GNOME Bugzilla – Bug 654883
[L10N] Impossible to translate string concatenations for 'Export ...' + export method
Last modified: 2011-08-30 22:25:30 UTC
Following strings are impossible to translate, because intltool/xgettext imports strings as containing only first part, and then beffore gettext call is made runtime, strings are concatenated with method of export e.g HTML. #: ../Tomboy/ExportAllApplicationAddin.cs:53 msgid "Export All Notes to " #: ../Tomboy/ExportAllApplicationAddin.cs:54 msgid "Start exporting notes to " #: ../Tomboy/ExportAllApplicationAddin.cs:58 msgid "Export selected notebook to " etc. (there is more than those three in the same file.) Simply said, one should not concatenate strings before or after gettext call if possible, but instead use strings such as Catalog.GetString ("Export All Notes to {0}") and then call e.g. String.Format to fill {0} container.
It seems translation is one thing I could have thought a bit harder about... Looks like the only place that really needs to be fixed is the Initialize() method, with user-facing strings. Bug 654865 and patch fixes the problem in ExportMultipleDialog. (I noticed there are a number of Logger.Error messages in other methods that are translated, if I've understood correctly they're not supposed to and so maybe we should remove those getStrings.) Semirelated thought: The pretty name (e.g. "HTML Files") is translated in the subclassing add-in and is fine for our HTML exporter, but unfortunately we cannot know what sort of pretty name will be given by any community add-ins that use the export all class. So for instance, "Export All Notes to Plain Text" becomes something like "Eksporter alle notater til Plain Text" in Norwegian even after we fix these l10n hiccups. Is that something that could be remedied after we set up a community repository?
Created attachment 192264 [details] [review] Make strings l10n friendly This patch makes all those strings localization friendly that I could find from the file Tomboy/ExportAllApplicationAddin.cs.
Review of attachment 192264 [details] [review]: Looks good to me. Note that this patch will also close Bug 654865 and render Aaron's patch there unnecessary.
Also patch from Bug 654865 should be committed in addition to my patch, because that string was not contained in my patch here.
Sorry, I messed up (getting sleepy :P ). Quite right, disregard my previous comment. Both patches should be committed.
String freeze for GNOME 3.2 is coming in a week. Is it possible to commit this soon? I can commit too with maintainer approval as I've commit access as a translator.
Feel free to commit Tommi, thanks!
Review of attachment 192264 [details] [review]: Great, thanks!
Now committed.
Thanks!