]> git.sur5r.net Git - glabels/commitdiff
String cleanup.
authorJim Evins <evins@snaught.com>
Wed, 7 Jul 2010 03:13:12 +0000 (23:13 -0400)
committerJim Evins <evins@snaught.com>
Wed, 7 Jul 2010 03:13:12 +0000 (23:13 -0400)
Removed pango markup from translatable strings.  Fixed word order assumption
with use of standalone "per sheet" string.

data/ui/merge-properties-dialog.ui
data/ui/object-editor.ui
data/ui/prefs-dialog.ui
data/ui/print-op-dialog-custom-widget.ui
libglabels/template.c
src/template-designer.c

index 18ae33dda43a38e25abf271b11b91dfb791cedf6..cda7d895284501fa3ed4dd4a52c45853884836f8 100644 (file)
             <child type="label">
               <object class="GtkLabel" id="label1">
                 <property name="visible">True</property>
-                <property name="label" translatable="yes">&lt;b&gt;Source&lt;/b&gt;</property>
-                <property name="use_markup">True</property>
+                <property name="label" translatable="yes">Source</property>
+                <attributes>
+                  <attribute name="weight" value="bold"/>
+                </attributes>
               </object>
             </child>
           </object>
             <child type="label">
               <object class="GtkLabel" id="label2">
                 <property name="visible">True</property>
-                <property name="label" translatable="yes">&lt;b&gt;Record selection/preview&lt;/b&gt;</property>
-                <property name="use_markup">True</property>
+                <property name="label" translatable="yes">Record selection/preview</property>
+                <attributes>
+                  <attribute name="weight" value="bold"/>
+                </attributes>
               </object>
             </child>
           </object>
index 43ac7f79fcdcf1f93d1e24228b00cd1bd53ba455..833a5848954cdaa6910dcda65870e21fa2f87711 100644 (file)
@@ -33,7 +33,7 @@
                 <child>
                   <object class="GtkLabel" id="title_label">
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes">&lt;span weight="bold" size="larger"&gt;Xxx object properties&lt;/span&gt;</property>
+                    <property name="label">&lt;span weight="bold" size="larger"&gt;Xxx object properties&lt;/span&gt;</property>
                     <property name="use_markup">True</property>
                   </object>
                   <packing>
index 65d236883e0a80dd4e4cfc21040cfabe750b4ba3..75da0aa6188b8e2c3f852bb20d381c04be31403c 100644 (file)
@@ -9,6 +9,7 @@
     <child internal-child="vbox">
       <object class="GtkVBox" id="dialog-vbox1">
         <property name="visible">True</property>
+        <property name="orientation">vertical</property>
         <child>
           <object class="GtkNotebook" id="prefs_notebook">
             <property name="visible">True</property>
@@ -17,6 +18,7 @@
               <object class="GtkVBox" id="vbox1">
                 <property name="visible">True</property>
                 <property name="border_width">12</property>
+                <property name="orientation">vertical</property>
                 <property name="spacing">12</property>
                 <child>
                   <object class="GtkLabel" id="label3">
                       <object class="GtkLabel" id="label4">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
-                        <property name="label" translatable="yes">&lt;span weight="bold"&gt;Units&lt;/span&gt;</property>
-                        <property name="use_markup">True</property>
+                        <property name="label" translatable="yes">Units</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
                       </object>
                     </child>
                   </object>
                       <object class="GtkLabel" id="label5">
                         <property name="visible">True</property>
                         <property name="xalign">0</property>
-                        <property name="label" translatable="yes">&lt;span weight="bold"&gt;Default page size&lt;/span&gt;</property>
-                        <property name="use_markup">True</property>
+                        <property name="label" translatable="yes">Default page size</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
                       </object>
                     </child>
                   </object>
               <object class="GtkVBox" id="vbox4">
                 <property name="visible">True</property>
                 <property name="border_width">12</property>
+                <property name="orientation">vertical</property>
                 <property name="spacing">12</property>
                 <child>
                   <object class="GtkLabel" id="label8">
                                       <object class="GtkImage" id="image6">
                                         <property name="visible">True</property>
                                         <property name="stock">gtk-bold</property>
-                                        <property name="icon-size">4</property>
                                       </object>
                                     </child>
                                   </object>
                                       <object class="GtkImage" id="image7">
                                         <property name="visible">True</property>
                                         <property name="stock">gtk-italic</property>
-                                        <property name="icon-size">4</property>
                                       </object>
                                     </child>
                                   </object>
                                       <object class="GtkImage" id="image3">
                                         <property name="visible">True</property>
                                         <property name="stock">gtk-justify-left</property>
-                                        <property name="icon-size">4</property>
                                       </object>
                                     </child>
                                   </object>
                                       <object class="GtkImage" id="image4">
                                         <property name="visible">True</property>
                                         <property name="stock">gtk-justify-center</property>
-                                        <property name="icon-size">4</property>
                                       </object>
                                     </child>
                                   </object>
                                       <object class="GtkImage" id="image5">
                                         <property name="visible">True</property>
                                         <property name="stock">gtk-justify-right</property>
-                                        <property name="icon-size">4</property>
                                       </object>
                                     </child>
                                   </object>
                     <child type="label">
                       <object class="GtkLabel" id="label9">
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes">&lt;span weight="bold"&gt;Text&lt;/span&gt;</property>
-                        <property name="use_markup">True</property>
+                        <property name="label" translatable="yes">Text</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
                       </object>
                     </child>
                   </object>
                     <child type="label">
                       <object class="GtkLabel" id="label10">
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes">&lt;span weight="bold"&gt;Line&lt;/span&gt;</property>
-                        <property name="use_markup">True</property>
+                        <property name="label" translatable="yes">Line</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
                       </object>
                     </child>
                   </object>
                     <child type="label">
                       <object class="GtkLabel" id="label11">
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes">&lt;span weight="bold"&gt;Fill&lt;/span&gt;</property>
-                        <property name="use_markup">True</property>
+                        <property name="label" translatable="yes">Fill</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
                       </object>
                     </child>
                   </object>
index 59afddbb6058b1411f12a531812aff506c0744c9..e2e071637648ccb72d1f7618eadc54350e92c54e 100644 (file)
                     <child type="label">
                       <object class="GtkLabel" id="label2">
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Copies&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
+                        <property name="label" translatable="yes">Copies</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
                       </object>
                     </child>
                   </object>
                     <child type="label">
                       <object class="GtkLabel" id="label3">
                         <property name="visible">True</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Merge Control&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
+                        <property name="label" translatable="yes">Merge Control</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
                       </object>
                     </child>
                   </object>
                 <child type="label">
                   <object class="GtkLabel" id="label4">
                     <property name="visible">True</property>
-                    <property name="label" translatable="yes">&lt;b&gt;Options&lt;/b&gt;</property>
-                    <property name="use_markup">True</property>
+                    <property name="label" translatable="yes">Options</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"/>
+                    </attributes>
                   </object>
                 </child>
               </object>
index c942e8bd120b9338693a9ce43660c0449d50f25d..d5bf03739ee1a1f7fc4b19aa6909cc717539f658 100644 (file)
@@ -719,11 +719,17 @@ lgl_template_frame_get_layout_description (const lglTemplateFrame *frame)
         if ( frame->all.layouts && (frame->all.layouts->next == NULL) )
         {
                 layout = (lglTemplateLayout *)frame->all.layouts->data;
-                string = g_strdup_printf ("%d × %d (%d %s)", layout->nx, layout->ny, n_labels, _("per sheet"));
+                /*
+                 * Translators: 1st %d = number of labels across a page,
+                 *              2nd %d = number of labels down a page,
+                 *              3rd %d = total number of labels on a page (sheet).
+                 */
+                string = g_strdup_printf (_("%d × %d (%d per sheet)"), layout->nx, layout->ny, n_labels);
         }
         else
         {
-                string = g_strdup_printf ("%d %s", n_labels, _("per sheet"));
+                /* Translators: %d is the total number of labels on a page (sheet). */
+                string = g_strdup_printf (_("%d per sheet"), n_labels);
         }
 
         return string;
index 891648a5f559182da8855a6363476bc459d9e6b5..4a8473e770b3eaf85bef4b8cef832125a34036b2 100644 (file)
@@ -1393,6 +1393,7 @@ static void
 name_page_changed_cb (glTemplateDesigner *dialog)
 {
        gchar *brand, *part_num, *desc;
+        gchar *string;
 
        brand    = g_strstrip (gtk_editable_get_chars (GTK_EDITABLE(dialog->priv->brand_entry), 0, -1));
        part_num = g_strstrip (gtk_editable_get_chars (GTK_EDITABLE(dialog->priv->part_num_entry), 0, -1));
@@ -1418,8 +1419,10 @@ name_page_changed_cb (glTemplateDesigner *dialog)
 
                                 gtk_image_set_from_stock (GTK_IMAGE (dialog->priv->name_warning_image),
                                                           GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_BUTTON);
-                                gtk_label_set_markup (GTK_LABEL (dialog->priv->name_warning_label),
-                                                      _("<span foreground='red' weight='bold'>Brand and part# match an existing template!</span>"));
+                                string = g_strdup_printf ("<span foreground='red' weight='bold'>%s</span>",
+                                                          _("Brand and part# match an existing template!"));
+                                gtk_label_set_markup (GTK_LABEL (dialog->priv->name_warning_label), string);
+                                g_free (string);
 
                         }
                 }