]> git.0d.be Git - empathy.git/commitdiff
Remove Pango markup from translatable strings where possible
authorPhilip Withnall <philip@tecnocode.co.uk>
Fri, 1 Jan 2010 13:02:23 +0000 (13:02 +0000)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 6 Jan 2010 15:18:29 +0000 (15:18 +0000)
Use GtkBuilder attributes on labels instead, and change one instance of code
to automatically add markup to the translated string.

libempathy-gtk/empathy-account-widget-aim.ui
libempathy-gtk/empathy-account-widget-groupwise.ui
libempathy-gtk/empathy-account-widget-icq.ui
libempathy-gtk/empathy-account-widget-jabber.ui
libempathy-gtk/empathy-account-widget-msn.ui
libempathy-gtk/empathy-account-widget-sip.ui
libempathy-gtk/empathy-account-widget-yahoo.ui
libempathy-gtk/empathy-contact-widget.c

index 2dfdde216e3a6f23867ad6a3f7bcc5804167e03c..63d894625fb15b217d945dcbe50954ce8291e415 100644 (file)
             <property name="visible">True</property>
             <property name="xalign">0</property>
             <property name="xpad">3</property>
-            <property name="label" translatable="yes">&lt;span size="small"&gt;&lt;b&gt;Example:&lt;/b&gt; MyScreenName&lt;/span&gt;</property>
+            <property name="label" translatable="yes">&lt;b&gt;Example:&lt;/b&gt; MyScreenName</property>
             <property name="use_markup">True</property>
+            <attributes>
+              <attribute name="scale" value="0.8"/><!-- PANGO_SCALE_SMALL -->
+            </attributes>
           </object>
           <packing>
             <property name="left_attach">1</property>
               <object class="GtkLabel" id="label_example">
                 <property name="visible">True</property>
                 <property name="xalign">0.10000000149011612</property>
-                <property name="label" translatable="yes">&lt;span size="small"&gt;&lt;b&gt;Example:&lt;/b&gt; MyScreenName&lt;/span&gt;</property>
+                <property name="label" translatable="yes">&lt;b&gt;Example:&lt;/b&gt; MyScreenName</property>
                 <property name="use_markup">True</property>
+                <attributes>
+                  <attribute name="scale" value="0.8"/><!-- PANGO_SCALE_SMALL -->
+                </attributes>
               </object>
               <packing>
                 <property name="position">1</property>
index d8ce768f994fb981ec4c35a06e540dc653bfd1e6..1f6c5aae693b3c9db3b62ce772972516377572f5 100644 (file)
             <property name="visible">True</property>
             <property name="xalign">0</property>
             <property name="xpad">3</property>
-            <property name="label" translatable="yes">&lt;span size="small"&gt;&lt;b&gt;Example:&lt;/b&gt; username&lt;/span&gt;</property>
+            <property name="label" translatable="yes">&lt;b&gt;Example:&lt;/b&gt; username</property>
             <property name="use_markup">True</property>
+            <attributes>
+              <attribute name="scale" value="0.8"/><!-- PANGO_SCALE_SMALL -->
+            </attributes>
           </object>
           <packing>
             <property name="left_attach">1</property>
               <object class="GtkLabel" id="label_example">
                 <property name="visible">True</property>
                 <property name="xalign">0.10000000149011612</property>
-                <property name="label" translatable="yes">&lt;span size="small"&gt;&lt;b&gt;Example:&lt;/b&gt; username&lt;/span&gt;</property>
+                <property name="label" translatable="yes">&lt;b&gt;Example:&lt;/b&gt; username</property>
                 <property name="use_markup">True</property>
+                <attributes>
+                  <attribute name="scale" value="0.8"/><!-- PANGO_SCALE_SMALL -->
+                </attributes>
               </object>
               <packing>
                 <property name="position">1</property>
index 495d6e94962d8fead845a07b2ddfbaa89e8f8412..f889fd0502de2704dcfa10f1ef4a0e4bb57cc6f8 100644 (file)
             <property name="visible">True</property>
             <property name="xalign">0</property>
             <property name="xpad">3</property>
-            <property name="label" translatable="yes">&lt;span size="small"&gt;&lt;b&gt;Example:&lt;/b&gt; 123456789&lt;/span&gt;</property>
+            <property name="label" translatable="yes">&lt;b&gt;Example:&lt;/b&gt; 123456789</property>
             <property name="use_markup">True</property>
+            <attributes>
+              <attribute name="scale" value="0.8"/><!-- PANGO_SCALE_SMALL -->
+            </attributes>
           </object>
           <packing>
             <property name="left_attach">1</property>
               <object class="GtkLabel" id="label_example">
                 <property name="visible">True</property>
                 <property name="xalign">0.10000000149011612</property>
-                <property name="label" translatable="yes">&lt;span size="small"&gt;&lt;b&gt;Example:&lt;/b&gt; 123456789&lt;/span&gt;</property>
+                <property name="label" translatable="yes">&lt;b&gt;Example:&lt;/b&gt; 123456789</property>
                 <property name="use_markup">True</property>
+                <attributes>
+                  <attribute name="scale" value="0.8"/><!-- PANGO_SCALE_SMALL -->
+                </attributes>
               </object>
               <packing>
                 <property name="position">1</property>
index ac70fc4db5d087aac9321414f082b11cf7c7eae3..f9210c645f069af38babb8e2fc476a7a7cf0584f 100644 (file)
                 <property name="visible">True</property>
                 <property name="xalign">0</property>
                 <property name="xpad">3</property>
-                <property name="label" translatable="yes">&lt;span size="small"&gt;&lt;b&gt;Example:&lt;/b&gt; user@jabber.org&lt;/span&gt;</property>
+                <property name="label" translatable="yes">&lt;b&gt;Example:&lt;/b&gt; user@jabber.org</property>
                 <property name="use_markup">True</property>
+                <attributes>
+                  <attribute name="scale" value="0.8"/><!-- PANGO_SCALE_SMALL -->
+                </attributes>
               </object>
               <packing>
                 <property name="position">0</property>
               <object class="GtkLabel" id="label_username_g_example">
                 <property name="xalign">0</property>
                 <property name="xpad">3</property>
-                <property name="label" translatable="yes">&lt;span size="small"&gt;&lt;b&gt;Example:&lt;/b&gt; user@gmail.com&lt;/span&gt;</property>
+                <property name="label" translatable="yes">&lt;b&gt;Example:&lt;/b&gt; user@gmail.com</property>
                 <property name="use_markup">True</property>
+                <attributes>
+                  <attribute name="scale" value="0.8"/><!-- PANGO_SCALE_SMALL -->
+                </attributes>
               </object>
               <packing>
                 <property name="position">1</property>
               <object class="GtkLabel" id="label_example">
                 <property name="visible">True</property>
                 <property name="xalign">0.10000000149011612</property>
-                <property name="label" translatable="yes">&lt;span size="small"&gt;&lt;b&gt;Example:&lt;/b&gt; user@jabber.org&lt;/span&gt;</property>
+                <property name="label" translatable="yes">&lt;b&gt;Example:&lt;/b&gt; user@jabber.org</property>
                 <property name="use_markup">True</property>
+                <attributes>
+                  <attribute name="scale" value="0.8"/><!-- PANGO_SCALE_SMALL -->
+                </attributes>
               </object>
               <packing>
                 <property name="position">1</property>
               <object class="GtkLabel" id="label_g_example">
                 <property name="visible">True</property>
                 <property name="xalign">0.10000000149011612</property>
-                <property name="label" translatable="yes">&lt;span size="small"&gt;&lt;b&gt;Example:&lt;/b&gt; user@gmail.com&lt;/span&gt;</property>
+                <property name="label" translatable="yes">&lt;b&gt;Example:&lt;/b&gt; user@gmail.com</property>
                 <property name="use_markup">True</property>
+                <attributes>
+                  <attribute name="scale" value="0.8"/><!-- PANGO_SCALE_SMALL -->
+                </attributes>
               </object>
               <packing>
                 <property name="position">1</property>
index 083f4f9bd2d96f59c8b68dd1218c692c447ef6c3..9a9250b757dab4f8eec397dcf0c7bb5d26440439 100644 (file)
             <property name="visible">True</property>
             <property name="xalign">0</property>
             <property name="xpad">3</property>
-            <property name="label" translatable="yes">&lt;span size="small"&gt;&lt;b&gt;Example:&lt;/b&gt; user@hotmail.com&lt;/span&gt;</property>
+            <property name="label" translatable="yes">&lt;b&gt;Example:&lt;/b&gt; user@hotmail.com</property>
             <property name="use_markup">True</property>
+            <attributes>
+              <attribute name="scale" value="0.8"/><!-- PANGO_SCALE_SMALL -->
+            </attributes>
           </object>
           <packing>
             <property name="left_attach">1</property>
               <object class="GtkLabel" id="label_example">
                 <property name="visible">True</property>
                 <property name="xalign">0.10000000149011612</property>
-                <property name="label" translatable="yes">&lt;span size="small"&gt;&lt;b&gt;Example:&lt;/b&gt; user@hotmail.com&lt;/span&gt;</property>
+                <property name="label" translatable="yes">&lt;b&gt;Example:&lt;/b&gt; user@hotmail.com</property>
                 <property name="use_markup">True</property>
+                <attributes>
+                  <attribute name="scale" value="0.8"/><!-- PANGO_SCALE_SMALL -->
+                </attributes>
               </object>
               <packing>
                 <property name="position">1</property>
index 1f465e478c7837a036523968ca207e3fe51e3990..13cc2f95934f77f5ec502c80ce564c37e63f8728 100644 (file)
             <property name="visible">True</property>
             <property name="xalign">0</property>
             <property name="xpad">3</property>
-            <property name="label" translatable="yes">&lt;span size="small"&gt;&lt;b&gt;Example:&lt;/b&gt; user@my.sip.server&lt;/span&gt;</property>
+            <property name="label" translatable="yes">&lt;b&gt;Example:&lt;/b&gt; user@my.sip.server</property>
             <property name="use_markup">True</property>
+            <attributes>
+              <attribute name="scale" value="0.8"/><!-- PANGO_SCALE_SMALL -->
+            </attributes>
           </object>
           <packing>
             <property name="left_attach">1</property>
@@ -199,8 +202,10 @@ username.</property>
                   <object class="GtkLabel" id="label_nat_traversal">
                     <property name="visible">True</property>
                     <property name="xalign">0</property>
-                    <property name="label" translatable="yes">&lt;b&gt;NAT Traversal Options&lt;/b&gt;</property>
-                    <property name="use_markup">True</property>
+                    <property name="label" translatable="yes">NAT Traversal Options</property>
+                    <attributes>
+                      <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+                    </attributes>
                   </object>
                   <packing>
                     <property name="right_attach">4</property>
@@ -210,8 +215,10 @@ username.</property>
                   <object class="GtkLabel" id="label_proxy">
                     <property name="visible">True</property>
                     <property name="xalign">0</property>
-                    <property name="label" translatable="yes">&lt;b&gt;Proxy Options&lt;/b&gt;</property>
-                    <property name="use_markup">True</property>
+                    <property name="label" translatable="yes">Proxy Options</property>
+                    <attributes>
+                      <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+                    </attributes>
                   </object>
                   <packing>
                     <property name="right_attach">4</property>
@@ -223,8 +230,10 @@ username.</property>
                   <object class="GtkLabel" id="label_misc">
                     <property name="visible">True</property>
                     <property name="xalign">0</property>
-                    <property name="label" translatable="yes">&lt;b&gt;Miscellaneous Options&lt;/b&gt;</property>
-                    <property name="use_markup">True</property>
+                    <property name="label" translatable="yes">Miscellaneous Options</property>
+                    <attributes>
+                      <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+                    </attributes>
                   </object>
                   <packing>
                     <property name="right_attach">4</property>
@@ -318,8 +327,10 @@ username.</property>
                   <object class="GtkLabel" id="label_keep_alive">
                     <property name="visible">True</property>
                     <property name="xalign">0</property>
-                    <property name="label" translatable="yes">&lt;b&gt;Keep-Alive Options&lt;/b&gt;</property>
-                    <property name="use_markup">True</property>
+                    <property name="label" translatable="yes">Keep-Alive Options</property>
+                    <attributes>
+                      <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+                    </attributes>
                   </object>
                   <packing>
                     <property name="right_attach">4</property>
@@ -555,8 +566,11 @@ username.</property>
               <object class="GtkLabel" id="label_example">
                 <property name="visible">True</property>
                 <property name="xalign">0.10000000149011612</property>
-                <property name="label" translatable="yes">&lt;span size="small"&gt;&lt;b&gt;Example:&lt;/b&gt; user@my.sip.server&lt;/span&gt;</property>
+                <property name="label" translatable="yes">&lt;b&gt;Example:&lt;/b&gt; user@my.sip.server</property>
                 <property name="use_markup">True</property>
+                <attributes>
+                  <attribute name="scale" value="0.8"/><!-- PANGO_SCALE_SMALL -->
+                </attributes>
               </object>
               <packing>
                 <property name="position">1</property>
index 0880cc7f49f1e6eb48070c9df509258b848f0336..c595a34302bb2ec386d7ffa8829aa999bbbf6298 100644 (file)
             <property name="visible">True</property>
             <property name="xalign">0</property>
             <property name="xpad">3</property>
-            <property name="label" translatable="yes">&lt;span size="small"&gt;&lt;b&gt;Example:&lt;/b&gt; username&lt;/span&gt;</property>
+            <property name="label" translatable="yes">&lt;b&gt;Example:&lt;/b&gt; username</property>
             <property name="use_markup">True</property>
+            <attributes>
+              <attribute name="scale" value="0.8"/><!-- PANGO_SCALE_SMALL -->
+            </attributes>
           </object>
           <packing>
             <property name="left_attach">1</property>
               <object class="GtkLabel" id="label_example">
                 <property name="visible">True</property>
                 <property name="xalign">0.10000000149011612</property>
-                <property name="label" translatable="yes">&lt;span size="small"&gt;&lt;b&gt;Example:&lt;/b&gt; username&lt;/span&gt;</property>
+                <property name="label" translatable="yes">&lt;b&gt;Example:&lt;/b&gt; username</property>
                 <property name="use_markup">True</property>
+                <attributes>
+                  <attribute name="scale" value="0.8"/><!-- PANGO_SCALE_SMALL -->
+                </attributes>
               </object>
               <packing>
                 <property name="position">1</property>
index 134f67fb3330afd45048d3d8f2d755a380dba26d..8b1522dc4e10ba32cff3c339e30577895b9fbae2 100644 (file)
@@ -1365,7 +1365,11 @@ contact_widget_location_update (EmpathyContactWidget *information)
 
   value = g_hash_table_lookup (location, EMPATHY_LOCATION_TIMESTAMP);
   if (value == NULL)
-    gtk_label_set_markup (GTK_LABEL (information->label_location), _("<b>Location</b>"));
+    {
+      gchar *location = g_strdup_printf ("<b>%s</b>", _("Location"));
+      gtk_label_set_markup (GTK_LABEL (information->label_location), location);
+      g_free (location);
+    }
   else
     {
       gchar *user_date;