Commit 5cfd0383 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Use C_() instead of Q_(). String change!

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!



svn path=/trunk/; revision=21716
parent ca15f74a
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!
2008-10-26 Christian Persch <chpe@gnome.org>
Bug 557065 – gtkcellrendererpixbuf spams console over and over with
......
......@@ -87,26 +87,20 @@ gtk_accel_label_class_init (GtkAccelLabelClass *class)
* 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 @@ _gtk_accel_label_class_get_accelerator_label (GtkAccelLabelClass *klass,
* 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 @@ _gtk_accel_label_class_get_accelerator_label (GtkAccelLabelClass *klass,
* 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 @@ _gtk_accel_label_class_get_accelerator_label (GtkAccelLabelClass *klass,
* 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 @@ _gtk_accel_label_class_get_accelerator_label (GtkAccelLabelClass *klass,
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));
......
......@@ -1796,14 +1796,11 @@ gtk_calendar_size_request (GtkWidget *widget,
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 @@ gtk_calendar_size_request (GtkWidget *widget,
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 @@ gtk_calendar_size_request (GtkWidget *widget,
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 @@ calendar_paint_header (GtkCalendar *calendar)
* 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 @@ calendar_paint_week_numbers (GtkCalendar *calendar)
* 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 @@ calendar_paint_day (GtkCalendar *calendar,
* 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: */
......
......@@ -238,10 +238,9 @@ convert_keysym_state_to_string (GtkCellRendererAccel *accel,
{
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)
......
......@@ -358,8 +358,7 @@ recompute_label (GtkCellRendererProgress *cellprogress)
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 @@ gtk_cell_renderer_progress_get_size (GtkCellRenderer *cell,
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);
......
......@@ -542,7 +542,7 @@ gtk_im_multicontext_append_menuitems (GtkIMMulticontext *context,
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 @@ gtk_im_multicontext_append_menuitems (GtkIMMulticontext *context,
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);
}
......
......@@ -771,21 +771,17 @@ gtk_recent_chooser_menu_create_item (GtkRecentChooserMenu *menu,
/* 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);
......
......@@ -164,10 +164,8 @@ cb_query_tooltip (GtkWidget *button,
* 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);
......
......@@ -92,7 +92,7 @@ all-no:
$(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 \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment