From f376893681a09960e0797dbabee5203b29f2234f Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Thu, 20 Feb 2014 11:00:24 +0100 Subject: [PATCH] core: add option "-beep" in command /print --- ChangeLog | 1 + doc/de/autogen/user/weechat_commands.txt | 54 ++++++++++++------------ doc/en/autogen/user/weechat_commands.txt | 6 ++- doc/fr/autogen/user/weechat_commands.txt | 6 ++- doc/it/autogen/user/weechat_commands.txt | 6 ++- doc/ja/autogen/user/weechat_commands.txt | 50 +++++++++++----------- doc/pl/autogen/user/weechat_commands.txt | 54 ++++++++++++------------ po/cs.po | 11 +++-- po/de.po | 19 +++++---- po/es.po | 11 +++-- po/fr.po | 20 +++++---- po/hu.po | 11 +++-- po/it.po | 11 +++-- po/ja.po | 16 ++++--- po/pl.po | 16 ++++--- po/pt_BR.po | 11 +++-- po/ru.po | 11 +++-- po/tr.po | 11 +++-- po/weechat.pot | 11 +++-- src/core/wee-command.c | 38 +++++++++++++---- 20 files changed, 224 insertions(+), 150 deletions(-) diff --git a/ChangeLog b/ChangeLog index 45516d871..15babc1e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] == Version 0.4.4 (under dev) +* core: add option "-beep" in command /print * core: allow empty arguments for command /print * core: add bare display mode (for easy text selection and click on URLs), new key: key[alt-!], new option "bare" in command /window, new options: diff --git a/doc/de/autogen/user/weechat_commands.txt b/doc/de/autogen/user/weechat_commands.txt index 9da319179..e53b07a31 100644 --- a/doc/de/autogen/user/weechat_commands.txt +++ b/doc/de/autogen/user/weechat_commands.txt @@ -569,39 +569,41 @@ Ohne Angabe eines Arguments werden alle installierten Erweiterungen angezeigt. ---- /print [-buffer |] [-core] [-escape] [-date ] [-tags ] [-action|-error|-join|-network|-quit] [] -stdout|-stderr [] + -beep --buffer: Buffer in welchem der Text ausgegeben werden soll (standardmäßig: aktueller Buffer) - -core: Alias für "-buffer core.weechat" --escape: Escapesequenzen werden umgewandelt (zum Beispiel \a, \07, \x07) - -date: Datum der Nachricht, mögliche Formatierung: - -n: 'n' vor dem jetzigen Zeipunkt, in Sekunden - +n: 'n' in Zukunft, in Sekunden - n: 'n' Sekunden seit der Epoche (siehe man time) - date/time (ISO 8601): yyyy-mm-ddThh:mm:ss, Beispiel: 2014-01-19T04:32:55 - time: hh:mm:ss (Beispiel: 04:32:55) - -tags: durch Kommata getrennte Liste von Tags (siehe /help filter für eine Liste von Tags die häufig genutzt werden) - text: Text der ausgegeben werden soll (Präfix und Nachricht muss durch \t getrennt werden) --stdout: Text wird an stdout geschickt (Escapesequenzen werden umgewandelt) --stderr: Text wird an stderr geschickt (Escapesequenzen werden umgewandelt) +-buffer: the buffer where text is displayed (default: current buffer) + -core: alias of "-buffer core.weechat" +-escape: interpret escaped chars (for example \a, \07, \x07) + -date: message date, format can be: + -n: 'n' seconds before now + +n: 'n' seconds in the future + n: 'n' seconds since the Epoch (see man time) + date/time (ISO 8601): yyyy-mm-ddThh:mm:ss, example: 2014-01-19T04:32:55 + time: hh:mm:ss (example: 04:32:55) + -tags: comma-separated list of tags (see /help filter for a list of tags most commonly used) + text: text to display (prefix and message must be separated by "\t", if text starts with "-", then add a "\" before) +-stdout: display text on stdout (escaped chars are interpreted) +-stderr: display text on stderr (escaped chars are interpreted) + -beep: alias of "-stderr \a" -Die Option -action ... -quit nutzt den Präfix der in der Option "weechat.look.prefix_*" definiert ist. +The options -action ... -quit use the prefix defined in options "weechat.look.prefix_*". -Folgende Escapesequenzen werden unterstützt: +Following escaped chars are supported: \" \\ \a \b \e \f \n \r \t \v \0ooo \xhh \uhhhh \Uhhhhhhhh -Beispiele: - zeigt eine Erinnerung, mit Highlight, im Core-Buffer dar: - /print -core -tags notify_highlight Reminder: Milch kaufen - zeigt eine Fehlernachricht im Core-Buffer an: - /print -core -error irgend ein Fehler - zeigt eine Nachricht im Core-Buffer mit dem Präfix "abc" an: - /print -core abc\tmeine Nachricht - es wird eine Nachricht im Channel #weechat ausgegeben: +Examples: + display a reminder on core buffer with a highlight: + /print -core -tags notify_highlight Reminder: buy milk + display an error on core buffer: + /print -core -error Some error here + display message on core buffer with prefix "abc": + /print -core abc\tThe message + display a message on channel #weechat: /print -buffer irc.freenode.#weechat Message on #weechat - gibt einen Schneemann aus (U+2603): + display a snowman (U+2603): /print -escape \u2603 - verschickt Alarm (BEL): - /print -stderr \a + send alert (BEL): + /print -beep ---- [[command_weechat_proxy]] diff --git a/doc/en/autogen/user/weechat_commands.txt b/doc/en/autogen/user/weechat_commands.txt index 320634621..d98943aeb 100644 --- a/doc/en/autogen/user/weechat_commands.txt +++ b/doc/en/autogen/user/weechat_commands.txt @@ -569,6 +569,7 @@ Without argument, this command lists loaded plugins. ---- /print [-buffer |] [-core] [-escape] [-date ] [-tags ] [-action|-error|-join|-network|-quit] [] -stdout|-stderr [] + -beep -buffer: the buffer where text is displayed (default: current buffer) -core: alias of "-buffer core.weechat" @@ -580,9 +581,10 @@ Without argument, this command lists loaded plugins. date/time (ISO 8601): yyyy-mm-ddThh:mm:ss, example: 2014-01-19T04:32:55 time: hh:mm:ss (example: 04:32:55) -tags: comma-separated list of tags (see /help filter for a list of tags most commonly used) - text: text to display (prefix and message must be separated by \t) + text: text to display (prefix and message must be separated by "\t", if text starts with "-", then add a "\" before) -stdout: display text on stdout (escaped chars are interpreted) -stderr: display text on stderr (escaped chars are interpreted) + -beep: alias of "-stderr \a" The options -action ... -quit use the prefix defined in options "weechat.look.prefix_*". @@ -601,7 +603,7 @@ Examples: display a snowman (U+2603): /print -escape \u2603 send alert (BEL): - /print -stderr \a + /print -beep ---- [[command_weechat_proxy]] diff --git a/doc/fr/autogen/user/weechat_commands.txt b/doc/fr/autogen/user/weechat_commands.txt index 0c34485ef..cb0f9eeae 100644 --- a/doc/fr/autogen/user/weechat_commands.txt +++ b/doc/fr/autogen/user/weechat_commands.txt @@ -569,6 +569,7 @@ Sans paramètre, cette commande liste les extensions chargées. ---- /print [-buffer |] [-core] [-escape] [-date ] [-tags <étiquettes>] [-action|-error|-join|-network|-quit] [] -stdout|-stderr [] + -beep -buffer: le tampon où est affiché le texte (par défaut: tampon courant) -core: alias de "-buffer core.weechat" @@ -580,9 +581,10 @@ Sans paramètre, cette commande liste les extensions chargées. date/heure (ISO 8601): yyyy-mm-ddThh:mm:ss, exemple: 2014-01-19T04:32:55 heure: hh:mm:ss (exemple: 04:32:55) -tags: liste d'étiquettes séparées par des virgules (voir /help filter pour une liste des étiquettes couramment utilisées) - texte: texte à afficher (le préfixe et le message doivent être séparés par \t) + texte: texte à afficher (le préfixe et le message doivent être séparés par "\t", si le texte commence par "-", ajoutez "\" avant) -stdout: afficher le texte sur stdout (les caractères échappés sont interprétés) -stderr: afficher le texte sur stderr (les caractères échappés sont interprétés) + -beep: alias de "-stderr \a" Les options -action ... -quit utilisent le préfixe défini dans les options "weechat.look.prefix_*". @@ -601,7 +603,7 @@ Exemples: afficher un bonhomme de neige (U+2603): /print -escape \u2603 envoyer une alerte (BEL): - /print -stderr \a + /print -beep ---- [[command_weechat_proxy]] diff --git a/doc/it/autogen/user/weechat_commands.txt b/doc/it/autogen/user/weechat_commands.txt index e124cd7bf..6d7ed42b6 100644 --- a/doc/it/autogen/user/weechat_commands.txt +++ b/doc/it/autogen/user/weechat_commands.txt @@ -569,6 +569,7 @@ Senza argomento, questo comando elenca i plugin caricati. ---- /print [-buffer |] [-core] [-escape] [-date ] [-tags ] [-action|-error|-join|-network|-quit] [] -stdout|-stderr [] + -beep -buffer: the buffer where text is displayed (default: current buffer) -core: alias of "-buffer core.weechat" @@ -580,9 +581,10 @@ Senza argomento, questo comando elenca i plugin caricati. date/time (ISO 8601): yyyy-mm-ddThh:mm:ss, example: 2014-01-19T04:32:55 time: hh:mm:ss (example: 04:32:55) -tags: comma-separated list of tags (see /help filter for a list of tags most commonly used) - text: text to display (prefix and message must be separated by \t) + text: text to display (prefix and message must be separated by "\t", if text starts with "-", then add a "\" before) -stdout: display text on stdout (escaped chars are interpreted) -stderr: display text on stderr (escaped chars are interpreted) + -beep: alias of "-stderr \a" The options -action ... -quit use the prefix defined in options "weechat.look.prefix_*". @@ -601,7 +603,7 @@ Examples: display a snowman (U+2603): /print -escape \u2603 send alert (BEL): - /print -stderr \a + /print -beep ---- [[command_weechat_proxy]] diff --git a/doc/ja/autogen/user/weechat_commands.txt b/doc/ja/autogen/user/weechat_commands.txt index 574035ecb..dbc17ed94 100644 --- a/doc/ja/autogen/user/weechat_commands.txt +++ b/doc/ja/autogen/user/weechat_commands.txt @@ -569,39 +569,41 @@ arguments: ロードするプラグインに与える引数 ---- /print [-buffer |] [-core] [-escape] [-date ] [-tags ] [-action|-error|-join|-network|-quit] [] -stdout|-stderr [] + -beep --buffer: テキストを表示するバッファ (デフォルト: 現在のバッファ) - -core: "-buffer core.weechat" のエイリアス --escape: エスケープ文字を解釈 (例えば \a、\07、\x07) - -date: メッセージの日付、フォーマット: - -n: 今から 'n' 秒前 - +n: 今から 'n' 秒後 - n: エポックから 'n' 秒目 (man time を参照) - 日付/時間 (ISO 8601): yyyy-mm-ddThh:mm:ss、例: 2014-01-19T04:32:55 - 時間: hh:mm:ss (example: 04:32:55) - -tags: タグのコンマ区切りリスト (よく使うタグのリストは /help filter を参照) - text: 表示するテキスト (プレフィックスとメッセージは必ず \t で区切ってください) --stdout: 標準出力にテキストを表示 (エスケープ文字を解釈) --stderr: 標準エラー出力にテキストを表示 (エスケープ文字を解釈) +-buffer: the buffer where text is displayed (default: current buffer) + -core: alias of "-buffer core.weechat" +-escape: interpret escaped chars (for example \a, \07, \x07) + -date: message date, format can be: + -n: 'n' seconds before now + +n: 'n' seconds in the future + n: 'n' seconds since the Epoch (see man time) + date/time (ISO 8601): yyyy-mm-ddThh:mm:ss, example: 2014-01-19T04:32:55 + time: hh:mm:ss (example: 04:32:55) + -tags: comma-separated list of tags (see /help filter for a list of tags most commonly used) + text: text to display (prefix and message must be separated by "\t", if text starts with "-", then add a "\" before) +-stdout: display text on stdout (escaped chars are interpreted) +-stderr: display text on stderr (escaped chars are interpreted) + -beep: alias of "-stderr \a" -オプション -action ... -quit をつけた場合、プレフィックスは "weechat.look.prefix_*" で定義されているものになります。 +The options -action ... -quit use the prefix defined in options "weechat.look.prefix_*". -以下のエスケープ文字を使うことができます: +Following escaped chars are supported: \" \\ \a \b \e \f \n \r \t \v \0ooo \xhh \uhhhh \Uhhhhhhhh -例: - コアバッファにハイライトを付けてリマインダを表示: +Examples: + display a reminder on core buffer with a highlight: /print -core -tags notify_highlight Reminder: buy milk - コアバッファにエラーを表示: + display an error on core buffer: /print -core -error Some error here - コアバッファにプレフィックス "abc" を付けてメッセージを表示: - /print -core abc The message - チャンネル #weechat にメッセージを表示: + display message on core buffer with prefix "abc": + /print -core abc\tThe message + display a message on channel #weechat: /print -buffer irc.freenode.#weechat Message on #weechat - 雪だるまを表示 (U+2603): + display a snowman (U+2603): /print -escape \u2603 - 警告を送信 (BEL): - /print -stderr \a + send alert (BEL): + /print -beep ---- [[command_weechat_proxy]] diff --git a/doc/pl/autogen/user/weechat_commands.txt b/doc/pl/autogen/user/weechat_commands.txt index 03f978104..79f6548e7 100644 --- a/doc/pl/autogen/user/weechat_commands.txt +++ b/doc/pl/autogen/user/weechat_commands.txt @@ -569,39 +569,41 @@ Bez argumentów ta komenda wyświetli wszystkie załadowane wtyczki. ---- /print [-buffer |] [-core] [-escape] [-date ] [-tags ] [-action|-error|-join|-network|-quit] [] -stdout|-stderr [] + -beep --buffer: bufor, w którym zostanie wyświetlony tekst (domyślnie: obecny bufor) - -core: alias dla bufora "-buffer core.weechat" --escape: interpretuj znaki poprzedzone \ (na przykład \a, \07, \x07) - -date: data wiadomości, możliwe formaty: - -n: 'n' sekund wcześniej - +n: 'n' sekund później - n: 'n' sekund od Epoch (zobacz man time) - data/czas (ISO 8601): yyyy-mm-ddThh:mm:ss, przykład: 2014-01-19T04:32:55 - czas: hh:mm:ss (przykład: 04:32:55) - -tags: oddzielona przecinkami lista tagów (zobacz /help filter w celu wyświetlenia listy najczęstszych tagów) - tekst: tekst do wyświetlenia (prefiks i wiadomość muszą być oddzielone za pomocą \t) --stdout: wyświetl tekst na standardowe wyjście (znaki poprzedzone \ są interpretowane) --stderr: wyświetl tekst na standardowe wyjście błędów (znaki poprzedzone \ są interpretowane) +-buffer: the buffer where text is displayed (default: current buffer) + -core: alias of "-buffer core.weechat" +-escape: interpret escaped chars (for example \a, \07, \x07) + -date: message date, format can be: + -n: 'n' seconds before now + +n: 'n' seconds in the future + n: 'n' seconds since the Epoch (see man time) + date/time (ISO 8601): yyyy-mm-ddThh:mm:ss, example: 2014-01-19T04:32:55 + time: hh:mm:ss (example: 04:32:55) + -tags: comma-separated list of tags (see /help filter for a list of tags most commonly used) + text: text to display (prefix and message must be separated by "\t", if text starts with "-", then add a "\" before) +-stdout: display text on stdout (escaped chars are interpreted) +-stderr: display text on stderr (escaped chars are interpreted) + -beep: alias of "-stderr \a" -Opcje -action ... -quit używają prefiksów zdefiniowanych w opcjach "weechat.look.prefix_*". +The options -action ... -quit use the prefix defined in options "weechat.look.prefix_*". -Wspierane znaczniki specjalne: +Following escaped chars are supported: \" \\ \a \b \e \f \n \r \t \v \0ooo \xhh \uhhhh \Uhhhhhhhh -Przykłady: - wyświetla przypomnienie w buforze głównym z higlightem: - /print -core -tags notify_highlight Reminder: kup mleko - wyświetla błąd w głównym buforze: - /print -core -error Jakiś błąd - wyświetla wiadomość w głównym buforze z prefiksem "abc": - /print -core abc\tWiadomość - wyświetla wiadomość na kanale #weechat: +Examples: + display a reminder on core buffer with a highlight: + /print -core -tags notify_highlight Reminder: buy milk + display an error on core buffer: + /print -core -error Some error here + display message on core buffer with prefix "abc": + /print -core abc\tThe message + display a message on channel #weechat: /print -buffer irc.freenode.#weechat Message on #weechat - wyświetla bałwana (U+2603): + display a snowman (U+2603): /print -escape \u2603 - wysyła alert (BEL): - /print -stderr \a + send alert (BEL): + /print -beep ---- [[command_weechat_proxy]] diff --git a/po/cs.po b/po/cs.po index bee7d2362..90ae48ac9 100644 --- a/po/cs.po +++ b/po/cs.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-02-19 10:29+0100\n" +"POT-Creation-Date: 2014-02-20 10:47+0100\n" "PO-Revision-Date: 2014-02-16 11:21+0100\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -1870,7 +1870,8 @@ msgstr "barva textu pro jeméno bufferu" msgid "" "[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr []" +"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" +"beep" msgstr "" msgid "" @@ -1886,9 +1887,11 @@ msgid "" " time: hh:mm:ss (example: 04:32:55)\n" " -tags: comma-separated list of tags (see /help filter for a list of tags " "most commonly used)\n" -" text: text to display (prefix and message must be separated by \\t)\n" +" text: text to display (prefix and message must be separated by \"\\t\", " +"if text starts with \"-\", then add a \"\\\" before)\n" "-stdout: display text on stdout (escaped chars are interpreted)\n" "-stderr: display text on stderr (escaped chars are interpreted)\n" +" -beep: alias of \"-stderr \\a\"\n" "\n" "The options -action ... -quit use the prefix defined in options \"weechat." "look.prefix_*\".\n" @@ -1909,7 +1912,7 @@ msgid "" " display a snowman (U+2603):\n" " /print -escape \\u2603\n" " send alert (BEL):\n" -" /print -stderr \\a" +" /print -beep" msgstr "" msgid "manage proxies" diff --git a/po/de.po b/po/de.po index 4fa18ac41..d6036df14 100644 --- a/po/de.po +++ b/po/de.po @@ -22,8 +22,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-02-19 10:29+0100\n" -"PO-Revision-Date: 2014-02-16 11:21+0100\n" +"POT-Creation-Date: 2014-02-20 10:47+0100\n" +"PO-Revision-Date: 2014-02-20 10:39+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" "Language: de_DE\n" @@ -2105,11 +2105,13 @@ msgstr "gibt einen Text" #, fuzzy msgid "" "[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr []" +"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" +"beep" msgstr "" "[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" "action|-error|-join|-network|-quit] || -stdout|-stderr " +#, fuzzy msgid "" "-buffer: the buffer where text is displayed (default: current buffer)\n" " -core: alias of \"-buffer core.weechat\"\n" @@ -2123,9 +2125,11 @@ msgid "" " time: hh:mm:ss (example: 04:32:55)\n" " -tags: comma-separated list of tags (see /help filter for a list of tags " "most commonly used)\n" -" text: text to display (prefix and message must be separated by \\t)\n" +" text: text to display (prefix and message must be separated by \"\\t\", " +"if text starts with \"-\", then add a \"\\\" before)\n" "-stdout: display text on stdout (escaped chars are interpreted)\n" "-stderr: display text on stderr (escaped chars are interpreted)\n" +" -beep: alias of \"-stderr \\a\"\n" "\n" "The options -action ... -quit use the prefix defined in options \"weechat." "look.prefix_*\".\n" @@ -2146,7 +2150,7 @@ msgid "" " display a snowman (U+2603):\n" " /print -escape \\u2603\n" " send alert (BEL):\n" -" /print -stderr \\a" +" /print -beep" msgstr "" "-buffer: Buffer in welchem der Text ausgegeben werden soll (standardmäßig: " "aktueller Buffer)\n" @@ -2164,8 +2168,7 @@ msgstr "" " text: Text der ausgegeben werden soll (Präfix und Nachricht muss durch " "\\t getrennt werden)\n" "-stdout: Text wird an stdout geschickt (Escapesequenzen werden umgewandelt)\n" -"-stderr: Text wird an stderr geschickt (Escapesequenzen werden " -"umgewandelt)\n" +"-stderr: Text wird an stderr geschickt (Escapesequenzen werden umgewandelt)\n" "\n" "Die Option -action ... -quit nutzt den Präfix der in der Option \"weechat." "look.prefix_*\" definiert ist.\n" @@ -2186,7 +2189,7 @@ msgstr "" " gibt einen Schneemann aus (U+2603):\n" " /print -escape \\u2603\n" " verschickt Alarm (BEL):\n" -" /print -stderr \\a" +" /print -beep" msgid "manage proxies" msgstr "Proxys verwalten" diff --git a/po/es.po b/po/es.po index 414a0e0a6..52806a3cb 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: 2014-02-19 10:29+0100\n" +"POT-Creation-Date: 2014-02-20 10:47+0100\n" "PO-Revision-Date: 2014-02-16 11:21+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -1975,7 +1975,8 @@ msgstr "color del texto en el buffer del repetidor" msgid "" "[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr []" +"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" +"beep" msgstr "" msgid "" @@ -1991,9 +1992,11 @@ msgid "" " time: hh:mm:ss (example: 04:32:55)\n" " -tags: comma-separated list of tags (see /help filter for a list of tags " "most commonly used)\n" -" text: text to display (prefix and message must be separated by \\t)\n" +" text: text to display (prefix and message must be separated by \"\\t\", " +"if text starts with \"-\", then add a \"\\\" before)\n" "-stdout: display text on stdout (escaped chars are interpreted)\n" "-stderr: display text on stderr (escaped chars are interpreted)\n" +" -beep: alias of \"-stderr \\a\"\n" "\n" "The options -action ... -quit use the prefix defined in options \"weechat." "look.prefix_*\".\n" @@ -2014,7 +2017,7 @@ msgid "" " display a snowman (U+2603):\n" " /print -escape \\u2603\n" " send alert (BEL):\n" -" /print -stderr \\a" +" /print -beep" msgstr "" msgid "manage proxies" diff --git a/po/fr.po b/po/fr.po index 41887ef61..5c4d5fba3 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: 2014-02-19 10:29+0100\n" -"PO-Revision-Date: 2014-02-19 10:32+0100\n" +"POT-Creation-Date: 2014-02-20 10:47+0100\n" +"PO-Revision-Date: 2014-02-20 10:50+0100\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -2051,11 +2051,12 @@ msgstr "afficher du texte dans un tampon" msgid "" "[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr []" +"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" +"beep" msgstr "" "[-buffer |] [-core] [-escape] [-date ] [-tags " "<étiquettes>] [-action|-error|-join|-network|-quit] [] || -stdout|-" -"stderr []" +"stderr [] || -beep" msgid "" "-buffer: the buffer where text is displayed (default: current buffer)\n" @@ -2070,9 +2071,11 @@ msgid "" " time: hh:mm:ss (example: 04:32:55)\n" " -tags: comma-separated list of tags (see /help filter for a list of tags " "most commonly used)\n" -" text: text to display (prefix and message must be separated by \\t)\n" +" text: text to display (prefix and message must be separated by \"\\t\", " +"if text starts with \"-\", then add a \"\\\" before)\n" "-stdout: display text on stdout (escaped chars are interpreted)\n" "-stderr: display text on stderr (escaped chars are interpreted)\n" +" -beep: alias of \"-stderr \\a\"\n" "\n" "The options -action ... -quit use the prefix defined in options \"weechat." "look.prefix_*\".\n" @@ -2093,7 +2096,7 @@ msgid "" " display a snowman (U+2603):\n" " /print -escape \\u2603\n" " send alert (BEL):\n" -" /print -stderr \\a" +" /print -beep" msgstr "" "-buffer: le tampon où est affiché le texte (par défaut: tampon courant)\n" " -core: alias de \"-buffer core.weechat\"\n" @@ -2108,11 +2111,12 @@ msgstr "" " -tags: liste d'étiquettes séparées par des virgules (voir /help filter " "pour une liste des étiquettes couramment utilisées)\n" " texte: texte à afficher (le préfixe et le message doivent être séparés par " -"\\t)\n" +"\"\\t\", si le texte commence par \"-\", ajoutez \"\\\" avant)\n" "-stdout: afficher le texte sur stdout (les caractères échappés sont " "interprétés)\n" "-stderr: afficher le texte sur stderr (les caractères échappés sont " "interprétés)\n" +" -beep: alias de \"-stderr \\a\"\n" "\n" "Les options -action ... -quit utilisent le préfixe défini dans les options " "\"weechat.look.prefix_*\".\n" @@ -2133,7 +2137,7 @@ msgstr "" " afficher un bonhomme de neige (U+2603):\n" " /print -escape \\u2603\n" " envoyer une alerte (BEL):\n" -" /print -stderr \\a" +" /print -beep" msgid "manage proxies" msgstr "gestion des proxies" diff --git a/po/hu.po b/po/hu.po index 0f88bb531..d1cf0f6d6 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: 2014-02-19 10:29+0100\n" +"POT-Creation-Date: 2014-02-20 10:47+0100\n" "PO-Revision-Date: 2014-02-16 11:21+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -1650,7 +1650,8 @@ msgstr "szerver nevének színe" msgid "" "[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr []" +"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" +"beep" msgstr "" msgid "" @@ -1666,9 +1667,11 @@ msgid "" " time: hh:mm:ss (example: 04:32:55)\n" " -tags: comma-separated list of tags (see /help filter for a list of tags " "most commonly used)\n" -" text: text to display (prefix and message must be separated by \\t)\n" +" text: text to display (prefix and message must be separated by \"\\t\", " +"if text starts with \"-\", then add a \"\\\" before)\n" "-stdout: display text on stdout (escaped chars are interpreted)\n" "-stderr: display text on stderr (escaped chars are interpreted)\n" +" -beep: alias of \"-stderr \\a\"\n" "\n" "The options -action ... -quit use the prefix defined in options \"weechat." "look.prefix_*\".\n" @@ -1689,7 +1692,7 @@ msgid "" " display a snowman (U+2603):\n" " /print -escape \\u2603\n" " send alert (BEL):\n" -" /print -stderr \\a" +" /print -beep" msgstr "" #, fuzzy diff --git a/po/it.po b/po/it.po index 846c833cd..49668bb81 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: 2014-02-19 10:29+0100\n" +"POT-Creation-Date: 2014-02-20 10:47+0100\n" "PO-Revision-Date: 2014-02-16 11:21+0100\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -2013,7 +2013,8 @@ msgstr "colore del testo nei buffer relay" msgid "" "[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr []" +"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" +"beep" msgstr "" msgid "" @@ -2029,9 +2030,11 @@ msgid "" " time: hh:mm:ss (example: 04:32:55)\n" " -tags: comma-separated list of tags (see /help filter for a list of tags " "most commonly used)\n" -" text: text to display (prefix and message must be separated by \\t)\n" +" text: text to display (prefix and message must be separated by \"\\t\", " +"if text starts with \"-\", then add a \"\\\" before)\n" "-stdout: display text on stdout (escaped chars are interpreted)\n" "-stderr: display text on stderr (escaped chars are interpreted)\n" +" -beep: alias of \"-stderr \\a\"\n" "\n" "The options -action ... -quit use the prefix defined in options \"weechat." "look.prefix_*\".\n" @@ -2052,7 +2055,7 @@ msgid "" " display a snowman (U+2603):\n" " /print -escape \\u2603\n" " send alert (BEL):\n" -" /print -stderr \\a" +" /print -beep" msgstr "" msgid "manage proxies" diff --git a/po/ja.po b/po/ja.po index 35a94df9f..4db4a364b 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,8 +20,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-02-19 10:29+0100\n" -"PO-Revision-Date: 2014-02-16 11:21+0100\n" +"POT-Creation-Date: 2014-02-20 10:47+0100\n" +"PO-Revision-Date: 2014-02-20 10:39+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" "Language: ja\n" @@ -1999,11 +1999,13 @@ msgstr "バッファ内にテキストを表示" #, fuzzy msgid "" "[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr []" +"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" +"beep" msgstr "" "[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" "action|-error|-join|-network|-quit] || -stdout|-stderr " +#, fuzzy msgid "" "-buffer: the buffer where text is displayed (default: current buffer)\n" " -core: alias of \"-buffer core.weechat\"\n" @@ -2017,9 +2019,11 @@ msgid "" " time: hh:mm:ss (example: 04:32:55)\n" " -tags: comma-separated list of tags (see /help filter for a list of tags " "most commonly used)\n" -" text: text to display (prefix and message must be separated by \\t)\n" +" text: text to display (prefix and message must be separated by \"\\t\", " +"if text starts with \"-\", then add a \"\\\" before)\n" "-stdout: display text on stdout (escaped chars are interpreted)\n" "-stderr: display text on stderr (escaped chars are interpreted)\n" +" -beep: alias of \"-stderr \\a\"\n" "\n" "The options -action ... -quit use the prefix defined in options \"weechat." "look.prefix_*\".\n" @@ -2040,7 +2044,7 @@ msgid "" " display a snowman (U+2603):\n" " /print -escape \\u2603\n" " send alert (BEL):\n" -" /print -stderr \\a" +" /print -beep" msgstr "" "-buffer: テキストを表示するバッファ (デフォルト: 現在のバッファ)\n" " -core: \"-buffer core.weechat\" のエイリアス\n" @@ -2078,7 +2082,7 @@ msgstr "" " 雪だるまを表示 (U+2603):\n" " /print -escape \\u2603\n" " 警告を送信 (BEL):\n" -" /print -stderr \\a" +" /print -beep" msgid "manage proxies" msgstr "プロキシの管理" diff --git a/po/pl.po b/po/pl.po index 642fcdbe3..694885937 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-02-19 10:29+0100\n" -"PO-Revision-Date: 2014-02-16 11:21+0100\n" +"POT-Creation-Date: 2014-02-20 10:47+0100\n" +"PO-Revision-Date: 2014-02-20 10:40+0100\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: weechat-dev \n" "Language: pl\n" @@ -2044,11 +2044,13 @@ msgstr "wyświetl tekst w buforze" #, fuzzy msgid "" "[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr []" +"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" +"beep" msgstr "" "[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" "action|-error|-join|-network|-quit] || -stdout|-stderr " +#, fuzzy msgid "" "-buffer: the buffer where text is displayed (default: current buffer)\n" " -core: alias of \"-buffer core.weechat\"\n" @@ -2062,9 +2064,11 @@ msgid "" " time: hh:mm:ss (example: 04:32:55)\n" " -tags: comma-separated list of tags (see /help filter for a list of tags " "most commonly used)\n" -" text: text to display (prefix and message must be separated by \\t)\n" +" text: text to display (prefix and message must be separated by \"\\t\", " +"if text starts with \"-\", then add a \"\\\" before)\n" "-stdout: display text on stdout (escaped chars are interpreted)\n" "-stderr: display text on stderr (escaped chars are interpreted)\n" +" -beep: alias of \"-stderr \\a\"\n" "\n" "The options -action ... -quit use the prefix defined in options \"weechat." "look.prefix_*\".\n" @@ -2085,7 +2089,7 @@ msgid "" " display a snowman (U+2603):\n" " /print -escape \\u2603\n" " send alert (BEL):\n" -" /print -stderr \\a" +" /print -beep" msgstr "" "-buffer: bufor, w którym zostanie wyświetlony tekst (domyślnie: obecny " "bufor)\n" @@ -2126,7 +2130,7 @@ msgstr "" " wyświetla bałwana (U+2603):\n" " /print -escape \\u2603\n" " wysyła alert (BEL):\n" -" /print -stderr \\a" +" /print -beep" msgid "manage proxies" msgstr "zarządzanie proxy" diff --git a/po/pt_BR.po b/po/pt_BR.po index 1d4c5d631..7e4766a52 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: 2014-02-19 10:29+0100\n" +"POT-Creation-Date: 2014-02-20 10:47+0100\n" "PO-Revision-Date: 2014-02-16 11:21+0100\n" "Last-Translator: Sergio Durigan Junior \n" "Language-Team: weechat-dev \n" @@ -1954,7 +1954,8 @@ msgstr "cor do texto para nomes de buffer" msgid "" "[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr []" +"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" +"beep" msgstr "" msgid "" @@ -1970,9 +1971,11 @@ msgid "" " time: hh:mm:ss (example: 04:32:55)\n" " -tags: comma-separated list of tags (see /help filter for a list of tags " "most commonly used)\n" -" text: text to display (prefix and message must be separated by \\t)\n" +" text: text to display (prefix and message must be separated by \"\\t\", " +"if text starts with \"-\", then add a \"\\\" before)\n" "-stdout: display text on stdout (escaped chars are interpreted)\n" "-stderr: display text on stderr (escaped chars are interpreted)\n" +" -beep: alias of \"-stderr \\a\"\n" "\n" "The options -action ... -quit use the prefix defined in options \"weechat." "look.prefix_*\".\n" @@ -1993,7 +1996,7 @@ msgid "" " display a snowman (U+2603):\n" " /print -escape \\u2603\n" " send alert (BEL):\n" -" /print -stderr \\a" +" /print -beep" msgstr "" msgid "manage proxies" diff --git a/po/ru.po b/po/ru.po index 130792585..d57b5b2d9 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: 2014-02-19 10:29+0100\n" +"POT-Creation-Date: 2014-02-20 10:47+0100\n" "PO-Revision-Date: 2014-02-16 11:21+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -1673,7 +1673,8 @@ msgstr "цвет названия сервера" msgid "" "[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr []" +"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" +"beep" msgstr "" msgid "" @@ -1689,9 +1690,11 @@ msgid "" " time: hh:mm:ss (example: 04:32:55)\n" " -tags: comma-separated list of tags (see /help filter for a list of tags " "most commonly used)\n" -" text: text to display (prefix and message must be separated by \\t)\n" +" text: text to display (prefix and message must be separated by \"\\t\", " +"if text starts with \"-\", then add a \"\\\" before)\n" "-stdout: display text on stdout (escaped chars are interpreted)\n" "-stderr: display text on stderr (escaped chars are interpreted)\n" +" -beep: alias of \"-stderr \\a\"\n" "\n" "The options -action ... -quit use the prefix defined in options \"weechat." "look.prefix_*\".\n" @@ -1712,7 +1715,7 @@ msgid "" " display a snowman (U+2603):\n" " /print -escape \\u2603\n" " send alert (BEL):\n" -" /print -stderr \\a" +" /print -beep" msgstr "" #, fuzzy diff --git a/po/tr.po b/po/tr.po index cd46811bd..064d0350b 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: 2014-02-19 10:29+0100\n" +"POT-Creation-Date: 2014-02-20 10:47+0100\n" "PO-Revision-Date: 2014-02-16 11:21+0100\n" "Last-Translator: Hasan Kiran \n" "Language-Team: weechat-dev \n" @@ -1483,7 +1483,8 @@ msgstr "" msgid "" "[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr []" +"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" +"beep" msgstr "" msgid "" @@ -1499,9 +1500,11 @@ msgid "" " time: hh:mm:ss (example: 04:32:55)\n" " -tags: comma-separated list of tags (see /help filter for a list of tags " "most commonly used)\n" -" text: text to display (prefix and message must be separated by \\t)\n" +" text: text to display (prefix and message must be separated by \"\\t\", " +"if text starts with \"-\", then add a \"\\\" before)\n" "-stdout: display text on stdout (escaped chars are interpreted)\n" "-stderr: display text on stderr (escaped chars are interpreted)\n" +" -beep: alias of \"-stderr \\a\"\n" "\n" "The options -action ... -quit use the prefix defined in options \"weechat." "look.prefix_*\".\n" @@ -1522,7 +1525,7 @@ msgid "" " display a snowman (U+2603):\n" " /print -escape \\u2603\n" " send alert (BEL):\n" -" /print -stderr \\a" +" /print -beep" msgstr "" msgid "manage proxies" diff --git a/po/weechat.pot b/po/weechat.pot index 70ffac43a..68edc8c5b 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-02-19 10:29+0100\n" +"POT-Creation-Date: 2014-02-20 10:47+0100\n" "PO-Revision-Date: 2013-02-14 18:20+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: weechat-dev \n" @@ -1486,7 +1486,8 @@ msgstr "" msgid "" "[-buffer |] [-core] [-escape] [-date ] [-tags ] [-" -"action|-error|-join|-network|-quit] [] || -stdout|-stderr []" +"action|-error|-join|-network|-quit] [] || -stdout|-stderr [] || -" +"beep" msgstr "" msgid "" @@ -1502,9 +1503,11 @@ msgid "" " time: hh:mm:ss (example: 04:32:55)\n" " -tags: comma-separated list of tags (see /help filter for a list of tags " "most commonly used)\n" -" text: text to display (prefix and message must be separated by \\t)\n" +" text: text to display (prefix and message must be separated by \"\\t\", " +"if text starts with \"-\", then add a \"\\\" before)\n" "-stdout: display text on stdout (escaped chars are interpreted)\n" "-stderr: display text on stderr (escaped chars are interpreted)\n" +" -beep: alias of \"-stderr \\a\"\n" "\n" "The options -action ... -quit use the prefix defined in options \"weechat." "look.prefix_*\".\n" @@ -1525,7 +1528,7 @@ msgid "" " display a snowman (U+2603):\n" " /print -escape \\u2603\n" " send alert (BEL):\n" -" /print -stderr \\a" +" /print -beep" msgstr "" msgid "manage proxies" diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 6dd77d99b..a64f1779a 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -4191,8 +4191,8 @@ COMMAND_CALLBACK(print) int i, escape, to_stdout, to_stderr; time_t date, date_now; struct tm tm_date; - char *tags, *pos, *text, *text2, *error; - const char *prefix; + char *tags, *pos, *text, *text2, *error, empty_string[1] = { '\0' }; + const char *prefix, *ptr_text; long value; /* make C compiler happy */ @@ -4205,6 +4205,7 @@ COMMAND_CALLBACK(print) escape = 0; to_stdout = 0; to_stderr = 0; + ptr_text = NULL; for (i = 1; i < argc; i++) { @@ -4305,13 +4306,31 @@ COMMAND_CALLBACK(print) { to_stderr = 1; } + else if (string_strcasecmp (argv[i], "-beep") == 0) + { + fprintf (stderr, "\a"); + return WEECHAT_RC_OK; + } + else if (argv[i][0] == '-') + { + /* unknown argument starting with "-", exit */ + return WEECHAT_RC_ERROR; + } else break; } + if (i < argc) + { + ptr_text = (strncmp (argv_eol[i], "\\-", 2) == 0) ? + argv_eol[i] + 1 : argv_eol[i]; + } + else + ptr_text = empty_string; + if (to_stdout || to_stderr) { - text = string_convert_escaped_chars ((i < argc) ? argv_eol[i] : ""); + text = string_convert_escaped_chars (ptr_text); if (text) { fprintf ((to_stdout) ? stdout : stderr, "%s", text); @@ -4320,7 +4339,7 @@ COMMAND_CALLBACK(print) } else { - text = strdup ((i < argc) ? argv_eol[i] : ""); + text = strdup (ptr_text); if (text) { pos = NULL; @@ -7108,7 +7127,8 @@ command_init () N_("display text on a buffer"), N_("[-buffer |] [-core] [-escape] [-date ] " "[-tags ] [-action|-error|-join|-network|-quit] []" - " || -stdout|-stderr []"), + " || -stdout|-stderr []" + " || -beep"), N_("-buffer: the buffer where text is displayed (default: current " "buffer)\n" " -core: alias of \"-buffer core.weechat\"\n" @@ -7123,9 +7143,10 @@ command_init () " -tags: comma-separated list of tags (see /help filter for a list " "of tags most commonly used)\n" " text: text to display (prefix and message must be separated by " - "\\t)\n" + "\"\\t\", if text starts with \"-\", then add a \"\\\" before)\n" "-stdout: display text on stdout (escaped chars are interpreted)\n" "-stderr: display text on stderr (escaped chars are interpreted)\n" + " -beep: alias of \"-stderr \\a\"\n" "\n" "The options -action ... -quit use the prefix defined in options " "\"weechat.look.prefix_*\".\n" @@ -7146,12 +7167,13 @@ command_init () " display a snowman (U+2603):\n" " /print -escape \\u2603\n" " send alert (BEL):\n" - " /print -stderr \\a"), + " /print -beep"), "-buffer %(buffers_numbers)|%(buffers_plugins_names)" " || -core|-escape|-date|-tags|-action|-error|-join|-network|-quit" " || -prefix" " || -stdout" - " || -stderr", + " || -stderr" + " || -beep", &command_print, NULL); hook_command ( NULL, "proxy",