gtk+ r21716 - in trunk: . gtk po



Author: matthiasc
Date: Mon Oct 27 01:42:28 2008
New Revision: 21716
URL: http://svn.gnome.org/viewvc/gtk+?rev=21716&view=rev

Log:
2008-10-26  Matthias Clasen  <mclasen redhat com>

        * gtk/gtkaccellabel.c:
        * gtk/gtkcalendar.c:
        * gtk/gtkcellrendereraccel.c:
        * gtk/gtkcellrendererprogress.c:
        * gtk/gtkimmulticontext.c:
        * gtk/gtkrecentchoosermenu.c:
        * gtk/gtkvolumebutton.c: Use C_() instead of Q_(). String change!




Modified:
   trunk/ChangeLog
   trunk/gtk/gtkaccellabel.c
   trunk/gtk/gtkcalendar.c
   trunk/gtk/gtkcellrendereraccel.c
   trunk/gtk/gtkcellrendererprogress.c
   trunk/gtk/gtkimmulticontext.c
   trunk/gtk/gtkrecentchoosermenu.c
   trunk/gtk/gtkvolumebutton.c
   trunk/po/Makefile.in.in

Modified: trunk/gtk/gtkaccellabel.c
==============================================================================
--- trunk/gtk/gtkaccellabel.c	(original)
+++ trunk/gtk/gtkaccellabel.c	Mon Oct 27 01:42:28 2008
@@ -87,26 +87,20 @@
    * that use the shift key. If the text on this key isn't typically
    * translated on keyboards used for your language, don't translate
    * this.
-   * 
-   * Don't include the prefix "keyboard label|" in the translation.
    */
-  class->mod_name_shift = g_strdup (Q_("keyboard label|Shift"));
+  class->mod_name_shift = g_strdup (C_("keyboard label", "Shift"));
   /* This is the text that should appear next to menu accelerators
    * that use the control key. If the text on this key isn't typically
    * translated on keyboards used for your language, don't translate
    * this.
-   *
-   * Don't include the prefix "keyboard label|" in the translation.
    */
-  class->mod_name_control = g_strdup (Q_("keyboard label|Ctrl"));
+  class->mod_name_control = g_strdup (C_("keyboard label", "Ctrl"));
   /* This is the text that should appear next to menu accelerators
    * that use the alt key. If the text on this key isn't typically
    * translated on keyboards used for your language, don't translate
    * this.
-   *
-   * Don't include the prefix "keyboard label|" in the translation.
    */
-  class->mod_name_alt = g_strdup (Q_("keyboard label|Alt"));
+  class->mod_name_alt = g_strdup (C_("keyboard label", "Alt"));
   class->mod_separator = g_strdup ("+");
 #else /* GDK_WINDOWING_QUARTZ */
 
@@ -673,9 +667,8 @@
        * that use the super key. If the text on this key isn't typically
        * translated on keyboards used for your language, don't translate
        * this.
-       * And do not translate the part before the |.
        */
-      g_string_append (gstring, Q_("keyboard label|Super"));
+      g_string_append (gstring, C_("keyboard label", "Super"));
       seen_mod = TRUE;
     }
   if (accelerator_mods & GDK_HYPER_MASK)
@@ -687,9 +680,8 @@
        * that use the hyper key. If the text on this key isn't typically
        * translated on keyboards used for your language, don't translate
        * this.
-       * And do not translate the part before the |.
        */
-      g_string_append (gstring, Q_("keyboard label|Hyper"));
+      g_string_append (gstring, C_("keyboard label", "Hyper"));
       seen_mod = TRUE;
     }
   if (accelerator_mods & GDK_META_MASK)
@@ -702,9 +694,8 @@
        * that use the meta key. If the text on this key isn't typically
        * translated on keyboards used for your language, don't translate
        * this.
-       * And do not translate the part before the |.
        */
-      g_string_append (gstring, Q_("keyboard label|Meta"));
+      g_string_append (gstring, C_("keyboard label", "Meta"));
 #else
       /* Command key symbol U+2318 PLACE OF INTEREST SIGN */
       g_string_append (gstring, "\xe2\x8c\x98");
@@ -721,12 +712,10 @@
       switch (ch)
 	{
 	case ' ':
-	  /* do not translate the part before the | */
-	  g_string_append (gstring, Q_("keyboard label|Space"));
+	  g_string_append (gstring, C_("keyboard label", "Space"));
 	  break;
 	case '\\':
-	  /* do not translate the part before the | */
-	  g_string_append (gstring, Q_("keyboard label|Backslash"));
+	  g_string_append (gstring, C_("keyboard label", "Backslash"));
 	  break;
 	default:
 	  g_string_append_unichar (gstring, g_unichar_toupper (ch));

Modified: trunk/gtk/gtkcalendar.c
==============================================================================
--- trunk/gtk/gtkcalendar.c	(original)
+++ trunk/gtk/gtkcalendar.c	Mon Oct 27 01:42:28 2008
@@ -1796,14 +1796,11 @@
 
       priv->max_year_width = 0;
       /* Translators:  This is a text measurement template.
-       * Translate it to the widest year text. 
-       * 
-       * Don't include the prefix "year measurement template|" 
-       * in the translation.
+       * Translate it to the widest year text
        *
        * If you don't understand this, leave it as "2000"
        */
-      pango_layout_set_text (layout, Q_("year measurement template|2000"), -1);	  
+      pango_layout_set_text (layout, C_("year measurement template", "2000"), -1);	  
       pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
       priv->max_year_width = MAX (priv->max_year_width,
 				  logical_rect.width + 8);
@@ -1834,7 +1831,7 @@
   for (i = 0; i < 9; i++)
     {
       gchar buffer[32];
-      g_snprintf (buffer, sizeof (buffer), Q_("calendar:day:digits|%d"), i * 11);
+      g_snprintf (buffer, sizeof (buffer), C_("calendar:day:digits", "%d"), i * 11);
       pango_layout_set_text (layout, buffer, -1);	  
       pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
       priv->min_day_width = MAX (priv->min_day_width,
@@ -1866,7 +1863,7 @@
     for (i = 0; i < 9; i++)
       {
 	gchar buffer[32];
-	g_snprintf (buffer, sizeof (buffer), Q_("calendar:week:digits|%d"), i * 11);
+	g_snprintf (buffer, sizeof (buffer), C_("calendar:week:digits", "%d"), i * 11);
 	pango_layout_set_text (layout, buffer, -1);	  
 	pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
 	priv->max_week_char_width = MAX (priv->max_week_char_width,
@@ -2140,14 +2137,13 @@
    * gtkcalendar widget.  See strftime() manual for the format.
    * Use only ASCII in the translation.
    *
-   * Also look for the msgid "year measurement template|2000".  
+   * Also look for the msgid "2000".
    * Translate that entry to a year with the widest output of this
-   * msgid. 
-   * 
-   * Don't include the prefix "calendar year format|" in the 
-   * translation. "%Y" is appropriate for most locales.
+   * msgid.
+   *
+   * "%Y" is appropriate for most locales.
    */
-  strftime (buffer, sizeof (buffer), Q_("calendar year format|%Y"), tm);
+  strftime (buffer, sizeof (buffer), C_("calendar year format", "%Y"), tm);
   str = g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL);
   layout = gtk_widget_create_pango_layout (widget, str);
   g_free (str);
@@ -2350,14 +2346,13 @@
        * localized digits or the ones used in English (0123...).
        *
        * Translate to "%Id" if you want to use localized digits, or
-       * translate to "%d" otherwise.  Don't include the
-       * "calendar:week:digits|" part in the translation.
+       * translate to "%d" otherwise.
        *
        * Note that translating this doesn't guarantee that you get localized
-       * digits.  That needs support from your system and locale definition
+       * digits. That needs support from your system and locale definition
        * too.
        */
-      g_snprintf (buffer, sizeof (buffer), Q_("calendar:week:digits|%d"), week);
+      g_snprintf (buffer, sizeof (buffer), C_("calendar:week:digits", "%d"), week);
       pango_layout_set_text (layout, buffer, -1);
       pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
 
@@ -2488,14 +2483,13 @@
    * localized digits or the ones used in English (0123...).
    *
    * Translate to "%Id" if you want to use localized digits, or
-   * translate to "%d" otherwise.  Don't include the "calendar:day:digits|"
-   * part in the translation.
+   * translate to "%d" otherwise.
    *
    * Note that translating this doesn't guarantee that you get localized
-   * digits.  That needs support from your system and locale definition
+   * digits. That needs support from your system and locale definition
    * too.
    */
-  g_snprintf (buffer, sizeof (buffer), Q_("calendar:day:digits|%d"), day);
+  g_snprintf (buffer, sizeof (buffer), C_("calendar:day:digits", "%d"), day);
 
   /* Get extra information to show, if any: */
 

Modified: trunk/gtk/gtkcellrendereraccel.c
==============================================================================
--- trunk/gtk/gtkcellrendereraccel.c	(original)
+++ trunk/gtk/gtkcellrendereraccel.c	Mon Oct 27 01:42:28 2008
@@ -238,10 +238,9 @@
 {
   if (keysym == 0 && keycode == 0)
     /* This label is displayed in a treeview cell displaying
-     * a disabled accelerator key combination. Only include
-     * the text after the | in the translation.
+     * a disabled accelerator key combination.
      */
-    return g_strdup (Q_("Accelerator|Disabled"));
+    return g_strdup (C_("Accelerator", "Disabled"));
   else 
     {
       if (accel->accel_mode == GTK_CELL_RENDERER_ACCEL_MODE_GTK)

Modified: trunk/gtk/gtkcellrendererprogress.c
==============================================================================
--- trunk/gtk/gtkcellrendererprogress.c	(original)
+++ trunk/gtk/gtkcellrendererprogress.c	Mon Oct 27 01:42:28 2008
@@ -358,8 +358,7 @@
   if (priv->text)
     label = g_strdup (priv->text);
   else if (priv->pulse < 0)
-    /* do not translate the part before the | */
-    label = g_strdup_printf (Q_("progress bar label|%d %%"), priv->value);
+    label = g_strdup_printf (C_("progress bar label", "%d %%"), priv->value);
   else
     label = NULL;
  
@@ -446,7 +445,7 @@
 
   if (priv->min_w < 0)
     {
-      text = g_strdup_printf (Q_("progress bar label|%d %%"), 100);
+      text = g_strdup_printf (C_("progress bar label", "%d %%"), 100);
       compute_dimensions (cell, widget, text,
 			  &priv->min_w,
 			  &priv->min_h);

Modified: trunk/gtk/gtkimmulticontext.c
==============================================================================
--- trunk/gtk/gtkimmulticontext.c	(original)
+++ trunk/gtk/gtkimmulticontext.c	Mon Oct 27 01:42:28 2008
@@ -542,7 +542,7 @@
   const char *system_context_id; 
   
   system_context_id = _gtk_im_module_get_default_context_id (context->priv->client_window);
-  system_menuitem = menuitem = gtk_radio_menu_item_new_with_label (group, Q_("input method menu|System"));
+  system_menuitem = menuitem = gtk_radio_menu_item_new_with_label (group, C_("input method menu", "System"));
   if (!user_context_id)
     gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menuitem), TRUE);
   group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menuitem));
@@ -626,7 +626,7 @@
           char *text;
 
           label = gtk_bin_get_child (GTK_BIN (system_menuitem));
-          text = g_strdup_printf (Q_("input method menu|System (%s)"), translated_name);
+          text = g_strdup_printf (C_("input method menu", "System (%s)"), translated_name);
           gtk_label_set_text (GTK_LABEL (label), text);
           g_free (text);
         }     

Modified: trunk/gtk/gtkrecentchoosermenu.c
==============================================================================
--- trunk/gtk/gtkrecentchoosermenu.c	(original)
+++ trunk/gtk/gtkrecentchoosermenu.c	Mon Oct 27 01:42:28 2008
@@ -771,21 +771,17 @@
       
       /* avoid clashing mnemonics */
       if (count <= 10)
-        /* This is the label format that is used for the first 10 items 
+        /* This is the label format that is used for the first 10 items
          * in a recent files menu. The %d is the number of the item,
          * the %s is the name of the item. Please keep the _ in front
          * of the number to give these menu items a mnemonic.
-         *
-         * Don't include the prefix "recent menu label|" in the translation.
          */
-        text = g_strdup_printf (Q_("recent menu label|_%d. %s"), count, escaped);
+        text = g_strdup_printf (C_("recent menu label", "_%d. %s"), count, escaped);
       else
-        /* This is the format that is used for items in a recent files menu. 
-         * The %d is the number of the item, the %s is the name of the item. 
-         *
-         * Don't include the prefix "recent menu label|" in the translation.
+        /* This is the format that is used for items in a recent files menu.
+         * The %d is the number of the item, the %s is the name of the item.
          */
-        text = g_strdup_printf (Q_("recent menu label|%d. %s"), count, escaped);
+        text = g_strdup_printf (C_("recent menu label", "%d. %s"), count, escaped);
       
       item = gtk_image_menu_item_new_with_mnemonic (text);
       

Modified: trunk/gtk/gtkvolumebutton.c
==============================================================================
--- trunk/gtk/gtkvolumebutton.c	(original)
+++ trunk/gtk/gtkvolumebutton.c	Mon Oct 27 01:42:28 2008
@@ -164,10 +164,8 @@
        * as used in the tooltip, eg. "49 %".
        * Translate the "%d" to "%Id" if you want to use localised digits,
        * or otherwise translate the "%d" to "%d".
-       * Do not translate and do not include the "volume percentage|"
-       * part in the translation!
        */
-      str = g_strdup_printf (Q_("volume percentage|%d %%"), percent);
+      str = g_strdup_printf (C_("volume percentage", "%d %%"), percent);
     }
 
   gtk_tooltip_set_text (tooltip, str);

Modified: trunk/po/Makefile.in.in
==============================================================================
--- trunk/po/Makefile.in.in	(original)
+++ trunk/po/Makefile.in.in	Mon Oct 27 01:42:28 2008
@@ -92,7 +92,7 @@
 
 $(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES)
 	$(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \
-	  --add-comments --keyword=_ --keyword=N_ --keyword=Q_ \
+	  --add-comments --keyword=_ --keyword=N_ --keyword=C_:1c,2 \
           --flag=g_strdup_printf:1:c-format \
           --flag=g_string_printf:2:c-format \
           --flag=g_string_append_printf:2:c-format \



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