Distinguish Simplified and Traditional Chinese

This commit is contained in:
Christian Dywan 2012-05-11 23:48:47 +02:00
parent c8106ee0ec
commit e3e15973cc
4 changed files with 17 additions and 3 deletions

View file

@ -3407,6 +3407,8 @@ _action_view_encoding_activate (GtkAction* action,
const gchar* encoding;
if (!strcmp (name, "EncodingChinese"))
encoding = "BIG5";
else if (!strcmp (name, "EncodingChineseSimplified"))
encoding = "GB18030";
else if (!strcmp (name, "EncodingJapanese"))
encoding = "SHIFT_JIS";
else if (!strcmp (name, "EncodingKorean"))
@ -5458,7 +5460,10 @@ static const GtkRadioActionEntry encoding_entries[] =
N_("_Automatic"), "",
NULL, 1 },
{ "EncodingChinese", NULL,
N_("Chinese (BIG5)"), "",
N_("Chinese Traditional (BIG5)"), "",
NULL, 1 },
{ "EncodingChineseSimplified", NULL,
N_("Chinese Simplified (GB18030)"), "",
NULL, 1 },
{ "EncodingJapanese", NULL,
/* i18n: A double underscore "__" is used to prevent the mnemonic */
@ -5630,6 +5635,7 @@ static const gchar* ui_markup =
"<menu action='Encoding'>"
"<menuitem action='EncodingAutomatic'/>"
"<menuitem action='EncodingChinese'/>"
"<menuitem action='EncodingChineseSimplified'/>"
"<menuitem action='EncodingJapanese'/>"
"<menuitem action='EncodingKorean'/>"
"<menuitem action='EncodingRussian'/>"

View file

@ -2677,6 +2677,7 @@ midori_view_populate_popup (MidoriView* view,
static const GtkActionEntry encodings[] = {
{ "EncodingAutomatic" },
{ "EncodingChinese" },
{ "EncodingChineseSimplified" },
{ "EncodingJapanese" },
{ "EncodingKorean" },
{ "EncodingRussian" },

View file

@ -233,7 +233,8 @@ midori_preferred_encoding_get_type (void)
if (!type)
{
static const GEnumValue values[] = {
{ MIDORI_ENCODING_CHINESE, "MIDORI_ENCODING_CHINESE", N_("Chinese (BIG5)") },
{ MIDORI_ENCODING_CHINESE, "MIDORI_ENCODING_CHINESE", N_("Chinese Traditional (BIG5)") },
{ MIDORI_ENCODING_CHINESE_SIMPLIFIED, "MIDORI_ENCODING_CHINESE_SIMPLIFIED", N_("Chinese Simplified (GB18030)") },
{ MIDORI_ENCODING_JAPANESE, "MIDORI_ENCODING_JAPANESE", N_("Japanese (SHIFT_JIS)") },
{ MIDORI_ENCODING_KOREAN, "MIDORI_ENCODING_KOREAN", N_("Korean (EUC-KR)") },
{ MIDORI_ENCODING_RUSSIAN, "MIDORI_ENCODING_RUSSIAN", N_("Russian (KOI8-R)") },
@ -1188,6 +1189,8 @@ notify_default_encoding_cb (GObject* object,
encoding = string ? string : "";
if (!strcmp (encoding, "BIG5"))
web_settings->preferred_encoding = MIDORI_ENCODING_CHINESE;
else if (!strcmp (encoding, "GB18030"))
web_settings->preferred_encoding = MIDORI_ENCODING_CHINESE_SIMPLIFIED;
else if (!strcmp (encoding, "SHIFT_JIS"))
web_settings->preferred_encoding = MIDORI_ENCODING_JAPANESE;
else if (!strcmp (encoding, "EUC-KR"))
@ -1552,6 +1555,9 @@ midori_web_settings_set_property (GObject* object,
case MIDORI_ENCODING_CHINESE:
g_object_set (object, "default-encoding", "BIG5", NULL);
break;
case MIDORI_ENCODING_CHINESE_SIMPLIFIED:
g_object_set (object, "default-encoding", "GB18030", NULL);
break;
case MIDORI_ENCODING_JAPANESE:
g_object_set (object, "default-encoding", "SHIFT_JIS", NULL);
break;

View file

@ -80,7 +80,8 @@ midori_startup_get_type (void) G_GNUC_CONST;
typedef enum
{
MIDORI_ENCODING_CHINESE,
MIDORI_ENCODING_CHINESE /* Traditional */,
MIDORI_ENCODING_CHINESE_SIMPLIFIED,
MIDORI_ENCODING_JAPANESE,
MIDORI_ENCODING_KOREAN,
MIDORI_ENCODING_RUSSIAN,