After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 353981 - i18n mechanism for selecting localized or unlocalized week numbers does not work
i18n mechanism for selecting localized or unlocalized week numbers does not work
Status: RESOLVED FIXED
Product: l10n
Classification: Infrastructure
Component: Norwegian nynorsk [nn_NO]
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2006-09-02 15:52 UTC by Åsmund Skjæveland
Modified: 2008-01-08 15:52 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16



Description Åsmund Skjæveland 2006-09-02 15:52:11 UTC
Please describe the problem:
In the GTK+ PO file, the msgid "calendar:week:digits|%d" says to translate it to "%ld" if localized week numbers are desired, and "%d" if otherwise. Since the msgid is marked as c-format, however, translating %d to %ld is illegal, and this  mechansim doesn't work.

A solution would be to set the string to not be interpreted as c-format, or instead use string translations such as "LOCALIZED" and "NOT_LOCALIZED" instead.

Steps to reproduce:
1. Edit PO file for GTK+, locate msgid "calendar:week:digits|%d"
2. Translate to "%ld", as the translator comment says to do
3. Save PO file, run «msgfmt -cv xx.po» where xx.po is the edited PO file

Actual results:
nn.po:1176: format specifications in 'msgid' and 'msgstr' for argument 1 are not the same
msgfmt: found 1 fatal error

Expected results:
A message count for the PO file, no error message.

Does this happen every time?
Yes.

Other information:
msgfmt 0.14.5, Ubuntu 6.06, KBabel 1.11.2
Comment 1 Åsmund Skjæveland 2006-09-02 18:22:07 UTC
It appears I misread the translator comment. It says "%Id" (capital I, as in India), not "%ld" (lima delta).

However, the PO check that the GNOME CVS server does on every PO file produces an error on the "%Id" msgstr, complaining that this is not a valid C-format:

*************************************************
*** ERROR MESSAGE FROM Gnome Translation Team ***
*************************************************
You are trying to commit an invalid .po file!
Please verify it first with msgfmt. Any problems
please contact <gnome-i18n@gnome.org>.

nn.po:1169: 'msgstr' is not a valid C format string, unlike 'msgid'
nn.po:1185: 'msgstr' is not a valid C format string, unlike 'msgid'
msgfmt: found 2 fatal errors
cvs server: Pre-commit check failed
cvs [server aborted]: correct above errors first!

Therefore, the bug report remains valid.

Solution: Remove "c-format" label on msgid.
Comment 2 Behdad Esfahbod 2006-09-02 19:01:23 UTC
You need a newer version of gettext.
Comment 3 Behdad Esfahbod 2006-09-02 19:42:49 UTC
Ok, I missed the point that it's a CVS commit check.  In that case, what we've been doing is that Owen added an exception to the commit check to not check fa.po files because we use this format in fa.po and the gettext installed on the CVS server is too old.

You want the 'nn.po' to be added to the list of exceptions.
Comment 4 Behdad Esfahbod 2006-09-02 22:56:06 UTC
I also wonder, why do you need the localized digits?  Which digits does nn use?  Not Latin ones?
Comment 5 Åsmund Skjæveland 2006-09-02 23:20:24 UTC
I may have misunderstood again. I interpreted it as localized or non-localized week number counting.

I also assumed that if something is defined in the locale settings, it's sensible to default to the locale definitions if I'm not sure what to use.
Comment 6 Matthias Clasen 2006-09-02 23:46:59 UTC
the %Id is just for using non-arabic digits; I guess that is not really interesting for Norwegian...
Comment 7 Kjartan Maraas 2008-01-08 15:52:14 UTC
Closing this out.