[gnome-documents] Disambiguate two strings for translation



commit 52f61a6f7c728e910aee0c85f6320db2ad770551
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Mar 28 09:46:18 2013 -0400

    Disambiguate two strings for translation
    
    Use pgettext() to add a translation context that disambiguates these
    two equal strings.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=685753

 src/properties.js |    3 ++-
 src/search.js     |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/properties.js b/src/properties.js
index abb14bb..1fcfdf5 100644
--- a/src/properties.js
+++ b/src/properties.js
@@ -23,6 +23,7 @@ const Gio = imports.gi.Gio;
 const GLib = imports.gi.GLib;
 const Gtk = imports.gi.Gtk;
 const _ = imports.gettext.gettext;
+const C_ = imports.gettext.pgettext;
 
 const Application = imports.application;
 const Documents = imports.documents;
@@ -114,7 +115,7 @@ const PropertiesDialog = new Lang.Class({
         // Document type item
         // Translators: "Type" is the label next to the document type
         // (PDF, spreadsheet, ...) in the properties dialog
-        this._docType = new Gtk.Label({ label: _("Type"),
+        this._docType = new Gtk.Label({ label: C_("Document Type", "Type"),
                                         halign: Gtk.Align.END });
         this._docType.get_style_context ().add_class('dim-label');
         grid.add (this._docType);
diff --git a/src/search.js b/src/search.js
index a8e9e89..84a97a1 100644
--- a/src/search.js
+++ b/src/search.js
@@ -30,6 +30,7 @@ const Gio = imports.gi.Gio;
 const GLib = imports.gi.GLib;
 const Tracker = imports.gi.Tracker;
 const _ = imports.gettext.gettext;
+const C_ = imports.gettext.pgettext;
 
 function initSearch(context) {
     context.collectionManager = new Manager.BaseManager(context);
@@ -163,7 +164,7 @@ const SearchTypeManager = new Lang.Class({
     _init: function(context) {
         // Translators: "Type" refers to a search filter on the document type
         // (PDF, spreadsheet, ...)
-        this.parent(_("Type"), context);
+        this.parent(C_("Search Filter", "Type"), context);
 
         this.addItem(new SearchType({ id: 'all',
                                       name: _("All") }));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]