gtk2/bugzilla-129753-gtk+-2.8.9-localize-font-style-name.diff

49 lines
1.9 KiB
Diff

Index: gtk+-2.19.0/gtk/gtkfontbutton.c
===================================================================
--- gtk+-2.19.0.orig/gtk/gtkfontbutton.c
+++ gtk+-2.19.0/gtk/gtkfontbutton.c
@@ -893,7 +893,7 @@ gtk_font_button_update_font_info (GtkFon
if (style == NULL || !g_ascii_strcasecmp (style, "Regular"))
family_style = g_strdup (family);
else
- family_style = g_strdup_printf ("%s %s", family, style);
+ family_style = g_strdup_printf ("%s %s", family, _(style));
gtk_label_set_text (GTK_LABEL (font_button->priv->font_label), family_style);
Index: gtk+-2.19.0/gtk/gtkfontsel.c
===================================================================
--- gtk+-2.19.0.orig/gtk/gtkfontsel.c
+++ gtk+-2.19.0/gtk/gtkfontsel.c
@@ -76,6 +76,21 @@
#define DEFAULT_FONT_NAME "Sans 10"
+/* These are the commonly used font styles, listed here only for
+ translations. */
+#define FONT_STYLE_ULTRA_LIGHT N_("Ultra-Light")
+#define FONT_STYLE_LIGHT N_("Light")
+#define FONT_STYLE_MEDIUM N_("Medium")
+#define FONT_STYLE_NORMAL N_("Normal")
+#define FONT_STYLE_REGULAR N_("Regular")
+#define FONT_STYLE_ITALIC N_("Italic")
+#define FONT_STYLE_OBLIQUE N_("Oblique")
+#define FONT_STYLE_SEMI_BOLD N_("Semi-Bold")
+#define FONT_STYLE_BOLD N_("Bold")
+#define FONT_STYLE_ULTRA_BOLD N_("Ultra-Bold")
+#define FONT_STYLE_HEAVY N_("Heavy")
+#define FONT_STYLE_BOLD_ITALIC N_("Bold Italic")
+
/* This is the initial and maximum height of the preview entry (it expands
when large font sizes are selected). Initial height is also the minimum. */
#define INITIAL_PREVIEW_HEIGHT 44
@@ -869,7 +884,7 @@ gtk_font_selection_show_available_styles
gtk_list_store_append (model, &iter);
gtk_list_store_set (model, &iter,
FACE_COLUMN, faces[i],
- FACE_NAME_COLUMN, str,
+ FACE_NAME_COLUMN, _(str),
-1);
if (i == 0)