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 360461 - Avoid markup in translatable messages
Avoid markup in translatable messages
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: general
2.8.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
evolution[nosip]
Depends on:
Blocks: 236276
 
 
Reported: 2006-10-07 18:54 UTC by Elijah Newren
Modified: 2010-04-23 09:21 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
patch for the markup for the translations (19.80 KB, patch)
2006-12-23 16:58 UTC, Gaëtan Podevijn
needs-work Details | Review
Simple patch for mail/em-filter-rule.c (747 bytes, patch)
2007-07-22 09:27 UTC, Gabor Kelemen
committed Details | Review
Simple patch for em-folder-view.c (709 bytes, patch)
2007-07-22 09:29 UTC, Gabor Kelemen
committed Details | Review
Patch for em-format-html.c (1015 bytes, patch)
2007-07-22 09:29 UTC, Gabor Kelemen
committed Details | Review
Patch for composer/e-msg-composer.c (812 bytes, patch)
2007-07-22 09:32 UTC, Gabor Kelemen
none Details | Review
Patch for plugins/ipod-sync/evolution-ipod-sync.c (2.43 KB, patch)
2007-07-22 09:34 UTC, Gabor Kelemen
committed Details | Review
Patch for plugins/groupwise-features/junk-mail-settings.c (1.01 KB, patch)
2007-07-22 09:35 UTC, Gabor Kelemen
committed Details | Review
Patch for plugins/groupwise-features/status-track.c (1.69 KB, patch)
2007-07-22 09:36 UTC, Gabor Kelemen
none Details | Review
Updated patch (1.66 KB, patch)
2007-07-24 00:08 UTC, Gabor Kelemen
committed Details | Review
Patch for plugins/itip-formatter/itip-view.c (15.15 KB, patch)
2007-07-24 00:12 UTC, Gabor Kelemen
needs-work Details | Review
Patch for plugins/itip-formatter/itip-view.c (15.15 KB, patch)
2007-07-24 00:22 UTC, Gabor Kelemen
rejected Details | Review
Patch for calendar/gui/e-itip-control.c (7.54 KB, patch)
2007-07-24 00:28 UTC, Gabor Kelemen
needs-work Details | Review
Patch for calendar/dialogs/comp-editor.c (757 bytes, patch)
2007-07-24 00:49 UTC, Gabor Kelemen
needs-work Details | Review
Updated patch for composer/e-msg-composer.c (1.24 KB, patch)
2007-07-24 01:00 UTC, Gabor Kelemen
needs-work Details | Review
evo patch (38.15 KB, patch)
2010-04-23 09:20 UTC, Milan Crha
committed Details | Review

Description Elijah Newren 2006-10-07 18:54:31 UTC
As translators often say, please don't include markup in translateable
messages. Move the markup outside of the gettext call.  See
http://developer.gnome.org/doc/tutorials/gnome-i18n/developer.html#avoid-markup

Affected messages (other than those from glade, since bug 97061 has to be fixed
first to handle those):

./evolution/calendar/gui/e-itip-control.c:	const_html = _("<br> Please review the following information, "
./evolution/calendar/gui/e-itip-control.c:		itip_desc = _("<b>%s</b> has published meeting information.");
./evolution/calendar/gui/e-itip-control.c:			itip_desc = _("<b>%s</b> requests the presence of %s at a meeting.");
./evolution/calendar/gui/e-itip-control.c:			itip_desc = _("<b>%s</b> requests your presence at a meeting.");
./evolution/calendar/gui/e-itip-control.c:		itip_desc = _("<b>%s</b> wishes to add to an existing meeting.");
./evolution/calendar/gui/e-itip-control.c:		itip_desc = _("<b>%s</b> wishes to receive the latest meeting information.");
./evolution/calendar/gui/e-itip-control.c:		itip_desc = _("<b>%s</b> has replied to a meeting request.");
./evolution/calendar/gui/e-itip-control.c:		itip_desc = _("<b>%s</b> has canceled a meeting.");
./evolution/calendar/gui/e-itip-control.c:		itip_desc = _("<b>%s</b> has sent an unintelligible message.");
./evolution/calendar/gui/e-itip-control.c:		itip_desc = _("<b>%s</b> has published task information.");
./evolution/calendar/gui/e-itip-control.c:			itip_desc = _("<b>%s</b> requests %s to perform a task.");
./evolution/calendar/gui/e-itip-control.c:			itip_desc = _("<b>%s</b> requests you perform a task.");
./evolution/calendar/gui/e-itip-control.c:		itip_desc = _("<b>%s</b> wishes to add to an existing task.");
./evolution/calendar/gui/e-itip-control.c:		itip_desc = _("<b>%s</b> wishes to receive the latest task information.");
./evolution/calendar/gui/e-itip-control.c:		itip_desc = _("<b>%s</b> has replied to a task assignment.");
./evolution/calendar/gui/e-itip-control.c:		itip_desc = _("<b>%s</b> has canceled a task.");
./evolution/calendar/gui/e-itip-control.c:		itip_desc = _("<b>%s</b> has sent an unintelligible message.");
./evolution/calendar/gui/e-itip-control.c:		itip_desc = _("<b>%s</b> has published free/busy information.");
./evolution/calendar/gui/e-itip-control.c:		itip_desc = _("<b>%s</b> requests your free/busy information.");
./evolution/calendar/gui/e-itip-control.c:		itip_desc = _("<b>%s</b> has replied to a free/busy request.");
./evolution/calendar/gui/e-itip-control.c:		itip_desc = _("<b>%s</b> has sent an unintelligible message.");
./evolution/composer/e-msg-composer.c:	set_editor_text (composer, _("<b>(The composer contains a non-text message body, which cannot be edited.)</b>"), -1, FALSE, FALSE);
./evolution/mail/em-filter-rule.c:	label = gtk_label_new(_("<b>Then</b>"));
./evolution/mail/em-format-html.c:				e_utf8_strftime(buf, sizeof(buf), _("<I> (%a, %R %Z)</I>"), &local);
./evolution/mail/em-format-html.c:				e_utf8_strftime(buf, sizeof(buf), _("<I> (%R %Z)</I>"), &local);
./evolution/plugins/groupwise-features/junk-mail-settings.c:	gtk_label_set_markup (GTK_LABEL (w), _("<b>Junk Mail Settings</b>"));
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> through %s has published the following meeting information:"), organizer, priv->sentby);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> has published the following meeting information:"), organizer);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> has delegated the following meeting to you:"), priv->delegator);
./evolution/plugins/itip-formatter/itip-view.c:				sender = g_strdup_printf (_("<b>%s</b> through %s requests your presence at the following meeting:"), organizer, priv->sentby);
./evolution/plugins/itip-formatter/itip-view.c:				sender = g_strdup_printf (_("<b>%s</b> requests your presence at the following meeting:"), organizer);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> through %s wishes to add to an existing meeting:"), organizer, priv->sentby);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> wishes to add to an existing meeting:"), organizer);
./evolution/plugins/itip-formatter/itip-view.c:		sender = g_strdup_printf (_("<b>%s</b> wishes to receive the latest information for the following meeting:"), attendee);
./evolution/plugins/itip-formatter/itip-view.c:		sender = g_strdup_printf (_("<b>%s</b> has sent back the following meeting response:"), attendee);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> through %s has canceled the following meeting:"), organizer, priv->sentby);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> has canceled the following meeting."), organizer);
./evolution/plugins/itip-formatter/itip-view.c:		sender = g_strdup_printf (_("<b>%s</b> has proposed the following meeting changes."), attendee);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> through %s has declined the following meeting changes:"), organizer, priv->sentby);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> has declined the following meeting changes."), organizer);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> through %s has published the following task:"), organizer, priv->sentby);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> has published the following task:"), organizer);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> requests the assignment of %s to the following task:"), organizer, priv->delegator);
./evolution/plugins/itip-formatter/itip-view.c:				sender = g_strdup_printf (_("<b>%s</b> through %s has assigned you a task:"), organizer, priv->sentby);
./evolution/plugins/itip-formatter/itip-view.c:				sender = g_strdup_printf (_("<b>%s</b> has assigned you a task:"), organizer);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> through %s wishes to add to an existing task:"), organizer, priv->sentby);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> wishes to add to an existing task:"), organizer);
./evolution/plugins/itip-formatter/itip-view.c:		sender = g_strdup_printf (_("<b>%s</b> wishes to receive the latest information for the following assigned task:"), attendee);
./evolution/plugins/itip-formatter/itip-view.c:		sender = g_strdup_printf (_("<b>%s</b> has sent back the following assigned task response:"), attendee);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> through %s has canceled the following assigned task:"), organizer, priv->sentby);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> has canceled the following assigned task:"), organizer);
./evolution/plugins/itip-formatter/itip-view.c:		sender = g_strdup_printf (_("<b>%s</b> has proposed the following task assignment changes:"), attendee);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> through %s has declined the following assigned task:"), organizer, priv->sentby);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> has declined the following assigned task:"), organizer);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> through %s has published the following memo:"), organizer, priv->sentby);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> has published the following memo:"), organizer);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> through %s wishes to add to an existing memo:"), organizer, priv->sentby);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> wishes to add to an existing memo:"), organizer);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> through %s has canceled the following shared memo:"), organizer, priv->sentby);
./evolution/plugins/itip-formatter/itip-view.c:			sender = g_strdup_printf (_("<b>%s</b> has canceled the following shared memo:"), organizer);
Comment 1 Gaëtan Podevijn 2006-12-23 16:58:02 UTC
Created attachment 78835 [details] [review]
patch for the markup for the translations
Comment 2 Gaëtan Podevijn 2006-12-23 17:00:07 UTC
Comment on attachment 78835 [details] [review]
patch for the markup for the translations

Here is the patch for the markup. I checked if it has no more errors. It's my third patch so any suggestions are welcome.
Comment 3 Alexander “weej” Jones 2006-12-30 17:43:56 UTC
Hi

" has declined the following meeting changes.", etc., are not complete sentences.

Tricky.
Comment 4 Srinivasa Ragavan 2007-06-04 18:49:36 UTC
Gaëtan Podevijn ,

I think your patch leaks memory. Can you rework and submit back?
Comment 5 Gabor Kelemen 2007-07-22 09:27:07 UTC
Created attachment 92149 [details] [review]
Simple patch for mail/em-filter-rule.c

I'll start creating per-file patches. Here are the first ones, let's see if they are ok.
Comment 6 Gabor Kelemen 2007-07-22 09:29:00 UTC
Created attachment 92150 [details] [review]
Simple patch for em-folder-view.c
Comment 7 Gabor Kelemen 2007-07-22 09:29:33 UTC
Created attachment 92151 [details] [review]
Patch for em-format-html.c
Comment 8 Gabor Kelemen 2007-07-22 09:32:37 UTC
Created attachment 92152 [details] [review]
Patch for composer/e-msg-composer.c
Comment 9 Gabor Kelemen 2007-07-22 09:34:57 UTC
Created attachment 92153 [details] [review]
Patch for plugins/ipod-sync/evolution-ipod-sync.c
Comment 10 Gabor Kelemen 2007-07-22 09:35:53 UTC
Created attachment 92154 [details] [review]
Patch for plugins/groupwise-features/junk-mail-settings.c
Comment 11 Gabor Kelemen 2007-07-22 09:36:33 UTC
Created attachment 92155 [details] [review]
Patch for plugins/groupwise-features/status-track.c
Comment 12 Gabor Kelemen 2007-07-24 00:08:15 UTC
Created attachment 92240 [details] [review]
Updated patch

Updated patch to make it actually compile
Comment 13 Gabor Kelemen 2007-07-24 00:12:42 UTC
Created attachment 92241 [details] [review]
Patch for plugins/itip-formatter/itip-view.c
Comment 14 Gabor Kelemen 2007-07-24 00:22:53 UTC
Created attachment 92242 [details] [review]
Patch for plugins/itip-formatter/itip-view.c
Comment 15 Gabor Kelemen 2007-07-24 00:28:47 UTC
Created attachment 92243 [details] [review]
Patch for calendar/gui/e-itip-control.c
Comment 16 Gabor Kelemen 2007-07-24 00:49:35 UTC
Created attachment 92244 [details] [review]
Patch for calendar/dialogs/comp-editor.c
Comment 17 Gabor Kelemen 2007-07-24 01:00:24 UTC
Created attachment 92245 [details] [review]
Updated patch for composer/e-msg-composer.c

One more markup string less. This is the last patch, no more markup should be left in c files.
Comment 18 Gabor Kelemen 2007-07-24 01:04:25 UTC
Rejecting a duplicated patch, sorry for the spam.
Comment 19 Srinivasa Ragavan 2007-07-25 18:10:22 UTC
gabor, most of the patches look fine. I will test it again and commit it.

The last two patches need rework. I dont think it prints the num_attachments at all.
Comment 20 Gabor Kelemen 2007-07-27 20:26:04 UTC
Thanks for the review. 
I see now that the plural forms patches are bad, but I have no idea how could be the messages translated properly, keeping the plurals and eliminating the markup. 

Until somebody comes up with a solution, could you review please the obsolete-marked e-msg-composer patch: http://bugzilla.gnome.org/attachment.cgi?id=92152

it's the same as the last one, without the bad plural fix.
Comment 21 Srinivasa Ragavan 2007-07-28 18:38:02 UTC
That part looks fine. 
Comment 22 Alexander “weej” Jones 2007-07-29 22:43:23 UTC
Simple. Don't eliminate the markup. Can we close this bug now? *ducks*
Comment 23 Alexander “weej” Jones 2007-07-29 22:45:08 UTC
In all seriousness, how are we supposed to do this reliably if, for some language, the markup in the string actually needs to be moved in the sentence? For example, highlighting verbs. It seems to me that translaters are simply gonna have to learn a little bit of Pango markup here and there to keep this sane.
Comment 24 Milan Crha 2007-07-30 07:54:52 UTC
I marked http://bugzilla.gnome.org/attachment.cgi?id=92241 as needs-work because it would be safer to test on values of priv->proxy, priv->delegator and so on, if not NULL, as is done before the usage now. Also you could create and use bolddelegator only when it is needed, in proper case. In the last definition of boldname you forget to g_free it.

And also http://bugzilla.gnome.org/attachment.cgi?id=92243 is marked as needs-work: "FIXME: this is ugly" something like "%%s" didn't work? Maybe with a comment for translators what it means.

All others marked committed are in trunk. Committed revision 33894.
Comment 25 Milan Crha 2008-03-11 18:01:33 UTC
Gabor, are you going to attach updated patches for 2.23.x, please? It will be nice to have this done. Thanks.
Comment 26 Milan Crha 2010-04-23 09:20:54 UTC
Created attachment 159399 [details] [review]
evo patch

for evolution;

Evo is clean now. Let's see for how long.
Comment 27 Milan Crha 2010-04-23 09:21:35 UTC
Created commit 91020b0 in evo master (2.31.1+)