GNOME Bugzilla – Bug 101596
Unnecessary markup in gnome-panel (requires glade fix)
Last modified: 2012-08-06 12:23:06 UTC
#: gnome-panel/gnome-panel-screenshot.glade.h:2 msgid "<b>Options</b>" #: gnome-panel/gnome-panel-screenshot.glade.h:3 msgid "<b>Preview</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.
#: applets/fish/fish.glade.h:3 msgid "<b>Animation</b>" #: applets/fish/fish.glade.h:4 msgid "<b>General</b>" #: applets/wncklet/window-list.glade.h:2 msgid "<b>Restoring Minimized Windows</b>" #: applets/wncklet/window-list.glade.h:3 msgid "<b>Window Grouping</b>" #: applets/wncklet/window-list.glade.h:4 msgid "<b>Window List Content</b>" #: applets/wncklet/window-list.glade.h:5 msgid "<b>Window List Size</b>" #: applets/wncklet/workspace-switcher.glade.h:2 msgid "<b>Switcher</b>" #: applets/wncklet/workspace-switcher.glade.h:3 msgid "<b>Workspaces</b>" #: gnome-panel/launcher.c:173 #, c-format msgid "" "<b>Cannot launch icon</b>\n" "\n" "Details: %s" #: gnome-panel/launcher.c:1100 gnome-panel/menu.c:1230 #: gnome-panel/panel-util.c:81 #, c-format msgid "" "<b>Cannot display help document</b>\n" "\n" "Details: %s" #: gnome-panel/menu.c:373 #, c-format msgid "" "<b>Can't execute 'About GNOME'</b>\n" "\n" "Details: %s probably does not exist" #: gnome-panel/menu.c:397 #, c-format msgid "" "<b>Can't launch entry</b>\n" "\n" "Details: %s" #: gnome-panel/menu.c:407 gnome-panel/menu.c:1204 gnome-panel/menu.c:1241 #, c-format msgid "" "<b>Can't load entry</b>\n" "\n" "Details: %s" #: gnome-panel/menu.c:1108 #, c-format msgid "" "<b>Could not remove the menu item %s</b>\n" "\n" "Details: %s\n" #: gnome-panel/menu.c:1195 msgid "" "<b>Can't add to run box</b>\n" "\n" "Details: No 'Exec' or 'URL' field in entry" #: gnome-panel/menu-ditem.c:123 #, c-format msgid "" "<b>Cannot save changes to launcher</b>\n" "\n" "Details: %s" #. class #: gnome-panel/menu-ditem.c:494 #, c-format msgid "" "<b>Cannot save menu item to disk</b>\n" "\n" "Details: %s" #: gnome-panel/panel-properties-dialog.glade.h:4 msgid "<b>_Name:</b>" #: gnome-panel/panel-properties-dialog.glade.h:5 msgid "<b>_Orientation:</b>" #: gnome-panel/panel-properties-dialog.glade.h:6 msgid "<b>_Size:</b>" #: gnome-panel/panel-properties-dialog.glade.h:7 msgid "<small>Opaque</small>" #: gnome-panel/panel-properties-dialog.glade.h:8 msgid "<small>Transparent</small>" #: gnome-panel/panel-run-dialog.c:276 #, c-format msgid "" "<b>Error launching command: '%s'</b>\n" "\n" "Details: %s" #: gnome-panel/panel-run-dialog.c:305 #, c-format msgid "" "<b>Error displaying location: '%s'</b>\n" "\n" "Details: %s" #: gnome-panel/panel-util.c:1440 msgid "" "<b>Cannot execute xscreensaver</b>\n" "\n" "Details: xscreensaver-command not found" The problem with markup in gnome-panel messages is growing.
Okay, so most of these require the glade problem to be fixed. However, I suprised that so many of them are in .c files. As Christian explained elsewhere this is quite trivial to fix - e.g. the last example: #: gnome-panel/panel-util.c:1440 msgid "" "<b>Cannot execute xscreensaver</b>\n" "\n" "Details: xscreensaver-command not found" You'd change the code to something like this: msg = g_strdup_printf ("<b>%s</b>\n\n%s\n", _("Cannot execute xscreensaver"), _("Details: xscreensaver-command not found")); /* use msg */ g_free (msg); This way translators don't have to "translate" the markup. Marking the bug as easy-fix - hopefully someone will take it on.
Oh, usually I post different bug reports for the .glade and .c files, since they require different solutions (or rather, one is trivially solvable, one is not). I obviously missed that in this case. I've put the problem with the .c files in bug 113433 now. Sorry.
Could this bug being closed now that gnome-panel was ported to GtkBuilder?
Here are the markup occurrences left in ui files, needed to be fixed before closing the bug: #: ../applets/clock/clock.ui.h:1 msgid "<i>(optional)</i>" msgstr "" #. Languages that have a single word that translates as either "state" or "province" should use that instead of "region". #: ../applets/clock/clock.ui.h:3 msgid "" "<small><i>Type a city, region, or country name and then select a match from " "the pop-up.</i></small>" msgstr "" ... #: ../gnome-panel/panel-properties-dialog.ui.h:2 msgid "<small>Opaque</small>" msgstr "" #: ../gnome-panel/panel-properties-dialog.ui.h:3 msgid "<small>Transparent</small>" msgstr ""
Hi, I wanted to help in this bug but I don't know how to generate those .ui.h files. I have only .ui files. Can someone give me a pointer?
Pablo, you can forget the .h extension. They correspond to intermediary files auto-generated by intltool so as strings can easily be extracted. Just concentrate on .ui files.
Created attachment 220413 [details] [review] Remove markup from translations This commit uses explicit attributes instead of embedded markup.
Comment on attachment 220413 [details] [review] Remove markup from translations Looks good to me
The following fix has been pushed: e0d37bf Remove markup from translations
Created attachment 220430 [details] [review] Remove markup from translations This commit uses explicit attributes instead of embedded markup.