GNOME Bugzilla – Bug 159806
label field should be translated in ui services
Last modified: 2009-09-21 19:47:05 UTC
This concerns plugins exporting ui service (python-loader and database AFAIK). in python-loader/plugin.xml.in: <actions> <action name="ShowConsole" label="Python console"/> </actions> So label is not marked for translation but is a user visible string.
This seems like it should be really easy. Does anybody know how to do this?
Not that easy in general. The plugin would need its own translation domain. (Since out-of-tree plugins can't very well have their translations in Gnumeric.)
Well, I had looked at our po files and saw: #: ../plugins/python-loader/gnm-py-interpreter.c:255 msgid "Default interpreter" msgstr "Vorgabeinterpreter" #: ../plugins/python-loader/gnm-python.c:130 #: ../plugins/python-loader/gnm-python.c:152 #, c-format msgid "Could not import %s." msgstr "%s konnte nicht gefunden werden." #: ../plugins/python-loader/gnm-python.c:137 #, c-format msgid "Could not find %s." msgstr "%s konnte nicht gefunden werden." #: ../plugins/python-loader/gnm-python.c:145 #, c-format msgid "Could not initialize Python bindings for Gtk+, etc: %s" msgstr "Python-Bindings für GTK+ usw. konnten nicht initialisiert werden: %s" #: ../plugins/python-loader/gnm-python.c:159 #, c-format msgid "Could not find %s" msgstr "%s konnte nicht gefunden werden" and many more. So while you are right that it should have its own translation domain, it seems to me the horses have already left the barn.
I think we should add a <domain> node or so to plugin.xml. We need also some mechanism to translate functions documentation from out of tree plugins.
That would work. In-tree plugins could then point to Gnumeric's domain, although for the sake of the example, the ui-hello plugin probably should not.
I tried to mark the ui string for translation. Unfortunately, this does not work. To make things work, we might have the label property become a child node. Is this ok ?
Created attachment 143482 [details] [review] proposed patch
Comment on attachment 143482 [details] [review] proposed patch Go ahead. If there are any problems we'll fix them.
Fixed.