After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 689623 - Need to disambiguate "Search"
Need to disambiguate "Search"
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Search
git master
Other Linux
: Normal normal
: ---
Assigned To: Cosimo Cecchi
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-12-04 13:43 UTC by Frederic Peters
Modified: 2012-12-06 09:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
search: add a translator's comment to the desktop file (785 bytes, patch)
2012-12-04 18:47 UTC, Cosimo Cecchi
none Details | Review

Description Frederic Peters 2012-12-04 13:43:34 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.
Comment 1 Cosimo Cecchi 2012-12-04 18:47:46 UTC
Created attachment 230686 [details] [review]
search: add a translator's comment to the desktop file

Is a patch like this one enough?
Comment 2 Frederic Peters 2012-12-04 22:59:11 UTC
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.
Comment 3 Matthias Clasen 2012-12-05 00:52:04 UTC
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'.
Comment 4 Alexandre Franke 2012-12-05 09:41:39 UTC
Why not just use msgctxt?
Comment 5 Matthias Clasen 2012-12-05 11:25:56 UTC
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
Comment 6 Bastien Nocera 2012-12-06 09:08:54 UTC
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