GNOME Bugzilla – Bug 162807
Please don't include markup in yelp message
Last modified: 2006-01-07 22:38:53 UTC
#: src/yelp-bookmarks.c:248 src/yelp-bookmarks.c:319 #, c-format msgid "A bookmark titled <b>%s</b> already exists for this page." Please move the markup outside of the gettext call and into the %s; there's no reason that translators should have to translate the markup.
That would be really annoying to have to do. gtk_message_dialog_new_with_markup takes a format string and arguments, and it conveniently escapes brackets and stuff in the arguments. If I took the markup out of the string, I would have to do take the title, escape the markup characters, put it in a format string like "<b>%s</b>", put that in a translated format string, escape any extra % characters, and pass that off to gtk_message_dialog_new_with_markup with no extra arguments. That's an incredible pain in the ass. If we can't put markup in translatable strings, then gtk_message_dialog_new_with_markup is effectively useless for any i18n-ized program.
CC:ing danilo and cneumair to get their opinions on this.
I don't think having to translate stuff like <b>This is a label</b> is a problem. The ones I have problems with are strings like <span size=\"larger\" weight=\"bold\">This is a string</span> and more complicated stuff like this.
I am closing this. If someone feels strongly about this, please re-open.
I do. If the markup shouldn't be translated, it shouldn't be marked for translation.
Confirming, updating version.
Created attachment 56912 [details] [review] Proposed (untested) patch My toolchain is currently broken, so I can't test this patch.
Err that patch isn't equivalent to the current code, you put <b> around everything while we just want it on the bmk title. Maybe you could do what epiphany does in these cases and just quote (curly quotes) the bmk title instead of making it bold? I.e. just change the string to ("A bookmark titled “%s” already exists for this page") [no period!] and use gtk_message_dialog_new, not _with_markup.
smitten chpe: I don't understand your response on 162807 chpe and the gnome web browser has no quit too :) smitten I don't see how it's not equivalent chpe hmm chpe you're right I'm wrong chpe (I still like the quotes better though) chpe (than bold) smitten I like bold. smitten shaunm: what's your opinion ? hehe smitten "but if you have an existing Pango markup string that you want to use literally as the label, then you need to use gtk_message_dialog_set_markup() instead, since you can't pass the markup string either as the format (it might contain '%' characters) or as a string argument." shaunm right smitten so Manny's patch is right. shaunm see, when I was looking at it before, I was thinking of constructing the string and passing it to new_with_markup shaunm which, of course, presented exactly that problem smitten yep smitten i'll apply the patch, make sure it works, and commit shaunm yeah, fine, commit it Committed, string change announcement made to gnome-doc-list@gnome.org
Thanks everyone.