diff --git a/po/cs.po b/po/cs.po index ea4ab9651..8c975aec3 100644 --- a/po/cs.po +++ b/po/cs.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-03-21 13:16+0100\n" +"POT-Creation-Date: 2009-03-21 15:56+0100\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -82,12 +82,9 @@ msgid "Error: cannot create directory \"%s\"\n" msgstr "%s nemohu vytvořit adresář \"%s\"\n" #, fuzzy, c-format -msgid "Welcome to %s%s%s, %s" +msgid "Welcome to %sWeeChat%s, %s" msgstr "%sVítejte do %s%s%s, %s" -msgid "compiled on" -msgstr "kompilováno" - msgid "List of bars:" msgstr "Seznam polí:" @@ -290,15 +287,9 @@ msgstr "Filter \"%s\" smazán" msgid "%s internal commands:" msgstr "%s vnitřní příkazy:" -msgid " (used by a plugin)" -msgstr " (není používáno pluginem)" - msgid "Other commands:" msgstr "Další příkazy:" -msgid " (masked by a plugin)" -msgstr " (maskován pluginem)" - #, c-format msgid "Option \"%s%s%s\":" msgstr "Volba \"%s%s%s\":" @@ -691,6 +682,20 @@ msgstr[1] "dny" msgid "WeeChat uptime: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, started on %s%s" msgstr "Čas běhu WeeChat: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, spuštěn %s%s" +msgid "compiled on" +msgstr "kompilováno" + +#, c-format +msgid "Upgraded %d %s, first start: %s" +msgstr "" + +#. TRANSLATORS: text is: "upgraded xx times" +#, fuzzy +msgid "time" +msgid_plural "times" +msgstr[0] "Aktivní" +msgstr[1] "Aktivní" + msgid "Windows list:" msgstr "Seznam oken:" @@ -1155,9 +1160,17 @@ msgstr "zobrazit jak dlouho WeeChat běží" msgid "[-o]" msgstr "[-o]" -msgid "-o: send uptime on current channel as an IRC message" +#, fuzzy +msgid "-o: send uptime to current buffer as input" msgstr "-o: poslat čas běhu na aktuální kanál jako IRC zprávu" +#, fuzzy +msgid "show WeeChat version and compilation date" +msgstr "datum vytvoření kanálu" + +msgid "-o: send version to current buffer as input" +msgstr "" + msgid "manage windows" msgstr "spravuje okna" @@ -1741,6 +1754,10 @@ msgstr "%s %s, řádek %d: nevalidní volba \"%s\"\n" msgid "Reloading configuration file %s" msgstr "Ukládám konfiguraci na disk\n" +#, fuzzy, c-format +msgid "%sError: another command \"%s\" already exists for plugin \"%s\"" +msgstr "%sChyba: filtr \"%s\" již existuje" + #, c-format msgid "System clock skew detected (%+ld seconds), reinitializing all timers" msgstr "" @@ -1757,6 +1774,12 @@ msgstr "%s nemohu zavřít jediný buffer\n" msgid "%sError with command \"%s\" (try /help %s)" msgstr "%s alias nebo příkaz \"%s\" nenalezen\n" +#, fuzzy, c-format +msgid "" +"%sError: ambigous command \"%s\": it exists in many plugins and not in \"%s" +"\" plugin" +msgstr "%sChyba: filtr \"%s\" již existuje" + #, fuzzy, c-format msgid "%sError: too much calls to command \"%s\" (looping)" msgstr "%s nekorektní hodnota pro volbu \"%s\"\n" @@ -3397,7 +3420,7 @@ msgid "%s%s: too few arguments for \"%s\" command" msgstr "%s špatné parametry pro příkaz \"%s\"\n" #, fuzzy, c-format -msgid "%s%s: command \"%s\" must be executed on irc buffer" +msgid "%s%s: command \"%s\" must be executed on irc buffer (server or channel)" msgstr "%s \"%s\" příkaz nemůže být spuštěn v bufferu serveru\n" #, fuzzy, c-format @@ -5506,6 +5529,16 @@ msgstr "%s DCC: nemohu nastavit 'neblokovaci' volbu na soket\n" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s chybí argument pro volbu \"%s\"\n" +#, fuzzy +#~ msgid "%s%s: command \"%s\" must be executed on irc buffer" +#~ msgstr "%s \"%s\" příkaz nemůže být spuštěn v bufferu serveru\n" + +#~ msgid " (used by a plugin)" +#~ msgstr " (není používáno pluginem)" + +#~ msgid " (masked by a plugin)" +#~ msgstr " (maskován pluginem)" + #~ msgid "plugin:" #~ msgstr "plugin:" @@ -5513,11 +5546,6 @@ msgstr "%s chybí argument pro volbu \"%s\"\n" #~ msgid "%s%s: unknown/missing channel name for \"%s\" command" #~ msgstr "%s chybí argumenty pro příkaz \"%s\"\n" -#, fuzzy -#~ msgid "" -#~ "%s%s: command \"%s\" must be executed on irc buffer (server/channel/pv)" -#~ msgstr "%s \"%s\" příkaz nemůže být spuštěn v bufferu serveru\n" - #~ msgid "nickname text" #~ msgstr "přezdívka text" diff --git a/po/de.po b/po/de.po index 8ac9f8581..46a86ad6e 100644 --- a/po/de.po +++ b/po/de.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-03-21 13:16+0100\n" +"POT-Creation-Date: 2009-03-21 15:56+0100\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Thomas Schuetz \n" "Language-Team: weechat-dev \n" @@ -88,12 +88,9 @@ msgid "Error: cannot create directory \"%s\"\n" msgstr "%s kann das Verzeichnis \"%s\" nicht anlegen\n" #, fuzzy, c-format -msgid "Welcome to %s%s%s, %s" +msgid "Welcome to %sWeeChat%s, %s" msgstr "%sWillkommen in %s%s%s, %s\n" -msgid "compiled on" -msgstr "kompiliert am" - #, fuzzy msgid "List of bars:" msgstr "Liste der Aliases:\n" @@ -307,18 +304,10 @@ msgstr "/users wurde deaktiviert" msgid "%s internal commands:" msgstr "%s interne Befehle:\n" -#, fuzzy -msgid " (used by a plugin)" -msgstr " (kein Plugin)\n" - #, fuzzy msgid "Other commands:" msgstr "%s interne Befehle:\n" -#, fuzzy -msgid " (masked by a plugin)" -msgstr " (kein Plugin)\n" - #, fuzzy, c-format msgid "Option \"%s%s%s\":" msgstr "Nicks %s%s%s: %s[" @@ -749,6 +738,20 @@ msgid "WeeChat uptime: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, started on %s%s" msgstr "" "WeeChat Uptime: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, gestartet am %s%s" +msgid "compiled on" +msgstr "kompiliert am" + +#, c-format +msgid "Upgraded %d %s, first start: %s" +msgstr "" + +#. TRANSLATORS: text is: "upgraded xx times" +#, fuzzy +msgid "time" +msgid_plural "times" +msgstr[0] "aktiv" +msgstr[1] "aktiv" + #, fuzzy msgid "Windows list:" msgstr "Ende der /who-Liste" @@ -1177,10 +1180,18 @@ msgstr "zeigt die Uptime von Weechat an" msgid "[-o]" msgstr "[-o]" -msgid "-o: send uptime on current channel as an IRC message" +#, fuzzy +msgid "-o: send uptime to current buffer as input" msgstr "" "-o: sendet die Weechat-Uptime als IRC-Nachricht in den aktuellen Channel" +#, fuzzy +msgid "show WeeChat version and compilation date" +msgstr "Konfigurationsdatei gesichert\n" + +msgid "-o: send version to current buffer as input" +msgstr "" + msgid "manage windows" msgstr "Fenster verwalten" @@ -1757,6 +1768,10 @@ msgstr "%s %s, Zeile %d: ungültige Option \"%s\"\n" msgid "Reloading configuration file %s" msgstr "Konfiguration wird gespeichert\n" +#, fuzzy, c-format +msgid "%sError: another command \"%s\" already exists for plugin \"%s\"" +msgstr "%s diese /ignore-Regel existiert bereits\n" + #, c-format msgid "System clock skew detected (%+ld seconds), reinitializing all timers" msgstr "" @@ -1773,6 +1788,12 @@ msgstr "%s der einzige Puffer kann nicht geschlossen werden\n" msgid "%sError with command \"%s\" (try /help %s)" msgstr "%s Alias oder Befehl \"%s\" nicht gefunden\n" +#, fuzzy, c-format +msgid "" +"%sError: ambigous command \"%s\": it exists in many plugins and not in \"%s" +"\" plugin" +msgstr "%s diese /ignore-Regel existiert bereits\n" + #, fuzzy, c-format msgid "%sError: too much calls to command \"%s\" (looping)" msgstr "%s ungültiger Wert für die Option \"%s\"\n" @@ -3377,7 +3398,7 @@ msgid "%s%s: too few arguments for \"%s\" command" msgstr "%s fehlerhafte Argumente für der \"%s\"-Befehl\n" #, fuzzy, c-format -msgid "%s%s: command \"%s\" must be executed on irc buffer" +msgid "%s%s: command \"%s\" must be executed on irc buffer (server or channel)" msgstr "%s der \"%s\"-Befehl kann nicht in Serverfenstern ausgeführt werden\n" #, fuzzy, c-format @@ -5442,6 +5463,19 @@ msgstr "%s DCC: kann die 'nonblock'-Option für den Socket nicht festlegen\n" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s fehlende Argumente für die \"--dir\"-Option\n" +#, fuzzy +#~ msgid "%s%s: command \"%s\" must be executed on irc buffer" +#~ msgstr "" +#~ "%s der \"%s\"-Befehl kann nicht in Serverfenstern ausgeführt werden\n" + +#, fuzzy +#~ msgid " (used by a plugin)" +#~ msgstr " (kein Plugin)\n" + +#, fuzzy +#~ msgid " (masked by a plugin)" +#~ msgstr " (kein Plugin)\n" + #, fuzzy #~ msgid "plugin:" #~ msgstr " (kein Plugin)\n" @@ -5450,12 +5484,6 @@ msgstr "%s fehlende Argumente für die \"--dir\"-Option\n" #~ msgid "%s%s: unknown/missing channel name for \"%s\" command" #~ msgstr "%s fehlende Argumente für den \"%s\"-Befehl\n" -#, fuzzy -#~ msgid "" -#~ "%s%s: command \"%s\" must be executed on irc buffer (server/channel/pv)" -#~ msgstr "" -#~ "%s der \"%s\"-Befehl kann nicht in Serverfenstern ausgeführt werden\n" - #~ msgid "nickname text" #~ msgstr "Nickname Text" diff --git a/po/es.po b/po/es.po index 2eec74f83..a82a8a4c1 100644 --- a/po/es.po +++ b/po/es.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-03-21 13:16+0100\n" +"POT-Creation-Date: 2009-03-21 15:56+0100\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Roberto González Cardenete \n" "Language-Team: weechat-dev \n" @@ -85,12 +85,9 @@ msgid "Error: cannot create directory \"%s\"\n" msgstr "%s no es posible crear el directorio \"%s\"\n" #, fuzzy, c-format -msgid "Welcome to %s%s%s, %s" +msgid "Welcome to %sWeeChat%s, %s" msgstr "%sBienvenido a %s%s%s, %s\n" -msgid "compiled on" -msgstr "compilado en" - #, fuzzy msgid "List of bars:" msgstr "Lista de alias:\n" @@ -303,18 +300,10 @@ msgstr "los usuarios han sido desactivados" msgid "%s internal commands:" msgstr "Comandos internos %s :\n" -#, fuzzy -msgid " (used by a plugin)" -msgstr " (sin plugins)\n" - #, fuzzy msgid "Other commands:" msgstr "Comandos internos %s :\n" -#, fuzzy -msgid " (masked by a plugin)" -msgstr " (sin plugins)\n" - #, fuzzy, c-format msgid "Option \"%s%s%s\":" msgstr "Usuarios %s%s%s: %s[" @@ -745,6 +734,20 @@ msgstr "" "Tiempo de uso de WeeChat: %s%d %s%s %s%02d%s: %s%02d%s:%s%02d%s, empezó en %" "s%s" +msgid "compiled on" +msgstr "compilado en" + +#, c-format +msgid "Upgraded %d %s, first start: %s" +msgstr "" + +#. TRANSLATORS: text is: "upgraded xx times" +#, fuzzy +msgid "time" +msgid_plural "times" +msgstr[0] "Activo" +msgstr[1] "Activo" + #, fuzzy msgid "Windows list:" msgstr "fin de la lista /who" @@ -1158,9 +1161,17 @@ msgstr "muestra el tiempo de uso de WeeChat" msgid "[-o]" msgstr "[-o]" -msgid "-o: send uptime on current channel as an IRC message" +#, fuzzy +msgid "-o: send uptime to current buffer as input" msgstr "-o: envía el tiempo de uso en el canal actual como un mensaje IRC" +#, fuzzy +msgid "show WeeChat version and compilation date" +msgstr "Archivo de configuración guardado\n" + +msgid "-o: send version to current buffer as input" +msgstr "" + msgid "manage windows" msgstr "gestión de ventanas" @@ -1742,6 +1753,10 @@ msgstr "%s %s, línea %d: opción \"%s\" inválida\n" msgid "Reloading configuration file %s" msgstr "Guardar configuración a disco\n" +#, fuzzy, c-format +msgid "%sError: another command \"%s\" already exists for plugin \"%s\"" +msgstr "el ignore %s ya existe\n" + #, c-format msgid "System clock skew detected (%+ld seconds), reinitializing all timers" msgstr "" @@ -1758,6 +1773,12 @@ msgstr "%s no es posible cerrar el único búfer\n" msgid "%sError with command \"%s\" (try /help %s)" msgstr "%s alias o comando \"%s\" no encontrado\n" +#, fuzzy, c-format +msgid "" +"%sError: ambigous command \"%s\": it exists in many plugins and not in \"%s" +"\" plugin" +msgstr "el ignore %s ya existe\n" + #, fuzzy, c-format msgid "%sError: too much calls to command \"%s\" (looping)" msgstr "%s valor incorrecto para la opción \"%s\"\n" @@ -3366,7 +3387,7 @@ msgid "%s%s: too few arguments for \"%s\" command" msgstr "%s argumentos incorrectos para el comando \"%s\"\n" #, fuzzy, c-format -msgid "%s%s: command \"%s\" must be executed on irc buffer" +msgid "%s%s: command \"%s\" must be executed on irc buffer (server or channel)" msgstr "%s el comando \"%s\" no puede ejecutarse en una ventana de servidor\n" #, fuzzy, c-format @@ -5438,6 +5459,19 @@ msgstr "%s no es posible crear el servidor\n" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s falta un argumento para la opción --dir\n" +#, fuzzy +#~ msgid "%s%s: command \"%s\" must be executed on irc buffer" +#~ msgstr "" +#~ "%s el comando \"%s\" no puede ejecutarse en una ventana de servidor\n" + +#, fuzzy +#~ msgid " (used by a plugin)" +#~ msgstr " (sin plugins)\n" + +#, fuzzy +#~ msgid " (masked by a plugin)" +#~ msgstr " (sin plugins)\n" + #, fuzzy #~ msgid "plugin:" #~ msgstr " (sin plugins)\n" @@ -5446,12 +5480,6 @@ msgstr "%s falta un argumento para la opción --dir\n" #~ msgid "%s%s: unknown/missing channel name for \"%s\" command" #~ msgstr "%s faltan argumentos para el comando \"%s\"\n" -#, fuzzy -#~ msgid "" -#~ "%s%s: command \"%s\" must be executed on irc buffer (server/channel/pv)" -#~ msgstr "" -#~ "%s el comando \"%s\" no puede ejecutarse en una ventana de servidor\n" - #~ msgid "nickname text" #~ msgstr "usuario texto" diff --git a/po/fr.po b/po/fr.po index e14505bd5..540157061 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-03-21 13:16+0100\n" -"PO-Revision-Date: 2009-03-21 13:17+0100\n" +"POT-Creation-Date: 2009-03-21 15:56+0100\n" +"PO-Revision-Date: 2009-03-21 15:57+0100\n" "Last-Translator: FlashCode \n" "Language-Team: weechat-dev \n" "MIME-Version: 1.0\n" @@ -84,11 +84,8 @@ msgid "Error: cannot create directory \"%s\"\n" msgstr "Erreur: impossible de créer le répertoire \"%s\"\n" #, c-format -msgid "Welcome to %s%s%s, %s" -msgstr "Bienvenue dans %s%s%s, %s" - -msgid "compiled on" -msgstr "compilé le" +msgid "Welcome to %sWeeChat%s, %s" +msgstr "Bienvenue dans %sWeeChat%s, %s" msgid "List of bars:" msgstr "Liste des barres:" @@ -294,15 +291,9 @@ msgstr "Filtre \"%s\" supprimé" msgid "%s internal commands:" msgstr "Commandes internes %s:" -msgid " (used by a plugin)" -msgstr " (utilisé par une extension)" - msgid "Other commands:" msgstr "Autres commandes:" -msgid " (masked by a plugin)" -msgstr " (masqué par une extension)" - #, c-format msgid "Option \"%s%s%s\":" msgstr "Option \"%s%s%s\":" @@ -693,6 +684,19 @@ msgstr[1] "jours" msgid "WeeChat uptime: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, started on %s%s" msgstr "Uptime WeeChat: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, démarré le %s%s" +msgid "compiled on" +msgstr "compilé le" + +#, c-format +msgid "Upgraded %d %s, first start: %s" +msgstr "Mis à jour %d %s, premier démarrage: %s" + +#. TRANSLATORS: text is: "upgraded xx times" +msgid "time" +msgid_plural "times" +msgstr[0] "fois" +msgstr[1] "fois" + msgid "Windows list:" msgstr "Liste des fenêtres:" @@ -1270,8 +1274,14 @@ msgstr "montrer l'uptime de WeeChat" msgid "[-o]" msgstr "[-o]" -msgid "-o: send uptime on current channel as an IRC message" -msgstr "-o: envoyer l'uptime sur le canal courant en tant que message IRC" +msgid "-o: send uptime to current buffer as input" +msgstr "-o: envoyer l'uptime sur le tampon courant comme entrée" + +msgid "show WeeChat version and compilation date" +msgstr "afficher la version de WeeChat et la date de compilation" + +msgid "-o: send version to current buffer as input" +msgstr "-o: envoyer la version sur le tampon courant comme entrée" msgid "manage windows" msgstr "gestion des fenêtres" @@ -1842,6 +1852,11 @@ msgstr "%sAttention: %s, ligne %d: valeur invalide pour l'option \"%s\"" msgid "Reloading configuration file %s" msgstr "Rechargement du fichier de configuration %s" +#, c-format +msgid "%sError: another command \"%s\" already exists for plugin \"%s\"" +msgstr "" +"%sErreur: une autre commande \"%s\" existe déjà pour l'extension \"%s\"" + #, c-format msgid "System clock skew detected (%+ld seconds), reinitializing all timers" msgstr "" @@ -1860,6 +1875,14 @@ msgstr "%sVous ne pouvez pas écrire de texte dans ce tampon" msgid "%sError with command \"%s\" (try /help %s)" msgstr "%sErreur avec la commande \"%s\" (essayez /help %s)" +#, c-format +msgid "" +"%sError: ambigous command \"%s\": it exists in many plugins and not in \"%s" +"\" plugin" +msgstr "" +"%sErreur: commande \"%s\" ambiguë: elle existe dans plusieurs extensions et " +"pas dans l'extension \"%s\"" + #, c-format msgid "%sError: too much calls to command \"%s\" (looping)" msgstr "%sErreur: trop d'appels à la commande \"%s\" (boucle)" @@ -3515,8 +3538,10 @@ msgid "%s%s: too few arguments for \"%s\" command" msgstr "%s%s: pas assez de paramètres pour la commande \"%s\"" #, c-format -msgid "%s%s: command \"%s\" must be executed on irc buffer" -msgstr "%s%s: la commande \"%s\" doit être exécutée sur un tampon irc" +msgid "%s%s: command \"%s\" must be executed on irc buffer (server or channel)" +msgstr "" +"%s%s: la commande \"%s\" doit être exécutée sur un tampon irc (serveur ou " +"canal)" #, c-format msgid "%s%s: command \"%s\" must be executed on connected irc server" @@ -5626,3 +5651,9 @@ msgstr "%s%s: impossible de positionner l'option \"nonblock\" pour la socket" #, c-format msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s%s: délai d'attente dépassé pour \"%s\" avec %s" + +#~ msgid " (used by a plugin)" +#~ msgstr " (utilisé par une extension)" + +#~ msgid " (masked by a plugin)" +#~ msgstr " (masqué par une extension)" diff --git a/po/hu.po b/po/hu.po index 70eed1495..ccaaa5b39 100644 --- a/po/hu.po +++ b/po/hu.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-03-21 13:16+0100\n" +"POT-Creation-Date: 2009-03-21 15:56+0100\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -89,12 +89,9 @@ msgid "Error: cannot create directory \"%s\"\n" msgstr "%s nem sikerült a \"%s\" könyvtárat létrehozni\n" #, fuzzy, c-format -msgid "Welcome to %s%s%s, %s" +msgid "Welcome to %sWeeChat%s, %s" msgstr "%sÜdvözöli a %s%s%s, %s\n" -msgid "compiled on" -msgstr "lefordítva:" - #, fuzzy msgid "List of bars:" msgstr "Aliaszok listája:\n" @@ -308,18 +305,10 @@ msgstr "a felhasználók le lettek tiltva" msgid "%s internal commands:" msgstr "%s belső parancsok:\n" -#, fuzzy -msgid " (used by a plugin)" -msgstr " (nem található bővítőmodul)\n" - #, fuzzy msgid "Other commands:" msgstr "%s belső parancsok:\n" -#, fuzzy -msgid " (masked by a plugin)" -msgstr " (nem található bővítőmodul)\n" - #, fuzzy, c-format msgid "Option \"%s%s%s\":" msgstr "Felhasználók a %s%s%s szobában: %s[" @@ -749,6 +738,20 @@ msgid "WeeChat uptime: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, started on %s%s" msgstr "" "WeeChat futásidő: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, elindítva: %s%s" +msgid "compiled on" +msgstr "lefordítva:" + +#, c-format +msgid "Upgraded %d %s, first start: %s" +msgstr "" + +#. TRANSLATORS: text is: "upgraded xx times" +#, fuzzy +msgid "time" +msgid_plural "times" +msgstr[0] "Aktív" +msgstr[1] "Aktív" + #, fuzzy msgid "Windows list:" msgstr "a /who lista vége" @@ -1193,9 +1196,17 @@ msgstr "a WeeChat futásidejének mutatása" msgid "[-o]" msgstr "[-o]" -msgid "-o: send uptime on current channel as an IRC message" +#, fuzzy +msgid "-o: send uptime to current buffer as input" msgstr "-o: a futásidő mint IRC üzenet elküldése az aktuális szobába" +#, fuzzy +msgid "show WeeChat version and compilation date" +msgstr "Konfigurációs fájl elmentve\n" + +msgid "-o: send version to current buffer as input" +msgstr "" + msgid "manage windows" msgstr "ablakok kezelése" @@ -1770,6 +1781,10 @@ msgstr "%s %s, %d. sor: érvénytelen opció: \"%s\"\n" msgid "Reloading configuration file %s" msgstr "Beállítások mentése a lemezre\n" +#, fuzzy, c-format +msgid "%sError: another command \"%s\" already exists for plugin \"%s\"" +msgstr "%s az ignore már létezik\n" + #, c-format msgid "System clock skew detected (%+ld seconds), reinitializing all timers" msgstr "" @@ -1786,6 +1801,12 @@ msgstr "%s az utolsó puffert nem lehet bezárni\n" msgid "%sError with command \"%s\" (try /help %s)" msgstr "%s a \"%s\" aliasz vagy parancs nem található\n" +#, fuzzy, c-format +msgid "" +"%sError: ambigous command \"%s\": it exists in many plugins and not in \"%s" +"\" plugin" +msgstr "%s az ignore már létezik\n" + #, fuzzy, c-format msgid "%sError: too much calls to command \"%s\" (looping)" msgstr "%s helytelen érték a \"%s\" paraméternek\n" @@ -3416,7 +3437,7 @@ msgid "%s%s: too few arguments for \"%s\" command" msgstr "%s rossz argumentum a \"%s\" parancsnak\n" #, fuzzy, c-format -msgid "%s%s: command \"%s\" must be executed on irc buffer" +msgid "%s%s: command \"%s\" must be executed on irc buffer (server or channel)" msgstr "%s \"%s\" parancs nem futtatható a szerverablakban\n" #, fuzzy, c-format @@ -5496,6 +5517,18 @@ msgstr "%s DCC: nem sikerült 'nonblock' opciót beállítani a csatornán\n" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n" +#, fuzzy +#~ msgid "%s%s: command \"%s\" must be executed on irc buffer" +#~ msgstr "%s \"%s\" parancs nem futtatható a szerverablakban\n" + +#, fuzzy +#~ msgid " (used by a plugin)" +#~ msgstr " (nem található bővítőmodul)\n" + +#, fuzzy +#~ msgid " (masked by a plugin)" +#~ msgstr " (nem található bővítőmodul)\n" + #, fuzzy #~ msgid "plugin:" #~ msgstr " (nem található bővítőmodul)\n" @@ -5504,11 +5537,6 @@ msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n" #~ msgid "%s%s: unknown/missing channel name for \"%s\" command" #~ msgstr "%s hiányzó argumentum a \"%s\" parancsnak\n" -#, fuzzy -#~ msgid "" -#~ "%s%s: command \"%s\" must be executed on irc buffer (server/channel/pv)" -#~ msgstr "%s \"%s\" parancs nem futtatható a szerverablakban\n" - #~ msgid "nickname text" #~ msgstr "név szöveg" diff --git a/po/ru.po b/po/ru.po index 0b8b91d8b..b22724db0 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-03-21 13:16+0100\n" +"POT-Creation-Date: 2009-03-21 15:56+0100\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -85,12 +85,9 @@ msgid "Error: cannot create directory \"%s\"\n" msgstr "%s не могу создать директорию \"%s\"\n" #, fuzzy, c-format -msgid "Welcome to %s%s%s, %s" +msgid "Welcome to %sWeeChat%s, %s" msgstr "%sДобро пожаловать в %s%s%s, %s\n" -msgid "compiled on" -msgstr "собран:" - #, fuzzy msgid "List of bars:" msgstr "Список сокращений:\n" @@ -304,18 +301,10 @@ msgstr "команда users отключена" msgid "%s internal commands:" msgstr "Внутренние команды %s:\n" -#, fuzzy -msgid " (used by a plugin)" -msgstr " (нет pluginа)\n" - #, fuzzy msgid "Other commands:" msgstr "Внутренние команды %s:\n" -#, fuzzy -msgid " (masked by a plugin)" -msgstr " (нет pluginа)\n" - #, fuzzy, c-format msgid "Option \"%s%s%s\":" msgstr "Ники %s%s%s: %s[" @@ -743,6 +732,20 @@ msgstr[1] "дней" msgid "WeeChat uptime: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, started on %s%s" msgstr "WeeChat работает: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, запущен %s%s" +msgid "compiled on" +msgstr "собран:" + +#, c-format +msgid "Upgraded %d %s, first start: %s" +msgstr "" + +#. TRANSLATORS: text is: "upgraded xx times" +#, fuzzy +msgid "time" +msgid_plural "times" +msgstr[0] "Активно" +msgstr[1] "Активно" + #, fuzzy msgid "Windows list:" msgstr "конец списка /who" @@ -1189,9 +1192,17 @@ msgstr "показать uptime WeeChat" msgid "[-o]" msgstr "[-o]" -msgid "-o: send uptime on current channel as an IRC message" +#, fuzzy +msgid "-o: send uptime to current buffer as input" msgstr "-o: отправить uptime сообщением в текущий канал" +#, fuzzy +msgid "show WeeChat version and compilation date" +msgstr "Конфигурационный файл сохранён\n" + +msgid "-o: send version to current buffer as input" +msgstr "" + msgid "manage windows" msgstr "управление окнами" @@ -1771,6 +1782,10 @@ msgstr "%s %s, строка %d: некорректный параметр \"%s\" msgid "Reloading configuration file %s" msgstr "Сохраняю конфигурацию\n" +#, fuzzy, c-format +msgid "%sError: another command \"%s\" already exists for plugin \"%s\"" +msgstr "%s игнорирование уже существует\n" + #, c-format msgid "System clock skew detected (%+ld seconds), reinitializing all timers" msgstr "" @@ -1787,6 +1802,12 @@ msgstr "%s невозможно закрыть единственный буфе msgid "%sError with command \"%s\" (try /help %s)" msgstr "%s сокращение или команда \"%s\" не найдены\n" +#, fuzzy, c-format +msgid "" +"%sError: ambigous command \"%s\": it exists in many plugins and not in \"%s" +"\" plugin" +msgstr "%s игнорирование уже существует\n" + #, fuzzy, c-format msgid "%sError: too much calls to command \"%s\" (looping)" msgstr "%s некорректное значение параметра \"%s\"\n" @@ -3409,7 +3430,7 @@ msgid "%s%s: too few arguments for \"%s\" command" msgstr "%s некорректные аргументы команды \"%s\"\n" #, fuzzy, c-format -msgid "%s%s: command \"%s\" must be executed on irc buffer" +msgid "%s%s: command \"%s\" must be executed on irc buffer (server or channel)" msgstr "%s \"%s\" команда может быть выполнена только в буфере сервера\n" #, fuzzy, c-format @@ -5467,6 +5488,18 @@ msgstr "%s DCC: не могу установить неблокирующий р msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s нет аргумента для параметра \"%s\"\n" +#, fuzzy +#~ msgid "%s%s: command \"%s\" must be executed on irc buffer" +#~ msgstr "%s \"%s\" команда может быть выполнена только в буфере сервера\n" + +#, fuzzy +#~ msgid " (used by a plugin)" +#~ msgstr " (нет pluginа)\n" + +#, fuzzy +#~ msgid " (masked by a plugin)" +#~ msgstr " (нет pluginа)\n" + #, fuzzy #~ msgid "plugin:" #~ msgstr " (нет pluginа)\n" @@ -5475,11 +5508,6 @@ msgstr "%s нет аргумента для параметра \"%s\"\n" #~ msgid "%s%s: unknown/missing channel name for \"%s\" command" #~ msgstr "%s нет аргументов для \"%s\" команды\n" -#, fuzzy -#~ msgid "" -#~ "%s%s: command \"%s\" must be executed on irc buffer (server/channel/pv)" -#~ msgstr "%s \"%s\" команда может быть выполнена только в буфере сервера\n" - #~ msgid "nickname text" #~ msgstr "ник текст" diff --git a/po/weechat.pot b/po/weechat.pot index bb14ed8b0..a3a2deb49 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: 2009-03-21 13:16+0100\n" +"POT-Creation-Date: 2009-03-21 15:56+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -67,10 +67,7 @@ msgid "Error: cannot create directory \"%s\"\n" msgstr "" #, c-format -msgid "Welcome to %s%s%s, %s" -msgstr "" - -msgid "compiled on" +msgid "Welcome to %sWeeChat%s, %s" msgstr "" msgid "List of bars:" @@ -273,15 +270,9 @@ msgstr "" msgid "%s internal commands:" msgstr "" -msgid " (used by a plugin)" -msgstr "" - msgid "Other commands:" msgstr "" -msgid " (masked by a plugin)" -msgstr "" - #, c-format msgid "Option \"%s%s%s\":" msgstr "" @@ -662,6 +653,19 @@ msgstr[1] "" msgid "WeeChat uptime: %s%d %s%s %s%02d%s:%s%02d%s:%s%02d%s, started on %s%s" msgstr "" +msgid "compiled on" +msgstr "" + +#, c-format +msgid "Upgraded %d %s, first start: %s" +msgstr "" + +#. TRANSLATORS: text is: "upgraded xx times" +msgid "time" +msgid_plural "times" +msgstr[0] "" +msgstr[1] "" + msgid "Windows list:" msgstr "" @@ -1025,7 +1029,13 @@ msgstr "" msgid "[-o]" msgstr "" -msgid "-o: send uptime on current channel as an IRC message" +msgid "-o: send uptime to current buffer as input" +msgstr "" + +msgid "show WeeChat version and compilation date" +msgstr "" + +msgid "-o: send version to current buffer as input" msgstr "" msgid "manage windows" @@ -1489,6 +1499,10 @@ msgstr "" msgid "Reloading configuration file %s" msgstr "" +#, c-format +msgid "%sError: another command \"%s\" already exists for plugin \"%s\"" +msgstr "" + #, c-format msgid "System clock skew detected (%+ld seconds), reinitializing all timers" msgstr "" @@ -1505,6 +1519,12 @@ msgstr "" msgid "%sError with command \"%s\" (try /help %s)" msgstr "" +#, c-format +msgid "" +"%sError: ambigous command \"%s\": it exists in many plugins and not in \"%s" +"\" plugin" +msgstr "" + #, c-format msgid "%sError: too much calls to command \"%s\" (looping)" msgstr "" @@ -2898,7 +2918,7 @@ msgid "%s%s: too few arguments for \"%s\" command" msgstr "" #, c-format -msgid "%s%s: command \"%s\" must be executed on irc buffer" +msgid "%s%s: command \"%s\" must be executed on irc buffer (server or channel)" msgstr "" #, c-format diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 33a222f9c..4adbacd06 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -766,7 +766,7 @@ command_command (void *data, struct t_gui_buffer *buffer, if (argc > 2) { ptr_plugin = NULL; - if (string_strcasecmp (argv[1], "weechat") != 0) + if (string_strcasecmp (argv[1], PLUGIN_CORE) != 0) { ptr_plugin = plugin_search (argv[1]); if (!ptr_plugin) @@ -1243,22 +1243,16 @@ command_help (void *data, struct t_gui_buffer *buffer, && HOOK_COMMAND(ptr_hook, command) && HOOK_COMMAND(ptr_hook, command)[0]) { - gui_chat_printf (NULL, " %s%s%s%s%s%s%s%s", + gui_chat_printf (NULL, " %s%s%s%s%s", GUI_COLOR(GUI_COLOR_CHAT_BUFFER), - (HOOK_COMMAND(ptr_hook, level) > 0) ? - "(" : "", HOOK_COMMAND(ptr_hook, command), - (HOOK_COMMAND(ptr_hook, level) > 0) ? - ")" : "", GUI_COLOR(GUI_COLOR_CHAT), (HOOK_COMMAND(ptr_hook, description) && HOOK_COMMAND(ptr_hook, description)[0]) ? " - " : "", (HOOK_COMMAND(ptr_hook, description) && HOOK_COMMAND(ptr_hook, description)[0]) ? - _(HOOK_COMMAND(ptr_hook, description)) : "", - (HOOK_COMMAND(ptr_hook, level) > 0) ? - _(" (used by a plugin)") : ""); + _(HOOK_COMMAND(ptr_hook, description)) : ""); } } gui_chat_printf (NULL, ""); @@ -1271,22 +1265,16 @@ command_help (void *data, struct t_gui_buffer *buffer, && HOOK_COMMAND(ptr_hook, command) && HOOK_COMMAND(ptr_hook, command)[0]) { - gui_chat_printf (NULL, " %s%s%s%s%s%s%s%s", + gui_chat_printf (NULL, " %s%s%s%s%s", GUI_COLOR(GUI_COLOR_CHAT_BUFFER), - (HOOK_COMMAND(ptr_hook, level) > 0) ? - "(" : "", HOOK_COMMAND(ptr_hook, command), - (HOOK_COMMAND(ptr_hook, level) > 0) ? - ")" : "", GUI_COLOR(GUI_COLOR_CHAT), (HOOK_COMMAND(ptr_hook, description) && HOOK_COMMAND(ptr_hook, description)[0]) ? " - " : "", (HOOK_COMMAND(ptr_hook, description) && HOOK_COMMAND(ptr_hook, description)[0]) ? - _(HOOK_COMMAND(ptr_hook, description)) : "", - (HOOK_COMMAND(ptr_hook, level) > 0) ? - _(" (masked by a plugin)") : ""); + _(HOOK_COMMAND(ptr_hook, description)) : ""); } } @@ -1300,7 +1288,6 @@ command_help (void *data, struct t_gui_buffer *buffer, if (!ptr_hook->deleted && HOOK_COMMAND(ptr_hook, command) && HOOK_COMMAND(ptr_hook, command)[0] - && (HOOK_COMMAND(ptr_hook, level) == 0) && (string_strcasecmp (HOOK_COMMAND(ptr_hook, command), argv[1]) == 0)) { @@ -3209,7 +3196,7 @@ command_uptime (void *data, struct t_gui_buffer *buffer, { time_t running_time; int day, hour, min, sec; - char string[256]; + char string[512]; /* make C compiler happy */ (void) data; @@ -3221,7 +3208,7 @@ command_uptime (void *data, struct t_gui_buffer *buffer, min = ((running_time % (60 * 60 * 24)) % (60 * 60)) / 60; sec = ((running_time % (60 * 60 * 24)) % (60 * 60)) % 60; - if ((argc == 2) && (string_strcasecmp (argv[1], "-o") == 0)) + if ((argc >= 2) && (string_strcasecmp (argv[1], "-o") == 0)) { snprintf (string, sizeof (string), _("WeeChat uptime: %d %s %02d:%02d:%02d, started on %s"), @@ -3260,6 +3247,81 @@ command_uptime (void *data, struct t_gui_buffer *buffer, return WEECHAT_RC_OK; } +/* + * command_version_display: display WeeChat version + */ + +void +command_version_display (struct t_gui_buffer *buffer, + int send_to_buffer_as_input) +{ + char string[512]; + + if (send_to_buffer_as_input) + { + snprintf (string, sizeof (string), + "WeeChat %s [%s %s %s]", + PACKAGE_VERSION, + _("compiled on"), + __DATE__, + __TIME__); + input_data (buffer, string); + if (weechat_upgrade_count > 0) + { + snprintf (string, sizeof (string), + _("Upgraded %d %s, first start: %s"), + weechat_upgrade_count, + NG_("time", "times", weechat_upgrade_count), + ctime (&weechat_start_time)); + string[strlen (string) - 1] = '\0'; + input_data (buffer, string); + } + } + else + { + gui_chat_printf (NULL, "%sWeeChat %s %s[%s%s %s %s%s]", + GUI_COLOR(GUI_COLOR_CHAT_BUFFER), + PACKAGE_VERSION, + GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS), + GUI_COLOR(GUI_COLOR_CHAT_HOST), + _("compiled on"), + __DATE__, + __TIME__, + GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS)); + if (weechat_upgrade_count > 0) + { + gui_chat_printf (NULL, + _("Upgraded %d %s, first start: %s"), + weechat_upgrade_count, + /* TRANSLATORS: text is: "upgraded xx times" */ + NG_("time", "times", weechat_upgrade_count), + ctime (&weechat_start_time)); + } + } +} + +/* + * command_version: display WeeChat version + */ + +int +command_version (void *data, struct t_gui_buffer *buffer, + int argc, char **argv, char **argv_eol) +{ + int send_to_buffer_as_input; + + /* make C compiler happy */ + (void) data; + (void) argv_eol; + + send_to_buffer_as_input = ((argc >= 2) + && (string_strcasecmp (argv[1], "-o") == 0)); + + command_version_display (buffer, send_to_buffer_as_input); + + return WEECHAT_RC_OK; +} + /* * command_window: manage windows */ @@ -3633,7 +3695,7 @@ command_init () "command)\n" "command: command to execute (a '/' is automatically " "added if not found at beginning of command)"), - "%p|weechat %P", + "%p|" PLUGIN_CORE " %P", &command_command, NULL); hook_command (NULL, "debug", N_("control debug for core/plugins"), @@ -3850,9 +3912,15 @@ command_init () hook_command (NULL, "uptime", N_("show WeeChat uptime"), N_("[-o]"), - N_("-o: send uptime on current channel as an IRC message"), + N_("-o: send uptime to current buffer as input"), "-o", &command_uptime, NULL); + hook_command (NULL, "version", + N_("show WeeChat version and compilation date"), + N_("[-o]"), + N_("-o: send version to current buffer as input"), + "-o", + &command_version, NULL); hook_command (NULL, "window", N_("manage windows"), N_("[list | -1 | +1 | b# | up | down | left | right | " diff --git a/src/core/wee-command.h b/src/core/wee-command.h index e83ca7236..821642bb2 100644 --- a/src/core/wee-command.h +++ b/src/core/wee-command.h @@ -26,5 +26,7 @@ extern int command_reload (void *data, struct t_gui_buffer *buffer, int argc, char **argv, char **argv_eol); extern void command_init (); extern void command_startup (int plugins_looaded); +extern void command_version_display (struct t_gui_buffer *buffer, + int send_to_buffer_as_input); #endif /* wee-command.h */ diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index 2cc7dc010..cae3f887f 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -304,7 +304,7 @@ hook_exec_end () */ struct t_hook * -hook_search_command (const char *command) +hook_search_command (struct t_weechat_plugin *plugin, const char *command) { struct t_hook *ptr_hook; @@ -312,11 +312,12 @@ hook_search_command (const char *command) ptr_hook = ptr_hook->next_hook) { if (!ptr_hook->deleted + && (ptr_hook->plugin == plugin) && (string_strcasecmp (HOOK_COMMAND(ptr_hook, command), command) == 0)) return ptr_hook; } - /* command hook not found */ + /* command hook not found for plugin */ return NULL; } @@ -331,24 +332,18 @@ hook_command (struct t_weechat_plugin *plugin, const char *command, const char *completion, t_hook_callback_command *callback, void *callback_data) { - struct t_hook *ptr_hook, *new_hook; + struct t_hook *new_hook; struct t_hook_command *new_hook_command; - - if ((string_strcasecmp (command, "builtin") == 0) - && hook_search_command (command)) - return NULL; - - /* increase level for command hooks with same command name - so that these commands will not be used any more, until this - one is removed */ - for (ptr_hook = weechat_hooks[HOOK_TYPE_COMMAND]; ptr_hook; - ptr_hook = ptr_hook->next_hook) + + if (hook_search_command (plugin, command)) { - if (!ptr_hook->deleted - && (string_strcasecmp (HOOK_COMMAND(ptr_hook, command), command) == 0)) - { - HOOK_COMMAND(ptr_hook, level)++; - } + gui_chat_printf (NULL, + _("%sError: another command \"%s\" already exists " + "for plugin \"%s\""), + gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], + command, + plugin_get_name (plugin)); + return NULL; } new_hook = malloc (sizeof (*new_hook)); @@ -367,7 +362,6 @@ hook_command (struct t_weechat_plugin *plugin, const char *command, new_hook_command->callback = callback; new_hook_command->command = (command) ? strdup (command) : strdup (""); - new_hook_command->level = 0; new_hook_command->description = (description) ? strdup (description) : strdup (""); new_hook_command->args = (args) ? @@ -400,7 +394,7 @@ hook_command_exec (struct t_gui_buffer *buffer, int any_plugin, struct t_hook *ptr_hook, *next_hook; struct t_hook *hook_for_plugin, *hook_for_other_plugin; char **argv, **argv_eol; - int argc, rc, command_is_running; + int argc, rc, number_for_other_plugin; if (!buffer || !string || !string[0]) return -1; @@ -423,31 +417,28 @@ hook_command_exec (struct t_gui_buffer *buffer, int any_plugin, hook_for_plugin = NULL; hook_for_other_plugin = NULL; - command_is_running = 0; + number_for_other_plugin = 0; ptr_hook = weechat_hooks[HOOK_TYPE_COMMAND]; while (ptr_hook) { next_hook = ptr_hook->next_hook; if (!ptr_hook->deleted - && ((!any_plugin || HOOK_COMMAND(ptr_hook, level) == 0)) && ((argv[0][0] == '/') && (string_strcasecmp (argv[0] + 1, HOOK_COMMAND(ptr_hook, command)) == 0))) { - if (ptr_hook->running > 0) - command_is_running = ptr_hook->running; - - if (ptr_hook->running < HOOK_COMMAND_MAX_CALLS) + if (ptr_hook->plugin == plugin) { - if (ptr_hook->plugin == plugin) - { - if (!hook_for_plugin) - hook_for_plugin = ptr_hook; - } - else + if (!hook_for_plugin) + hook_for_plugin = ptr_hook; + } + else + { + if (any_plugin) { if (!hook_for_other_plugin) hook_for_other_plugin = ptr_hook; + number_for_other_plugin++; } } } @@ -455,20 +446,28 @@ hook_command_exec (struct t_gui_buffer *buffer, int any_plugin, ptr_hook = next_hook; } - /* ambiguous: command found for current plugin and other one, we don't know - which one to run! */ - if (any_plugin && hook_for_plugin && hook_for_other_plugin) + if (!hook_for_plugin && !hook_for_other_plugin) { - rc = -2; + /* command not found */ + rc = -1; } else { - if (any_plugin || hook_for_plugin) + if (!hook_for_plugin && (number_for_other_plugin > 1)) + { + /* ambiguous: no command for current plugin, but more than one + command was found for other plugins, we don't know which one to + run! */ + rc = -2; + } + else { ptr_hook = (hook_for_plugin) ? hook_for_plugin : hook_for_other_plugin; - if (ptr_hook) + if (ptr_hook->running >= HOOK_COMMAND_MAX_CALLS) + rc = -3; + else { ptr_hook->running++; rc = (int) (HOOK_COMMAND(ptr_hook, callback)) @@ -479,16 +478,6 @@ hook_command_exec (struct t_gui_buffer *buffer, int any_plugin, else rc = 1; } - else - { - if (command_is_running) - rc = -3; - } - } - else - { - if (command_is_running) - rc = -3; } } @@ -1948,8 +1937,6 @@ hook_infolist_get (struct t_weechat_plugin *plugin, const char *infolist_name, void unhook (struct t_hook *hook) { - struct t_hook *ptr_hook; - /* invalid hook? */ if (!hook_valid (hook)) return; @@ -1972,20 +1959,6 @@ unhook (struct t_hook *hook) switch (hook->type) { case HOOK_TYPE_COMMAND: - /* decrease level for command hooks with same command name - and level higher than this one */ - for (ptr_hook = weechat_hooks[HOOK_TYPE_COMMAND]; ptr_hook; - ptr_hook = ptr_hook->next_hook) - { - if (!ptr_hook->deleted - && (ptr_hook != hook) - && (string_strcasecmp (HOOK_COMMAND(ptr_hook, command), - HOOK_COMMAND(hook, command)) == 0) - && (HOOK_COMMAND(ptr_hook, level) > HOOK_COMMAND(hook, level))) - { - HOOK_COMMAND(ptr_hook, level)--; - } - } if (HOOK_COMMAND(hook, command)) free (HOOK_COMMAND(hook, command)); if (HOOK_COMMAND(hook, description)) @@ -2189,8 +2162,6 @@ hook_add_to_infolist_type (struct t_infolist *infolist, return 0; if (!infolist_new_var_string (ptr_item, "command", HOOK_COMMAND(ptr_hook, command))) return 0; - if (!infolist_new_var_integer (ptr_item, "level", HOOK_COMMAND(ptr_hook, level))) - return 0; if (!infolist_new_var_string (ptr_item, "description", HOOK_COMMAND(ptr_hook, description))) return 0; @@ -2472,7 +2443,6 @@ hook_print_log () log_printf (" command data:"); log_printf (" callback . . . . . . : 0x%lx", HOOK_COMMAND(ptr_hook, callback)); log_printf (" command. . . . . . . : '%s'", HOOK_COMMAND(ptr_hook, command)); - log_printf (" level. . . . . . . . : %d", HOOK_COMMAND(ptr_hook, level)); log_printf (" description. . . . . : '%s'", HOOK_COMMAND(ptr_hook, description)); log_printf (" args . . . . . . . . : '%s'", HOOK_COMMAND(ptr_hook, args)); log_printf (" args_description . . : '%s'", HOOK_COMMAND(ptr_hook, args_description)); diff --git a/src/core/wee-hook.h b/src/core/wee-hook.h index 833473684..68f6d8800 100644 --- a/src/core/wee-hook.h +++ b/src/core/wee-hook.h @@ -99,8 +99,6 @@ struct t_hook_command { t_hook_callback_command *callback; /* command callback */ char *command; /* name of command (without '/') */ - int level; /* when many commands with same name */ - /* exist: lower level= high priority */ char *description; /* (for /help) short cmd description */ char *args; /* (for /help) command arguments */ char *args_description; /* (for /help) args long description */ diff --git a/src/core/wee-input.c b/src/core/wee-input.c index 1eb45acec..8dfcf8155 100644 --- a/src/core/wee-input.c +++ b/src/core/wee-input.c @@ -135,6 +135,14 @@ input_exec_command (struct t_gui_buffer *buffer, break; case 1: /* command hooked, OK (executed) */ break; + case -2: /* command is ambigous (exists for other plugins) */ + gui_chat_printf (NULL, + _("%sError: ambigous command \"%s\": it exists " + "in many plugins and not in \"%s\" plugin"), + gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], + command + 1, + plugin_get_name (plugin)); + break; case -3: /* command is running */ gui_chat_printf (NULL, _("%sError: too much calls to command \"%s\" " @@ -152,8 +160,8 @@ input_exec_command (struct t_gui_buffer *buffer, else { gui_chat_printf (NULL, - _("%sError: unknown command \"%s\" (type /help " - "for help)"), + _("%sError: unknown command \"%s\" (type " + "/help for help)"), gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], command + 1); } @@ -170,53 +178,36 @@ input_exec_command (struct t_gui_buffer *buffer, void input_data (struct t_gui_buffer *buffer, const char *data) { - char *new_data, *pos; + char *pos; const char *ptr_data; if (!buffer || !data || !data[0] || (data[0] == '\r') || (data[0] == '\n')) return; - - /* TODO: modifier for input */ - /*new_data = plugin_modifier_exec (PLUGIN_MODIFIER_IRC_USER, - "", data);*/ - new_data = strdup (data); - /* no changes in new data */ - if (new_data && (strcmp (data, new_data) == 0)) + /* use new data (returned by plugin) */ + ptr_data = data; + while (ptr_data && ptr_data[0]) { - free (new_data); - new_data = NULL; - } - - /* message not dropped? */ - if (!new_data || new_data[0]) - { - /* use new data (returned by plugin) */ - ptr_data = (new_data) ? new_data : data; + pos = strchr (ptr_data, '\n'); + if (pos) + pos[0] = '\0'; - while (ptr_data && ptr_data[0]) + if (input_is_command (ptr_data)) { - pos = strchr (ptr_data, '\n'); - if (pos) - pos[0] = '\0'; - - if (input_is_command (ptr_data)) - { - /* WeeChat or plugin command */ - (void) input_exec_command (buffer, 1, buffer->plugin, ptr_data); - } - else - { - input_exec_data (buffer, ptr_data); - } - - if (pos) - { - pos[0] = '\n'; - ptr_data = pos + 1; - } - else - ptr_data = NULL; + /* WeeChat or plugin command */ + (void) input_exec_command (buffer, 1, buffer->plugin, ptr_data); } + else + { + input_exec_data (buffer, ptr_data); + } + + if (pos) + { + pos[0] = '\n'; + ptr_data = pos + 1; + } + else + ptr_data = NULL; } } diff --git a/src/core/wee-upgrade.c b/src/core/wee-upgrade.c index 34f1f7194..a99351e1a 100644 --- a/src/core/wee-upgrade.c +++ b/src/core/wee-upgrade.c @@ -204,6 +204,11 @@ upgrade_weechat_save_uptime (struct t_upgrade_file *upgrade_file) infolist_free (ptr_infolist); return 0; } + if (!infolist_new_var_integer (ptr_item, "upgrade_count", weechat_upgrade_count)) + { + infolist_free (ptr_infolist); + return 0; + } rc = upgrade_file_write_object (upgrade_file, UPGRADE_WEECHAT_TYPE_UPTIME, @@ -504,6 +509,7 @@ upgrade_weechat_read_cb (void *data, break; case UPGRADE_WEECHAT_TYPE_UPTIME: weechat_start_time = infolist_time (infolist, "start_time"); + weechat_upgrade_count = infolist_integer (infolist, "upgrade_count"); break; case UPGRADE_WEECHAT_TYPE_HOTLIST: if (!hotlist_reset) diff --git a/src/core/weechat.c b/src/core/weechat.c index 0d3f45ad2..c997f22c6 100644 --- a/src/core/weechat.c +++ b/src/core/weechat.c @@ -74,6 +74,7 @@ int weechat_debug_core = 0; /* debug level for core */ char *weechat_argv0 = NULL; /* WeeChat binary file name (argv[0])*/ int weechat_upgrading = 0; /* =1 if WeeChat is upgrading */ time_t weechat_start_time = 0; /* start time (used by /uptime cmd) */ +int weechat_upgrade_count = 0; /* number of /upgrade done */ int weechat_quit = 0; /* = 1 if quit request from user */ int weechat_sigsegv = 0; /* SIGSEGV received? */ char *weechat_home = NULL; /* home dir. (default: ~/.weechat) */ @@ -313,23 +314,14 @@ weechat_welcome_message () if (CONFIG_STRING(config_startup_weechat_slogan) && CONFIG_STRING(config_startup_weechat_slogan)[0]) { - gui_chat_printf (NULL, _("Welcome to %s%s%s, %s"), + gui_chat_printf (NULL, _("Welcome to %sWeeChat%s, %s"), GUI_COLOR(GUI_COLOR_CHAT_BUFFER), - PACKAGE_NAME, GUI_NO_COLOR, CONFIG_STRING(config_startup_weechat_slogan)); } if (CONFIG_BOOLEAN(config_startup_display_version)) { - gui_chat_printf (NULL, "%sWeeChat %s %s[%s%s %s %s%s]", - GUI_COLOR(GUI_COLOR_CHAT_BUFFER), - PACKAGE_VERSION, - GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS), - GUI_COLOR(GUI_COLOR_CHAT_HOST), - _("compiled on"), - __DATE__, - __TIME__, - GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS)); + command_version_display (NULL, 0); } if (CONFIG_BOOLEAN(config_startup_display_logo) || (CONFIG_STRING(config_startup_weechat_slogan) @@ -406,7 +398,10 @@ main (int argc, char *argv[]) exit (EXIT_FAILURE); gui_main_init (); /* init WeeChat interface */ if (weechat_upgrading) + { upgrade_weechat_load (); /* upgrade with session file */ + weechat_upgrade_count++; /* increase /upgrade count */ + } weechat_welcome_message (); /* display WeeChat welcome message */ command_startup (0); /* command executed before plugins */ plugin_init (weechat_auto_load_plugins, /* init plugin interface(s) */ diff --git a/src/core/weechat.h b/src/core/weechat.h index 5c4ebcf88..283ccfc07 100644 --- a/src/core/weechat.h +++ b/src/core/weechat.h @@ -102,6 +102,7 @@ extern int weechat_debug_core; extern char *weechat_argv0; extern int weechat_upgrading; extern time_t weechat_start_time; +extern int weechat_upgrade_count; extern int weechat_quit; extern char *weechat_home; extern char *weechat_local_charset; diff --git a/src/gui/gui-completion.c b/src/gui/gui-completion.c index 16ef58b8c..b64a326fe 100644 --- a/src/gui/gui-completion.c +++ b/src/gui/gui-completion.c @@ -219,7 +219,6 @@ gui_completion_search_command (struct t_gui_completion *completion) if (!ptr_hook->deleted && HOOK_COMMAND(ptr_hook, command) && HOOK_COMMAND(ptr_hook, command)[0] - && (HOOK_COMMAND(ptr_hook, level) == 0) && (string_strcasecmp (HOOK_COMMAND(ptr_hook, command), completion->base_command) == 0)) return ptr_hook; @@ -691,9 +690,9 @@ gui_completion_list_add_plugin_commands (struct t_gui_completion *completion) if (plugin_name) { ptr_plugin = NULL; - if (string_strcasecmp (plugin_name, "weechat") != 0) + if (string_strcasecmp (plugin_name, PLUGIN_CORE) != 0) { - /* plugin name is different from "weechat", then search it in + /* plugin name is different from "core", then search it in plugin list */ ptr_plugin = plugin_search (plugin_name); if (!ptr_plugin) @@ -1600,8 +1599,7 @@ gui_completion_command (struct t_gui_completion *completion) { if (!ptr_hook->deleted && HOOK_COMMAND(ptr_hook, command) - && HOOK_COMMAND(ptr_hook, command)[0] - && (HOOK_COMMAND(ptr_hook, level) == 0)) + && HOOK_COMMAND(ptr_hook, command)[0]) { gui_completion_list_add (completion, HOOK_COMMAND(ptr_hook, command), diff --git a/src/plugins/irc/irc-command.h b/src/plugins/irc/irc-command.h index 045a933bf..12b2b526d 100644 --- a/src/plugins/irc/irc-command.h +++ b/src/plugins/irc/irc-command.h @@ -36,7 +36,7 @@ struct t_irc_channel; { \ weechat_printf (NULL, \ _("%s%s: command \"%s\" must be executed on " \ - "irc buffer"), \ + "irc buffer (server or channel)"), \ weechat_prefix ("error"), IRC_PLUGIN_NAME, \ __command); \ return WEECHAT_RC_OK; \