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 333039 - merge some i18n strings
merge some i18n strings
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Calendar
2.8.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-calendar-maintainers
Evolution QA team
Depends on:
Blocks: 236276
 
 
Reported: 2006-03-01 19:59 UTC by Benoît Dejean
Modified: 2010-04-02 11:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixed. (1.95 KB, patch)
2006-09-28 11:48 UTC, ushveen kaur
needs-work Details | Review
Resubmitting the patch. (1.94 KB, patch)
2006-09-29 07:06 UTC, ushveen kaur
needs-work Details | Review

Description Benoît Dejean 2006-03-01 19:59:47 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.
Comment 1 André Klapper 2006-03-01 21:12:02 UTC
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.
Comment 2 Karsten Bräckelmann 2006-03-01 23:46:52 UTC
There are languages that use different digits...
Comment 3 Benoît Dejean 2006-03-13 14:50:58 UTC
give us an example. See #334291
Comment 4 André Klapper 2006-04-18 11:57:08 UTC
yeah... the farsi example. see bug 334291. :-)
Comment 5 Benoît Dejean 2006-04-18 17:27:56 UTC
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%")  :)?
Comment 6 André Klapper 2006-04-18 18:43:57 UTC
1st: hmm... right.
2nd: :-)
Comment 7 ushveen kaur 2006-09-28 11:48:58 UTC
Created attachment 73552 [details] [review]
Fixed.
Comment 8 Benoît Dejean 2006-09-28 12:35:26 UTC
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.
Comment 9 Benoît Dejean 2006-09-28 12:39:29 UTC
And it leaks each string :)
Comment 10 André Klapper 2006-09-28 12:48:36 UTC
argh. yeah. bad patch.
Comment 11 ushveen kaur 2006-09-29 07:06:00 UTC
Created attachment 73613 [details] [review]
Resubmitting the patch.
Comment 12 André Klapper 2006-09-29 12:48:17 UTC
(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.
Comment 13 Benoît Dejean 2006-09-29 17:30:19 UTC
+		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.
Comment 14 Milan Crha 2010-04-02 11:07:54 UTC
Created commit 31d42a5 in evo master (2.31.1+)

Committed patch covers also few other related leaks.