diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2011-08-09 09:10:26 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2011-08-09 09:10:26 +0200 |
commit | 40c5eb207da9d40133eec57b499c4f9b56c4ac37 (patch) | |
tree | 6af51430361f9fe2655120d7f1e81b7b84d389a8 | |
parent | 0a6682314f5aa19c456b7fea18942cdc41f8d740 (diff) | |
download | weechat-40c5eb207da9d40133eec57b499c4f9b56c4ac37.zip |
core: add new command /repeat (execute a command several times)
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | doc/de/autogen/user/weechat_commands.txt | 16 | ||||
-rw-r--r-- | doc/en/autogen/user/weechat_commands.txt | 16 | ||||
-rw-r--r-- | doc/fr/autogen/user/weechat_commands.txt | 14 | ||||
-rw-r--r-- | doc/it/autogen/user/weechat_commands.txt | 16 | ||||
-rw-r--r-- | po/cs.po | 39 | ||||
-rw-r--r-- | po/de.po | 39 | ||||
-rw-r--r-- | po/es.po | 40 | ||||
-rw-r--r-- | po/fr.po | 41 | ||||
-rw-r--r-- | po/hu.po | 37 | ||||
-rw-r--r-- | po/it.po | 39 | ||||
-rw-r--r-- | po/pl.po | 39 | ||||
-rw-r--r-- | po/pt_BR.po | 39 | ||||
-rw-r--r-- | po/ru.po | 37 | ||||
-rw-r--r-- | po/weechat.pot | 25 | ||||
-rw-r--r-- | src/core/wee-command.c | 143 |
16 files changed, 571 insertions, 12 deletions
@@ -1,12 +1,13 @@ WeeChat ChangeLog ================= Sébastien Helleu <flashcode@flashtux.org> -v0.3.6-dev, 2011-08-08 +v0.3.6-dev, 2011-08-09 Version 0.3.6 (under dev!) -------------------------- +* core: add new command /repeat (execute a command several times) * core: save and restore layout for buffers and windows on /upgrade * core: fix bugs with automatic layout (bug #26110), add support of merged buffers in layout (task #10893) diff --git a/doc/de/autogen/user/weechat_commands.txt b/doc/de/autogen/user/weechat_commands.txt index 5ba1df83e..1594561b3 100644 --- a/doc/de/autogen/user/weechat_commands.txt +++ b/doc/de/autogen/user/weechat_commands.txt @@ -509,6 +509,22 @@ file: Konfigurationsdatei die erneut geladen werden soll (ohne Dateinamenserweit Ohne Angabe von Argumenten werden alle Konfigurationen (WeeChat und Erweiterungen) neu geladen. ........................................ +[[command_weechat_repeat]] +[command]*`repeat`* execute a command several times:: +........................................ +/repeat [-interval <delay>] <count> <command> + + delay: delay between execution of commands (in milliseconds) + count: number of times to execute command +command: command to execute (a '/' is automatically added if not found at beginning of command) + +All commands are executed on buffer where this command was issued. + +Example: + scroll 2 pages up: + /repeat 2 /window page_up +........................................ + [[command_weechat_save]] [command]*`save`* Konfiguration abspeichern:: ........................................ diff --git a/doc/en/autogen/user/weechat_commands.txt b/doc/en/autogen/user/weechat_commands.txt index cdb73b5e6..479424eac 100644 --- a/doc/en/autogen/user/weechat_commands.txt +++ b/doc/en/autogen/user/weechat_commands.txt @@ -509,6 +509,22 @@ file: configuration file to reload (without extension ".conf") Without argument, all files (WeeChat and plugins) are reloaded. ........................................ +[[command_weechat_repeat]] +[command]*`repeat`* execute a command several times:: +........................................ +/repeat [-interval <delay>] <count> <command> + + delay: delay between execution of commands (in milliseconds) + count: number of times to execute command +command: command to execute (a '/' is automatically added if not found at beginning of command) + +All commands are executed on buffer where this command was issued. + +Example: + scroll 2 pages up: + /repeat 2 /window page_up +........................................ + [[command_weechat_save]] [command]*`save`* save configuration files to disk:: ........................................ diff --git a/doc/fr/autogen/user/weechat_commands.txt b/doc/fr/autogen/user/weechat_commands.txt index 90af566c5..0fb576cbe 100644 --- a/doc/fr/autogen/user/weechat_commands.txt +++ b/doc/fr/autogen/user/weechat_commands.txt @@ -509,6 +509,20 @@ fichier: fichier de configuration à recharger (sans l'extension ".conf") Sans paramètre, tous les fichiers (WeeChat et extensions) sont rechargés. ........................................ +[[command_weechat_repeat]] +[command]*`repeat`* exécuter une commande plusieurs fois:: +........................................ +/repeat [-interval <délai>] <nombre> <commande> + + délai: délai entre l'exécution des commandes (en millisecondes) + nombre: nombre de fois que la commande sera exécutée +commande: commande à exécuter (un '/' est automatiquement ajouté s'il n'est pas trouvé au début de la commande) + +Exemple: + faire défiler de 2 pages vers le haut: + /repeat 2 /window page_up +........................................ + [[command_weechat_save]] [command]*`save`* sauvegarder les fichiers de configuration sur disque:: ........................................ diff --git a/doc/it/autogen/user/weechat_commands.txt b/doc/it/autogen/user/weechat_commands.txt index 5e3cc722e..47c8a1576 100644 --- a/doc/it/autogen/user/weechat_commands.txt +++ b/doc/it/autogen/user/weechat_commands.txt @@ -509,6 +509,22 @@ file: file di configurazione da ricaricare (senza estensione ".conf") Senza argomento, vengono ricaricati tutti i file (WeeChat e plugin). ........................................ +[[command_weechat_repeat]] +[command]*`repeat`* execute a command several times:: +........................................ +/repeat [-interval <delay>] <count> <command> + + delay: delay between execution of commands (in milliseconds) + count: number of times to execute command +command: command to execute (a '/' is automatically added if not found at beginning of command) + +All commands are executed on buffer where this command was issued. + +Example: + scroll 2 pages up: + /repeat 2 /window page_up +........................................ + [[command_weechat_save]] [command]*`save`* salva i file di configurazione su disco:: ........................................ @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-08 11:27+0200\n" +"POT-Creation-Date: 2011-08-08 16:53+0200\n" "PO-Revision-Date: 2011-07-05 15:37+0200\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -655,6 +655,10 @@ msgstr "%sChyba: selhalo znovunačtení voleb z %s" msgid "Unknown configuration file \"%s\"" msgstr "Neznámý konfigurační soubor \"%s\"" +#, fuzzy, c-format +msgid "%sError: incorrect number" +msgstr "%sChyba: nekorektní číslo bufferu" + #, c-format msgid "Options saved to %s" msgstr "Volby uloženy do %s" @@ -1725,6 +1729,31 @@ msgstr "" "\n" "Bez argumentu jsou načteny všechny soubory (WeeChat a pluginů)." +#, fuzzy +msgid "execute a command several times" +msgstr "vykonat příkaz v tichosti" + +#, fuzzy +msgid "[-interval <delay>] <count> <command>" +msgstr "<číslo>[<jednotka>] <příkaz>" + +#, fuzzy +msgid "" +" delay: delay between execution of commands (in milliseconds)\n" +" count: number of times to execute command\n" +"command: command to execute (a '/' is automatically added if not found at " +"beginning of command)\n" +"\n" +"All commands are executed on buffer where this command was issued.\n" +"\n" +"Example:\n" +" scroll 2 pages up:\n" +" /repeat 2 /window page_up" +msgstr "" +" plugin: jméno pluginu ('weechat' pro WeeChat vnitřní příkaz)\n" +" příkaz: příkaz, který spustit ('/' je automaticky dodáno, pokud není " +"nalezeno na začátku příkazu)" + msgid "save configuration files to disk" msgstr "uložit soubory s nastavením na disk" @@ -7950,6 +7979,14 @@ msgstr "" msgid "Lists" msgstr "" +#, fuzzy +#~ msgid "%sError: incorrect interval" +#~ msgstr "%sChyba: nekorektní číslo bufferu" + +#, fuzzy +#~ msgid "%sError: incorrect count" +#~ msgstr "%sChyba: nekorektní číslo bufferu" + #~ msgid "window name (can start or end with \"*\" as wildcard) (optional)" #~ msgstr "" #~ "jméno okna (může začínat nebo končit \"*\" jako zástupným znakem) " @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-08 11:27+0200\n" +"POT-Creation-Date: 2011-08-08 16:53+0200\n" "PO-Revision-Date: 2011-07-14 20:53+0100\n" "Last-Translator: Nils Görs\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -670,6 +670,10 @@ msgstr "%sFehler: Optionen von %s konnten nicht neu geladen werden" msgid "Unknown configuration file \"%s\"" msgstr "Unbekannte Konfigurationsdatei \"%s\"" +#, fuzzy, c-format +msgid "%sError: incorrect number" +msgstr "%sFehler: falsche Buffer-Nummer" + #, c-format msgid "Options saved to %s" msgstr "Optionen gesichert unter %s" @@ -1804,6 +1808,31 @@ msgstr "" "Ohne Angabe von Argumenten werden alle Konfigurationen (WeeChat und " "Erweiterungen) neu geladen." +#, fuzzy +msgid "execute a command several times" +msgstr "Führt einen Befehl ohne Textausgabe aus" + +#, fuzzy +msgid "[-interval <delay>] <count> <command>" +msgstr "<number>[<unit>] <command>" + +#, fuzzy +msgid "" +" delay: delay between execution of commands (in milliseconds)\n" +" count: number of times to execute command\n" +"command: command to execute (a '/' is automatically added if not found at " +"beginning of command)\n" +"\n" +"All commands are executed on buffer where this command was issued.\n" +"\n" +"Example:\n" +" scroll 2 pages up:\n" +" /repeat 2 /window page_up" +msgstr "" +"Erweiterung: Name der Erweiterung ('weechat' für interne WeeChat Befehle)\n" +" Befehl: auszuführender Befehl (es wird automatisch ein '/' " +"vorangestellt, falls dieser nicht angegeben wurde)" + msgid "save configuration files to disk" msgstr "Konfiguration abspeichern" @@ -8278,6 +8307,14 @@ msgstr "Variablen" msgid "Lists" msgstr "Listen" +#, fuzzy +#~ msgid "%sError: incorrect interval" +#~ msgstr "%sFehler: falsche Buffer-Nummer" + +#, fuzzy +#~ msgid "%sError: incorrect count" +#~ msgstr "%sFehler: falsche Buffer-Nummer" + #~ msgid "window name (can start or end with \"*\" as wildcard) (optional)" #~ msgstr "" #~ "Fenstername (darf mit einem \"*\" als Platzhalter beginnen oder enden) " @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-08 11:27+0200\n" +"POT-Creation-Date: 2011-08-08 16:53+0200\n" "PO-Revision-Date: 2011-07-05 15:37+0200\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -656,6 +656,10 @@ msgstr "%sError: no se pudo recargar las opciones desde %s" msgid "Unknown configuration file \"%s\"" msgstr "Archivo de configuración \"%s\" desconocido" +#, fuzzy, c-format +msgid "%sError: incorrect number" +msgstr "%sError: número del buffer incorrecto" + #, c-format msgid "Options saved to %s" msgstr "Opciones guardadas en %s" @@ -1741,6 +1745,32 @@ msgstr "" "Sin ningún argumento, todos los archivos (de WeeChat y plugins) son " "recargados." +#, fuzzy +msgid "execute a command several times" +msgstr "ejecuta un comando silenciosamente" + +#, fuzzy +msgid "[-interval <delay>] <count> <command>" +msgstr "<número>[<unidad>] <comando>" + +#, fuzzy +msgid "" +" delay: delay between execution of commands (in milliseconds)\n" +" count: number of times to execute command\n" +"command: command to execute (a '/' is automatically added if not found at " +"beginning of command)\n" +"\n" +"All commands are executed on buffer where this command was issued.\n" +"\n" +"Example:\n" +" scroll 2 pages up:\n" +" /repeat 2 /window page_up" +msgstr "" +" plugin: nombre del plugin ('weechat' para los comandos internos de " +"WeeChat)\n" +"comando: comando a ejecutar (se añade una '/' automáticamente si no se " +"encuentra al principio del comando)" + msgid "save configuration files to disk" msgstr "guardar archivos de configuración al disco" @@ -8079,6 +8109,14 @@ msgstr "" msgid "Lists" msgstr "" +#, fuzzy +#~ msgid "%sError: incorrect interval" +#~ msgstr "%sError: número del buffer incorrecto" + +#, fuzzy +#~ msgid "%sError: incorrect count" +#~ msgstr "%sError: número del buffer incorrecto" + #~ msgid "window name (can start or end with \"*\" as wildcard) (optional)" #~ msgstr "" #~ "nombre de la ventana (puede empezar o terminar con \"*\" como comodín) " @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-08 11:27+0200\n" -"PO-Revision-Date: 2011-08-08 11:28+0200\n" +"POT-Creation-Date: 2011-08-08 16:53+0200\n" +"PO-Revision-Date: 2011-08-08 16:53+0200\n" "Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: French\n" @@ -662,6 +662,10 @@ msgid "Unknown configuration file \"%s\"" msgstr "Fichier de configuration inconnu \"%s\"" #, c-format +msgid "%sError: incorrect number" +msgstr "%sErreur: nombre incorrect" + +#, c-format msgid "Options saved to %s" msgstr "Options sauvegardées dans %s" @@ -1808,6 +1812,33 @@ msgstr "" "\n" "Sans paramètre, tous les fichiers (WeeChat et extensions) sont rechargés." +msgid "execute a command several times" +msgstr "exécuter une commande plusieurs fois" + +msgid "[-interval <delay>] <count> <command>" +msgstr "[-interval <délai>] <nombre> <commande>" + +msgid "" +" delay: delay between execution of commands (in milliseconds)\n" +" count: number of times to execute command\n" +"command: command to execute (a '/' is automatically added if not found at " +"beginning of command)\n" +"\n" +"All commands are executed on buffer where this command was issued.\n" +"\n" +"Example:\n" +" scroll 2 pages up:\n" +" /repeat 2 /window page_up" +msgstr "" +" délai: délai entre l'exécution des commandes (en millisecondes)\n" +" nombre: nombre de fois que la commande sera exécutée\n" +"commande: commande à exécuter (un '/' est automatiquement ajouté s'il n'est " +"pas trouvé au début de la commande)\n" +"\n" +"Exemple:\n" +" faire défiler de 2 pages vers le haut:\n" +" /repeat 2 /window page_up" + msgid "save configuration files to disk" msgstr "sauvegarder les fichiers de configuration sur disque" @@ -8177,6 +8208,12 @@ msgstr "Variables" msgid "Lists" msgstr "Listes" +#~ msgid "%sError: incorrect interval" +#~ msgstr "%sErreur: intervalle incorrect" + +#~ msgid "%sError: incorrect count" +#~ msgstr "%sErreur: numéro incorrect" + #~ msgid "window name (can start or end with \"*\" as wildcard) (optional)" #~ msgstr "" #~ "nom de fenêtre (peut démarrer ou se terminer par \"*\" comme joker) " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-08 11:27+0200\n" +"POT-Creation-Date: 2011-08-08 16:53+0200\n" "PO-Revision-Date: 2011-05-15 10:51+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -695,6 +695,10 @@ msgid "Unknown configuration file \"%s\"" msgstr "szerver konfigurációs fájljának újraolvastatása" #, fuzzy, c-format +msgid "%sError: incorrect number" +msgstr "%s helytelen pufferszám\n" + +#, fuzzy, c-format msgid "Options saved to %s" msgstr "Modul beállítások elmentve\n" @@ -1490,6 +1494,29 @@ msgid "" msgstr "" #, fuzzy +msgid "execute a command several times" +msgstr "%s belső parancsok:\n" + +msgid "[-interval <delay>] <count> <command>" +msgstr "" + +#, fuzzy +msgid "" +" delay: delay between execution of commands (in milliseconds)\n" +" count: number of times to execute command\n" +"command: command to execute (a '/' is automatically added if not found at " +"beginning of command)\n" +"\n" +"All commands are executed on buffer where this command was issued.\n" +"\n" +"Example:\n" +" scroll 2 pages up:\n" +" /repeat 2 /window page_up" +msgstr "" +"parancs: futtatandó parancs (egy '/' autómatikusan hozzáadódik, ha nincs " +"megadva a parancs elején)\n" + +#, fuzzy msgid "save configuration files to disk" msgstr "beállítások mentése kilépéskor" @@ -7505,6 +7532,14 @@ msgid "Lists" msgstr "" #, fuzzy +#~ msgid "%sError: incorrect interval" +#~ msgstr "%s helytelen pufferszám\n" + +#, fuzzy +#~ msgid "%sError: incorrect count" +#~ msgstr "%s helytelen pufferszám\n" + +#, fuzzy #~ msgid "" #~ "channel: channel for ban\n" #~ " nick: user or host to ban" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-08 11:27+0200\n" +"POT-Creation-Date: 2011-08-08 16:53+0200\n" "PO-Revision-Date: 2011-07-16 11:32+0200\n" "Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -655,6 +655,10 @@ msgstr "%sErrore: impossibile ricaricare le opzioni da %s" msgid "Unknown configuration file \"%s\"" msgstr "File di configurazione \"%s\" sconosciuto" +#, fuzzy, c-format +msgid "%sError: incorrect number" +msgstr "%sErrore: nome buffer non corretto" + #, c-format msgid "Options saved to %s" msgstr "Opzioni salvate in %s" @@ -1755,6 +1759,31 @@ msgstr "" "\n" "Senza argomento, vengono ricaricati tutti i file (WeeChat e plugin)." +#, fuzzy +msgid "execute a command several times" +msgstr "esegue un comando in silenzio" + +#, fuzzy +msgid "[-interval <delay>] <count> <command>" +msgstr "<numero>[<unità>] <comando>" + +#, fuzzy +msgid "" +" delay: delay between execution of commands (in milliseconds)\n" +" count: number of times to execute command\n" +"command: command to execute (a '/' is automatically added if not found at " +"beginning of command)\n" +"\n" +"All commands are executed on buffer where this command was issued.\n" +"\n" +"Example:\n" +" scroll 2 pages up:\n" +" /repeat 2 /window page_up" +msgstr "" +" plugin: nome plugin ('weechat' per il comando interno di WeeChat)\n" +"comando: comando da eseguire (una '/' viene aggiunta automaticamente se non " +"trovata all'inizio del comando)" + msgid "save configuration files to disk" msgstr "salva i file di configurazione su disco" @@ -8064,6 +8093,14 @@ msgstr "Variabili" msgid "Lists" msgstr "Liste" +#, fuzzy +#~ msgid "%sError: incorrect interval" +#~ msgstr "%sErrore: nome buffer non corretto" + +#, fuzzy +#~ msgid "%sError: incorrect count" +#~ msgstr "%sErrore: nome buffer non corretto" + #~ msgid "window name (can start or end with \"*\" as wildcard) (optional)" #~ msgstr "" #~ "nome finestra (può iniziare o terminare con \"*\" come carattere jolly) " @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-08 11:27+0200\n" +"POT-Creation-Date: 2011-08-08 16:53+0200\n" "PO-Revision-Date: 2011-07-05 15:38+0200\n" "Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -659,6 +659,10 @@ msgstr "%sBłąd: nie udało się przeładować ustawień z %s" msgid "Unknown configuration file \"%s\"" msgstr "Nieznany plik konfiguracyjny \"%s\"" +#, fuzzy, c-format +msgid "%sError: incorrect number" +msgstr "%sBłąd: nieprawidłowy numer buforu" + #, c-format msgid "Options saved to %s" msgstr "Ustawienia zapisano do %s" @@ -1742,6 +1746,31 @@ msgstr "" "Bez podania argumentu wszystkie pliki (WeeChat oraz wtyczki) zostaną " "przeładowane." +#, fuzzy +msgid "execute a command several times" +msgstr "wykonuje komende po cichu" + +#, fuzzy +msgid "[-interval <delay>] <count> <command>" +msgstr "<liczba>[<jednostka>] <komenda>" + +#, fuzzy +msgid "" +" delay: delay between execution of commands (in milliseconds)\n" +" count: number of times to execute command\n" +"command: command to execute (a '/' is automatically added if not found at " +"beginning of command)\n" +"\n" +"All commands are executed on buffer where this command was issued.\n" +"\n" +"Example:\n" +" scroll 2 pages up:\n" +" /repeat 2 /window page_up" +msgstr "" +" plugin: nazwa pluginu ('weechat' dla wewnętrznych komend WeeChat )\n" +"command: komenda do wywołania ( '/' jest automatycznie dodawane jeśli nie " +"występuje na początku komendy)" + msgid "save configuration files to disk" msgstr "zapisuje pliki konfiguracyjne na dysku" @@ -7985,6 +8014,14 @@ msgstr "" msgid "Lists" msgstr "" +#, fuzzy +#~ msgid "%sError: incorrect interval" +#~ msgstr "%sBłąd: nieprawidłowy numer buforu" + +#, fuzzy +#~ msgid "%sError: incorrect count" +#~ msgstr "%sBłąd: nieprawidłowy numer buforu" + #~ msgid "window name (can start or end with \"*\" as wildcard) (optional)" #~ msgstr "nazwa okna (może się zaczynać lub kończyć \"*\") (opcjonalne)" diff --git a/po/pt_BR.po b/po/pt_BR.po index 0ce34258d..f062e6d2b 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-08 11:27+0200\n" +"POT-Creation-Date: 2011-08-08 16:53+0200\n" "PO-Revision-Date: 2011-05-15 10:52+0200\n" "Last-Translator: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -665,6 +665,10 @@ msgstr "%sErro: falhou ao recarregar as opções de %s" msgid "Unknown configuration file \"%s\"" msgstr "Arquivo de configuração desconhecido \"%s\"" +#, fuzzy, c-format +msgid "%sError: incorrect number" +msgstr "%sErro: número do buffer incorreto" + #, c-format msgid "Options saved to %s" msgstr "Opções salvas para %s" @@ -1740,6 +1744,31 @@ msgstr "" "\n" "Sem argumentos, todos os arquivos (WeeChat e plugins) são recarregados." +#, fuzzy +msgid "execute a command several times" +msgstr "executa um comando silenciosamente" + +#, fuzzy +msgid "[-interval <delay>] <count> <command>" +msgstr "número[unidade] comando" + +#, fuzzy +msgid "" +" delay: delay between execution of commands (in milliseconds)\n" +" count: number of times to execute command\n" +"command: command to execute (a '/' is automatically added if not found at " +"beginning of command)\n" +"\n" +"All commands are executed on buffer where this command was issued.\n" +"\n" +"Example:\n" +" scroll 2 pages up:\n" +" /repeat 2 /window page_up" +msgstr "" +" plugin: nome do plugin ('weechat' para comandos internos do weechat)\n" +"command: comando a ser executado (um '/' é automaticamente adicionado se não " +"for encontrado no começo de um comando)" + msgid "save configuration files to disk" msgstr "salva configurações dos arquivos no disco" @@ -7225,6 +7254,14 @@ msgid "Lists" msgstr "" #, fuzzy +#~ msgid "%sError: incorrect interval" +#~ msgstr "%sErro: número do buffer incorreto" + +#, fuzzy +#~ msgid "%sError: incorrect count" +#~ msgstr "%sErro: número do buffer incorreto" + +#, fuzzy #~ msgid "Key bindings (%d) for context \"%s\":" #~ msgstr "Atalhos de teclado (%d):" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.6-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-08 11:27+0200\n" +"POT-Creation-Date: 2011-08-08 16:53+0200\n" "PO-Revision-Date: 2011-05-15 10:52+0200\n" "Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -700,6 +700,10 @@ msgid "Unknown configuration file \"%s\"" msgstr "перезагрузить конфигурационный файл сервера" #, fuzzy, c-format +msgid "%sError: incorrect number" +msgstr "%s неправильный номер буфера\n" + +#, fuzzy, c-format msgid "Options saved to %s" msgstr "Настройки pluginов сохранены\n" @@ -1499,6 +1503,29 @@ msgid "" msgstr "" #, fuzzy +msgid "execute a command several times" +msgstr "Внутренние команды %s:\n" + +msgid "[-interval <delay>] <count> <command>" +msgstr "" + +#, fuzzy +msgid "" +" delay: delay between execution of commands (in milliseconds)\n" +" count: number of times to execute command\n" +"command: command to execute (a '/' is automatically added if not found at " +"beginning of command)\n" +"\n" +"All commands are executed on buffer where this command was issued.\n" +"\n" +"Example:\n" +" scroll 2 pages up:\n" +" /repeat 2 /window page_up" +msgstr "" +"команда: исполняемая команда ('/' автоматически добавляется в начало " +"команды)\n" + +#, fuzzy msgid "save configuration files to disk" msgstr "сохранять конфигурационный файл при выходе" @@ -7514,6 +7541,14 @@ msgid "Lists" msgstr "" #, fuzzy +#~ msgid "%sError: incorrect interval" +#~ msgstr "%s неправильный номер буфера\n" + +#, fuzzy +#~ msgid "%sError: incorrect count" +#~ msgstr "%s неправильный номер буфера\n" + +#, fuzzy #~ msgid "" #~ "channel: channel for ban\n" #~ " nick: user or host to ban" diff --git a/po/weechat.pot b/po/weechat.pot index 809eaac3e..ab4dc2d32 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-08-08 11:27+0200\n" +"POT-Creation-Date: 2011-08-08 16:53+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -610,6 +610,10 @@ msgid "Unknown configuration file \"%s\"" msgstr "" #, c-format +msgid "%sError: incorrect number" +msgstr "" + +#, c-format msgid "Options saved to %s" msgstr "" @@ -1317,6 +1321,25 @@ msgid "" "Without argument, all files (WeeChat and plugins) are reloaded." msgstr "" +msgid "execute a command several times" +msgstr "" + +msgid "[-interval <delay>] <count> <command>" +msgstr "" + +msgid "" +" delay: delay between execution of commands (in milliseconds)\n" +" count: number of times to execute command\n" +"command: command to execute (a '/' is automatically added if not found at " +"beginning of command)\n" +"\n" +"All commands are executed on buffer where this command was issued.\n" +"\n" +"Example:\n" +" scroll 2 pages up:\n" +" /repeat 2 /window page_up" +msgstr "" + msgid "save configuration files to disk" msgstr "" diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 1ed072476..069cd3941 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -3864,6 +3864,134 @@ COMMAND_CALLBACK(reload) } /* + * command_repeat_timer_cb: callback for repeat timer + */ + +int +command_repeat_timer_cb (void *data, int remaining_calls) +{ + char **repeat_args; + int i; + struct t_gui_buffer *ptr_buffer; + + repeat_args = (char **)data; + + if (!repeat_args) + return WEECHAT_RC_ERROR; + + if (repeat_args[0] && repeat_args[1] && repeat_args[2]) + { + /* search buffer, fallback to core buffer if not found */ + ptr_buffer = gui_buffer_search_by_name (repeat_args[0], repeat_args[1]); + if (!ptr_buffer) + ptr_buffer = gui_buffer_search_main (); + + /* execute command */ + if (ptr_buffer) + input_exec_command (ptr_buffer, 1, NULL, repeat_args[2]); + } + + if (remaining_calls == 0) + { + for (i = 0; i < 3; i++) + { + if (repeat_args[i]) + free (repeat_args[i]); + } + free (repeat_args); + } + + return WEECHAT_RC_OK; +} + +/* + * command_repeat: execute a command several times + */ + +COMMAND_CALLBACK(repeat) +{ + int arg_count, count, interval, length, i; + char *error, *command, **repeat_args; + + /* make C compiler happy */ + (void) data; + + if (argc < 3) + return WEECHAT_RC_OK; + + arg_count = 1; + interval = 0; + + if ((argc >= 5) && (string_strcasecmp (argv[1], "-interval") == 0)) + { + error = NULL; + interval = (int)strtol (argv[2], &error, 10); + if (!error || error[0] || (interval < 1)) + interval = 0; + arg_count = 3; + } + + error = NULL; + count = (int)strtol (argv[arg_count], &error, 10); + if (!error || error[0] || (count < 1)) + { + /* invalid count */ + gui_chat_printf (NULL, + _("%sError: incorrect number"), + gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]); + return WEECHAT_RC_OK; + } + + if (string_is_command_char (argv_eol[arg_count + 1])) + command = strdup (argv_eol[arg_count + 1]); + else + { + length = strlen (argv_eol[arg_count + 1]) + 2; + command = malloc (length); + if (command) + snprintf (command, length, "/%s", argv_eol[arg_count + 1]); + } + + if (command) + { + input_exec_command (buffer, 1, NULL, command); + if (count > 1) + { + if (interval == 0) + { + for (i = 0; i < count - 1; i++) + { + input_exec_command (buffer, 1, NULL, command); + } + free (command); + } + else + { + repeat_args = malloc (3 * sizeof (*repeat_args)); + if (!repeat_args) + { + gui_chat_printf (NULL, + _("%sNot enough memory"), + gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]); + return WEECHAT_RC_OK; + } + repeat_args[0] = strdup (gui_buffer_get_plugin_name (buffer)); + repeat_args[1] = strdup (buffer->name); + repeat_args[2] = command; + hook_timer (NULL, interval, 0, count - 1, + &command_repeat_timer_cb, repeat_args); + } + } + else + { + free (command); + } + } + + return WEECHAT_RC_OK; +} + +/* * command_save_file: save a configuration file to disk */ @@ -5708,6 +5836,21 @@ command_init () "reloaded."), "%(config_files)|%*", &command_reload, NULL); + hook_command (NULL, "repeat", + N_("execute a command several times"), + N_("[-interval <delay>] <count> <command>"), + N_(" delay: delay between execution of commands (in " + "milliseconds)\n" + " count: number of times to execute command\n" + "command: command to execute (a '/' is automatically " + "added if not found at beginning of command)\n\n" + "All commands are executed on buffer where this command " + "was issued.\n\n" + "Example:\n" + " scroll 2 pages up:\n" + " /repeat 2 /window page_up"), + "%- %(commands)", + &command_repeat, NULL); hook_command (NULL, "save", N_("save configuration files to disk"), N_("[<file> [<file>...]]"), |