Fixed translatable strings
authorDan Breslau <dbreslau@painless-security.com>
Wed, 24 Aug 2016 21:25:39 +0000 (17:25 -0400)
committerDan Breslau <dbreslau@painless-security.com>
Wed, 24 Aug 2016 21:25:39 +0000 (17:25 -0400)
src/moonshot-idcard-widget.vala
src/moonshot-identity-management-view.vala
src/moonshot-identity-manager-app.vala
src/moonshot-trust-anchor-dialog.vala

index 487b0e7..03f4d61 100644 (file)
@@ -128,24 +128,24 @@ class IdCardWidget : Box
     update_id_card_label()
     {
         // !!TODO: Use a table to format the labels and values
-        string service_spacer = _("\n                ");
+        string service_spacer = "\n                ";
 
         var display_name = (manager_view.selection_in_progress() && this.id_card.is_no_identity()
-                            ? "Do not use a Moonshot identity for this service" : this.id_card.display_name);
-        var label_text = Markup.printf_escaped(_("<span rise='8000'><big>%s</big></span>"), display_name);
+                            ? _("Do not use a Moonshot identity for this service") : this.id_card.display_name);
+        var label_text = Markup.printf_escaped("<span rise='8000'><big>%s</big></span>", display_name);
 
         if (is_selected)
         {
             if (!this.id_card.is_no_identity()) {
-                label_text += "\nUsername:  " + id_card.username;
-                label_text += "\nRealm:  " + id_card.issuer;
+                label_text += "\n" + _("Username") + ":  " + id_card.username;
+                label_text += "\n" + _("Realm:") + "  " + id_card.issuer;
                 if (!id_card.trust_anchor.is_empty()) {
-                    label_text += _("\nTrust anchor: Enterprise provisioned");
+                    label_text += "\n" + _("Trust anchor: Enterprise provisioned");
                 }
             }
 
             string services_text = _("Services:  ") + this.id_card.get_services_string(service_spacer);
-            label_text += _("\n") + services_text;
+            label_text += "\n" + services_text;
         }
 
         label.set_markup(label_text);
index c91d0e1..c4a8a1a 100644 (file)
@@ -748,7 +748,7 @@ SUCH DAMAGE.
         this.search_entry.key_press_event.connect(search_entry_key_press_event_cb);
         this.search_entry.set_width_chars(24);
 
-        var search_label_markup =_("<small>") + search_tooltip_text + _("</small>");
+        var search_label_markup ="<small>" + search_tooltip_text + "</small>";
         var full_search_label = new Label(null);
         full_search_label.set_markup(search_label_markup);
         full_search_label.set_alignment(1, 0);
@@ -868,9 +868,9 @@ SUCH DAMAGE.
         if (selection_in_progress()) {
             var result = WarningDialog.confirm(this,
                                                Markup.printf_escaped(
-                                                   _("<span font-weight='heavy'>Do you wish to use the %s service?</span>"),
+                                                   "<span font-weight='heavy'>" + _("Do you wish to use the %s service?") + "</span>",
                                                    this.request_queue.peek_head().service)
-                                               + _("\n\nSelect Yes to select an ID for this service, or No to cancel"),
+                                               + "\n\n" + _("Select Yes to select an ID for this service, or No to cancel"),
                                                "close_moonshot_window");
             if (result) {
                 // Prevent other handlers from handling this event; this keeps the window open.
@@ -892,7 +892,7 @@ SUCH DAMAGE.
     }
 
     private void import_identities_cb() {
-        var dialog = new FileChooserDialog("Import File",
+        var dialog = new FileChooserDialog(_("Import File"),
                                            this,
                                            FileChooserAction.OPEN,
                                            _("Cancel"),ResponseType.CANCEL,
index cb109e1..0170139 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2014, JANET(UK)
+ * Copyright (c) 2011-2016, JANET(UK)
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -292,7 +292,7 @@ public class IdentityManagerApp {
                 if (!shown) {
                     GLib.error("Couldn't own name org.janet.Moonshot on dbus or show previously launched identity manager.");
                 } else {
-                    stdout.printf("Showed previously launched identity manager.\n");
+                    stdout.printf(_("Showed previously launched identity manager.\n"));
                     GLib.Process.exit(0);
                 }
             }
@@ -456,6 +456,7 @@ public static int main(string[] args) {
     settings.set_long_property("gtk-menu-images", 0, "moonshot");
 #endif
 
+    //TODO?? Do we need to call Intl.setlocale(LocaleCategory.MESSAGES, "");
     Intl.bindtextdomain(Config.GETTEXT_PACKAGE, Config.LOCALEDIR);
     Intl.bind_textdomain_codeset(Config.GETTEXT_PACKAGE, "UTF-8");
     Intl.textdomain(Config.GETTEXT_PACKAGE);
index 20def57..695aa63 100644 (file)
@@ -56,7 +56,7 @@ class TrustAnchorDialog : Dialog
         Label dialog_label = new Label("");
         dialog_label.set_alignment(0, 0);
 
-        string label_markup = _("<span font-weight='heavy'>You are using this identity for the first time with the following trust anchor:</span>");
+        string label_markup = "<span font-weight='heavy'>" + _("You are using this identity for the first time with the following trust anchor:") + "</span>";
 
         dialog_label.set_markup(label_markup);
         dialog_label.set_line_wrap(true);