diff --git a/ChangeLog b/ChangeLog index 9bedfadae3..06ee567bd1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +Thu May 29 09:34:05 2003 Hidetoshi Tajima + + * gtk/gtkimmodule.c (_gtk_im_module_list): make "Default" + label of default input method localizable. + * gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems): + use translations of input method context names + * modules/input/imam-et.c, modules/input/imcyrillic-translit.c, + modules/input/iminuktitut.c, modules/input/imthai-broken.c, + modules/input/imti-er.c, modules/input/imti-et.c + modules/input/imviqr.c, modules/input/imxim.c + use GETTEXT_PACKAGE instead of "gtk+" for domain name. + (#113850). + Thu May 29 18:23:01 2003 Kristian Rietveld Merged from stable. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 9bedfadae3..06ee567bd1 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,16 @@ +Thu May 29 09:34:05 2003 Hidetoshi Tajima + + * gtk/gtkimmodule.c (_gtk_im_module_list): make "Default" + label of default input method localizable. + * gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems): + use translations of input method context names + * modules/input/imam-et.c, modules/input/imcyrillic-translit.c, + modules/input/iminuktitut.c, modules/input/imthai-broken.c, + modules/input/imti-er.c, modules/input/imti-et.c + modules/input/imviqr.c, modules/input/imxim.c + use GETTEXT_PACKAGE instead of "gtk+" for domain name. + (#113850). + Thu May 29 18:23:01 2003 Kristian Rietveld Merged from stable. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 9bedfadae3..06ee567bd1 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,16 @@ +Thu May 29 09:34:05 2003 Hidetoshi Tajima + + * gtk/gtkimmodule.c (_gtk_im_module_list): make "Default" + label of default input method localizable. + * gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems): + use translations of input method context names + * modules/input/imam-et.c, modules/input/imcyrillic-translit.c, + modules/input/iminuktitut.c, modules/input/imthai-broken.c, + modules/input/imti-er.c, modules/input/imti-et.c + modules/input/imviqr.c, modules/input/imxim.c + use GETTEXT_PACKAGE instead of "gtk+" for domain name. + (#113850). + Thu May 29 18:23:01 2003 Kristian Rietveld Merged from stable. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 9bedfadae3..06ee567bd1 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,16 @@ +Thu May 29 09:34:05 2003 Hidetoshi Tajima + + * gtk/gtkimmodule.c (_gtk_im_module_list): make "Default" + label of default input method localizable. + * gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems): + use translations of input method context names + * modules/input/imam-et.c, modules/input/imcyrillic-translit.c, + modules/input/iminuktitut.c, modules/input/imthai-broken.c, + modules/input/imti-er.c, modules/input/imti-et.c + modules/input/imviqr.c, modules/input/imxim.c + use GETTEXT_PACKAGE instead of "gtk+" for domain name. + (#113850). + Thu May 29 18:23:01 2003 Kristian Rietveld Merged from stable. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 9bedfadae3..06ee567bd1 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,16 @@ +Thu May 29 09:34:05 2003 Hidetoshi Tajima + + * gtk/gtkimmodule.c (_gtk_im_module_list): make "Default" + label of default input method localizable. + * gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems): + use translations of input method context names + * modules/input/imam-et.c, modules/input/imcyrillic-translit.c, + modules/input/iminuktitut.c, modules/input/imthai-broken.c, + modules/input/imti-er.c, modules/input/imti-et.c + modules/input/imviqr.c, modules/input/imxim.c + use GETTEXT_PACKAGE instead of "gtk+" for domain name. + (#113850). + Thu May 29 18:23:01 2003 Kristian Rietveld Merged from stable. diff --git a/gtk/gtkimmodule.c b/gtk/gtkimmodule.c index 042c9024ca..e4e77ff9b4 100644 --- a/gtk/gtkimmodule.c +++ b/gtk/gtkimmodule.c @@ -416,7 +416,7 @@ _gtk_im_module_list (const GtkIMContextInfo ***contexts, static const GtkIMContextInfo simple_context_info = { SIMPLE_ID, - "Default", + N_("Default"), "gtk+", NULL, "" diff --git a/gtk/gtkimmulticontext.c b/gtk/gtkimmulticontext.c index 4bee03330c..b547dd7c9a 100644 --- a/gtk/gtkimmulticontext.c +++ b/gtk/gtkimmulticontext.c @@ -25,6 +25,7 @@ #include "gtkimmulticontext.h" #include "gtkimmodule.h" #include "gtkradiomenuitem.h" +#include "gtkintl.h" static void gtk_im_multicontext_class_init (GtkIMMulticontextClass *class); static void gtk_im_multicontext_init (GtkIMMulticontext *im_multicontext); @@ -480,9 +481,36 @@ gtk_im_multicontext_append_menuitems (GtkIMMulticontext *context, for (i=0; i < n_contexts; i++) { GtkWidget *menuitem; - + const gchar *translated_name; +#ifdef ENABLE_NLS + if (contexts[i]->domain && contexts[i]->domain_dirname && + contexts[i]->domain[0] && contexts[i]->domain_dirname[0]) + { + if (strcmp (contexts[i]->domain, GETTEXT_PACKAGE) == 0 && + strcmp (contexts[i]->domain_dirname, GTK_LOCALEDIR) == 0) + /* Input method may have a name in the GTK+ message catalog */ + translated_name = _(contexts[i]->context_name); + else + /* Input method has own message catalog */ + { + bindtextdomain (contexts[i]->domain, + contexts[i]->domain_dirname); +#ifdef HAVE_BIND_TEXTDOMAIN_CODESET + bind_textdomain_codeset (contexts[i]->domain, "UTF-8"); +#endif + translated_name = dgettext (contexts[i]->domain, contexts[i]->context_name); + } + } + else + /* Either domain or domain_dirname is NULL or "". We assume that + * input method does not want a translated name in this case + */ + translated_name = contexts[i]->context_name; +#else + translated_name = contexts[i]->context_name; +#endif menuitem = gtk_radio_menu_item_new_with_label (group, - contexts[i]->context_name); + translated_name); if ((global_context_id == NULL && group == NULL) || (global_context_id && diff --git a/modules/input/imam-et.c b/modules/input/imam-et.c index bbdb8f7a6e..2e3f659e69 100644 --- a/modules/input/imam-et.c +++ b/modules/input/imam-et.c @@ -450,8 +450,8 @@ am_et_init (GtkIMContextSimple *im_context) static const GtkIMContextInfo am_et_info = { "am_et", /* ID */ - N_("Amharic (EZ+)"), /* Human readable name */ - "gtk+", /* Translation domain */ + N_("Amharic (EZ+)"), /* Human readable name */ + GETTEXT_PACKAGE, /* Translation domain */ GTK_LOCALEDIR, /* Dir for bindtextdomain (not strictly needed for "gtk+") */ "am" /* Languages for which this module is the default */ }; diff --git a/modules/input/imcyrillic-translit.c b/modules/input/imcyrillic-translit.c index 5f0a0218b3..ccd2bc4146 100644 --- a/modules/input/imcyrillic-translit.c +++ b/modules/input/imcyrillic-translit.c @@ -214,7 +214,7 @@ cyrillic_translit_init (GtkIMContextSimple *im_context) static const GtkIMContextInfo cyrillic_translit_info = { "cyrillic_translit", /* ID */ N_("Cyrillic (Transliterated)"), /* Human readable name */ - "gtk+", /* Translation domain */ + GETTEXT_PACKAGE, /* Translation domain */ GTK_LOCALEDIR, /* Dir for bindtextdomain (not strictly needed for "gtk+") */ "" /* Languages for which this module is the default */ }; diff --git a/modules/input/iminuktitut.c b/modules/input/iminuktitut.c index 9d1d7827f7..d57d72dba3 100644 --- a/modules/input/iminuktitut.c +++ b/modules/input/iminuktitut.c @@ -124,8 +124,8 @@ inuktitut_init (GtkIMContextSimple *im_context) static const GtkIMContextInfo inuktitut_info = { "inuktitut", /* ID */ N_("Inukitut (Transliterated)"), /* Human readable name */ - "gtk+", /* Translation domain */ - GTK_LOCALEDIR, /* Dir for bindtextdomain (not strictly needed for "gtk+") */ + GETTEXT_PACKAGE, /* Translation domain */ + GTK_LOCALEDIR, /* Dir for bindtextdomain (not strictly needed for "gtk+") */ "iu" /* Languages for which this module is the default */ }; diff --git a/modules/input/imthai-broken.c b/modules/input/imthai-broken.c index b31ae4c1d2..98f3921464 100644 --- a/modules/input/imthai-broken.c +++ b/modules/input/imthai-broken.c @@ -175,7 +175,7 @@ thai_broken_init (GtkIMContextSimple *im_context) static const GtkIMContextInfo thai_broken_info = { "thai_broken", /* ID */ N_("Thai (Broken)"), /* Human readable name */ - "gtk+", /* Translation domain */ + GETTEXT_PACKAGE, /* Translation domain */ GTK_LOCALEDIR, /* Dir for bindtextdomain (not strictly needed for "gtk+") */ "" /* Languages for which this module is the default */ }; diff --git a/modules/input/imti-er.c b/modules/input/imti-er.c index c0c65e6411..e1905c70af 100644 --- a/modules/input/imti-er.c +++ b/modules/input/imti-er.c @@ -450,7 +450,7 @@ ti_er_init (GtkIMContextSimple *im_context) static const GtkIMContextInfo ti_er_info = { "ti_er", /* ID */ N_("Tigrigna-Eritrean (EZ+)"), /* Human readable name */ - "gtk+", /* Translation domain */ + GETTEXT_PACKAGE, /* Translation domain */ GTK_LOCALEDIR, /* Dir for bindtextdomain (not strictly needed for "gtk+") */ "ti" /* Languages for which this module is the default */ }; diff --git a/modules/input/imti-et.c b/modules/input/imti-et.c index 3ceab1b97c..2a2b28d075 100644 --- a/modules/input/imti-et.c +++ b/modules/input/imti-et.c @@ -450,7 +450,7 @@ ti_et_init (GtkIMContextSimple *im_context) static const GtkIMContextInfo ti_et_info = { "ti_et", /* ID */ N_("Tigrigna-Ethiopian (EZ+)"), /* Human readable name */ - "gtk+", /* Translation domain */ + GETTEXT_PACKAGE, /* Translation domain */ GTK_LOCALEDIR, /* Dir for bindtextdomain (not strictly needed for "gtk+") */ "ti" /* Languages for which this module is the default */ }; diff --git a/modules/input/imviqr.c b/modules/input/imviqr.c index be08db0812..977318ea14 100644 --- a/modules/input/imviqr.c +++ b/modules/input/imviqr.c @@ -241,7 +241,7 @@ viqr_init (GtkIMContextSimple *im_context) static const GtkIMContextInfo viqr_info = { "viqr", /* ID */ N_("Vietnamese (VIQR)"), /* Human readable name */ - "gtk+", /* Translation domain */ + GETTEXT_PACKAGE, /* Translation domain */ GTK_LOCALEDIR, /* Dir for bindtextdomain (not strictly needed for "gtk+") */ "vi" /* Languages for which this module is the default */ }; diff --git a/modules/input/imxim.c b/modules/input/imxim.c index 503e555923..cb719058e9 100644 --- a/modules/input/imxim.c +++ b/modules/input/imxim.c @@ -25,8 +25,8 @@ static const GtkIMContextInfo xim_ja_info = { "xim", /* ID */ N_("X Input Method"), /* Human readable name */ - "gtk+", /* Translation domain */ - GTK_LOCALEDIR, /* Dir for bindtextdomain (not strictly needed for "gtk+") */ + GETTEXT_PACKAGE, /* Translation domain */ + GTK_LOCALEDIR, /* Dir for bindtextdomain (not strictly needed for "gtk+") */ "ko:ja:zh" /* Languages for which this module is the default */ }; diff --git a/po/ChangeLog b/po/ChangeLog index 87ac542777..6e831c7524 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -1,3 +1,7 @@ + Thu May 29 09:46:26 2003 Hidetoshi Tajima + + * POTFILES.in: add gtk/gtkimmodule.c (#113850) + 2003-05-19 Arafat Medini * ar.po: Added Arabic translation by Arabeyes. diff --git a/po/POTFILES.in b/po/POTFILES.in index 033aba0a2a..ee5a4ae5ef 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -48,6 +48,7 @@ gtk/gtkhandlebox.c gtk/gtkiconfactory.c gtk/gtkimage.c gtk/gtkimagemenuitem.c +gtk/gtkimmodule.c gtk/gtkinputdialog.c gtk/gtkinvisible.c gtk/gtklabel.c