GNOME Bugzilla – Bug 333039
merge some i18n strings
Last modified: 2010-04-02 11:07:54 UTC
I think all these strings should be merged in a single string "%d%%". #: ../calendar/gui/e-calendar-table.c:408 > > msgid "0%" > > msgstr "0%" > > > > #: ../calendar/gui/e-calendar-table.c:409 > > msgid "10%" > > msgstr "10%" > > > > #: ../calendar/gui/e-calendar-table.c:410 > > msgid "20%" > > msgstr "20%" > > > > #: ../calendar/gui/e-calendar-table.c:411 > > msgid "30%" > > msgstr "30%" > > > > #: ../calendar/gui/e-calendar-table.c:412 > > msgid "40%" > > msgstr "40%" > > > > #: ../calendar/gui/e-calendar-table.c:413 > > msgid "50%" > > msgstr "50%" > > > > #: ../calendar/gui/e-calendar-table.c:414 > > msgid "60%" > > msgstr "60%" > > > > #: ../calendar/gui/e-calendar-table.c:415 > > msgid "70%" > > msgstr "70%" > > > > #: ../calendar/gui/e-calendar-table.c:416 > > msgid "80%" > > msgstr "80%" > > > > #: ../calendar/gui/e-calendar-table.c:417 > > msgid "90%" > > msgstr "90%" > > > > #: ../calendar/gui/e-calendar-table.c:418 > > msgid "100%" > > msgstr "100%" Thanks.
i doubt if they should be translatable at all, don't know if there are languages that use another symbol for percent than "%" or perhaps "%100" instead of "100%". hmm.
There are languages that use different digits...
give us an example. See #334291
yeah... the farsi example. see bug 334291. :-)
then use %Id instead of %d, no ? Btw, should i open a bug against gtk+ because the progress bar should be translated like _("0%"), _("1%"), _("2%") ... _("100%") :)?
1st: hmm... right. 2nd: :-)
Created attachment 73552 [details] [review] Fixed.
A few things : - Please use /* xgettext: comment for translator */ instead. - Your patch breaks C89 compatibility. - use g_strdup_printf because your patch is broken. "100%" is 5 chars. And your patch assumes that every language uses at most N chars to translate it. And temp is a cryptic name for a loop var.
And it leaks each string :)
argh. yeah. bad patch.
Created attachment 73613 [details] [review] Resubmitting the patch.
(already discussed on irc, anyway) i don't have the feeling that "j" is a better var name. please use something descriptive. this still breaks C89. it is still assumed that every language only needs 5 chars to display "100%" - this is at least wrong for farsi. this still leaks each string.
+ buffer = (char *)malloc(sizeof(char)*5); + /* xgettext: "%d%%" is the percentage of task done(eg: 10%, 20%) */ + buffer = g_strdup_printf(_("%d%%"),j*10); now we have a double leak ... please be serious.
Created commit 31d42a5 in evo master (2.31.1+) Committed patch covers also few other related leaks.