make "Default" label of default input method localizable. use translations

Thu May 29 09:34:05 2003  Hidetoshi Tajima  <hidetoshi.tajima@sun.com>

        * 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).
This commit is contained in:
Hidetoshi Tajima 2003-05-30 00:37:58 +00:00 committed by Hidetoshi Tajima
parent 763672696a
commit 156e978f87
17 changed files with 112 additions and 14 deletions

View File

@ -1,3 +1,16 @@
Thu May 29 09:34:05 2003 Hidetoshi Tajima <hidetoshi.tajima@sun.com>
* 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 <kris@gtk.org>
Merged from stable.

View File

@ -1,3 +1,16 @@
Thu May 29 09:34:05 2003 Hidetoshi Tajima <hidetoshi.tajima@sun.com>
* 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 <kris@gtk.org>
Merged from stable.

View File

@ -1,3 +1,16 @@
Thu May 29 09:34:05 2003 Hidetoshi Tajima <hidetoshi.tajima@sun.com>
* 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 <kris@gtk.org>
Merged from stable.

View File

@ -1,3 +1,16 @@
Thu May 29 09:34:05 2003 Hidetoshi Tajima <hidetoshi.tajima@sun.com>
* 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 <kris@gtk.org>
Merged from stable.

View File

@ -1,3 +1,16 @@
Thu May 29 09:34:05 2003 Hidetoshi Tajima <hidetoshi.tajima@sun.com>
* 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 <kris@gtk.org>
Merged from stable.

View File

@ -416,7 +416,7 @@ _gtk_im_module_list (const GtkIMContextInfo ***contexts,
static const GtkIMContextInfo simple_context_info = {
SIMPLE_ID,
"Default",
N_("Default"),
"gtk+",
NULL,
""

View File

@ -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 &&

View File

@ -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 */
};

View File

@ -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 */
};

View File

@ -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 */
};

View File

@ -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 */
};

View File

@ -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 */
};

View File

@ -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 */
};

View File

@ -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 */
};

View File

@ -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 */
};

View File

@ -1,3 +1,7 @@
Thu May 29 09:46:26 2003 Hidetoshi Tajima <hidetoshi.tajima@sun.com>
* POTFILES.in: add gtk/gtkimmodule.c (#113850)
2003-05-19 Arafat Medini <lumina@silverpen.de>
* ar.po: Added Arabic translation by Arabeyes.

View File

@ -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