aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-toolbar-editor.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-04-10 05:48:20 +0800
committerChristian Persch <chpe@src.gnome.org>2005-04-10 05:48:20 +0800
commit362684154b565935fbe80d45a421aa3ce18ff3a7 (patch)
tree34695ec7474e240466dfa21ee7e81f711c2bc33e /src/ephy-toolbar-editor.c
parent4f8e3c039bc6fc01e99deeb78645376f2a8b9a18 (diff)
downloadgsoc2013-epiphany-362684154b565935fbe80d45a421aa3ce18ff3a7.tar
gsoc2013-epiphany-362684154b565935fbe80d45a421aa3ce18ff3a7.tar.gz
gsoc2013-epiphany-362684154b565935fbe80d45a421aa3ce18ff3a7.tar.bz2
gsoc2013-epiphany-362684154b565935fbe80d45a421aa3ce18ff3a7.tar.lz
gsoc2013-epiphany-362684154b565935fbe80d45a421aa3ce18ff3a7.tar.xz
gsoc2013-epiphany-362684154b565935fbe80d45a421aa3ce18ff3a7.tar.zst
gsoc2013-epiphany-362684154b565935fbe80d45a421aa3ce18ff3a7.zip
Re-use the strings from control centre domain, to make it consistent
2005-04-09 Christian Persch <chpe@cvs.gnome.org> * src/ephy-toolbar-editor.c: (ephy_toolbar_editor_constructor): Re-use the strings from control centre domain, to make it consistent automatically.
Diffstat (limited to 'src/ephy-toolbar-editor.c')
-rw-r--r--src/ephy-toolbar-editor.c46
1 files changed, 26 insertions, 20 deletions
diff --git a/src/ephy-toolbar-editor.c b/src/ephy-toolbar-editor.c
index fd015ef5d..97a8558d6 100644
--- a/src/ephy-toolbar-editor.c
+++ b/src/ephy-toolbar-editor.c
@@ -46,7 +46,8 @@
#include <gtk/gtkstock.h>
#include <string.h>
-#define DATA_KEY "EphyToolbarEditor"
+#define DATA_KEY "EphyToolbarEditor"
+#define CONTROL_CENTRE_DOMAIN "control-center-2.0"
#define EPHY_TOOLBAR_EDITOR_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_TOOLBAR_EDITOR, EphyToolbarEditorPrivate))
@@ -72,29 +73,18 @@ static const struct
{
const char *text;
EggTbModelFlags flags;
+ gboolean cc_domain;
}
toolbar_styles [] =
{
{ /* Translators: The text before the "|" is context to help you decide on
* the correct translation. You MUST OMIT it in the translated string. */
- N_("toolbar style|Default"), 0 },
- { NULL /* separator row */, 0 },
- { /* Translators: The text before the "|" is context to help you decide on
- * the correct translation. You MUST OMIT it in the translated string. *
- * Translators: translate the same as in gnome-control-center */
- N_("toolbar style|Text below icons"), EGG_TB_MODEL_BOTH },
- { /* Translators: The text before the "|" is context to help you decide on
- * the correct translation. You MUST OMIT it in the translated string. *
- * Translators: translate the same as in gnome-control-center */
- N_("toolbar style|Text beside icons"), EGG_TB_MODEL_BOTH_HORIZ },
- { /* Translators: The text before the "|" is context to help you decide on
- * the correct translation. You MUST OMIT it in the translated string. *
- * Translators: translate the same as in gnome-control-center */
- N_("toolbar style|Icons only"), EGG_TB_MODEL_ICONS },
- { /* Translators: The text before the "|" is context to help you decide on
- * the correct translation. You MUST OMIT it in the translated string. *
- * Translators: translate the same as in gnome-control-center */
- N_("toolbar style|Text only"), EGG_TB_MODEL_TEXT }
+ N_("toolbar style|Default"), 0, FALSE },
+ { NULL /* separator row */, 0, FALSE },
+ { "Text below icons", EGG_TB_MODEL_BOTH, TRUE },
+ { "Text beside icons", EGG_TB_MODEL_BOTH_HORIZ, TRUE },
+ { "Icons only", EGG_TB_MODEL_ICONS, TRUE },
+ { "Text only", EGG_TB_MODEL_TEXT, TRUE }
};
enum
@@ -193,6 +183,12 @@ ephy_toolbar_editor_constructor (GType type,
object = parent_class->constructor (type, n_construct_properties,
construct_params);
+#ifdef ENABLE_NLS
+ /* Initialize the control centre domain */
+ bindtextdomain (CONTROL_CENTRE_DOMAIN, GNOMELOCALEDIR);
+ bind_textdomain_codeset(CONTROL_CENTRE_DOMAIN, "UTF-8");
+#endif
+
dialog = GTK_WIDGET (object);
priv = EPHY_TOOLBAR_EDITOR (object)->priv;
@@ -229,10 +225,20 @@ ephy_toolbar_editor_constructor (GType type,
for (i = 0; i < G_N_ELEMENTS (toolbar_styles); i++)
{
const char *text = toolbar_styles[i].text;
+ const char *tr_text = NULL;
+
+ if (toolbar_styles[i].cc_domain)
+ {
+ tr_text = dgettext (CONTROL_CENTRE_DOMAIN, text);
+ }
+ else if (text != NULL)
+ {
+ tr_text= Q_(text);
+ }
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
- COL_TEXT, text ? Q_(text) : NULL,
+ COL_TEXT, tr_text,
COL_FLAGS, toolbar_styles[i].flags,
COL_IS_SEP, toolbar_styles[i].text == NULL,
-1);