← Back to team overview

elementaryart team mailing list archive

[Merge] lp:~ttosttos/granite/fix-871831 into lp:granite

 

ttosttos has proposed merging lp:~ttosttos/granite/fix-871831 into lp:granite.

Requested reviews:
  elementary Pantheon team (elementary-pantheon)
Related bugs:
  Bug #871831 in Granite: "Granite cannot be translated"
  https://bugs.launchpad.net/granite/+bug/871831

For more details, see:
https://code.launchpad.net/~ttosttos/granite/fix-871831/+merge/105448

Makes strings in About dialog translatable
-- 
https://code.launchpad.net/~ttosttos/granite/fix-871831/+merge/105448
Your team elementaryart (old) is subscribed to branch lp:granite.
=== modified file 'lib/GtkPatch/AboutDialog.vala'
--- lib/GtkPatch/AboutDialog.vala	2012-04-26 21:38:04 +0000
+++ lib/GtkPatch/AboutDialog.vala	2012-05-11 07:42:18 +0000
@@ -37,7 +37,7 @@
                 artists_label.set_text("");
             }
             else {
-                artists_label.set_markup(set_string_from_string_array("<span size=\"small\">Designed by" + ":</span>\n", _artists));
+                artists_label.set_markup(set_string_from_string_array("<span size=\"small\">" + _("Designed by") + ":</span>\n", _artists));
                 artists_label.show();
             }
         }
@@ -56,7 +56,7 @@
                 authors_label.set_text("");
             }
             else {
-                authors_label.set_markup(set_string_from_string_array("<span size=\"small\">Written by" + ":</span>\n", _authors));
+                authors_label.set_markup(set_string_from_string_array("<span size=\"small\">" + _("Written by") + ":</span>\n", _authors));
                 authors_label.show();
             }
         }
@@ -172,7 +172,7 @@
                 translators_label.set_text("");
             }
             else {
-                translators_label.set_markup("<span size=\"small\">Translated by " + _translator_credits.replace("&", "&amp;") + "</span>\n");
+                translators_label.set_markup("<span size=\"small\">" + _("Translated by ") + _translator_credits.replace("&", "&amp;") + "</span>\n");
                 translators_label.show();
             }
         }
@@ -441,7 +441,7 @@
 
     private void set_generic_license(string url, string license_type)
     {
-        license_label.set_markup("<span size=\"small\">This program is published under the terms of the " + license_type + " license, it comes with ABSOLUTELY NO WARRANTY; for details, visit <a href=\"" + url + "\">" + url + "</a></span>\n");
+        license_label.set_markup("<span size=\"small\">" + _("This program is published under the terms of the ") + license_type + _(" license, it comes with ABSOLUTELY NO WARRANTY; for details, visit ") + "<a href=\"" + url + "\">" + url + "</a></span>\n");
         license_label.show();
     }
 

=== modified file 'lib/Widgets/AboutDialog.vala'
--- lib/Widgets/AboutDialog.vala	2012-04-27 13:26:24 +0000
+++ lib/Widgets/AboutDialog.vala	2012-05-11 07:42:18 +0000
@@ -144,12 +144,12 @@
             ((Gtk.ButtonBox) action_area).set_child_non_homogeneous (help_button, true);
 
             /* translate button */
-            translate_button = new Button.with_label("Translate this app");
+            translate_button = new Button.with_label(_("Translate this app"));
             translate_button.pressed.connect ( () => { activate_link(translate); });
             action_area.pack_start (translate_button, false, false, 0);
 
             /* bug button */
-            bug_button = new Button.with_label ("Report a problem");
+            bug_button = new Button.with_label (_("Report a problem"));
             bug_button.pressed.connect (() => { activate_link(bug); });
             action_area.pack_start (bug_button, false, false, 0);
 


Follow ups