diff options
Diffstat (limited to '')
-rw-r--r-- | rc.c | 53 |
1 files changed, 34 insertions, 19 deletions
@@ -1,4 +1,4 @@ -/* $Id: rc.c,v 1.96 2004/04/22 16:34:08 ukai Exp $ */ +/* $Id: rc.c,v 1.102 2006/04/07 15:48:56 inu Exp $ */ /* * Initialization file etc. */ @@ -192,6 +192,7 @@ static int OptionEncode = FALSE; #endif /* USE_SSL */ #ifdef USE_COOKIE #define CMT_USECOOKIE N_("Enable cookie processing") +#define CMT_SHOWCOOKIE N_("Print a message when receiving a cookie") #define CMT_ACCEPTCOOKIE N_("Accept cookies") #define CMT_ACCEPTBADCOOKIE N_("Action to be taken on invalid cookie") #define CMT_COOKIE_REJECT_DOMAINS N_("Domains to reject cookies from") @@ -289,22 +290,22 @@ static struct sel_c wheelmode[] = { #ifdef INET6 static struct sel_c dnsorders[] = { - {N_S(DNS_ORDER_UNSPEC), "unspecified"}, - {N_S(DNS_ORDER_INET_INET6), "inet inet6"}, - {N_S(DNS_ORDER_INET6_INET), "inet6 inet"}, - {N_S(DNS_ORDER_INET_ONLY), "inet only"}, - {N_S(DNS_ORDER_INET6_ONLY), "inet6 only"}, + {N_S(DNS_ORDER_UNSPEC), N_("unspecified")}, + {N_S(DNS_ORDER_INET_INET6), N_("inet inet6")}, + {N_S(DNS_ORDER_INET6_INET), N_("inet6 inet")}, + {N_S(DNS_ORDER_INET_ONLY), N_("inet only")}, + {N_S(DNS_ORDER_INET6_ONLY), N_("inet6 only")}, {0, NULL, NULL} }; #endif /* INET6 */ #ifdef USE_COOKIE static struct sel_c badcookiestr[] = { - {N_S(ACCEPT_BAD_COOKIE_DISCARD), "discard"}, + {N_S(ACCEPT_BAD_COOKIE_DISCARD), N_("discard")}, #if 0 - {N_S(ACCEPT_BAD_COOKIE_ACCEPT), "accept"}, + {N_S(ACCEPT_BAD_COOKIE_ACCEPT), N_("accept")}, #endif - {N_S(ACCEPT_BAD_COOKIE_ASK), "ask"}, + {N_S(ACCEPT_BAD_COOKIE_ASK), N_("ask")}, {0, NULL, NULL} }; #endif /* USE_COOKIE */ @@ -314,9 +315,9 @@ static wc_ces_list *display_charset_str = NULL; static wc_ces_list *document_charset_str = NULL; static wc_ces_list *system_charset_str = NULL; static struct sel_c auto_detect_str[] = { - {N_S(WC_OPT_DETECT_OFF), "OFF"}, - {N_S(WC_OPT_DETECT_ISO_2022), "Only ISO 2022"}, - {N_S(WC_OPT_DETECT_ON), "ON"}, + {N_S(WC_OPT_DETECT_OFF), N_("OFF")}, + {N_S(WC_OPT_DETECT_ISO_2022), N_("Only ISO 2022")}, + {N_S(WC_OPT_DETECT_ON), N_("ON")}, {0, NULL, NULL} }; #endif @@ -552,6 +553,8 @@ struct param_ptr params7[] = { #ifdef USE_COOKIE struct param_ptr params8[] = { {"use_cookie", P_INT, PI_ONOFF, (void *)&use_cookie, CMT_USECOOKIE, NULL}, + {"show_cookie", P_INT, PI_ONOFF, (void *)&show_cookie, + CMT_SHOWCOOKIE, NULL}, {"accept_cookie", P_INT, PI_ONOFF, (void *)&accept_cookie, CMT_ACCEPTCOOKIE, NULL}, {"accept_bad_cookie", P_INT, PI_SEL_C, (void *)&accept_bad_cookie, @@ -793,7 +796,7 @@ show_params(FILE * fp) #ifdef USE_M17N if (!OptionEncode) cmt = - wc_conv(gettext(sections[j].name), OptionCharset, + wc_conv(_(sections[j].name), OptionCharset, InnerCharset)->ptr; else #endif @@ -839,7 +842,7 @@ show_params(FILE * fp) } #ifdef USE_M17N if (!OptionEncode) - cmt = wc_conv(gettext(sections[j].params[i].comment), + cmt = wc_conv(_(sections[j].params[i].comment), OptionCharset, InnerCharset)->ptr; else #endif @@ -1303,7 +1306,7 @@ load_option_panel(void) if (optionpanel_str == NULL) optionpanel_str = Sprintf(optionpanel_src1, w3m_version, - html_quote(localCookie()->ptr), CMT_HELPER); + html_quote(localCookie()->ptr), _(CMT_HELPER)); #if ENABLE_NLS OptionCharset = SystemCharset; /* FIXME */ #endif @@ -1313,16 +1316,28 @@ load_option_panel(void) wc_Str_conv(optionpanel_str, OptionCharset, InnerCharset); for (i = 0; sections[i].name != NULL; i++) { sections[i].name = - wc_conv(gettext(sections[i].name), OptionCharset, + wc_conv(_(sections[i].name), OptionCharset, InnerCharset)->ptr; - for (p = sections[i].params; p->name; p++) + for (p = sections[i].params; p->name; p++) { p->comment = - wc_conv(gettext(p->comment), OptionCharset, + wc_conv(_(p->comment), OptionCharset, InnerCharset)->ptr; + if (p->inputtype == PI_SEL_C +#ifdef USE_COLOR + && p->select != colorstr +#endif + ) { + for (s = (struct sel_c *)p->select; s->text != NULL; s++) { + s->text = + wc_conv(_(s->text), OptionCharset, + InnerCharset)->ptr; + } + } + } } #ifdef USE_COLOR for (s = colorstr; s->text; s++) - s->text = wc_conv(gettext(s->text), OptionCharset, + s->text = wc_conv(_(s->text), OptionCharset, InnerCharset)->ptr; #endif OptionEncode = TRUE; |