GNOME Bugzilla – Bug 689623
Need to disambiguate "Search"
Last modified: 2012-12-06 09:08:54 UTC
"Search" is now both used in panels/keyboard/01-launchers.xml.in where it's used along other verbs; and is now also used as the title of the Search panel, where it's a substantive; in some languages they will need to be translated differently ("Rechercher" vs "Recherche" in French, for example), it's not possible at the moment.
Created attachment 230686 [details] [review] search: add a translator's comment to the desktop file Is a patch like this one enough?
Unfortunately it won't work as a single string will still appear in the .po file; while in C programs we have the *dgettext calls, that allows to specify a domain, I don't know how such a thing could be done for the strings in this specific case.
You can just disambiguate the strings by using different strings, e.g. 'System Search' vs 'Start a Search' - if necessary, we can add an en_US translation that translates them both back to 'Search'.
Why not just use msgctxt?
Because these strings live in desktop and xml files. At least in desktop files, there's no context available. In the xml file, context="keybinding" might actually work
commit 2a63aed36b9a06186364d8bb67a785fd78156bb3 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Dec 6 10:07:28 2012 +0100 keyboard: Add context to the "Search" string https://bugzilla.gnome.org/show_bug.cgi?id=689623 commit f94aeb2b023c224d0d8397a53d2fbf5f9f3062f1 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Dec 6 10:04:55 2012 +0100 keyboard: Add support for msgctxt in keybindings Unfortunately, this means duplicating the description attribute to the text inside the KeyListEntry element, and marking the KeyListEntry element as translatable by prepending "_". <KeyListEntry name="search" _description="Search"/> becomes: <_KeyListEntry name="search" description="Search" msgctxt="keybinding"> Search </_KeyListEntry> https://bugzilla.gnome.org/show_bug.cgi?id=689623