diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 4c20a966b..407ce0767 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -20,6 +20,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] New features:: + * core: add option "time" in command /debug * api: add info "pid" (WeeChat PID) (issue #850) * fifo: add file fifo.conf and option fifo.file.path to customize FIFO pipe path/filename (issue #850) * irc: add tag "self_msg" on self messages (issue #840) diff --git a/doc/de/autogen/user/weechat_commands.adoc b/doc/de/autogen/user/weechat_commands.adoc index 24d200856..2a0d408d2 100644 --- a/doc/de/autogen/user/weechat_commands.adoc +++ b/doc/de/autogen/user/weechat_commands.adoc @@ -218,7 +218,7 @@ Beispiele: ---- [[command_weechat_debug]] -* `+debug+`: Debug-Kontrolle für Hauptprogramm und/oder Erweiterung +* `+debug+`: debug functions ---- /debug list @@ -227,25 +227,27 @@ Beispiele: buffer|color|infolists|memory|tags|term|windows mouse|cursor [verbose] hdata [free] + time - list: zeigt alle Erweiterungen mit Debuglevel an - set: setzt den Level der Protokollierung für eine Erweiterung - plugin: Name der Erweiterung ("core" für den WeeChat Kern) - level: Debuglevel der Erweiterung (0 = deaktiviert Debug) - dump: Speicherabbild in die WeeChat Protokolldatei schreiben (wie bei einem Programmabsturz) - buffer: speichert den Bufferinhalt als hexadezimale Ausgabe in die Protokolldatei - color: zeigt Informationen über die aktuellen Farbpaarungen an - cursor: schaltet den debug-Modus für den Cursor-Modus ein/aus - dirs: Verzeichnisse werden angezeigt - hdata: zeigt Informationen zu hdata an (mittels free werden alle hdata Informationen aus dem Speicher entfernt) - hooks: zeigt die aktiven Hooks an -infolists: zeigt Information über die Infolists an - libs: zeigt an welche externen Bibliotheken verwendet werden - memory: gibt Informationen über den genutzten Speicher aus - mouse: schaltet den debug-Modus für den Maus-Modus ein/aus - tags: zeigt für jede einzelne Zeile die dazugehörigen Schlagwörter an - term: gibt Informationen über das Terminal und verfügbare Farben aus - windows: zeigt die Fensterstruktur an + list: list plugins with debug levels + set: set debug level for plugin + plugin: name of plugin ("core" for WeeChat core) + level: debug level for plugin (0 = disable debug) + dump: save memory dump in WeeChat log file (same dump is written when WeeChat crashes) + buffer: dump buffer content with hexadecimal values in log file + color: display infos about current color pairs + cursor: toggle debug for cursor mode + dirs: display directories + hdata: display infos about hdata (with free: remove all hdata in memory) + hooks: display infos about hooks +infolists: display infos about infolists + libs: display infos about external libraries used + memory: display infos about memory usage + mouse: toggle debug for mouse + tags: display tags for lines + term: display infos about terminal + windows: display windows tree + time: measure time to execute a command or to send text to the current buffer ---- [[command_weechat_eval]] diff --git a/doc/en/autogen/user/weechat_commands.adoc b/doc/en/autogen/user/weechat_commands.adoc index d9371e381..56e34d884 100644 --- a/doc/en/autogen/user/weechat_commands.adoc +++ b/doc/en/autogen/user/weechat_commands.adoc @@ -218,7 +218,7 @@ Examples: ---- [[command_weechat_debug]] -* `+debug+`: control debug for core/plugins +* `+debug+`: debug functions ---- /debug list @@ -227,6 +227,7 @@ Examples: buffer|color|infolists|memory|tags|term|windows mouse|cursor [verbose] hdata [free] + time list: list plugins with debug levels set: set debug level for plugin @@ -246,6 +247,7 @@ infolists: display infos about infolists tags: display tags for lines term: display infos about terminal windows: display windows tree + time: measure time to execute a command or to send text to the current buffer ---- [[command_weechat_eval]] diff --git a/doc/fr/autogen/user/weechat_commands.adoc b/doc/fr/autogen/user/weechat_commands.adoc index 56c2426c0..743b4bcd1 100644 --- a/doc/fr/autogen/user/weechat_commands.adoc +++ b/doc/fr/autogen/user/weechat_commands.adoc @@ -218,7 +218,7 @@ Exemples : ---- [[command_weechat_debug]] -* `+debug+`: contrôle du debug pour le cœur/les extensions +* `+debug+`: fonctions de debug ---- /debug list @@ -227,6 +227,7 @@ Exemples : buffer|color|infolists|memory|tags|term|windows cursor|mouse [verbose] hdata [free] + time list : lister les extensions avec leur niveau de debug set : définir le niveau de debug pour l'extension @@ -246,6 +247,7 @@ infolists : afficher des infos sur les infolists tags : afficher les étiquettes pour les lignes term : afficher des infos sur le terminal windows : afficher l'arbre des fenêtres + time : mesurer le temps pour exécuter une commande ou pour envoyer du texte au tampon courant ---- [[command_weechat_eval]] diff --git a/doc/it/autogen/user/weechat_commands.adoc b/doc/it/autogen/user/weechat_commands.adoc index f3f2b5b67..9bb7e4cc4 100644 --- a/doc/it/autogen/user/weechat_commands.adoc +++ b/doc/it/autogen/user/weechat_commands.adoc @@ -218,15 +218,16 @@ Examples: ---- [[command_weechat_debug]] -* `+debug+`: attiva debug per core/plugin +* `+debug+`: debug functions ---- /debug list - set + set dump [] buffer|color|infolists|memory|tags|term|windows mouse|cursor [verbose] hdata [free] + time list: list plugins with debug levels set: set debug level for plugin @@ -246,6 +247,7 @@ infolists: display infos about infolists tags: display tags for lines term: display infos about terminal windows: display windows tree + time: measure time to execute a command or to send text to the current buffer ---- [[command_weechat_eval]] diff --git a/doc/ja/autogen/user/weechat_commands.adoc b/doc/ja/autogen/user/weechat_commands.adoc index ed32619ea..57b413a97 100644 --- a/doc/ja/autogen/user/weechat_commands.adoc +++ b/doc/ja/autogen/user/weechat_commands.adoc @@ -218,7 +218,7 @@ stop: カーソルモードを終了 ---- [[command_weechat_debug]] -* `+debug+`: core やプラグインのデバッグ管理 +* `+debug+`: debug functions ---- /debug list @@ -227,25 +227,27 @@ stop: カーソルモードを終了 buffer|color|infolists|memory|tags|term|windows mouse|cursor [verbose] hdata [free] + time - list: デバッグレベルの設定されたプラグインをリストアップ - set: プラグインのデバッグレベルを設定 - plugin: プラグインの名前 ("core" は WeeChat コアを意味する) - level: プラグインのデバッグレベル (0 はデバッグの無効化) - dump: WeeChat ログファイルにメモリダンプを保存 (WeeChat がクラッシュした場合と同じダンプが書き込まれます) - buffer: ログファイルに 16 進値でバッファの内容をダンプ - color: 現在の色ペアに関する情報を表示 - cursor: カーソルモードのデバッグを切り替え - dirs: ディレクトリを表示 - hdata: hdata に関する情報を表示 (free を付けた場合: メモリから全ての hdata を削除) - hooks: フックに関する情報を表示 -infolists: インフォリストに関する情報を表示 - libs: 使用中の外部ライブラリに関する情報を表示 - memory: メモリ使用量に関する情報を表示 - mouse: マウスのデバックを切り替え - tags: 行のタグを表示 - term: 端末に関する情報を表示 - windows: ウィンドウツリーの情報を表示 + list: list plugins with debug levels + set: set debug level for plugin + plugin: name of plugin ("core" for WeeChat core) + level: debug level for plugin (0 = disable debug) + dump: save memory dump in WeeChat log file (same dump is written when WeeChat crashes) + buffer: dump buffer content with hexadecimal values in log file + color: display infos about current color pairs + cursor: toggle debug for cursor mode + dirs: display directories + hdata: display infos about hdata (with free: remove all hdata in memory) + hooks: display infos about hooks +infolists: display infos about infolists + libs: display infos about external libraries used + memory: display infos about memory usage + mouse: toggle debug for mouse + tags: display tags for lines + term: display infos about terminal + windows: display windows tree + time: measure time to execute a command or to send text to the current buffer ---- [[command_weechat_eval]] diff --git a/doc/pl/autogen/user/weechat_commands.adoc b/doc/pl/autogen/user/weechat_commands.adoc index 96d85742e..2db55ecb0 100644 --- a/doc/pl/autogen/user/weechat_commands.adoc +++ b/doc/pl/autogen/user/weechat_commands.adoc @@ -218,34 +218,36 @@ Przykłady: ---- [[command_weechat_debug]] -* `+debug+`: kontrola debugu dla rdzenia/wtyczek +* `+debug+`: debug functions ---- /debug list - set - dump [] + set + dump [] buffer|color|infolists|memory|tags|term|windows mouse|cursor [verbose] hdata [free] + time - list: wyświetla wtyczki z poziomem debugowania - set: ustawia poziom debugowania dla wtyczki - plugin: nazwa wtyczki ("core" dla rdzenia WeeChat) - poziom: poziom debugowania wtyczki (0 = wyłączony) - dump: zachowuje zrzut pamięci w pliku z logiem WeeChat (taki sam zrzut jest zapisywany podczas awarii WeeChat) - buffer: zrzuca zawartość bufora z wartościami heksadecymalnymi do pliku z logiem - color: wyświetla informacje na temat obecnych par kolorów - cursor: przełącza debugowanie dla trybu kursora - dirs: wyświetla katalogi - hdata: wyświetla informacje o hdata (z free: usuwa wszystkie hdata z pamięci) - hooks: wyświetla informacje o hooks -infolists: wyświetla informacje o infolistach - libs: wyświetla informacje o użytych zewnętrznych bibliotekach - memory: wyświetla informacje o zużyciu pamięci - mouse: przełącza debugowanie myszy - tags: wyświetla tagi dla linii - term: wyświetla informacje o terminalu - windows: wyświetla drzewo okien + list: list plugins with debug levels + set: set debug level for plugin + plugin: name of plugin ("core" for WeeChat core) + level: debug level for plugin (0 = disable debug) + dump: save memory dump in WeeChat log file (same dump is written when WeeChat crashes) + buffer: dump buffer content with hexadecimal values in log file + color: display infos about current color pairs + cursor: toggle debug for cursor mode + dirs: display directories + hdata: display infos about hdata (with free: remove all hdata in memory) + hooks: display infos about hooks +infolists: display infos about infolists + libs: display infos about external libraries used + memory: display infos about memory usage + mouse: toggle debug for mouse + tags: display tags for lines + term: display infos about terminal + windows: display windows tree + time: measure time to execute a command or to send text to the current buffer ---- [[command_weechat_eval]] diff --git a/po/cs.po b/po/cs.po index 09d7717b4..1a1755959 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: 2016-11-26 13:55+0100\n" +"POT-Creation-Date: 2016-11-28 21:48+0100\n" "PO-Revision-Date: 2016-09-03 08:23+0200\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -1380,13 +1380,14 @@ msgid "" " /cursor go 10,5" msgstr "" -msgid "control debug for core/plugins" -msgstr "spřáva ladění pro jádro/pluginy" +msgid "debug functions" +msgstr "" #, fuzzy msgid "" "list || set || dump [] || buffer|color|infolists|" -"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free] || time " +"" msgstr "" "list || set || dump [] || buffer|color|memory|term|" "windows" @@ -1412,7 +1413,9 @@ msgid "" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" " term: display infos about terminal\n" -" windows: display windows tree" +" windows: display windows tree\n" +" time: measure time to execute a command or to send text to the current " +"buffer" msgstr "" " list: vypsat pluginy s urovněmi ladění\n" " set: nastavit úroveň logování pro plugin\n" @@ -11400,6 +11403,9 @@ msgstr "%s%s: vypršel časový limit \"%s\" pro %s" msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: nemohu se připojit\" neočekávaná chyba (%d)" +#~ msgid "control debug for core/plugins" +#~ msgstr "spřáva ladění pro jádro/pluginy" + #~ msgid "text color for nicks in chat window" #~ msgstr "barva textu přezdívky v okně rozhovoru" diff --git a/po/de.po b/po/de.po index dca25633d..c4dcfc2bf 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: 2016-11-26 13:55+0100\n" +"POT-Creation-Date: 2016-11-28 21:48+0100\n" "PO-Revision-Date: 2016-11-22 21:27+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -1471,16 +1471,19 @@ msgstr "" " gehe zu den Koordinaten x=10, y=5:\n" " /cursor go 10,5" -msgid "control debug for core/plugins" -msgstr "Debug-Kontrolle für Hauptprogramm und/oder Erweiterung" +msgid "debug functions" +msgstr "" +#, fuzzy msgid "" "list || set || dump [] || buffer|color|infolists|" -"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free] || time " +"" msgstr "" "list || set || dump [] || buffer|color|infolists|" "memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +#, fuzzy msgid "" " list: list plugins with debug levels\n" " set: set debug level for plugin\n" @@ -1501,7 +1504,9 @@ msgid "" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" " term: display infos about terminal\n" -" windows: display windows tree" +" windows: display windows tree\n" +" time: measure time to execute a command or to send text to the current " +"buffer" msgstr "" " list: zeigt alle Erweiterungen mit Debuglevel an\n" " set: setzt den Level der Protokollierung für eine Erweiterung\n" @@ -12976,6 +12981,9 @@ msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "" "%s%s: Verbindung konnte nicht hergestellt werden: unerwarteter Fehler (%d)" +#~ msgid "control debug for core/plugins" +#~ msgstr "Debug-Kontrolle für Hauptprogramm und/oder Erweiterung" + #~ msgid "text color for nicks in chat window" #~ msgstr "Farbe für Nicks im Chat-Fenster" diff --git a/po/es.po b/po/es.po index a46bfd7ef..6ce2fffd4 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: 2016-11-26 13:55+0100\n" +"POT-Creation-Date: 2016-11-28 21:48+0100\n" "PO-Revision-Date: 2016-09-03 08:23+0200\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -1403,13 +1403,15 @@ msgstr "" " ir a las coordenadas x=10, y=5:\n" " /cursor go 10,5" -msgid "control debug for core/plugins" -msgstr "controla los mensajes de depuración para el núcleo/plugins" +msgid "debug functions" +msgstr "" # hooks missing? +#, fuzzy msgid "" "list || set || dump [] || buffer|color|infolists|" -"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free] || time " +"" msgstr "" "list || set || dump [] || buffer|color|infolists|" "memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" @@ -1435,7 +1437,9 @@ msgid "" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" " term: display infos about terminal\n" -" windows: display windows tree" +" windows: display windows tree\n" +" time: measure time to execute a command or to send text to the current " +"buffer" msgstr "" " list: listar plugins con niveles de depuración.\n" " set: configura el nivel de depuración para plugin.\n" @@ -11660,6 +11664,9 @@ msgstr "%s%s: tiempo de espera máximo para \"%s\" con %s" msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: no es posible conectarse al transmisor" +#~ msgid "control debug for core/plugins" +#~ msgstr "controla los mensajes de depuración para el núcleo/plugins" + #~ msgid "text color for nicks in chat window" #~ msgstr "color para los apodos en la ventana de conversación" diff --git a/po/fr.po b/po/fr.po index 63f2ca8fb..7201c1cc2 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: 2016-11-26 13:55+0100\n" -"PO-Revision-Date: 2016-11-26 13:55+0100\n" +"POT-Creation-Date: 2016-11-28 21:48+0100\n" +"PO-Revision-Date: 2016-11-28 21:49+0100\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -1447,15 +1447,17 @@ msgstr "" " aller aux coordonnées x=10, y=5 :\n" " /cursor go 10,5" -msgid "control debug for core/plugins" -msgstr "contrôle du debug pour le cœur/les extensions" +msgid "debug functions" +msgstr "fonctions de debug" msgid "" "list || set || dump [] || buffer|color|infolists|" -"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free] || time " +"" msgstr "" "list || set || dump [] || buffer|color|" -"infolists|memory|tags|term|windows || cursor|mouse [verbose] || hdata [free]" +"infolists|memory|tags|term|windows || cursor|mouse [verbose] || hdata [free] " +"|| time " msgid "" " list: list plugins with debug levels\n" @@ -1477,7 +1479,9 @@ msgid "" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" " term: display infos about terminal\n" -" windows: display windows tree" +" windows: display windows tree\n" +" time: measure time to execute a command or to send text to the current " +"buffer" msgstr "" " list : lister les extensions avec leur niveau de debug\n" " set : définir le niveau de debug pour l'extension\n" @@ -1499,7 +1503,9 @@ msgstr "" " mouse : activer/désactiver le debug pour la souris\n" " tags : afficher les étiquettes pour les lignes\n" " term : afficher des infos sur le terminal\n" -" windows : afficher l'arbre des fenêtres" +" windows : afficher l'arbre des fenêtres\n" +" time : mesurer le temps pour exécuter une commande ou pour envoyer du " +"texte au tampon courant" msgid "evaluate expression" msgstr "évaluer une expression" @@ -12716,6 +12722,9 @@ msgstr "%s%s : délai d'attente dépassé pour \"%s\" avec %s" msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s : impossible de se connecter : erreur inattendue (%d)" +#~ msgid "control debug for core/plugins" +#~ msgstr "contrôle du debug pour le cœur/les extensions" + #~ msgid "text color for nicks in chat window" #~ msgstr "couleur du texte pour les pseudos dans la fenêtre de discussion" diff --git a/po/hu.po b/po/hu.po index a61750ba6..d0e3bdeaa 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: 2016-11-26 13:55+0100\n" +"POT-Creation-Date: 2016-11-28 21:48+0100\n" "PO-Revision-Date: 2016-09-03 08:23+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -1311,13 +1311,14 @@ msgid "" " /cursor go 10,5" msgstr "" -msgid "control debug for core/plugins" +msgid "debug functions" msgstr "" #, fuzzy msgid "" "list || set || dump [] || buffer|color|infolists|" -"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free] || time " +"" msgstr "dump | buffer | windows" #, fuzzy @@ -1341,7 +1342,9 @@ msgid "" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" " term: display infos about terminal\n" -" windows: display windows tree" +" windows: display windows tree\n" +" time: measure time to execute a command or to send text to the current " +"buffer" msgstr "" " dump: memóriatartalom mentése a WeeChat logba (ugyanez a tartalom íródik " "a WeeChat összeomlásakor)\n" diff --git a/po/it.po b/po/it.po index f82a7e94d..c035f2cdd 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: 2016-11-26 13:55+0100\n" +"POT-Creation-Date: 2016-11-28 21:48+0100\n" "PO-Revision-Date: 2016-09-03 08:24+0200\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -1383,12 +1383,14 @@ msgstr "" " vai alle coordinate x=10, y=5:\n" " /cursor go 10,5" -msgid "control debug for core/plugins" -msgstr "attiva debug per core/plugin" +msgid "debug functions" +msgstr "" +#, fuzzy msgid "" "list || set || dump [] || buffer|color|infolists|" -"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free] || time " +"" msgstr "" "list || set || dump [] || buffer|color|infolists|" "memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" @@ -1414,7 +1416,9 @@ msgid "" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" " term: display infos about terminal\n" -" windows: display windows tree" +" windows: display windows tree\n" +" time: measure time to execute a command or to send text to the current " +"buffer" msgstr "" " list: elenca i plugin con i livelli di debug\n" " set: imposta il livello di debug per il plugin\n" @@ -11848,6 +11852,9 @@ msgstr "%s%s: timeout per \"%s\" con %s" msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: impossibile connettersi al mittente" +#~ msgid "control debug for core/plugins" +#~ msgstr "attiva debug per core/plugin" + #~ msgid "text color for nicks in chat window" #~ msgstr "colore del testo per i nick nella finestra di chat" diff --git a/po/ja.po b/po/ja.po index 02ddf43b4..359279054 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: 2016-11-26 13:55+0100\n" +"POT-Creation-Date: 2016-11-28 21:48+0100\n" "PO-Revision-Date: 2016-11-23 09:00+0900\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese || dump [] || buffer|color|infolists|" -"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free] || time " +"" msgstr "" "list || set || dump [] || buffer|color|infolists|" "memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +#, fuzzy msgid "" " list: list plugins with debug levels\n" " set: set debug level for plugin\n" @@ -1444,7 +1447,9 @@ msgid "" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" " term: display infos about terminal\n" -" windows: display windows tree" +" windows: display windows tree\n" +" time: measure time to execute a command or to send text to the current " +"buffer" msgstr "" " list: デバッグレベルの設定されたプラグインをリストアップ\n" " set: プラグインのデバッグレベルを設定\n" @@ -12223,6 +12228,9 @@ msgstr "%s%s: \"%s\" のタイムアウト %s" msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: 接続できません: 未定義のエラー (%d)" +#~ msgid "control debug for core/plugins" +#~ msgstr "core やプラグインのデバッグ管理" + #~ msgid "text color for nicks in chat window" #~ msgstr "チャットウィンドウ内のニックネームのテキスト色" diff --git a/po/pl.po b/po/pl.po index 13ec876c0..e2d3d8c88 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2016-11-26 13:55+0100\n" +"POT-Creation-Date: 2016-11-28 21:48+0100\n" "PO-Revision-Date: 2016-09-03 08:24+0200\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: weechat-dev \n" @@ -1447,16 +1447,19 @@ msgstr "" " przejdź do współrzędnych x=10, y=5:\n" " /cursor go 10,5" -msgid "control debug for core/plugins" -msgstr "kontrola debugu dla rdzenia/wtyczek" +msgid "debug functions" +msgstr "" +#, fuzzy msgid "" "list || set || dump [] || buffer|color|infolists|" -"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free] || time " +"" msgstr "" "list || set || dump [] || buffer|color|infolists|" "memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +#, fuzzy msgid "" " list: list plugins with debug levels\n" " set: set debug level for plugin\n" @@ -1477,7 +1480,9 @@ msgid "" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" " term: display infos about terminal\n" -" windows: display windows tree" +" windows: display windows tree\n" +" time: measure time to execute a command or to send text to the current " +"buffer" msgstr "" " list: wyświetla wtyczki z poziomem debugowania\n" " set: ustawia poziom debugowania dla wtyczki\n" @@ -12455,6 +12460,9 @@ msgstr "%s%s: przekroczono czas na \"%s\" z %s" msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: nie można połączyć: niespodziewany błąd (%d)" +#~ msgid "control debug for core/plugins" +#~ msgstr "kontrola debugu dla rdzenia/wtyczek" + #~ msgid "text color for nicks in chat window" #~ msgstr "kolor nicków w oknie rozmowy" diff --git a/po/pt.po b/po/pt.po index 88f1e47df..18c81eefa 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: 2016-11-26 13:55+0100\n" +"POT-Creation-Date: 2016-11-28 21:48+0100\n" "PO-Revision-Date: 2016-09-27 12:29+0000\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -1436,16 +1436,19 @@ msgstr "" " ir para as coordenadas x=10, y=5:\n" " /cursor go 10,5" -msgid "control debug for core/plugins" -msgstr "controlar depuração do core/plugins" +msgid "debug functions" +msgstr "" +#, fuzzy msgid "" "list || set || dump [] || buffer|color|infolists|" -"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free] || time " +"" msgstr "" "list || set || dump [] || buffer|color|infolists|" "memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +#, fuzzy msgid "" " list: list plugins with debug levels\n" " set: set debug level for plugin\n" @@ -1466,7 +1469,9 @@ msgid "" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" " term: display infos about terminal\n" -" windows: display windows tree" +" windows: display windows tree\n" +" time: measure time to execute a command or to send text to the current " +"buffer" msgstr "" " list: listar plugins com nível de depuração\n" " set: definir nível de depuração do plugin\n" @@ -12469,6 +12474,9 @@ msgstr "%s%s: tempo limite de \"%s\" com %s" msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: não foi possível conectar: erro inesperado (%d)" +#~ msgid "control debug for core/plugins" +#~ msgstr "controlar depuração do core/plugins" + #~ msgid "text color for nicks in chat window" #~ msgstr "cor do texto dos nicks na janela de chat" diff --git a/po/pt_BR.po b/po/pt_BR.po index 43b27a28d..3b53eb32d 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: 2016-11-26 13:55+0100\n" +"POT-Creation-Date: 2016-11-28 21:48+0100\n" "PO-Revision-Date: 2016-09-03 08:24+0200\n" "Last-Translator: Eduardo Elias \n" "Language-Team: weechat-dev \n" @@ -1444,14 +1444,16 @@ msgstr "" " vá para as coordenadas x=10, y=5:\n" " /cursor go 10,5" -msgid "control debug for core/plugins" -msgstr "controlar depuração para core/plugins" +msgid "debug functions" +msgstr "" # find a better translation to dump? # find a better translation do log? +#, fuzzy msgid "" "list || set || dump [] || buffer|color|infolists|" -"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free] || time " +"" msgstr "" "list || set || dump [] || buffer|color|cursor|" "infolists|memory|mouse|tags|term|windows || hdata [free]" @@ -1478,7 +1480,9 @@ msgid "" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" " term: display infos about terminal\n" -" windows: display windows tree" +" windows: display windows tree\n" +" time: measure time to execute a command or to send text to the current " +"buffer" msgstr "" " list: lista plugins e níveis de depuração\n" " set: configura nível de depuração para plugin\n" @@ -11139,5 +11143,8 @@ msgstr "%s%s: tempo esgotado para \"%s\" com %s" msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: não foi possível conectar ao remetente" +#~ msgid "control debug for core/plugins" +#~ msgstr "controlar depuração para core/plugins" + #~ msgid "text color for nicks in chat window" #~ msgstr "cor do texto para apelidos na janela de conversa" diff --git a/po/ru.po b/po/ru.po index bde2f59ef..0d352411f 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: 2016-11-26 13:55+0100\n" +"POT-Creation-Date: 2016-11-28 21:48+0100\n" "PO-Revision-Date: 2016-09-03 08:24+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -1332,13 +1332,14 @@ msgid "" " /cursor go 10,5" msgstr "" -msgid "control debug for core/plugins" +msgid "debug functions" msgstr "" #, fuzzy msgid "" "list || set || dump [] || buffer|color|infolists|" -"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free] || time " +"" msgstr "dump | buffer | windows" #, fuzzy @@ -1362,7 +1363,9 @@ msgid "" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" " term: display infos about terminal\n" -" windows: display windows tree" +" windows: display windows tree\n" +" time: measure time to execute a command or to send text to the current " +"buffer" msgstr "" " dump: сохранить дамп памяти в журнал WeeChat (аналогично дампу при крахе " "WeeChat)\n" diff --git a/po/tr.po b/po/tr.po index 5b019f0a3..deb86bd38 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: 2016-11-26 13:55+0100\n" +"POT-Creation-Date: 2016-11-28 21:48+0100\n" "PO-Revision-Date: 2016-05-18 07:43+0200\n" "Last-Translator: Hasan Kiran \n" "Language-Team: weechat-dev \n" @@ -1173,12 +1173,13 @@ msgid "" " /cursor go 10,5" msgstr "" -msgid "control debug for core/plugins" +msgid "debug functions" msgstr "" msgid "" "list || set || dump [] || buffer|color|infolists|" -"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free] || time " +"" msgstr "" msgid "" @@ -1201,7 +1202,9 @@ msgid "" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" " term: display infos about terminal\n" -" windows: display windows tree" +" windows: display windows tree\n" +" time: measure time to execute a command or to send text to the current " +"buffer" msgstr "" msgid "evaluate expression" diff --git a/po/weechat.pot b/po/weechat.pot index 5d1e84c5a..e24e76412 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: 2016-11-26 13:55+0100\n" +"POT-Creation-Date: 2016-11-28 21:48+0100\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -1176,12 +1176,13 @@ msgid "" " /cursor go 10,5" msgstr "" -msgid "control debug for core/plugins" +msgid "debug functions" msgstr "" msgid "" "list || set || dump [] || buffer|color|infolists|" -"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free]" +"memory|tags|term|windows || mouse|cursor [verbose] || hdata [free] || time " +"" msgstr "" msgid "" @@ -1204,7 +1205,9 @@ msgid "" " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" " term: display infos about terminal\n" -" windows: display windows tree" +" windows: display windows tree\n" +" time: measure time to execute a command or to send text to the current " +"buffer" msgstr "" msgid "evaluate expression" diff --git a/src/core/wee-command.c b/src/core/wee-command.c index aa0afc9e7..3d90b2441 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -1688,6 +1688,7 @@ COMMAND_CALLBACK(debug) { struct t_config_option *ptr_option; struct t_weechat_plugin *ptr_plugin; + struct timeval time_start, time_end; int debug; /* make C compiler happy */ @@ -1861,6 +1862,16 @@ COMMAND_CALLBACK(debug) return WEECHAT_RC_OK; } + if (string_strcasecmp (argv[1], "time") == 0) + { + COMMAND_MIN_ARGS(3, "time"); + gettimeofday (&time_start, NULL); + (void) input_data (buffer, argv_eol[2]); + gettimeofday (&time_end, NULL); + debug_display_time_elapsed (&time_start, &time_end, argv_eol[2], 1); + return WEECHAT_RC_OK; + } + COMMAND_ERROR; } @@ -7127,13 +7138,14 @@ command_init () &command_cursor, NULL, NULL); hook_command ( NULL, "debug", - N_("control debug for core/plugins"), + N_("debug functions"), N_("list" " || set " " || dump []" " || buffer|color|infolists|memory|tags|term|windows" " || mouse|cursor [verbose]" - " || hdata [free]"), + " || hdata [free]" + " || time "), N_(" list: list plugins with debug levels\n" " set: set debug level for plugin\n" " plugin: name of plugin (\"core\" for WeeChat core)\n" @@ -7153,7 +7165,9 @@ command_init () " mouse: toggle debug for mouse\n" " tags: display tags for lines\n" " term: display infos about terminal\n" - " windows: display windows tree"), + " windows: display windows tree\n" + " time: measure time to execute a command or to send text to " + "the current buffer"), "list" " || set %(plugins_names)|core" " || dump %(plugins_names)|core" @@ -7169,7 +7183,8 @@ command_init () " || mouse verbose" " || tags" " || term" - " || windows", + " || windows" + " || time %(commands)", &command_debug, NULL, NULL); hook_command ( NULL, "eval", diff --git a/src/core/wee-debug.c b/src/core/wee-debug.c index d6ab2118b..d66d40574 100644 --- a/src/core/wee-debug.c +++ b/src/core/wee-debug.c @@ -65,9 +65,6 @@ int debug_dump_active = 0; -char *debug_time_name = NULL; -struct timeval debug_timeval_start = { 0, 0 }; - /* * Writes dump of data to WeeChat log file. @@ -584,39 +581,21 @@ debug_directories () } /* - * Starts time measure. - */ - -void -debug_time_start (const char *name) -{ - if (debug_time_name) - { - free (debug_time_name); - debug_time_name = NULL; - } - if (name) - debug_time_name = strdup (name); - - gettimeofday (&debug_timeval_start, NULL); -} - -/* - * Ends time measure and display elapsed time. + * Display time elapsed between two times. * * If display is 1, the message is displayed in core buffer, otherwise it's * written in log file. */ void -debug_time_end (int display) +debug_display_time_elapsed (struct timeval *time1, struct timeval *time2, + const char *message, int display) { struct timeval debug_timeval_end; long long diff, diff_hour, diff_min, diff_sec, diff_usec; gettimeofday (&debug_timeval_end, NULL); - diff = util_timeval_diff (&debug_timeval_start, - &debug_timeval_end); + diff = util_timeval_diff (time1, time2); diff_usec = diff % 1000000; diff_sec = (diff / 1000000) % 60; @@ -627,13 +606,13 @@ debug_time_end (int display) { gui_chat_printf (NULL, "debug: time[%s] -> %lld:%02lld:%02lld.%06d", - (debug_time_name) ? debug_time_name : "?", + (message) ? message : "?", diff_hour, diff_min, diff_sec, diff_usec); } else { log_printf ("debug: time[%s] -> %lld:%02lld:%02lld.%06d", - (debug_time_name) ? debug_time_name : "?", + (message) ? message : "?", diff_hour, diff_min, diff_sec, diff_usec); } } @@ -661,9 +640,4 @@ debug_init () void debug_end () { - if (debug_time_name) - { - free (debug_time_name); - debug_time_name = NULL; - } } diff --git a/src/core/wee-debug.h b/src/core/wee-debug.h index ab018aece..8cc4e5ae6 100644 --- a/src/core/wee-debug.h +++ b/src/core/wee-debug.h @@ -29,8 +29,10 @@ extern void debug_hdata (); extern void debug_hooks (); extern void debug_infolists (); extern void debug_directories (); -extern void debug_time_start (const char *name); -extern void debug_time_end (int display); +extern void debug_display_time_elapsed (struct timeval *time1, + struct timeval *time2, + const char *message, + int display); extern void debug_init (); extern void debug_end ();