GNOME Bugzilla – Bug 99867
Remove unnecessary markup from glade messages in rhythmbox
Last modified: 2004-12-22 21:47:04 UTC
#: data/glade/preferences.glade.h:2 msgid "<b>Browser Views</b>" #: data/glade/preferences.glade.h:3 msgid "<span weight=\"bold\">Appearance</span>" #: data/glade/preferences.glade.h:4 msgid "<span weight=\"bold\">Visible Columns</span>" #: data/glade/song-info.glade.h:3 msgid "<span weight=\"bold\">Duration: </span>" #: data/glade/song-info.glade.h:4 msgid "<span weight=\"bold\">Encoding:</span>" #: data/glade/song-info.glade.h:5 msgid "<span weight=\"bold\">Last played: </span>" #: data/glade/song-info.glade.h:6 msgid "<span weight=\"bold\">Location: </span>" #: data/glade/song-info.glade.h:7 msgid "<span weight=\"bold\">Name:</span>" #: data/glade/song-info.glade.h:8 msgid "<span weight=\"bold\">Play count: </span>" #: data/glade/song-info.glade.h:9 msgid "<span weight=\"bold\">Quality:</span>" #: data/glade/song-info.glade.h:10 msgid "<span weight=\"bold\">_Album:</span>" #: data/glade/song-info.glade.h:11 msgid "<span weight=\"bold\">_Artist:</span>" #: data/glade/song-info.glade.h:12 msgid "<span weight=\"bold\">_Comments:</span>" #: data/glade/song-info.glade.h:13 msgid "<span weight=\"bold\">_Date:</span>" #: data/glade/song-info.glade.h:14 msgid "<span weight=\"bold\">_Genre:</span>" #: data/glade/song-info.glade.h:15 msgid "<span weight=\"bold\">_Rating:</span>" #: data/glade/song-info.glade.h:16 msgid "<span weight=\"bold\">_Title:</span>" #: data/glade/song-info.glade.h:17 msgid "<span weight=\"bold\">_Track number:</span>" #: data/glade/toolbar-editor.glade.h:1 msgid "<b>Cu_rrent Controls</b>" #: data/glade/toolbar-editor.glade.h:2 msgid "<b>_Available Controls</b>" This use of markup inside messages marked for translation is totally unnecessary, and a problem for the translation process. For details, see the problem description in bug 96836. Since these are glade messages, I'll mark it dependant on the glade bug 97061 in the mean time.
This bug is fixed in CVS.
#: data/glade/buffering-dialog.glade.h:1 msgid "<b>Loading...</b>" #: data/glade/general-prefs.glade.h:2 msgid "<span weight=\"bold\">Visible Columns</span>" #: data/glade/library-prefs.glade.h:2 msgid "<b>Browser Views</b>" #: data/glade/song-info.glade.h:3 msgid "<b>Duration:</b>" #: data/glade/song-info.glade.h:4 msgid "<b>Encoding:</b>" #: data/glade/song-info.glade.h:5 msgid "<b>Last played:</b>" #: data/glade/song-info.glade.h:6 msgid "<b>Location:</b>" #: data/glade/song-info.glade.h:7 msgid "<b>Name:</b>" #: data/glade/song-info.glade.h:8 msgid "<b>Play count:</b>" #: data/glade/song-info.glade.h:9 msgid "<b>Quality:</b>" #: data/glade/song-info.glade.h:10 msgid "<b>_Album:</b>" #: data/glade/song-info.glade.h:11 msgid "<b>_Artist:</b>" #: data/glade/song-info.glade.h:12 msgid "<b>_Comments:</b>" #: data/glade/song-info.glade.h:13 msgid "<b>_Date:</b>" #: data/glade/song-info.glade.h:14 msgid "<b>_Genre:</b>" #: data/glade/song-info.glade.h:15 msgid "<b>_Rating:</b>" #: data/glade/song-info.glade.h:16 msgid "<b>_Title:</b>" #: data/glade/song-info.glade.h:17 msgid "<b>_Track number:</b>" Sorry, this doesn't seem to be fixed.
Sorry about that; I had grepped for '<b>' in the glade file, but since it was encoded as <b> I didn't see it. I fixed the buffering dialog one, still have to fix the rest...
Ok, now I think we've got all of them. Let me know if we missed something...
It's not fixed, there are strings to fix, I was looking those ones to fix them myself, but I don't know how should I fix them without losing context, Christian ideas? #: sources/rb-group-source.c:547 sources/rb-library-source.c:825 #, c-format msgid "<b>%.1f</b> days (%ld songs)" msgstr "" #: sources/rb-group-source.c:550 sources/rb-library-source.c:828 #, c-format msgid "<b>%ld</b> hours and <b>%ld</b> minutes (%ld songs)" msgstr "" #: sources/rb-group-source.c:553 sources/rb-library-source.c:831 #, c-format msgid "<b>%ld</b> minutes (%ld songs)" msgstr "" #: sources/rb-iradio-source.c:487 #, c-format msgid "<b>%d</b> total stations in <b>%d</b> distinct genres" msgstr ""
In the other cases, the pango markup could fairly easily be added at runtime, because we could simply cover the whole string. In this case however, only parts of the strings are covered, I am not aware of an alternative other than using pango markup directly in the strings. Unless you are aware of another alternative, I think we can mark this bug as fixed...
If we don't lose any context spliting of strings, we could do something like that: label = glade_xml_get_widget (xml, "comments_label"); str_final = g_strdup_printf ("<b>%s</b>", gtk_label_get_label (label)); gtk_label_set_markup_with_mnemonic (label, str_final); g_free (str_final); It's the way I'm just coding to fix the pango markup with the song-info.glade file (my previous fix didn't work, because you cannot mix pango functions with key accels and the bold attr was not been using). For example we could fix one of those strins: str_final = g_strdup_printf ("<b>%s</b> %s", _("%.1f"), _("days (%ld songs")) and use str_final where we have now the full string. P.S.: I'm changing last bits about song-info.glade now and it really works now, I will commit it in five minutes or so.
This would be awkward for languages which have to rearrange things, no? For example in Hebrew wouldn't you want to move the (%ld songs) to be first?
Yes, that's why I didn't fix it already, because we can lose translation context.
I think this has been fixed now, I don't see other messages using all markup now.