GNOME Bugzilla – Bug 765778
unescaped soft hyphen in POT confuses translators
Last modified: 2018-01-18 02:02:02 UTC
There are a few soft hyphens in the POT, e.g. "Pri-va-cy" (substituted with normal hyphens). Translators with a Unicode-conforming editor will not be able to see such characters, hence they will not add soft hyphens for their languages accordingly. A comment should be added for such strings. If GNU gettext allows using escapes (msgcat -E) for only some of the messages, that would be even better. See also: https://github.com/vslavik/poedit/issues/269
> If GNU gettext.... https://savannah.gnu.org/bugs/index.php?47801
There's a translator comment for every one of those strings: https://git.gnome.org/browse/gnome-control-center/commit/?id=b3be07609a9bae43947ee3e59d8982a7715c9acf But gettext only took the last line. commit 5c10ce45b8f2902e71a36649b9d0a31ccff6dc0f Author: Bastien Nocera <hadess@hadess.net> Date: Thu Apr 28 23:36:30 2016 +0200 panels: Fix translators comments being truncated Commit b3be076 added soft hyphens along with a comment for translators to use those soft hyphens. Except that gettext would only grab the one line out of the four we wrote for translators to read. Put them all on the same line so that gettext actually extracts those. https://bugzilla.gnome.org/show_bug.cgi?id=765778
> There are a few soft hyphens in the POT Translators should not see such characters, because soft hyphens in the msgid strings are meant for *rendering* the untranslated English strings. They have no importance to the translator. > hence they will not add soft hyphens for their languages accordingly. If that is what you want to achieve, it is an invalid use of soft hyphens, because sometimes the English word consists only of one syllable, without the possibility to insert a soft hyphen. A translator comment is the right solution for this type of information. > Except that gettext would only grab the one line out of the four > we wrote for translators to read. Yes, you would have to repeat the prefix "# Translators:" on each of the lines.
>> Except that gettext would only grab the one line out of the four >> we wrote for translators to read. > Yes, you would have to repeat the prefix "# Translators:" on each of the lines. This doesn't seem to be the case in gettext doc: https://www.gnu.org/software/gettext/manual/gettext.html#Bug-Report-Address The handling of comments in GnuPG trustdb.c:uid_trust_string_fixed matches the gettext doc example.
>> Yes, you would have to repeat the prefix "# Translators:" on each of the >> lines. > This doesn't seem to be the case in gettext doc You're right. It was in xgettext version 0.10.40 that the prefix "# Translators:" has to appear on each line. This was corrected in the xgettext version 0.11.5, back in 2002. To convince yourself, use an extraction command such as $ xgettext -o - -k_ --add-comments="TRANSLATORS:" foo.c I conclude that the need for commit 5c10ce45b8f2902e71a36649b9d0a31ccff6dc0f must come from a GNOME specific tool, not from the GNU gettext tools.
> I conclude that the need for commit 5c10ce45b8f2902e71a36649b9d0a31ccff6dc0f > must come from a GNOME specific tool, not from the GNU gettext tools. Yes, this is an inittool thing. It seems that they are only matching a single line of comment in type_ini by doing /^(#(.+)\n)?^_[A-Za-z0-9\-]+\s*=\s*(.*)$/mg. I have added a comment to https://bugs.launchpad.net/intltool/+bug/410972.