Re: broken strings in localization (was: How to run git-gui always in English?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Johannes Schindelin <Johannes.Schindelin@xxxxxx>:
Note that the msgstr-translation has not been changed yet - this can
only be done by a human. For that reason, the update inserted the
"fuzzy" marker. Here's where the error came in: All strings marked as
"fuzzy" MUST NOT BE USED by msgfmt! And git-gui's script po2msg.sh
doesn't adhere to this rule. Boo, that's why such erroneous translations
made it into the msgcat catalog.

My bad.  I thought I handled that, but obviously I did not.  Will fix.

Patch looks good.

Note that "msgfmt" with the "-c" option still does more checking and should probably be enabled by default. Currently I can use the "-c" option by running make MSGFMT="msgfmt -c". We can just call msgfmt always with the option -c (it was added in gettext-0.10.35 in 1998) so that Shawn or everyone else gets immediate notice if there is a format string problem in the file.

@nanako3: In particular, with the current git-gui.git master msgfmt will complain about an error in ja.po, which is a rather tricky one. (All the rest is fine.) The fix looks as follows (ignoring the non-european characters):

diff --git a/po/ja.po b/po/ja.po
index f65e460..2713c9e 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -1781,3 +1781,3 @@ msgstr "??????????:"
 msgid "%s ... %*i of %*i %s (%3i%%)"
-msgstr "%1$s ... %3$*i %4$s ?? %$2*i (%5$3i%%)"
+msgstr "%1$s ... %4$*i %6$s ?? %2$*i (%7$3i%%)"

Two errors: The easy one #1 is the confused '$' and '2' - the format string in the middle should start with '%2$'. The difficult one #2 is that one has to know that a format specification with a '*' (asterisk) suddenly refers to *two* arguments instead of one, hence the suceeding argument number is two higher instead of one. This way, the argument numbers count up to 7.

Regards,

Christian
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux