From 0436fff31b5ef7814391dd1a666cccfaa0f2ff67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Wed, 29 Mar 2017 20:00:36 +0200 Subject: [PATCH] buflist: add option buflist.format.number --- doc/de/autogen/user/buflist_commands.adoc | 1 + doc/de/autogen/user/buflist_options.adoc | 10 +++++-- doc/en/autogen/user/buflist_commands.adoc | 1 + doc/en/autogen/user/buflist_options.adoc | 10 +++++-- doc/fr/autogen/user/buflist_commands.adoc | 1 + doc/fr/autogen/user/buflist_options.adoc | 10 +++++-- doc/it/autogen/user/buflist_commands.adoc | 1 + doc/it/autogen/user/buflist_options.adoc | 10 +++++-- doc/ja/autogen/user/buflist_commands.adoc | 33 ++++++++++++----------- doc/ja/autogen/user/buflist_options.adoc | 10 +++++-- doc/pl/autogen/user/buflist_commands.adoc | 1 + doc/pl/autogen/user/buflist_options.adoc | 10 +++++-- po/cs.po | 10 ++++++- po/de.po | 12 ++++++++- po/es.po | 10 ++++++- po/fr.po | 15 +++++++++-- po/hu.po | 10 ++++++- po/it.po | 12 ++++++++- po/ja.po | 13 ++++++++- po/pl.po | 12 ++++++++- po/pt.po | 11 +++++++- po/pt_BR.po | 12 ++++++++- po/ru.po | 10 ++++++- po/tr.po | 9 ++++++- po/weechat.pot | 9 ++++++- src/plugins/buflist/buflist-bar-item.c | 8 ++++++ src/plugins/buflist/buflist-command.c | 2 ++ src/plugins/buflist/buflist-config.c | 16 +++++++++-- src/plugins/buflist/buflist-config.h | 1 + 29 files changed, 226 insertions(+), 44 deletions(-) diff --git a/doc/de/autogen/user/buflist_commands.adoc b/doc/de/autogen/user/buflist_commands.adoc index 4a6950c93..ffea9f6c0 100644 --- a/doc/de/autogen/user/buflist_commands.adoc +++ b/doc/de/autogen/user/buflist_commands.adoc @@ -24,6 +24,7 @@ The following variables can be used in these options: - ${buffer.nicklist_nicks_count} - extra variables added by buflist for convenience: - ${format_buffer}: the evaluated value of option buflist.format.buffer; this can be used in option buflist.format.buffer_current to just change the background color for example + - ${format_number}: indented number with separator (evaluation of option buflist.format.number) - ${number}: indented number, for example " 1" if there are between 10 and 99 buffers - ${indent}: indentation for name (channel and private buffers are indented) - ${name}: the short name (if set), with a fallback on the name diff --git a/doc/de/autogen/user/buflist_options.adoc b/doc/de/autogen/user/buflist_options.adoc index 8b9fbcb7d..d67db0a13 100644 --- a/doc/de/autogen/user/buflist_options.adoc +++ b/doc/de/autogen/user/buflist_options.adoc @@ -6,13 +6,13 @@ ** Beschreibung: pass:none[format of each line with a buffer (note: content is evaluated, see /help buflist)] ** Typ: Zeichenkette ** Werte: beliebige Zeichenkette -** Standardwert: `+"${color:green}${number}.${indent}${color_hotlist}${name}"+` +** Standardwert: `+"${format_number}${indent}${color_hotlist}${name}"+` * [[option_buflist.format.buffer_current]] *buflist.format.buffer_current* ** Beschreibung: pass:none[format for the line with current buffer (note: content is evaluated, see /help buflist)] ** Typ: Zeichenkette ** Werte: beliebige Zeichenkette -** Standardwert: `+"${color:lightgreen,blue}${number}.${indent}${color_hotlist}${name}"+` +** Standardwert: `+"${color:lightgreen,blue}${format_buffer}"+` * [[option_buflist.format.hotlist]] *buflist.format.hotlist* ** Beschreibung: pass:none[format for hotlist (note: content is evaluated, see /help buflist)] @@ -62,6 +62,12 @@ ** Werte: beliebige Zeichenkette ** Standardwert: `+" ${color:green}[${color:brown}${lag}${color:green}]"+` +* [[option_buflist.format.number]] *buflist.format.number* +** Beschreibung: pass:none[format for buffer number, ${number} is the indented number (note: content is evaluated, see /help buflist)] +** Typ: Zeichenkette +** Werte: beliebige Zeichenkette +** Standardwert: `+"${color:green}${number}${if:${number_displayed}?.: }"+` + * [[option_buflist.look.display_conditions]] *buflist.look.display_conditions* ** Beschreibung: pass:none[conditions to display a buffer (note: content is evaluated, see /help buflist)] ** Typ: Zeichenkette diff --git a/doc/en/autogen/user/buflist_commands.adoc b/doc/en/autogen/user/buflist_commands.adoc index 4a6950c93..ffea9f6c0 100644 --- a/doc/en/autogen/user/buflist_commands.adoc +++ b/doc/en/autogen/user/buflist_commands.adoc @@ -24,6 +24,7 @@ The following variables can be used in these options: - ${buffer.nicklist_nicks_count} - extra variables added by buflist for convenience: - ${format_buffer}: the evaluated value of option buflist.format.buffer; this can be used in option buflist.format.buffer_current to just change the background color for example + - ${format_number}: indented number with separator (evaluation of option buflist.format.number) - ${number}: indented number, for example " 1" if there are between 10 and 99 buffers - ${indent}: indentation for name (channel and private buffers are indented) - ${name}: the short name (if set), with a fallback on the name diff --git a/doc/en/autogen/user/buflist_options.adoc b/doc/en/autogen/user/buflist_options.adoc index 6e42890df..d7e811b78 100644 --- a/doc/en/autogen/user/buflist_options.adoc +++ b/doc/en/autogen/user/buflist_options.adoc @@ -6,13 +6,13 @@ ** description: pass:none[format of each line with a buffer (note: content is evaluated, see /help buflist)] ** type: string ** values: any string -** default value: `+"${color:green}${number}.${indent}${color_hotlist}${name}"+` +** default value: `+"${format_number}${indent}${color_hotlist}${name}"+` * [[option_buflist.format.buffer_current]] *buflist.format.buffer_current* ** description: pass:none[format for the line with current buffer (note: content is evaluated, see /help buflist)] ** type: string ** values: any string -** default value: `+"${color:lightgreen,blue}${number}.${indent}${color_hotlist}${name}"+` +** default value: `+"${color:lightgreen,blue}${format_buffer}"+` * [[option_buflist.format.hotlist]] *buflist.format.hotlist* ** description: pass:none[format for hotlist (note: content is evaluated, see /help buflist)] @@ -62,6 +62,12 @@ ** values: any string ** default value: `+" ${color:green}[${color:brown}${lag}${color:green}]"+` +* [[option_buflist.format.number]] *buflist.format.number* +** description: pass:none[format for buffer number, ${number} is the indented number (note: content is evaluated, see /help buflist)] +** type: string +** values: any string +** default value: `+"${color:green}${number}${if:${number_displayed}?.: }"+` + * [[option_buflist.look.display_conditions]] *buflist.look.display_conditions* ** description: pass:none[conditions to display a buffer (note: content is evaluated, see /help buflist)] ** type: string diff --git a/doc/fr/autogen/user/buflist_commands.adoc b/doc/fr/autogen/user/buflist_commands.adoc index 6d7a99145..932d4e95f 100644 --- a/doc/fr/autogen/user/buflist_commands.adoc +++ b/doc/fr/autogen/user/buflist_commands.adoc @@ -24,6 +24,7 @@ Les variables suivantes peuvent être utilisées dans ces options : - ${buffer.nicklist_nicks_count} - variables additionnelles ajoutées par buflist pour des raisons pratiques : - ${format_buffer} : la valeur évaluée de l'option buflist.format.buffer ; peut être utilisée dans l'option buflist.format.buffer_current pour juste changer la couleur de fond par exemple + - ${format_number} : numéro indenté avec un séparateur (évaluation de l'option buflist.format.number) - ${number} : numéro indenté, par exemple " 1" s'il y a entre 10 et 99 tampons - ${indent} : indentation pour le nom (les tampons de canaux ou privés sont indentés) - ${name} : le nom court (si défini), sinon le nom diff --git a/doc/fr/autogen/user/buflist_options.adoc b/doc/fr/autogen/user/buflist_options.adoc index 8bb6d34d4..5cbf92ffc 100644 --- a/doc/fr/autogen/user/buflist_options.adoc +++ b/doc/fr/autogen/user/buflist_options.adoc @@ -6,13 +6,13 @@ ** description: pass:none[format pour chaque ligne avec un tampon (note : le contenu est évalué, voir /help buflist)] ** type: chaîne ** valeurs: toute chaîne -** valeur par défaut: `+"${color:green}${number}.${indent}${color_hotlist}${name}"+` +** valeur par défaut: `+"${format_number}${indent}${color_hotlist}${name}"+` * [[option_buflist.format.buffer_current]] *buflist.format.buffer_current* ** description: pass:none[format pour la ligne avec le tampon courant (note : le contenu est évalué, voir /help buflist)] ** type: chaîne ** valeurs: toute chaîne -** valeur par défaut: `+"${color:lightgreen,blue}${number}.${indent}${color_hotlist}${name}"+` +** valeur par défaut: `+"${color:lightgreen,blue}${format_buffer}"+` * [[option_buflist.format.hotlist]] *buflist.format.hotlist* ** description: pass:none[format pour la hotlist (note : le contenu est évalué, voir /help buflist)] @@ -62,6 +62,12 @@ ** valeurs: toute chaîne ** valeur par défaut: `+" ${color:green}[${color:brown}${lag}${color:green}]"+` +* [[option_buflist.format.number]] *buflist.format.number* +** description: pass:none[format pour un numéro de tampon, ${number} est le numéro indenté (note : le contenu est évalué, voir /help buflist)] +** type: chaîne +** valeurs: toute chaîne +** valeur par défaut: `+"${color:green}${number}${if:${number_displayed}?.: }"+` + * [[option_buflist.look.display_conditions]] *buflist.look.display_conditions* ** description: pass:none[conditions pour afficher un tampon (note : le contenu est évalué, voir /help buflist)] ** type: chaîne diff --git a/doc/it/autogen/user/buflist_commands.adoc b/doc/it/autogen/user/buflist_commands.adoc index 4a6950c93..ffea9f6c0 100644 --- a/doc/it/autogen/user/buflist_commands.adoc +++ b/doc/it/autogen/user/buflist_commands.adoc @@ -24,6 +24,7 @@ The following variables can be used in these options: - ${buffer.nicklist_nicks_count} - extra variables added by buflist for convenience: - ${format_buffer}: the evaluated value of option buflist.format.buffer; this can be used in option buflist.format.buffer_current to just change the background color for example + - ${format_number}: indented number with separator (evaluation of option buflist.format.number) - ${number}: indented number, for example " 1" if there are between 10 and 99 buffers - ${indent}: indentation for name (channel and private buffers are indented) - ${name}: the short name (if set), with a fallback on the name diff --git a/doc/it/autogen/user/buflist_options.adoc b/doc/it/autogen/user/buflist_options.adoc index f9d30996e..92459b2c1 100644 --- a/doc/it/autogen/user/buflist_options.adoc +++ b/doc/it/autogen/user/buflist_options.adoc @@ -6,13 +6,13 @@ ** descrizione: pass:none[format of each line with a buffer (note: content is evaluated, see /help buflist)] ** tipo: stringa ** valori: qualsiasi stringa -** valore predefinito: `+"${color:green}${number}.${indent}${color_hotlist}${name}"+` +** valore predefinito: `+"${format_number}${indent}${color_hotlist}${name}"+` * [[option_buflist.format.buffer_current]] *buflist.format.buffer_current* ** descrizione: pass:none[format for the line with current buffer (note: content is evaluated, see /help buflist)] ** tipo: stringa ** valori: qualsiasi stringa -** valore predefinito: `+"${color:lightgreen,blue}${number}.${indent}${color_hotlist}${name}"+` +** valore predefinito: `+"${color:lightgreen,blue}${format_buffer}"+` * [[option_buflist.format.hotlist]] *buflist.format.hotlist* ** descrizione: pass:none[format for hotlist (note: content is evaluated, see /help buflist)] @@ -62,6 +62,12 @@ ** valori: qualsiasi stringa ** valore predefinito: `+" ${color:green}[${color:brown}${lag}${color:green}]"+` +* [[option_buflist.format.number]] *buflist.format.number* +** descrizione: pass:none[format for buffer number, ${number} is the indented number (note: content is evaluated, see /help buflist)] +** tipo: stringa +** valori: qualsiasi stringa +** valore predefinito: `+"${color:green}${number}${if:${number_displayed}?.: }"+` + * [[option_buflist.look.display_conditions]] *buflist.look.display_conditions* ** descrizione: pass:none[conditions to display a buffer (note: content is evaluated, see /help buflist)] ** tipo: stringa diff --git a/doc/ja/autogen/user/buflist_commands.adoc b/doc/ja/autogen/user/buflist_commands.adoc index b1c63ecf1..27d1a5e92 100644 --- a/doc/ja/autogen/user/buflist_commands.adoc +++ b/doc/ja/autogen/user/buflist_commands.adoc @@ -8,27 +8,28 @@ ---- /buflist refresh -refresh: 強制的に "buflist" バー要素の内容を最新の状態に更新します +refresh: force the refresh of the "buflist" bar item -各バッファエントリは文字列評価 (書式は /help eval を参照してください) を使って表示されます、以下のオプションで指定します: - - buflist.look.display_conditions: バッファをリスト内に表示する条件 - - buflist.format.buffer: 現在のバッファ以外のバッファを表示する書式 - - buflist.format.buffer_current: 現在のバッファを表示する書式 +The lines with buffers are displayed using string evaluation (see /help eval for the format), with these options: + - buflist.look.display_conditions: conditions to display a buffer in the list + - buflist.format.buffer: format for a buffer which is not current buffer + - buflist.format.buffer_current: format for the current buffer -以下は上記オプションで使用可能な変数です: - - バッファデータ (完全なリストは API リファレンスの hdata "buffer" を参照してください)、例: +The following variables can be used in these options: + - buffer data (see hdata "buffer" in API doc for a complete list), for example: - ${buffer.number} - ${buffer.name} - ${buffer.full_name} - ${buffer.short_name} - ${buffer.nicklist_nicks_count} - - buflist プラグインが利便性向上の目的で追加した変数: - - ${format_buffer}: buflist.format.buffer オプションの評価結果; 例えば単に背景色を変えるなどの目的で、この変数を buflist.format.buffer_current オプションの中で使うことも可能です。 - - ${number}: インデント済み番号、例えば 10 から 99 番のバッファがある場合に " 1" - - ${indent}: 名前用のインデント (チャンネルとプライベートバッファがインデントされます) - - ${name}: 短縮名 (設定済みの場合)、未設定の場合には名前 - - ${color_hotlist}: 対象バッファのホットリストレベルの最大値に対応する色 (buflist.format.hotlist_xxx オプションの評価結果、xxx がレベル) - - ${format_hotlist}: 評価後のホットリスト (buflist.format.hotlist オプションの評価結果) - - ${hotlist}: 評価前のホットリスト - - ${format_lag}: IRC サーババッファの遅延時間、遅延がない場合は空 (buflist.format.lag オプションの評価結果) + - extra variables added by buflist for convenience: + - ${format_buffer}: the evaluated value of option buflist.format.buffer; this can be used in option buflist.format.buffer_current to just change the background color for example + - ${format_number}: indented number with separator (evaluation of option buflist.format.number) + - ${number}: indented number, for example " 1" if there are between 10 and 99 buffers + - ${indent}: indentation for name (channel and private buffers are indented) + - ${name}: the short name (if set), with a fallback on the name + - ${color_hotlist}: the color depending on the highest hotlist level for the buffer (evaluation of option buflist.format.hotlist_xxx where xxx is the level) + - ${format_hotlist}: the formatted hotlist (evaluation of option buflist.format.hotlist) + - ${hotlist}: the raw hotlist + - ${format_lag}: the lag for an IRC server buffer, empty if there's no lag (evaluation of option buflist.format.lag) ---- diff --git a/doc/ja/autogen/user/buflist_options.adoc b/doc/ja/autogen/user/buflist_options.adoc index 5edc1b6c8..09cb829df 100644 --- a/doc/ja/autogen/user/buflist_options.adoc +++ b/doc/ja/autogen/user/buflist_options.adoc @@ -6,13 +6,13 @@ ** 説明: pass:none[各バッファの表示書式 (注意: 値は評価されます、/help eval を参照してください)] ** タイプ: 文字列 ** 値: 未制約文字列 -** デフォルト値: `+"${color:green}${number}.${indent}${color_hotlist}${name}"+` +** デフォルト値: `+"${format_number}${indent}${color_hotlist}${name}"+` * [[option_buflist.format.buffer_current]] *buflist.format.buffer_current* ** 説明: pass:none[現在のバッファの表示書式 (注意: 値は評価されます、/help eval を参照してください)] ** タイプ: 文字列 ** 値: 未制約文字列 -** デフォルト値: `+"${color:lightgreen,blue}${number}.${indent}${color_hotlist}${name}"+` +** デフォルト値: `+"${color:lightgreen,blue}${format_buffer}"+` * [[option_buflist.format.hotlist]] *buflist.format.hotlist* ** 説明: pass:none[ホットリストの表示書式 (注意: 値は評価されます、/help eval を参照してください)] @@ -62,6 +62,12 @@ ** 値: 未制約文字列 ** デフォルト値: `+" ${color:green}[${color:brown}${lag}${color:green}]"+` +* [[option_buflist.format.number]] *buflist.format.number* +** 説明: pass:none[format for buffer number, ${number} is the indented number (note: content is evaluated, see /help buflist)] +** タイプ: 文字列 +** 値: 未制約文字列 +** デフォルト値: `+"${color:green}${number}${if:${number_displayed}?.: }"+` + * [[option_buflist.look.display_conditions]] *buflist.look.display_conditions* ** 説明: pass:none[バッファの表示条件 (注意: 値は評価されます、/help eval を参照してください)] ** タイプ: 文字列 diff --git a/doc/pl/autogen/user/buflist_commands.adoc b/doc/pl/autogen/user/buflist_commands.adoc index 4a6950c93..ffea9f6c0 100644 --- a/doc/pl/autogen/user/buflist_commands.adoc +++ b/doc/pl/autogen/user/buflist_commands.adoc @@ -24,6 +24,7 @@ The following variables can be used in these options: - ${buffer.nicklist_nicks_count} - extra variables added by buflist for convenience: - ${format_buffer}: the evaluated value of option buflist.format.buffer; this can be used in option buflist.format.buffer_current to just change the background color for example + - ${format_number}: indented number with separator (evaluation of option buflist.format.number) - ${number}: indented number, for example " 1" if there are between 10 and 99 buffers - ${indent}: indentation for name (channel and private buffers are indented) - ${name}: the short name (if set), with a fallback on the name diff --git a/doc/pl/autogen/user/buflist_options.adoc b/doc/pl/autogen/user/buflist_options.adoc index 1e58e8347..548296c26 100644 --- a/doc/pl/autogen/user/buflist_options.adoc +++ b/doc/pl/autogen/user/buflist_options.adoc @@ -6,13 +6,13 @@ ** opis: pass:none[format of each line with a buffer (note: content is evaluated, see /help buflist)] ** typ: ciąg ** wartości: dowolny ciąg -** domyślna wartość: `+"${color:green}${number}.${indent}${color_hotlist}${name}"+` +** domyślna wartość: `+"${format_number}${indent}${color_hotlist}${name}"+` * [[option_buflist.format.buffer_current]] *buflist.format.buffer_current* ** opis: pass:none[format for the line with current buffer (note: content is evaluated, see /help buflist)] ** typ: ciąg ** wartości: dowolny ciąg -** domyślna wartość: `+"${color:lightgreen,blue}${number}.${indent}${color_hotlist}${name}"+` +** domyślna wartość: `+"${color:lightgreen,blue}${format_buffer}"+` * [[option_buflist.format.hotlist]] *buflist.format.hotlist* ** opis: pass:none[format for hotlist (note: content is evaluated, see /help buflist)] @@ -62,6 +62,12 @@ ** wartości: dowolny ciąg ** domyślna wartość: `+" ${color:green}[${color:brown}${lag}${color:green}]"+` +* [[option_buflist.format.number]] *buflist.format.number* +** opis: pass:none[format for buffer number, ${number} is the indented number (note: content is evaluated, see /help buflist)] +** typ: ciąg +** wartości: dowolny ciąg +** domyślna wartość: `+"${color:green}${number}${if:${number_displayed}?.: }"+` + * [[option_buflist.look.display_conditions]] *buflist.look.display_conditions* ** opis: pass:none[conditions to display a buffer (note: content is evaluated, see /help buflist)] ** typ: ciąg diff --git a/po/cs.po b/po/cs.po index 498f2517e..b07683c84 100644 --- a/po/cs.po +++ b/po/cs.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-03-27 21:10+0200\n" +"POT-Creation-Date: 2017-03-29 19:58+0200\n" "PO-Revision-Date: 2017-01-06 21:59+0100\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -4905,6 +4905,8 @@ msgid "" " - ${format_buffer}: the evaluated value of option buflist.format.buffer; " "this can be used in option buflist.format.buffer_current to just change the " "background color for example\n" +" - ${format_number}: indented number with separator (evaluation of option " +"buflist.format.number)\n" " - ${number}: indented number, for example \" 1\" if there are between 10 " "and 99 buffers\n" " - ${indent}: indentation for name (channel and private buffers are " @@ -4995,6 +4997,12 @@ msgid "" "help buflist)" msgstr "příkaz spuštěný při startu WeeChat, před načtením pluginů" +#, fuzzy +msgid "" +"format for buffer number, ${number} is the indented number (note: content is " +"evaluated, see /help buflist)" +msgstr "příkaz spuštěný při startu WeeChat, před načtením pluginů" + msgid "Charset conversions" msgstr "konverze znakové sady" diff --git a/po/de.po b/po/de.po index b4ef51191..da2a03e94 100644 --- a/po/de.po +++ b/po/de.po @@ -19,7 +19,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-03-27 21:10+0200\n" +"POT-Creation-Date: 2017-03-29 19:58+0200\n" "PO-Revision-Date: 2017-03-12 21:27+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -5772,6 +5772,8 @@ msgid "" " - ${format_buffer}: the evaluated value of option buflist.format.buffer; " "this can be used in option buflist.format.buffer_current to just change the " "background color for example\n" +" - ${format_number}: indented number with separator (evaluation of option " +"buflist.format.number)\n" " - ${number}: indented number, for example \" 1\" if there are between 10 " "and 99 buffers\n" " - ${indent}: indentation for name (channel and private buffers are " @@ -5876,6 +5878,14 @@ msgid "" "help buflist)" msgstr "Passwort für Server (Hinweis: Inhalt wird evaluiert, siehe /help eval)" +#, fuzzy +msgid "" +"format for buffer number, ${number} is the indented number (note: content is " +"evaluated, see /help buflist)" +msgstr "" +"Realname der auf dem Server genutzt werden soll (Hinweis: Inhalt wird " +"evaluiert, siehe /help eval)" + msgid "Charset conversions" msgstr "Zeichensatzkonvertierung" diff --git a/po/es.po b/po/es.po index da097b1c1..d0eac88bb 100644 --- a/po/es.po +++ b/po/es.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-03-27 21:10+0200\n" +"POT-Creation-Date: 2017-03-29 19:58+0200\n" "PO-Revision-Date: 2017-01-06 22:01+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -5117,6 +5117,8 @@ msgid "" " - ${format_buffer}: the evaluated value of option buflist.format.buffer; " "this can be used in option buflist.format.buffer_current to just change the " "background color for example\n" +" - ${format_number}: indented number with separator (evaluation of option " +"buflist.format.number)\n" " - ${number}: indented number, for example \" 1\" if there are between 10 " "and 99 buffers\n" " - ${indent}: indentation for name (channel and private buffers are " @@ -5207,6 +5209,12 @@ msgid "" "help buflist)" msgstr "comando ejecutado cuando WeeChat inicia, antes de cargar los plugins" +#, fuzzy +msgid "" +"format for buffer number, ${number} is the indented number (note: content is " +"evaluated, see /help buflist)" +msgstr "comando ejecutado cuando WeeChat inicia, antes de cargar los plugins" + msgid "Charset conversions" msgstr "Conversiones de mapa de caracteres" diff --git a/po/fr.po b/po/fr.po index 1fb53f1b3..a6c400faf 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-03-27 21:10+0200\n" -"PO-Revision-Date: 2017-03-27 21:12+0200\n" +"POT-Creation-Date: 2017-03-29 19:58+0200\n" +"PO-Revision-Date: 2017-03-29 19:58+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -5654,6 +5654,8 @@ msgid "" " - ${format_buffer}: the evaluated value of option buflist.format.buffer; " "this can be used in option buflist.format.buffer_current to just change the " "background color for example\n" +" - ${format_number}: indented number with separator (evaluation of option " +"buflist.format.number)\n" " - ${number}: indented number, for example \" 1\" if there are between 10 " "and 99 buffers\n" " - ${indent}: indentation for name (channel and private buffers are " @@ -5691,6 +5693,8 @@ msgstr "" " - ${format_buffer} : la valeur évaluée de l'option buflist.format." "buffer ; peut être utilisée dans l'option buflist.format.buffer_current pour " "juste changer la couleur de fond par exemple\n" +" - ${format_number} : numéro indenté avec un séparateur (évaluation de " +"l'option buflist.format.number)\n" " - ${number} : numéro indenté, par exemple \" 1\" s'il y a entre 10 et 99 " "tampons\n" " - ${indent} : indentation pour le nom (les tampons de canaux ou privés " @@ -5794,6 +5798,13 @@ msgstr "" "format pour le lag sur un tampon de serveur IRC (note : le contenu est " "évalué, voir /help buflist)" +msgid "" +"format for buffer number, ${number} is the indented number (note: content is " +"evaluated, see /help buflist)" +msgstr "" +"format pour un numéro de tampon, ${number} est le numéro indenté (note : le " +"contenu est évalué, voir /help buflist)" + msgid "Charset conversions" msgstr "Conversions de charset" diff --git a/po/hu.po b/po/hu.po index 22200d3a7..be8efc141 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-03-27 21:10+0200\n" +"POT-Creation-Date: 2017-03-29 19:58+0200\n" "PO-Revision-Date: 2017-01-06 22:03+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -4442,6 +4442,8 @@ msgid "" " - ${format_buffer}: the evaluated value of option buflist.format.buffer; " "this can be used in option buflist.format.buffer_current to just change the " "background color for example\n" +" - ${format_number}: indented number with separator (evaluation of option " +"buflist.format.number)\n" " - ${number}: indented number, for example \" 1\" if there are between 10 " "and 99 buffers\n" " - ${indent}: indentation for name (channel and private buffers are " @@ -4530,6 +4532,12 @@ msgid "" "help buflist)" msgstr "felhasználónév az IRC szerveren" +#, fuzzy +msgid "" +"format for buffer number, ${number} is the indented number (note: content is " +"evaluated, see /help buflist)" +msgstr "felhasználónév az IRC szerveren" + #, fuzzy msgid "Charset conversions" msgstr "WeeChat szlogen" diff --git a/po/it.po b/po/it.po index f8a451f95..8d52e8021 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-03-27 21:10+0200\n" +"POT-Creation-Date: 2017-03-29 19:58+0200\n" "PO-Revision-Date: 2017-01-06 22:04+0100\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -5256,6 +5256,8 @@ msgid "" " - ${format_buffer}: the evaluated value of option buflist.format.buffer; " "this can be used in option buflist.format.buffer_current to just change the " "background color for example\n" +" - ${format_number}: indented number with separator (evaluation of option " +"buflist.format.number)\n" " - ${number}: indented number, for example \" 1\" if there are between 10 " "and 99 buffers\n" " - ${indent}: indentation for name (channel and private buffers are " @@ -5368,6 +5370,14 @@ msgstr "" "password per il server (nota: il contenuto viene valutato, consultare /help " "eval)" +#, fuzzy +msgid "" +"format for buffer number, ${number} is the indented number (note: content is " +"evaluated, see /help buflist)" +msgstr "" +"nome utente per il server proxy (nota: il contenuto viene valutato, " +"consultare /help eval)" + msgid "Charset conversions" msgstr "Conversione del set caratteri" diff --git a/po/ja.po b/po/ja.po index b7dc624e7..ec33d4fe1 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-03-27 21:10+0200\n" +"POT-Creation-Date: 2017-03-29 19:58+0200\n" "PO-Revision-Date: 2017-03-26 09:00+0900\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" "Language-Team: weechat-dev \n" @@ -5509,6 +5509,8 @@ msgid "" " - ${format_buffer}: the evaluated value of option buflist.format.buffer; " "this can be used in option buflist.format.buffer_current to just change the " "background color for example\n" +" - ${format_number}: indented number with separator (evaluation of option " +"buflist.format.number)\n" " - ${number}: indented number, for example \" 1\" if there are between 10 " "and 99 buffers\n" " - ${indent}: indentation for name (channel and private buffers are " @@ -5617,6 +5619,14 @@ msgid "" msgstr "" "hasło dla serwera (uwaga: zawartość jest przetwarzana, zobacz /help eval)" +#, fuzzy +msgid "" +"format for buffer number, ${number} is the indented number (note: content is " +"evaluated, see /help buflist)" +msgstr "" +"prawdziwa nazwa do użycia na serwerze (uwaga: zawartość jest przetwarzana, " +"zobacz /help eval)" + msgid "Charset conversions" msgstr "Konwersja kodowania" diff --git a/po/pt.po b/po/pt.po index 7eefde7b9..04ee74661 100644 --- a/po/pt.po +++ b/po/pt.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-03-27 21:10+0200\n" +"POT-Creation-Date: 2017-03-29 19:58+0200\n" "PO-Revision-Date: 2017-01-14 21:39+0100\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -5511,6 +5511,8 @@ msgid "" " - ${format_buffer}: the evaluated value of option buflist.format.buffer; " "this can be used in option buflist.format.buffer_current to just change the " "background color for example\n" +" - ${format_number}: indented number with separator (evaluation of option " +"buflist.format.number)\n" " - ${number}: indented number, for example \" 1\" if there are between 10 " "and 99 buffers\n" " - ${indent}: indentation for name (channel and private buffers are " @@ -5616,6 +5618,13 @@ msgid "" msgstr "" "palavra-passe para o servidor (nota: o conteúdo é avaliado, ver /help eval)" +#, fuzzy +msgid "" +"format for buffer number, ${number} is the indented number (note: content is " +"evaluated, see /help buflist)" +msgstr "" +"nome real a usar no servidor (nota: o conteúdo é avaliado, ver /help eval)" + msgid "Charset conversions" msgstr "Conversões de conjunto de carateres" diff --git a/po/pt_BR.po b/po/pt_BR.po index 61d4b5bfc..0458b1dca 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-03-27 21:10+0200\n" +"POT-Creation-Date: 2017-03-29 19:58+0200\n" "PO-Revision-Date: 2016-09-03 08:24+0200\n" "Last-Translator: Eduardo Elias \n" "Language-Team: weechat-dev \n" @@ -5058,6 +5058,8 @@ msgid "" " - ${format_buffer}: the evaluated value of option buflist.format.buffer; " "this can be used in option buflist.format.buffer_current to just change the " "background color for example\n" +" - ${format_number}: indented number with separator (evaluation of option " +"buflist.format.number)\n" " - ${number}: indented number, for example \" 1\" if there are between 10 " "and 99 buffers\n" " - ${indent}: indentation for name (channel and private buffers are " @@ -5170,6 +5172,14 @@ msgstr "" "comando executado quando o WeeChat inicia, antes do carregamento dos plugins " "(nota: conteúdo é avaliado, veja /help eval)" +#, fuzzy +msgid "" +"format for buffer number, ${number} is the indented number (note: content is " +"evaluated, see /help buflist)" +msgstr "" +"comando executado quando o WeeChat inicia, antes do carregamento dos plugins " +"(nota: conteúdo é avaliado, veja /help eval)" + #, fuzzy msgid "Charset conversions" msgstr "versão do WeeChat" diff --git a/po/ru.po b/po/ru.po index c0fa9a049..9a10ffb49 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-03-27 21:10+0200\n" +"POT-Creation-Date: 2017-03-29 19:58+0200\n" "PO-Revision-Date: 2017-01-06 22:06+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -4480,6 +4480,8 @@ msgid "" " - ${format_buffer}: the evaluated value of option buflist.format.buffer; " "this can be used in option buflist.format.buffer_current to just change the " "background color for example\n" +" - ${format_number}: indented number with separator (evaluation of option " +"buflist.format.number)\n" " - ${number}: indented number, for example \" 1\" if there are between 10 " "and 99 buffers\n" " - ${indent}: indentation for name (channel and private buffers are " @@ -4568,6 +4570,12 @@ msgid "" "help buflist)" msgstr "ник, используемый на IRC сервере" +#, fuzzy +msgid "" +"format for buffer number, ${number} is the indented number (note: content is " +"evaluated, see /help buflist)" +msgstr "ник, используемый на IRC сервере" + #, fuzzy msgid "Charset conversions" msgstr "слоган WeeChat" diff --git a/po/tr.po b/po/tr.po index 072334a8b..c2b515b8c 100644 --- a/po/tr.po +++ b/po/tr.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-03-27 21:10+0200\n" +"POT-Creation-Date: 2017-03-29 19:58+0200\n" "PO-Revision-Date: 2017-01-06 22:07+0100\n" "Last-Translator: Hasan Kiran \n" "Language-Team: weechat-dev \n" @@ -4046,6 +4046,8 @@ msgid "" " - ${format_buffer}: the evaluated value of option buflist.format.buffer; " "this can be used in option buflist.format.buffer_current to just change the " "background color for example\n" +" - ${format_number}: indented number with separator (evaluation of option " +"buflist.format.number)\n" " - ${number}: indented number, for example \" 1\" if there are between 10 " "and 99 buffers\n" " - ${indent}: indentation for name (channel and private buffers are " @@ -4124,6 +4126,11 @@ msgid "" "help buflist)" msgstr "" +msgid "" +"format for buffer number, ${number} is the indented number (note: content is " +"evaluated, see /help buflist)" +msgstr "" + msgid "Charset conversions" msgstr "" diff --git a/po/weechat.pot b/po/weechat.pot index f1d8687bf..97df81908 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2017-03-27 21:10+0200\n" +"POT-Creation-Date: 2017-03-29 19:58+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -4031,6 +4031,8 @@ msgid "" " - ${format_buffer}: the evaluated value of option buflist.format.buffer; " "this can be used in option buflist.format.buffer_current to just change the " "background color for example\n" +" - ${format_number}: indented number with separator (evaluation of option " +"buflist.format.number)\n" " - ${number}: indented number, for example \" 1\" if there are between 10 " "and 99 buffers\n" " - ${indent}: indentation for name (channel and private buffers are " @@ -4109,6 +4111,11 @@ msgid "" "help buflist)" msgstr "" +msgid "" +"format for buffer number, ${number} is the indented number (note: content is " +"evaluated, see /help buflist)" +msgstr "" + msgid "Charset conversions" msgstr "" diff --git a/src/plugins/buflist/buflist-bar-item.c b/src/plugins/buflist/buflist-bar-item.c index 1f5f43959..4a492b649 100644 --- a/src/plugins/buflist/buflist-bar-item.c +++ b/src/plugins/buflist/buflist-bar-item.c @@ -138,11 +138,15 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data, { snprintf (str_number, sizeof (str_number), str_format_number, number); + weechat_hashtable_set (buflist_hashtable_extra_vars, + "number_displayed", "1"); } else { snprintf (str_number, sizeof (str_number), str_format_number_empty, " "); + weechat_hashtable_set (buflist_hashtable_extra_vars, + "number_displayed", "0"); } prev_number = number; @@ -163,6 +167,10 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data, buflist_config_format_buffer)); weechat_hashtable_set (buflist_hashtable_extra_vars, "number", str_number); + weechat_hashtable_set (buflist_hashtable_extra_vars, + "format_number", + weechat_config_string ( + buflist_config_format_number)); weechat_hashtable_set (buflist_hashtable_extra_vars, "indent", str_indent_name); weechat_hashtable_set (buflist_hashtable_extra_vars, diff --git a/src/plugins/buflist/buflist-command.c b/src/plugins/buflist/buflist-command.c index 02ef81451..b9b873c90 100644 --- a/src/plugins/buflist/buflist-command.c +++ b/src/plugins/buflist/buflist-command.c @@ -93,6 +93,8 @@ buflist_command_init () "buflist.format.buffer; this can be used in option " "buflist.format.buffer_current to just change the background color " "for example\n" + " - ${format_number}: indented number with separator " + "(evaluation of option buflist.format.number)\n" " - ${number}: indented number, for example \" 1\" if there " "are between 10 and 99 buffers\n" " - ${indent}: indentation for name (channel and private " diff --git a/src/plugins/buflist/buflist-config.c b/src/plugins/buflist/buflist-config.c index 1c24a6d61..76f7bdf7e 100644 --- a/src/plugins/buflist/buflist-config.c +++ b/src/plugins/buflist/buflist-config.c @@ -44,6 +44,7 @@ struct t_config_option *buflist_config_format_hotlist_level[4]; struct t_config_option *buflist_config_format_hotlist_level_none; struct t_config_option *buflist_config_format_hotlist_separator; struct t_config_option *buflist_config_format_lag; +struct t_config_option *buflist_config_format_number; struct t_hook **buflist_config_signals_refresh = NULL; int buflist_config_num_signals_refresh = 0; @@ -264,7 +265,7 @@ buflist_config_init () N_("format of each line with a buffer " "(note: content is evaluated, see /help buflist)"), NULL, 0, 0, - "${color:green}${number}.${indent}${color_hotlist}${name}", + "${format_number}${indent}${color_hotlist}${name}", NULL, 0, NULL, NULL, NULL, &buflist_config_change_buflist, NULL, NULL, @@ -275,7 +276,7 @@ buflist_config_init () N_("format for the line with current buffer " "(note: content is evaluated, see /help buflist)"), NULL, 0, 0, - "${color:lightgreen,blue}${number}.${indent}${color_hotlist}${name}", + "${color:lightgreen,blue}${format_buffer}", NULL, 0, NULL, NULL, NULL, &buflist_config_change_buflist, NULL, NULL, @@ -368,6 +369,17 @@ buflist_config_init () NULL, NULL, NULL, &buflist_config_change_buflist, NULL, NULL, NULL, NULL, NULL); + buflist_config_format_number = weechat_config_new_option ( + buflist_config_file, ptr_section, + "number", "string", + N_("format for buffer number, ${number} is the indented number " + "(note: content is evaluated, see /help buflist)"), + NULL, 0, 0, + "${color:green}${number}${if:${number_displayed}?.: }", + NULL, 0, + NULL, NULL, NULL, + &buflist_config_change_buflist, NULL, NULL, + NULL, NULL, NULL); return 1; } diff --git a/src/plugins/buflist/buflist-config.h b/src/plugins/buflist/buflist-config.h index c49890a4f..e0c89ff8f 100644 --- a/src/plugins/buflist/buflist-config.h +++ b/src/plugins/buflist/buflist-config.h @@ -35,6 +35,7 @@ extern struct t_config_option *buflist_config_format_hotlist_level[4]; extern struct t_config_option *buflist_config_format_hotlist_level_none; extern struct t_config_option *buflist_config_format_hotlist_separator; extern struct t_config_option *buflist_config_format_lag; +extern struct t_config_option *buflist_config_format_number; extern char **buflist_config_sort_fields; extern int buflist_config_sort_fields_count;