[dconf] editor: mark appropriate strings for translation



commit e28b351f6706b1286833b1cefdf6f868a50e5dfb
Author: Ryan Lortie <desrt desrt ca>
Date:   Sat Aug 4 13:05:17 2012 -0400

    editor: mark appropriate strings for translation
    
    Mark UI strings for translation.
    
    The various warnings that are issued as a result of errors while parsing
    schemas have not been marked for translation because they are never
    shown in the UI (only via g_warning()) and because they are expected to
    be removed soon.

 editor/dconf-editor.vala |   12 ++++++------
 editor/dconf-view.vala   |    8 +++++---
 2 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/editor/dconf-editor.vala b/editor/dconf-editor.vala
index 1a5a3cb..476d4ee 100644
--- a/editor/dconf-editor.vala
+++ b/editor/dconf-editor.vala
@@ -162,13 +162,13 @@ class ConfigurationEditor : Gtk.Application
                 min = key.get_min();
                 max = key.get_max();
             }
-            return "Integer [%s..%s]".printf(min.print(false), max.print(false));
+            return _("Integer [%s..%s]").printf(min.print(false), max.print(false));
         case "b":
-            return "Boolean";
+            return _("Boolean");
         case "s":
-            return "String";
+            return _("String");
         case "<enum>":
-            return "Enumeration";
+            return _("Enumeration");
         default:
             return key.schema.type;
         }
@@ -211,7 +211,7 @@ class ConfigurationEditor : Gtk.Application
             }
             else
             {
-                schema_name = "No schema";
+                schema_name = _("No schema");
             }
         }
 
@@ -339,7 +339,7 @@ class ConfigurationEditor : Gtk.Application
                                "version", Config.VERSION,
                                "comments",
                                _("Directly edit your entire configuration database"),
-                               "copyright", "Copyright \xc2\xa9 Canonical Ltd",
+                               "copyright", _("Copyright \xc2\xa9 Canonical Ltd"),
                                "license", license,
                                "wrap-license", true,
                                "authors", authors,
diff --git a/editor/dconf-view.vala b/editor/dconf-view.vala
index 13ac438..c83b53f 100644
--- a/editor/dconf-view.vala
+++ b/editor/dconf-view.vala
@@ -261,7 +261,7 @@ private class KeyValueRenderer: Gtk.CellRenderer
             }
             catch (VariantParseError e)
             {
-                var dialog = new Gtk.MessageDialog(null, Gtk.DialogFlags.MODAL, Gtk.MessageType.WARNING, Gtk.ButtonsType.OK, "Error setting value: %s", e.message);
+                var dialog = new Gtk.MessageDialog(null, Gtk.DialogFlags.MODAL, Gtk.MessageType.WARNING, Gtk.ButtonsType.OK, _("Error setting value: %s"), e.message);
                 dialog.run();
                 dialog.destroy();
             }
@@ -314,9 +314,11 @@ public class DConfKeyView : Gtk.TreeView
 {
     public DConfKeyView()
     {
-        var column = new Gtk.TreeViewColumn.with_attributes("Name", new Gtk.CellRendererText(), "text", 1, "weight", 4, null);
+		/* Translators: this is the column header label in the main view */
+        var column = new Gtk.TreeViewColumn.with_attributes(_("Name"), new Gtk.CellRendererText(), "text", 1, "weight", 4, null);
         /*column.set_sort_column_id(1);*/
         append_column(column);
-        insert_column_with_attributes(-1, "Value", new KeyValueRenderer(this), "key", 0, null);
+		/* Translators: this is the column header label in the main view */
+        insert_column_with_attributes(-1, _("Value"), new KeyValueRenderer(this), "key", 0, null);
     }
 }



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