From 1dc99c1dc2a95ccd117c444e08940889dcaf5778 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Wed, 19 Sep 2012 17:40:13 +0200 Subject: [PATCH] charset: allow "UTF-8" in charset encoding options (still forbidden in decoding options) --- ChangeLog | 6 ++-- doc/de/autogen/user/charset_options.txt | 4 +-- doc/en/autogen/user/charset_options.txt | 4 +-- doc/fr/autogen/user/charset_options.txt | 4 +-- doc/it/autogen/user/charset_options.txt | 4 +-- doc/ja/autogen/user/charset_options.txt | 4 +-- po/cs.po | 26 +++++++++----- po/de.po | 28 ++++++++++----- po/es.po | 26 +++++++++----- po/fr.po | 40 +++++++++++++++------- po/hu.po | 16 +++++---- po/it.po | 28 ++++++++++----- po/ja.po | 28 ++++++++++----- po/pl.po | 26 +++++++++----- po/pt_BR.po | 26 +++++++++----- po/ru.po | 16 +++++---- po/weechat.pot | 16 +++++---- src/plugins/charset/charset.c | 45 ++++++++++++++----------- 18 files changed, 226 insertions(+), 121 deletions(-) diff --git a/ChangeLog b/ChangeLog index 94721a7fb..5544a4adb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ WeeChat ChangeLog ================= Sébastien Helleu -v0.3.9-rc2, 2012-09-18 +v0.3.9-rc2, 2012-09-19 Version 0.3.9 (under dev!) @@ -63,8 +63,8 @@ Version 0.3.9 (under dev!) command /aspell (rename options enable/disable/dictlist to setdict/deldict/listdict), display aspell status with /aspell (task #11988) * aspell: add missing dictionaries (ast/grc/hus/kn/ky) -* charset: do not allow "UTF-8" in charset options (useless because UTF-8 is the - internal WeeChat charset) +* charset: do not allow "UTF-8" in charset decoding options (useless because + UTF-8 is the internal WeeChat charset) * fifo: ignore read failing with error EAGAIN (bug #37019) * guile: fix crash when unloading a script without pointer to interpreter * guile: fix path of guile include dirs in cmake build (patch #7790) diff --git a/doc/de/autogen/user/charset_options.txt b/doc/de/autogen/user/charset_options.txt index 238e79f13..9652b1988 100644 --- a/doc/de/autogen/user/charset_options.txt +++ b/doc/de/autogen/user/charset_options.txt @@ -1,10 +1,10 @@ * [[option_charset.default.decode]] *charset.default.decode* -** Beschreibung: `globaler Zeichensatz zum dekodieren` +** Beschreibung: `global decoding charset: charset used to decode incoming messages (if decoding fails, fallback is UTF-8 because it is the WeeChat internal charset)` ** Typ: Zeichenkette ** Werte: beliebige Zeichenkette (Standardwert: `"iso-8859-1"`) * [[option_charset.default.encode]] *charset.default.encode* -** Beschreibung: `globaler Zeichensatz zum kodieren` +** Beschreibung: `global encoding charset: charset used to encode outgoing messages (if empty, default is UTF-8 because it is the WeeChat internal charset)` ** Typ: Zeichenkette ** Werte: beliebige Zeichenkette (Standardwert: `""`) diff --git a/doc/en/autogen/user/charset_options.txt b/doc/en/autogen/user/charset_options.txt index f49b041e2..b17707e26 100644 --- a/doc/en/autogen/user/charset_options.txt +++ b/doc/en/autogen/user/charset_options.txt @@ -1,10 +1,10 @@ * [[option_charset.default.decode]] *charset.default.decode* -** description: `global decoding charset` +** description: `global decoding charset: charset used to decode incoming messages (if decoding fails, fallback is UTF-8 because it is the WeeChat internal charset)` ** type: string ** values: any string (default value: `"iso-8859-1"`) * [[option_charset.default.encode]] *charset.default.encode* -** description: `global encoding charset` +** description: `global encoding charset: charset used to encode outgoing messages (if empty, default is UTF-8 because it is the WeeChat internal charset)` ** type: string ** values: any string (default value: `""`) diff --git a/doc/fr/autogen/user/charset_options.txt b/doc/fr/autogen/user/charset_options.txt index 7f6f64d8b..cf06f7d75 100644 --- a/doc/fr/autogen/user/charset_options.txt +++ b/doc/fr/autogen/user/charset_options.txt @@ -1,10 +1,10 @@ * [[option_charset.default.decode]] *charset.default.decode* -** description: `charset de décodage global` +** description: `charset de décodage global: charset utilisé pour décoder les messages entrants (si le décodage échoue, par défaut UTF-8 sera utilisé car c'est le charset interne de WeeChat)` ** type: chaîne ** valeurs: toute chaîne (valeur par défaut: `"iso-8859-1"`) * [[option_charset.default.encode]] *charset.default.encode* -** description: `charset d'encodage global` +** description: `charset d'encodage global: charset utilisé pour encoder les messages sortants (si vide, le défaut est UTF-8 car c'est le charset interne de WeeChat)` ** type: chaîne ** valeurs: toute chaîne (valeur par défaut: `""`) diff --git a/doc/it/autogen/user/charset_options.txt b/doc/it/autogen/user/charset_options.txt index ada729b0e..7a7ecf630 100644 --- a/doc/it/autogen/user/charset_options.txt +++ b/doc/it/autogen/user/charset_options.txt @@ -1,10 +1,10 @@ * [[option_charset.default.decode]] *charset.default.decode* -** descrizione: `set di caratteri per la decodifica globale` +** descrizione: `global decoding charset: charset used to decode incoming messages (if decoding fails, fallback is UTF-8 because it is the WeeChat internal charset)` ** tipo: stringa ** valori: qualsiasi stringa (valore predefinito: `"iso-8859-1"`) * [[option_charset.default.encode]] *charset.default.encode* -** descrizione: `set di caratter per la codifica globale` +** descrizione: `global encoding charset: charset used to encode outgoing messages (if empty, default is UTF-8 because it is the WeeChat internal charset)` ** tipo: stringa ** valori: qualsiasi stringa (valore predefinito: `""`) diff --git a/doc/ja/autogen/user/charset_options.txt b/doc/ja/autogen/user/charset_options.txt index c5072e50a..047901915 100644 --- a/doc/ja/autogen/user/charset_options.txt +++ b/doc/ja/autogen/user/charset_options.txt @@ -1,10 +1,10 @@ * [[option_charset.default.decode]] *charset.default.decode* -** 説明: `グローバルデコード文字集合` +** 説明: `global decoding charset: charset used to decode incoming messages (if decoding fails, fallback is UTF-8 because it is the WeeChat internal charset)` ** タイプ: 文字列 ** 値: 未制約文字列 (デフォルト値: `"iso-8859-1"`) * [[option_charset.default.encode]] *charset.default.encode* -** 説明: `グローバルエンコード文字集合` +** 説明: `global encoding charset: charset used to encode outgoing messages (if empty, default is UTF-8 because it is the WeeChat internal charset)` ** タイプ: 文字列 ** 値: 未制約文字列 (デフォルト値: `""`) diff --git a/po/cs.po b/po/cs.po index c7392ce75..bce658d29 100644 --- a/po/cs.po +++ b/po/cs.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-04 13:19+0200\n" +"POT-Creation-Date: 2012-09-19 14:48+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -3799,20 +3799,24 @@ msgstr "verze WeeChat" #, c-format msgid "" -"%s%s: UTF-8 is not allowed in charset options (it is internal and default " -"charset: default encode is UTF-8 and decode of UTF-8 is OK even if you " -"specify another charset to decode)" +"%s%s: UTF-8 is not allowed in charset decoding options (it is internal and " +"default charset: decode of UTF-8 is OK even if you specify another charset " +"to decode)" msgstr "" #, c-format msgid "%s%s: error creating charset \"%s\" => \"%s\"" msgstr "%s%s: chyba vytváření znakové sady \"%s\" => \"%s\"" -msgid "global decoding charset" -msgstr "globální znaková sada pro dekódování" +msgid "" +"global decoding charset: charset used to decode incoming messages (if " +"decoding fails, fallback is UTF-8 because it is the WeeChat internal charset)" +msgstr "" -msgid "global encoding charset" -msgstr "globální znaková sada pro kódování" +msgid "" +"global encoding charset: charset used to encode outgoing messages (if empty, " +"default is UTF-8 because it is the WeeChat internal charset)" +msgstr "" #, c-format msgid "%s: %s, \"%s\": removed" @@ -9064,6 +9068,12 @@ msgstr "" msgid "Constants" msgstr "" +#~ msgid "global decoding charset" +#~ msgstr "globální znaková sada pro dekódování" + +#~ msgid "global encoding charset" +#~ msgstr "globální znaková sada pro kódování" + #~ msgid "%s: connecting to server %s/%d%s%s..." #~ msgstr "%s: připojuji se k serveru %s/%d%s%s..." diff --git a/po/de.po b/po/de.po index 0a1b96438..93cc074cc 100644 --- a/po/de.po +++ b/po/de.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-18 21:14+0200\n" +"POT-Creation-Date: 2012-09-19 14:48+0200\n" "PO-Revision-Date: 2012-09-18 21:14+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -4176,11 +4176,11 @@ msgstr "%s%s: Nicht genug Speicher um neue Rechtschreibung zu erstellen" msgid "Charset conversions" msgstr "Zeichensatzkonvertierung" -#, c-format +#, fuzzy, c-format msgid "" -"%s%s: UTF-8 is not allowed in charset options (it is internal and default " -"charset: default encode is UTF-8 and decode of UTF-8 is OK even if you " -"specify another charset to decode)" +"%s%s: UTF-8 is not allowed in charset decoding options (it is internal and " +"default charset: decode of UTF-8 is OK even if you specify another charset " +"to decode)" msgstr "" "%s%s: UTF-8 ist in den Charset-Optionen nicht erlaubt (dies ist der interne " "und Standard-Charset: UTF-8 dient zur Kodierung und zur Dekodierung kann " @@ -4191,11 +4191,15 @@ msgstr "" msgid "%s%s: error creating charset \"%s\" => \"%s\"" msgstr "%s%s: Fehler bei der Erstellung des Zeichensatzes \"%s\" => \"%s\"" -msgid "global decoding charset" -msgstr "globaler Zeichensatz zum dekodieren" +msgid "" +"global decoding charset: charset used to decode incoming messages (if " +"decoding fails, fallback is UTF-8 because it is the WeeChat internal charset)" +msgstr "" -msgid "global encoding charset" -msgstr "globaler Zeichensatz zum kodieren" +msgid "" +"global encoding charset: charset used to encode outgoing messages (if empty, " +"default is UTF-8 because it is the WeeChat internal charset)" +msgstr "" #, c-format msgid "%s: %s, \"%s\": removed" @@ -9752,6 +9756,12 @@ msgstr "Type" msgid "Constants" msgstr "Konstanten" +#~ msgid "global decoding charset" +#~ msgstr "globaler Zeichensatz zum dekodieren" + +#~ msgid "global encoding charset" +#~ msgstr "globaler Zeichensatz zum kodieren" + #~ msgid "alt+d=back to list" #~ msgstr "alt+d=zurück zur Auswahl" diff --git a/po/es.po b/po/es.po index 6e89eba73..fc9597a28 100644 --- a/po/es.po +++ b/po/es.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-04 13:19+0200\n" +"POT-Creation-Date: 2012-09-19 14:48+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -3999,20 +3999,24 @@ msgstr "versión de WeeChat" #, c-format msgid "" -"%s%s: UTF-8 is not allowed in charset options (it is internal and default " -"charset: default encode is UTF-8 and decode of UTF-8 is OK even if you " -"specify another charset to decode)" +"%s%s: UTF-8 is not allowed in charset decoding options (it is internal and " +"default charset: decode of UTF-8 is OK even if you specify another charset " +"to decode)" msgstr "" #, c-format msgid "%s%s: error creating charset \"%s\" => \"%s\"" msgstr "%s%s: error al crear el set de caracteres \"%s\" => \"%s\"" -msgid "global decoding charset" -msgstr "set de caracteres para la decodificación global" +msgid "" +"global decoding charset: charset used to decode incoming messages (if " +"decoding fails, fallback is UTF-8 because it is the WeeChat internal charset)" +msgstr "" -msgid "global encoding charset" -msgstr "set de caracteres para la codificación global" +msgid "" +"global encoding charset: charset used to encode outgoing messages (if empty, " +"default is UTF-8 because it is the WeeChat internal charset)" +msgstr "" #, c-format msgid "%s: %s, \"%s\": removed" @@ -9348,6 +9352,12 @@ msgstr "Tipo" msgid "Constants" msgstr "Constantes" +#~ msgid "global decoding charset" +#~ msgstr "set de caracteres para la decodificación global" + +#~ msgid "global encoding charset" +#~ msgstr "set de caracteres para la codificación global" + #~ msgid "%s: connecting to server %s/%d%s%s..." #~ msgstr "%s: conectando al servidor %s/%d%s%s..." diff --git a/po/fr.po b/po/fr.po index 9a6351774..68a870211 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-04 13:19+0200\n" -"PO-Revision-Date: 2012-09-04 13:15+0200\n" +"POT-Creation-Date: 2012-09-19 14:48+0200\n" +"PO-Revision-Date: 2012-09-19 14:49+0200\n" "Last-Translator: Sebastien Helleu \n" "Language-Team: weechat-dev \n" "Language: French\n" @@ -4052,23 +4052,33 @@ msgstr "Conversions de charset" #, c-format msgid "" -"%s%s: UTF-8 is not allowed in charset options (it is internal and default " -"charset: default encode is UTF-8 and decode of UTF-8 is OK even if you " -"specify another charset to decode)" +"%s%s: UTF-8 is not allowed in charset decoding options (it is internal and " +"default charset: decode of UTF-8 is OK even if you specify another charset " +"to decode)" msgstr "" -"%s%s: UTF-8 n'est pas autorisé dans les options de charset (c'est le charset " -"interne et par défaut: l'encodage par défaut est UTF-8 et le décodage " -"d'UTF-8 est OK même si vous spécifiez un autre charset à décoder)" +"%s%s: UTF-8 n'est pas autorisé dans les options de décodage de charset " +"(c'est le charset interne et par défaut: le décodage d'UTF-8 est OK même si " +"vous spécifiez un autre charset à décoder)" #, c-format msgid "%s%s: error creating charset \"%s\" => \"%s\"" msgstr "%s%s: erreur en création du charset \"%s\" => \"%s\"" -msgid "global decoding charset" -msgstr "charset de décodage global" +msgid "" +"global decoding charset: charset used to decode incoming messages (if " +"decoding fails, fallback is UTF-8 because it is the WeeChat internal charset)" +msgstr "" +"charset de décodage global: charset utilisé pour décoder les messages " +"entrants (si le décodage échoue, par défaut UTF-8 sera utilisé car c'est le " +"charset interne de WeeChat)" -msgid "global encoding charset" -msgstr "charset d'encodage global" +msgid "" +"global encoding charset: charset used to encode outgoing messages (if empty, " +"default is UTF-8 because it is the WeeChat internal charset)" +msgstr "" +"charset d'encodage global: charset utilisé pour encoder les messages " +"sortants (si vide, le défaut est UTF-8 car c'est le charset interne de " +"WeeChat)" #, c-format msgid "%s: %s, \"%s\": removed" @@ -9510,6 +9520,12 @@ msgstr "Type" msgid "Constants" msgstr "Constantes" +#~ msgid "global decoding charset" +#~ msgstr "charset de décodage global" + +#~ msgid "global encoding charset" +#~ msgstr "charset d'encodage global" + #~ msgid "alt+v=back to list" #~ msgstr "alt+v=retour à la liste" diff --git a/po/hu.po b/po/hu.po index 123354fc1..c61d97659 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-04 13:19+0200\n" +"POT-Creation-Date: 2012-09-19 14:48+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -3428,19 +3428,23 @@ msgstr "WeeChat szlogen" #, c-format msgid "" -"%s%s: UTF-8 is not allowed in charset options (it is internal and default " -"charset: default encode is UTF-8 and decode of UTF-8 is OK even if you " -"specify another charset to decode)" +"%s%s: UTF-8 is not allowed in charset decoding options (it is internal and " +"default charset: decode of UTF-8 is OK even if you specify another charset " +"to decode)" msgstr "" #, fuzzy, c-format msgid "%s%s: error creating charset \"%s\" => \"%s\"" msgstr "%s nincs elég memória az információs pult üzenethez\n" -msgid "global decoding charset" +msgid "" +"global decoding charset: charset used to decode incoming messages (if " +"decoding fails, fallback is UTF-8 because it is the WeeChat internal charset)" msgstr "" -msgid "global encoding charset" +msgid "" +"global encoding charset: charset used to encode outgoing messages (if empty, " +"default is UTF-8 because it is the WeeChat internal charset)" msgstr "" #, fuzzy, c-format diff --git a/po/it.po b/po/it.po index 9c979d034..e9c1f821c 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-04 13:19+0200\n" +"POT-Creation-Date: 2012-09-19 14:48+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Marco Paolone \n" "Language-Team: weechat-dev \n" @@ -3984,11 +3984,11 @@ msgstr "%s%s: memoria non sufficiente per creare un nuovo correttore" msgid "Charset conversions" msgstr "versione di WeeChat" -#, c-format +#, fuzzy, c-format msgid "" -"%s%s: UTF-8 is not allowed in charset options (it is internal and default " -"charset: default encode is UTF-8 and decode of UTF-8 is OK even if you " -"specify another charset to decode)" +"%s%s: UTF-8 is not allowed in charset decoding options (it is internal and " +"default charset: decode of UTF-8 is OK even if you specify another charset " +"to decode)" msgstr "" "%s%s: UTF-8 non è consentito nelle opzioni per il set caratteri (è interno " "ed è il set caratteri predefinito: la codifica predefinita è UTF-8 e la " @@ -4000,11 +4000,15 @@ msgid "%s%s: error creating charset \"%s\" => \"%s\"" msgstr "" "%s%s: errore durante la creazione del set di caratteri \"%s\" => \"%s\"" -msgid "global decoding charset" -msgstr "set di caratteri per la decodifica globale" +msgid "" +"global decoding charset: charset used to decode incoming messages (if " +"decoding fails, fallback is UTF-8 because it is the WeeChat internal charset)" +msgstr "" -msgid "global encoding charset" -msgstr "set di caratter per la codifica globale" +msgid "" +"global encoding charset: charset used to encode outgoing messages (if empty, " +"default is UTF-8 because it is the WeeChat internal charset)" +msgstr "" #, c-format msgid "%s: %s, \"%s\": removed" @@ -9327,6 +9331,12 @@ msgstr "Tipo" msgid "Constants" msgstr "Costanti" +#~ msgid "global decoding charset" +#~ msgstr "set di caratteri per la decodifica globale" + +#~ msgid "global encoding charset" +#~ msgstr "set di caratter per la codifica globale" + #~ msgid "%s: connecting to server %s/%d%s%s..." #~ msgstr "%s: connessione al server %s/%d%s%s..." diff --git a/po/ja.po b/po/ja.po index 18330dd73..2f088da76 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-17 13:11+0200\n" +"POT-Creation-Date: 2012-09-19 14:48+0200\n" "PO-Revision-Date: 2012-09-05 01:33+0900\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" @@ -3893,11 +3893,11 @@ msgstr "%s%s: 新しい speller を作る十分なメモリがありません" msgid "Charset conversions" msgstr "文字コード変換" -#, c-format +#, fuzzy, c-format msgid "" -"%s%s: UTF-8 is not allowed in charset options (it is internal and default " -"charset: default encode is UTF-8 and decode of UTF-8 is OK even if you " -"specify another charset to decode)" +"%s%s: UTF-8 is not allowed in charset decoding options (it is internal and " +"default charset: decode of UTF-8 is OK even if you specify another charset " +"to decode)" msgstr "" "%s%s: UTF-8 を charset オプションに設定することはできません (UTF-8 は内部デ" "フォルト文字セットです: その他の文字セットへのデコードを指定したとしても、デ" @@ -3907,11 +3907,15 @@ msgstr "" msgid "%s%s: error creating charset \"%s\" => \"%s\"" msgstr "%s%s: 文字集合 \"%s\" => \"%s\" の作成中にエラー" -msgid "global decoding charset" -msgstr "グローバルデコード文字集合" +msgid "" +"global decoding charset: charset used to decode incoming messages (if " +"decoding fails, fallback is UTF-8 because it is the WeeChat internal charset)" +msgstr "" -msgid "global encoding charset" -msgstr "グローバルエンコード文字集合" +msgid "" +"global encoding charset: charset used to encode outgoing messages (if empty, " +"default is UTF-8 because it is the WeeChat internal charset)" +msgstr "" #, c-format msgid "%s: %s, \"%s\": removed" @@ -9190,6 +9194,12 @@ msgstr "タイプ" msgid "Constants" msgstr "定数" +#~ msgid "global decoding charset" +#~ msgstr "グローバルデコード文字集合" + +#~ msgid "global encoding charset" +#~ msgstr "グローバルエンコード文字集合" + #~ msgid "alt+d=back to list" #~ msgstr "alt+d=リストに戻る" diff --git a/po/pl.po b/po/pl.po index eb0972fe2..534b5cd8b 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-04 13:19+0200\n" +"POT-Creation-Date: 2012-09-19 14:48+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: weechat-dev \n" @@ -3977,20 +3977,24 @@ msgstr "wersja WeeChat" #, c-format msgid "" -"%s%s: UTF-8 is not allowed in charset options (it is internal and default " -"charset: default encode is UTF-8 and decode of UTF-8 is OK even if you " -"specify another charset to decode)" +"%s%s: UTF-8 is not allowed in charset decoding options (it is internal and " +"default charset: decode of UTF-8 is OK even if you specify another charset " +"to decode)" msgstr "" #, c-format msgid "%s%s: error creating charset \"%s\" => \"%s\"" msgstr "%s%s: błąd przy tworzeniu zestawu znaków (kodowania) \"%s\" => \"%s\"" -msgid "global decoding charset" -msgstr "globalne dekodowane kodowanie" +msgid "" +"global decoding charset: charset used to decode incoming messages (if " +"decoding fails, fallback is UTF-8 because it is the WeeChat internal charset)" +msgstr "" -msgid "global encoding charset" -msgstr "globalnie kodowanie" +msgid "" +"global encoding charset: charset used to encode outgoing messages (if empty, " +"default is UTF-8 because it is the WeeChat internal charset)" +msgstr "" #, c-format msgid "%s: %s, \"%s\": removed" @@ -9259,6 +9263,12 @@ msgstr "Typ" msgid "Constants" msgstr "Stałe" +#~ msgid "global decoding charset" +#~ msgstr "globalne dekodowane kodowanie" + +#~ msgid "global encoding charset" +#~ msgstr "globalnie kodowanie" + #~ msgid "%s: connecting to server %s/%d%s%s..." #~ msgstr "%s: łączę z serwerem %s/%d%s%s..." diff --git a/po/pt_BR.po b/po/pt_BR.po index 145ab258c..846a9c545 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-04 13:19+0200\n" +"POT-Creation-Date: 2012-09-19 14:48+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Sergio Durigan Junior \n" "Language-Team: weechat-dev \n" @@ -3854,20 +3854,24 @@ msgstr "versão do WeeChat" #, c-format msgid "" -"%s%s: UTF-8 is not allowed in charset options (it is internal and default " -"charset: default encode is UTF-8 and decode of UTF-8 is OK even if you " -"specify another charset to decode)" +"%s%s: UTF-8 is not allowed in charset decoding options (it is internal and " +"default charset: decode of UTF-8 is OK even if you specify another charset " +"to decode)" msgstr "" #, c-format msgid "%s%s: error creating charset \"%s\" => \"%s\"" msgstr "%s%s: erro ao criar charset \"%s\" => \"%s\"" -msgid "global decoding charset" -msgstr "charset de decodificação global" +msgid "" +"global decoding charset: charset used to decode incoming messages (if " +"decoding fails, fallback is UTF-8 because it is the WeeChat internal charset)" +msgstr "" -msgid "global encoding charset" -msgstr "charset de codificação global" +msgid "" +"global encoding charset: charset used to encode outgoing messages (if empty, " +"default is UTF-8 because it is the WeeChat internal charset)" +msgstr "" #, c-format msgid "%s: %s, \"%s\": removed" @@ -8701,6 +8705,12 @@ msgstr "" msgid "Constants" msgstr "" +#~ msgid "global decoding charset" +#~ msgstr "charset de decodificação global" + +#~ msgid "global encoding charset" +#~ msgstr "charset de codificação global" + #~ msgid "%s: connecting to server %s/%d%s%s..." #~ msgstr "%s: conectando ao servidor %s/%d%s%s..." diff --git a/po/ru.po b/po/ru.po index 8efddce8f..012e02d8c 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-04 13:19+0200\n" +"POT-Creation-Date: 2012-09-19 14:48+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -3458,19 +3458,23 @@ msgstr "слоган WeeChat" #, c-format msgid "" -"%s%s: UTF-8 is not allowed in charset options (it is internal and default " -"charset: default encode is UTF-8 and decode of UTF-8 is OK even if you " -"specify another charset to decode)" +"%s%s: UTF-8 is not allowed in charset decoding options (it is internal and " +"default charset: decode of UTF-8 is OK even if you specify another charset " +"to decode)" msgstr "" #, fuzzy, c-format msgid "%s%s: error creating charset \"%s\" => \"%s\"" msgstr "%s недостаточно памяти для сообщения в строке информации\n" -msgid "global decoding charset" +msgid "" +"global decoding charset: charset used to decode incoming messages (if " +"decoding fails, fallback is UTF-8 because it is the WeeChat internal charset)" msgstr "" -msgid "global encoding charset" +msgid "" +"global encoding charset: charset used to encode outgoing messages (if empty, " +"default is UTF-8 because it is the WeeChat internal charset)" msgstr "" #, fuzzy, c-format diff --git a/po/weechat.pot b/po/weechat.pot index 1a96e6502..a94c20238 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-04 13:19+0200\n" +"POT-Creation-Date: 2012-09-19 14:48+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -3026,19 +3026,23 @@ msgstr "" #, c-format msgid "" -"%s%s: UTF-8 is not allowed in charset options (it is internal and default " -"charset: default encode is UTF-8 and decode of UTF-8 is OK even if you " -"specify another charset to decode)" +"%s%s: UTF-8 is not allowed in charset decoding options (it is internal and " +"default charset: decode of UTF-8 is OK even if you specify another charset " +"to decode)" msgstr "" #, c-format msgid "%s%s: error creating charset \"%s\" => \"%s\"" msgstr "" -msgid "global decoding charset" +msgid "" +"global decoding charset: charset used to decode incoming messages (if " +"decoding fails, fallback is UTF-8 because it is the WeeChat internal charset)" msgstr "" -msgid "global encoding charset" +msgid "" +"global encoding charset: charset used to encode outgoing messages (if empty, " +"default is UTF-8 because it is the WeeChat internal charset)" msgstr "" #, c-format diff --git a/src/plugins/charset/charset.c b/src/plugins/charset/charset.c index 7599e5c6c..1b132f895 100644 --- a/src/plugins/charset/charset.c +++ b/src/plugins/charset/charset.c @@ -74,23 +74,23 @@ charset_config_reload (void *data, struct t_config_file *config_file) } /* - * charset_is_allowed: check if charset is allowed (different from "UTF-8", - * which is the internal charset) - * return 1 if charset is allowed, otherwise 0 - * (and error is displayed) + * charset_decode_is_allowed: check if charset (decode) is allowed (different + * from "UTF-8", which is the internal charset) + * return 1 if charset is allowed, otherwise 0 + * (and error is displayed) */ int -charset_is_allowed (const char *charset) +charset_decode_is_allowed (const char *charset) { if (weechat_strcasestr (charset, "utf-8") || weechat_strcasestr (charset, "utf8")) { weechat_printf (NULL, - _("%s%s: UTF-8 is not allowed in charset options (it " - "is internal and default charset: default encode " - "is UTF-8 and decode of UTF-8 is OK even if you " - "specify another charset to decode)"), + _("%s%s: UTF-8 is not allowed in charset decoding " + "options (it is internal and default charset: decode " + "of UTF-8 is OK even if you specify another charset " + "to decode)"), weechat_prefix ("error"), CHARSET_PLUGIN_NAME); return 0; } @@ -99,18 +99,19 @@ charset_is_allowed (const char *charset) } /* - * charset_check_charset_cb: callback called to check the charset value + * charset_check_charset_decode_cb: callback called to check the charset value + * (for decoding only) */ int -charset_check_charset_cb (void *data, struct t_config_option *option, - const char *value) +charset_check_charset_decode_cb (void *data, struct t_config_option *option, + const char *value) { /* make C compiler happy */ (void) data; (void) option; - return charset_is_allowed (value); + return charset_decode_is_allowed (value); } /* @@ -148,13 +149,15 @@ charset_config_create_option (void *data, struct t_config_file *config_file, { if (value && value[0]) { - if (charset_is_allowed (value)) + if ((section != charset_config_section_decode) + || charset_decode_is_allowed (value)) { ptr_option = weechat_config_new_option ( config_file, section, option_name, "string", NULL, NULL, 0, 0, "", value, 0, - &charset_check_charset_cb, NULL, NULL, NULL, NULL, NULL); + (section == charset_config_section_decode) ? &charset_check_charset_decode_cb : NULL, NULL, + NULL, NULL, NULL, NULL); rc = (ptr_option) ? WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE : WEECHAT_CONFIG_OPTION_SET_ERROR; } @@ -204,19 +207,23 @@ charset_config_init () charset_default_decode = weechat_config_new_option ( charset_config_file, ptr_section, "decode", "string", - N_("global decoding charset"), + N_("global decoding charset: charset used to decode incoming messages " + "(if decoding fails, fallback is UTF-8 because it is the WeeChat " + "internal charset)"), NULL, 0, 0, (charset_terminal && charset_internal && (strcasecmp (charset_terminal, charset_internal) != 0)) ? charset_terminal : "iso-8859-1", NULL, 0, - &charset_check_charset_cb, NULL, NULL, NULL, NULL, NULL); + &charset_check_charset_decode_cb, NULL, NULL, NULL, NULL, NULL); charset_default_encode = weechat_config_new_option ( charset_config_file, ptr_section, "encode", "string", - N_("global encoding charset"), + N_("global encoding charset: charset used to encode outgoing messages " + "(if empty, default is UTF-8 because it is the WeeChat internal " + "charset)"), NULL, 0, 0, "", NULL, 0, - &charset_check_charset_cb, NULL, NULL, NULL, NULL, NULL); + NULL, NULL, NULL, NULL, NULL, NULL); ptr_section = weechat_config_new_section (charset_config_file, "decode", 1, 1,