'~*' in format strings confuses 'msgfmt' (Gettext)

  • Done
  • quality assurance status badge
Details
4 participants
  • Danny Milosavljevic
  • Jonathan Brielmaier
  • Konrad Hinsen
  • Ludovic Courtès
Owner
unassigned
Submitted by
Konrad Hinsen
Severity
normal
K
K
Konrad Hinsen wrote on 24 Sep 2019 18:11
"make check" fails on a fresh Guix checkout
(address . bug-guix@gnu.org)
m1ef05n088.fsf@fastmail.net
Hi everyone,

on a fresh checkout of today's Guix master branch (commit
b150e83bef766ca67a3931afce36b6cb6c7f8c10), "make check" fails due to problems
with the po files. Log below.

Konrad.

GEN doc/os-config-bare-bones.texi
GEN doc/os-config-desktop.texi
GEN doc/os-config-lightweight-desktop.texi
PO4A doc/contributing.de.texi
Your input po file po/doc/guix-manual.de.po seems outdated (The amount of entries differ between files: 7994 is not 228
). Please consider running po4a-updatepo to refresh it.
POXREF doc/contributing.de.texi
mv "doc/contributing.de.texi.tmp" "doc/contributing.de.texi"
PO4A doc/guix.de.texi
Your input po file po/doc/guix-manual.de.po seems outdated (The amount of entries differ between files: 7994 is not 8111
). Please consider running po4a-updatepo to refresh it.
sed -i "s|guix\.info|$(basename "doc/guix.de.texi" | sed 's|texi$|info|')|" "doc/guix.de.texi.tmp"
echo 'org_babel_sh_eoe'
POXREF doc/guix.de.texi
mv "doc/guix.de.texi.tmp" "doc/guix.de.texi"
PO4A doc/contributing.es.texi
Your input po file po/doc/guix-manual.es.po seems outdated (The amount of entries differ between files: 7994 is not 228
). Please consider running po4a-updatepo to refresh it.
POXREF doc/contributing.es.texi
mv "doc/contributing.es.texi.tmp" "doc/contributing.es.texi"
PO4A doc/guix.es.texi
Your input po file po/doc/guix-manual.es.po seems outdated (The amount of entries differ between files: 7994 is not 8111
). Please consider running po4a-updatepo to refresh it.
sed -i "s|guix\.info|$(basename "doc/guix.es.texi" | sed 's|texi$|info|')|" "doc/guix.es.texi.tmp"
POXREF doc/guix.es.texi
mv "doc/guix.es.texi.tmp" "doc/guix.es.texi"
PO4A doc/contributing.fr.texi
Your input po file po/doc/guix-manual.fr.po seems outdated (The amount of entries differ between files: 7994 is not 228
). Please consider running po4a-updatepo to refresh it.
POXREF doc/contributing.fr.texi
mv "doc/contributing.fr.texi.tmp" "doc/contributing.fr.texi"
PO4A doc/guix.fr.texi
Your input po file po/doc/guix-manual.fr.po seems outdated (The amount of entries differ between files: 7994 is not 8111
). Please consider running po4a-updatepo to refresh it.
sed -i "s|guix\.info|$(basename "doc/guix.fr.texi" | sed 's|texi$|info|')|" "doc/guix.fr.texi.tmp"
POXREF doc/guix.fr.texi
mv "doc/guix.fr.texi.tmp" "doc/guix.fr.texi"
PO4A doc/contributing.ru.texi
Your input po file po/doc/guix-manual.ru.po seems outdated (The amount of entries differ between files: 7994 is not 228
). Please consider running po4a-updatepo to refresh it.
POXREF doc/contributing.ru.texi
mv "doc/contributing.ru.texi.tmp" "doc/contributing.ru.texi"
PO4A doc/guix.ru.texi
Your input po file po/doc/guix-manual.ru.po seems outdated (The amount of entries differ between files: 7994 is not 8111
). Please consider running po4a-updatepo to refresh it.
sed -i "s|guix\.info|$(basename "doc/guix.ru.texi" | sed 's|texi$|info|')|" "doc/guix.ru.texi.tmp"
POXREF doc/guix.ru.texi
mv "doc/guix.ru.texi.tmp" "doc/guix.ru.texi"
PO4A doc/contributing.zh_CN.texi
Your input po file po/doc/guix-manual.zh_CN.po seems outdated (The amount of entries differ between files: 7994 is not 228
). Please consider running po4a-updatepo to refresh it.
POXREF doc/contributing.zh_CN.texi
mv "doc/contributing.zh_CN.texi.tmp" "doc/contributing.zh_CN.texi"
PO4A doc/guix.zh_CN.texi
Your input po file po/doc/guix-manual.zh_CN.po seems outdated (The amount of entries differ between files: 7994 is not 8111
). Please consider running po4a-updatepo to refresh it.
sed -i "s|guix\.info|$(basename "doc/guix.zh_CN.texi" | sed 's|texi$|info|')|" "doc/guix.zh_CN.texi.tmp"
POXREF doc/guix.zh_CN.texi
mv "doc/guix.zh_CN.texi.tmp" "doc/guix.zh_CN.texi"
GEN nix/libstore/schema.sql.hh
echo 1.0.1.3746-b150e > ".version-t" && mv ".version-t" ".version"
make check-recursive
make[1]: Entering directory '/home/hinsen/guix-from-source/guix'
Making check in po/guix
make[2]: Entering directory '/home/hinsen/guix-from-source/guix/po/guix'
make guix.pot-update
make[3]: Entering directory '/home/hinsen/guix-from-source/guix/po/guix'
sed -e '/^#/d' remove-potcdate.sin > t-remove-potcdate.sed
mv t-remove-potcdate.sed remove-potcdate.sed
if LC_ALL=C grep 'GNU guix' ../../* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \
package_gnu='GNU '; \
else \
package_gnu=''; \
fi; \
if test -n 'ludo@gnu.org' || test 'bug-guix@gnu.org' = '@'PACKAGE_BUGREPORT'@'; then \
msgid_bugs_address='ludo@gnu.org'; \
else \
msgid_bugs_address='bug-guix@gnu.org'; \
fi; \
case `/gnu/store/6z2rl8vrbcghvwcjdcf740b8l2cgx25a-profile/bin/xgettext --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
/gnu/store/6z2rl8vrbcghvwcjdcf740b8l2cgx25a-profile/bin/xgettext --default-domain=guix --directory=../.. \
--add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=G_ --keyword=N_:1,2 --keyword=message --keyword=description --keyword=n_ \
--files-from=./POTFILES.in \
--copyright-holder='Ludovic Courtès' \
--msgid-bugs-address="$msgid_bugs_address" \
;; \
*) \
/gnu/store/6z2rl8vrbcghvwcjdcf740b8l2cgx25a-profile/bin/xgettext --default-domain=guix --directory=../.. \
--add-comments=TRANSLATORS: --from-code=UTF-8 --keyword=G_ --keyword=N_:1,2 --keyword=message --keyword=description --keyword=n_ \
--files-from=./POTFILES.in \
--copyright-holder='Ludovic Courtès' \
--package-name="${package_gnu}guix" \
--package-version='1.0.1.3746-b150e' \
--msgid-bugs-address="$msgid_bugs_address" \
;; \
esac
test ! -f guix.po || { \
if test -f ./guix.pot; then \
sed -f remove-potcdate.sed < ./guix.pot > guix.1po && \
sed -f remove-potcdate.sed < guix.po > guix.2po && \
if cmp guix.1po guix.2po >/dev/null 2>&1; then \
rm -f guix.1po guix.2po guix.po; \
else \
rm -f guix.1po guix.2po ./guix.pot && \
mv guix.po ./guix.pot; \
fi; \
else \
mv guix.po ./guix.pot; \
fi; \
}
make[3]: Leaving directory '/home/hinsen/guix-from-source/guix/po/guix'
test ! -f ./guix.pot || \
test -z "cs.gmo da.gmo de.gmo en@boldquot.gmo en@quot.gmo eo.gmo es.gmo fr.gmo hu.gmo pl.gmo pt_BR.gmo sr.gmo sv.gmo vi.gmo zh_CN.gmo" || make cs.gmo da.gmo de.gmo en@boldquot.gmo en@quot.gmo eo.gmo es.gmo fr.gmo hu.gmo pl.gmo pt_BR.gmo sr.gmo sv.gmo vi.gmo zh_CN.gmo
make[3]: Entering directory '/home/hinsen/guix-from-source/guix/po/guix'
/gnu/store/6z2rl8vrbcghvwcjdcf740b8l2cgx25a-profile/bin/msgmerge --update --lang=cs cs.po guix.pot
................................................................................................................................................................................................................................ done.
rm -f cs.gmo && /gnu/store/6z2rl8vrbcghvwcjdcf740b8l2cgx25a-profile/bin/msgfmt -c --statistics --verbose -o cs.gmo cs.po
cs.po: 60 translated messages, 120 fuzzy translations, 735 untranslated messages.
/gnu/store/6z2rl8vrbcghvwcjdcf740b8l2cgx25a-profile/bin/msgmerge --update --lang=da da.po guix.pot
.................................................................................................................................... done.
rm -f da.gmo && /gnu/store/6z2rl8vrbcghvwcjdcf740b8l2cgx25a-profile/bin/msgfmt -c --statistics --verbose -o da.gmo da.po
da.po: 741 translated messages, 52 fuzzy translations, 122 untranslated messages.
/gnu/store/6z2rl8vrbcghvwcjdcf740b8l2cgx25a-profile/bin/msgmerge --update --lang=de de.po guix.pot
........................................................................................................................................ done.
rm -f de.gmo && /gnu/store/6z2rl8vrbcghvwcjdcf740b8l2cgx25a-profile/bin/msgfmt -c --statistics --verbose -o de.gmo de.po
de.po: 853 translated messages, 36 fuzzy translations, 26 untranslated messages.
make[4]: Entering directory '/home/hinsen/guix-from-source/guix/po/guix'
make en@boldquot.po-update
make[5]: Entering directory '/home/hinsen/guix-from-source/guix/po/guix'
sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' ./insert-header.sin > en@boldquot.insert-header
en@boldquot:
en@boldquot:
msgmerge --lang=en@boldquot en@boldquot.po guix.pot -o en@boldquot.new.po
............................................................................................... done.
make[5]: Leaving directory '/home/hinsen/guix-from-source/guix/po/guix'
make[4]: Leaving directory '/home/hinsen/guix-from-source/guix/po/guix'
rm -f en@boldquot.gmo && /gnu/store/6z2rl8vrbcghvwcjdcf740b8l2cgx25a-profile/bin/msgfmt -c --statistics --verbose -o en@boldquot.gmo en@boldquot.po
en@boldquot.po:2849: format specifications in 'msgstr[0]' are not a subset of those in 'msgid_plural'
en@boldquot.po:2856: format specifications in 'msgstr[0]' are not a subset of those in 'msgid_plural'
/gnu/store/6z2rl8vrbcghvwcjdcf740b8l2cgx25a-profile/bin/msgfmt: found 2 fatal errors
en@boldquot.po: 915 translated messages.
make[3]: *** [Makefile:201: en@boldquot.gmo] Error 1
make[3]: Leaving directory '/home/hinsen/guix-from-source/guix/po/guix'
make[2]: *** [Makefile:238: stamp-po] Error 2
make[2]: Leaving directory '/home/hinsen/guix-from-source/guix/po/guix'
make[1]: *** [Makefile:4866: check-recursive] Error 1
make[1]: Leaving directory '/home/hinsen/guix-from-source/guix'
make: *** [Makefile:5334: check] Error 2
D
D
Danny Milosavljevic wrote on 24 Sep 2019 23:09
(name . Konrad Hinsen)(address . konrad.hinsen@fastmail.net)(address . 37505@debbugs.gnu.org)
20190924230934.0b97be54@scratchpost.org
Yeah, "make" itself fails, too, see bug #37491.

I'm not that knowledgeable with po strings but I think it added a
msgstr that's broken in that the number of format string parts is
different from msgid_plural.

I've edited po/guix/en@quot.po and po/guix/en@boldquot.po (which "git log"
doesn't work on) in order to work around the problem, something like

#: guix/scripts/pull.scm:307
#, scheme-format
msgid " ~*One new channel:~%"
msgid_plural " ~a new channels:~%"
msgstr[0] "" <---- edited
msgstr[1] "" <---- edited

but since I have no idea of what I'm doing there I've not committed it.

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl2Khg4ACgkQ5xo1VCww
uqXTugf/W9o0vQc+QWL7NKjkjHSzYACu/lyPkBNcFq1Xz4f6+HNtEdQnNPU9jbGU
8czkbvQ5K/C2S2pP0prl/wgp9WrlohmEFNPVfPJ5duXBdPgYVIe4Vogk7/9G58YT
nE7xrk5FkGa9lJtOwifYqIhu+53nBi00b4UQNYODc49rhRtsmAIhhFq51S9UQz8K
d5Mqq3o65RJAYmFeZJBLxHSx/bKGr6R7cSOsV4t6WpYg6w0dTT9Ys7BIS5I3ehoF
wlU5Aa2VrVZ1AUB9Ij+8KHcgnFzTaliF2Do1aOB7A/fPdqy+pnajlJYJONEscDB4
nvM5rF3eEoXFuKFCHoJXKDF5jNeEMA==
=Wry0
-----END PGP SIGNATURE-----


J
J
Jonathan Brielmaier wrote on 25 Sep 2019 18:22
"make check" fails on a fresh Guix checkout
(address . 37505@debbugs.gnu.org)
57a231e2-3dbb-a2ab-e075-bd2a3d5ea173@web.de
The following diff mitigates this build failure for me:

Toggle diff (22 lines)
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 0372278705..04970cf503 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -304,7 +304,7 @@ to display."
(new
(let ((count (length new)))
(format (current-error-port)
- (N_ " ~*One new channel:~%"
+ (N_ " ~a new channel:~%"
" ~a new channels:~%" count)
count)
(for-each display-channel new))))
@@ -314,7 +314,7 @@ to display."
(removed
(let ((count (length removed)))
(format (current-error-port)
- (N_ " ~*One channel removed:~%"
+ (N_ " ~a channel removed:~%"
" ~a channels removed:~%" count)
count)
(for-each display-channel removed))))
L
L
Ludovic Courtès wrote on 1 Oct 2019 11:31
control message for bug #37505
(address . control@debbugs.gnu.org)
87eezwrev5.fsf@gnu.org
retitle 37505 '~*' in format strings confuses 'msgfmt' (Gettext)
quit
L
L
Ludovic Courtès wrote on 1 Oct 2019 11:32
Re: bug#37505: "make check" fails on a fresh Guix checkout
(name . Konrad Hinsen)(address . konrad.hinsen@fastmail.net)(address . 37505-done@debbugs.gnu.org)
87a7akreuf.fsf@gnu.org
Hello,

Konrad Hinsen <konrad.hinsen@fastmail.net> skribis:

Toggle quote (4 lines)
> en@boldquot.po:2849: format specifications in 'msgstr[0]' are not a subset of those in 'msgid_plural'
> en@boldquot.po:2856: format specifications in 'msgstr[0]' are not a subset of those in 'msgid_plural'
> /gnu/store/6z2rl8vrbcghvwcjdcf740b8l2cgx25a-profile/bin/msgfmt: found 2 fatal errors

Fixed in 43f7fd8783af1e824904a76115a8ae8ccbb19f06, thanks!

Ludo'.
Closed
K
K
Konrad Hinsen wrote on 1 Oct 2019 12:50
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 37505-done@debbugs.gnu.org)
m1sgocyc29.fsf@fastmail.net
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (8 lines)
> Konrad Hinsen <konrad.hinsen@fastmail.net> skribis:
>
>> en@boldquot.po:2849: format specifications in 'msgstr[0]' are not a subset of those in 'msgid_plural'
>> en@boldquot.po:2856: format specifications in 'msgstr[0]' are not a subset of those in 'msgid_plural'
>> /gnu/store/6z2rl8vrbcghvwcjdcf740b8l2cgx25a-profile/bin/msgfmt: found 2 fatal errors
>
> Fixed in 43f7fd8783af1e824904a76115a8ae8ccbb19f06, thanks!

Thanks!

Unfortunately, a very similar error still blocks compiling a fresh Guix
checkout:

make[5]: Entering directory '/home/hinsen/guix/guix/po/guix'
sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' ./insert-header.sin > en@boldquot.insert-header
en@boldquot:
en@boldquot:
msgmerge --lang=en@boldquot en@boldquot.po guix.pot -o en@boldquot.new.po
............................................................................................ done.
make[5]: Leaving directory '/home/hinsen/guix/guix/po/guix'
make[4]: Leaving directory '/home/hinsen/guix/guix/po/guix'
rm -f en@boldquot.gmo && /gnu/store/6z2rl8vrbcghvwcjdcf740b8l2cgx25a-profile/bin/msgfmt -c --statistics --verbose -o en@boldquot.gmo en@boldquot.po
en@boldquot.po:2864: format specifications in 'msgstr[0]' are not a subset of those in 'msgid_plural'
/gnu/store/6z2rl8vrbcghvwcjdcf740b8l2cgx25a-profile/bin/msgfmt: found 1 fatal error

Cheers,
Konrad.
Closed
K
K
Konrad Hinsen wrote on 1 Oct 2019 12:59
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 37505-done@debbugs.gnu.org)
m1pnjgybn3.fsf@fastmail.net
Konrad Hinsen <konrad.hinsen@fastmail.net> writes:

Toggle quote (3 lines)
> Unfortunately, a very similar error still blocks compiling a fresh Guix
> checkout:

Sorry, false alarm. I have been typing in the wrong terminal window.
Too many Guix installations in my life ;-)

Konrad.
Closed
K
K
Konrad Hinsen wrote on 1 Oct 2019 17:11
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 37505-done@debbugs.gnu.org)
m1ftkcxzyq.fsf@fastmail.net
Konrad Hinsen <konrad.hinsen@fastmail.net> writes:

Toggle quote (7 lines)
> Konrad Hinsen <konrad.hinsen@fastmail.net> writes:
>
>> Unfortunately, a very similar error still blocks compiling a fresh Guix
>> checkout:
>
> Sorry, false alarm. I have been typing in the wrong terminal window.

OK, I triple-checked: there still is a problem. There are two places in
pull.scm that used '~*'. The attached patch removes the second one.

Konrad.
From 370579d7ac4e01fd66bdf4518d31f7d3bc17a65a Mon Sep 17 00:00:00 2001
From: Konrad Hinsen <konrad.hinsen@fastmail.net>
Date: Tue, 1 Oct 2019 17:06:58 +0200
Subject: [PATCH] pull: Do not use '~*', which 'msgfmt' fails to interpret.

---
guix/scripts/pull.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index e018985469..04970cf503 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -314,7 +314,7 @@ to display."
(removed
(let ((count (length removed)))
(format (current-error-port)
- (N_ " ~*One channel removed:~%"
+ (N_ " ~a channel removed:~%"
" ~a channels removed:~%" count)
count)
(for-each display-channel removed))))
--
2.23.0
Closed
L
L
Ludovic Courtès wrote on 1 Oct 2019 23:04
(name . Konrad Hinsen)(address . konrad.hinsen@fastmail.net)(address . 37505-done@debbugs.gnu.org)
87imp8kwj9.fsf@gnu.org
Hello!

Konrad Hinsen <konrad.hinsen@fastmail.net> skribis:

Toggle quote (3 lines)
> OK, I triple-checked: there still is a problem. There are two places in
> pull.scm that used '~*'. The attached patch removes the second one.

Oops, my bad.

Toggle quote (7 lines)
> From 370579d7ac4e01fd66bdf4518d31f7d3bc17a65a Mon Sep 17 00:00:00 2001
> From: Konrad Hinsen <konrad.hinsen@fastmail.net>
> Date: Tue, 1 Oct 2019 17:06:58 +0200
> Subject: [PATCH] pull: Do not use '~*', which 'msgfmt' fails to interpret.
>
> Really fixes <https://bugs.gnu.org/37505>.

Applied, thanks!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 37505@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 37505
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch