diff --git a/po/cs.po b/po/cs.po index e5bc94d96..fd1bac821 100644 --- a/po/cs.po +++ b/po/cs.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 10:12+0200\n" +"POT-Creation-Date: 2012-09-04 12:56+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -8204,6 +8204,10 @@ msgstr "načteny %s skripty:" msgid "%s: unknown language for script \"%s\"" msgstr "%s: odebírám skript \"%s\"" +#, fuzzy, c-format +msgid "%s: plugin \"%s\" is not loaded" +msgstr "%s%s: skript \"%s\" nenačten" + #, fuzzy, c-format msgid "%s: script \"%s\" is not loaded" msgstr "%s%s: skript \"%s\" nenačten" @@ -8212,10 +8216,20 @@ msgstr "%s%s: skript \"%s\" nenačten" msgid "%s%s: error downloading script \"%s\": %s" msgstr "%s: odebírám skript \"%s\"" +#, fuzzy, c-format +msgid "" +"%s: script \"%s\" can not be installed because plugin \"%s\" is not loaded" +msgstr "" +"%sChyba: funkce \"%s\" nebyla v pluginu \"%s\" nalezena, načtení selhalo" + #, fuzzy, c-format msgid "%s: downloading script \"%s\"..." msgstr "%s: odebírám skript \"%s\"" +#, fuzzy, c-format +msgid "%s: script \"%s\" not found" +msgstr "%s%s: skript \"%s\" nenalezen" + #, fuzzy, c-format msgid "%s: script \"%s\" is not installed" msgstr "%s%s: skript \"%s\" nenačten" @@ -8225,8 +8239,10 @@ msgid "%s: script \"%s\" is held" msgstr "%s: skript \"%s\" odebrán" #, fuzzy, c-format -msgid "%s: script \"%s\" not found" -msgstr "%s%s: skript \"%s\" nenalezen" +msgid "" +"%s: script \"%s\" can not be removed because plugin \"%s\" is not loaded" +msgstr "" +"%sChyba: funkce \"%s\" nebyla v pluginu \"%s\" nalezena, načtení selhalo" #, fuzzy, c-format msgid "%s: script \"%s\" is not held any more" diff --git a/po/de.po b/po/de.po index 00c042c70..72effb444 100644 --- a/po/de.po +++ b/po/de.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 10:12+0200\n" +"POT-Creation-Date: 2012-09-04 12:56+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -8775,6 +8775,10 @@ msgstr "Installierte \"%s\" Skripten:" msgid "%s: unknown language for script \"%s\"" msgstr "%s: Deinstalliere das Skript \"%s\"" +#, fuzzy, c-format +msgid "%s: plugin \"%s\" is not loaded" +msgstr "%s%s: Das Skript \"%s\" wurde nicht installiert" + #, fuzzy, c-format msgid "%s: script \"%s\" is not loaded" msgstr "%s%s: Das Skript \"%s\" wurde nicht installiert" @@ -8783,10 +8787,21 @@ msgstr "%s%s: Das Skript \"%s\" wurde nicht installiert" msgid "%s%s: error downloading script \"%s\": %s" msgstr "%s: Deinstalliere das Skript \"%s\"" +#, fuzzy, c-format +msgid "" +"%s: script \"%s\" can not be installed because plugin \"%s\" is not loaded" +msgstr "" +"%sFehler: Funktion \"%s\" nicht in Erweiterung \"%s\" gefunden. Installation " +"fehlgeschlagen" + #, fuzzy, c-format msgid "%s: downloading script \"%s\"..." msgstr "%s: Deinstalliere das Skript \"%s\"" +#, fuzzy, c-format +msgid "%s: script \"%s\" not found" +msgstr "%s%s: Skript \"%s\" wurde nicht gefunden" + #, fuzzy, c-format msgid "%s: script \"%s\" is not installed" msgstr "%s%s: Das Skript \"%s\" wurde nicht installiert" @@ -8796,8 +8811,11 @@ msgid "%s: script \"%s\" is held" msgstr "%s: Das Skript \"%s\" wurde deinstalliert" #, fuzzy, c-format -msgid "%s: script \"%s\" not found" -msgstr "%s%s: Skript \"%s\" wurde nicht gefunden" +msgid "" +"%s: script \"%s\" can not be removed because plugin \"%s\" is not loaded" +msgstr "" +"%sFehler: Funktion \"%s\" nicht in Erweiterung \"%s\" gefunden. Installation " +"fehlgeschlagen" #, fuzzy, c-format msgid "%s: script \"%s\" is not held any more" diff --git a/po/es.po b/po/es.po index 3fe2bfea6..9cd963a3d 100644 --- a/po/es.po +++ b/po/es.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 10:12+0200\n" +"POT-Creation-Date: 2012-09-04 12:56+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -8478,6 +8478,10 @@ msgstr "scripts en %s cargados:" msgid "%s: unknown language for script \"%s\"" msgstr "%s: descargando el script \"%s\"" +#, fuzzy, c-format +msgid "%s: plugin \"%s\" is not loaded" +msgstr "%s%s: el script \"%s\" no está cargado" + #, fuzzy, c-format msgid "%s: script \"%s\" is not loaded" msgstr "%s%s: el script \"%s\" no está cargado" @@ -8486,10 +8490,20 @@ msgstr "%s%s: el script \"%s\" no está cargado" msgid "%s%s: error downloading script \"%s\": %s" msgstr "%s: descargando el script \"%s\"" +#, fuzzy, c-format +msgid "" +"%s: script \"%s\" can not be installed because plugin \"%s\" is not loaded" +msgstr "" +"%sError: función \"%s\" no encontrada en el plugin \"%s\", no se puede cargar" + #, fuzzy, c-format msgid "%s: downloading script \"%s\"..." msgstr "%s: descargando el script \"%s\"" +#, fuzzy, c-format +msgid "%s: script \"%s\" not found" +msgstr "%s%s: script \"%s\" no encontrado" + #, fuzzy, c-format msgid "%s: script \"%s\" is not installed" msgstr "%s%s: el script \"%s\" no está cargado" @@ -8499,8 +8513,10 @@ msgid "%s: script \"%s\" is held" msgstr "%s: script \"%s\" descargado" #, fuzzy, c-format -msgid "%s: script \"%s\" not found" -msgstr "%s%s: script \"%s\" no encontrado" +msgid "" +"%s: script \"%s\" can not be removed because plugin \"%s\" is not loaded" +msgstr "" +"%sError: función \"%s\" no encontrada en el plugin \"%s\", no se puede cargar" #, fuzzy, c-format msgid "%s: script \"%s\" is not held any more" diff --git a/po/fr.po b/po/fr.po index 664600053..3b78b6ee9 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 10:12+0200\n" -"PO-Revision-Date: 2012-09-03 09:58+0200\n" +"POT-Creation-Date: 2012-09-04 12:56+0200\n" +"PO-Revision-Date: 2012-09-04 12:24+0200\n" "Last-Translator: Sebastien Helleu \n" "Language-Team: weechat-dev \n" "Language: French\n" @@ -8556,6 +8556,10 @@ msgstr "Scripts chargés:" msgid "%s: unknown language for script \"%s\"" msgstr "%s: langage inconnu pour le script \"%s\"" +#, c-format +msgid "%s: plugin \"%s\" is not loaded" +msgstr "%s: l'extension \"%s\" n'est pas chargée" + #, c-format msgid "%s: script \"%s\" is not loaded" msgstr "%s: script \"%s\" non chargé" @@ -8564,10 +8568,21 @@ msgstr "%s: script \"%s\" non chargé" msgid "%s%s: error downloading script \"%s\": %s" msgstr "%s%s: erreur de téléchargement du script \"%s\": %s" +#, c-format +msgid "" +"%s: script \"%s\" can not be installed because plugin \"%s\" is not loaded" +msgstr "" +"%s: le script \"%s\" ne peut pas être installé car l'extension \"%s\" n'est " +"pas chargée" + #, c-format msgid "%s: downloading script \"%s\"..." msgstr "%s: téléchargement du script \"%s\"..." +#, c-format +msgid "%s: script \"%s\" not found" +msgstr "%s: script \"%s\" non trouvé" + #, c-format msgid "%s: script \"%s\" is not installed" msgstr "%s: le script \"%s\" n'est pas installé" @@ -8577,8 +8592,11 @@ msgid "%s: script \"%s\" is held" msgstr "%s: le script \"%s\" est figé" #, c-format -msgid "%s: script \"%s\" not found" -msgstr "%s: script \"%s\" non trouvé" +msgid "" +"%s: script \"%s\" can not be removed because plugin \"%s\" is not loaded" +msgstr "" +"%s: le script \"%s\" ne peut pas être supprimé car l'extension \"%s\" n'est " +"pas chargée" #, c-format msgid "%s: script \"%s\" is not held any more" diff --git a/po/hu.po b/po/hu.po index 474d7e71d..1a62cb0ed 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 10:12+0200\n" +"POT-Creation-Date: 2012-09-04 12:56+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -7681,6 +7681,10 @@ msgstr "FIFO cső bezárva\n" msgid "%s: unknown language for script \"%s\"" msgstr "folyamat: \"%s\" szerver betöltése\n" +#, fuzzy, c-format +msgid "%s: plugin \"%s\" is not loaded" +msgstr "%s a \"%s\" szerver nem található\n" + #, fuzzy, c-format msgid "%s: script \"%s\" is not loaded" msgstr "%s a \"%s\" szerver nem található\n" @@ -7689,10 +7693,21 @@ msgstr "%s a \"%s\" szerver nem található\n" msgid "%s%s: error downloading script \"%s\": %s" msgstr "folyamat: \"%s\" szerver betöltése\n" +#, fuzzy, c-format +msgid "" +"%s: script \"%s\" can not be installed because plugin \"%s\" is not loaded" +msgstr "" +"%s a \"weechat_plugin_init\" függvény nem található a \"%s\" modulban, " +"betöltés sikertelen\n" + #, fuzzy, c-format msgid "%s: downloading script \"%s\"..." msgstr "folyamat: \"%s\" szerver betöltése\n" +#, fuzzy, c-format +msgid "%s: script \"%s\" not found" +msgstr "%s a \"%s\" szerver nem található\n" + #, fuzzy, c-format msgid "%s: script \"%s\" is not installed" msgstr "%s a \"%s\" szerver nem található\n" @@ -7702,8 +7717,11 @@ msgid "%s: script \"%s\" is held" msgstr "A \"%s\" modul eltávolítva.\n" #, fuzzy, c-format -msgid "%s: script \"%s\" not found" -msgstr "%s a \"%s\" szerver nem található\n" +msgid "" +"%s: script \"%s\" can not be removed because plugin \"%s\" is not loaded" +msgstr "" +"%s a \"weechat_plugin_init\" függvény nem található a \"%s\" modulban, " +"betöltés sikertelen\n" #, fuzzy, c-format msgid "%s: script \"%s\" is not held any more" diff --git a/po/it.po b/po/it.po index 2542ad201..441ee25e6 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 10:12+0200\n" +"POT-Creation-Date: 2012-09-04 12:56+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Marco Paolone \n" "Language-Team: weechat-dev \n" @@ -8468,6 +8468,10 @@ msgstr "script %s caricati:" msgid "%s: unknown language for script \"%s\"" msgstr "%s: scaricamento dello script \"%s\"" +#, fuzzy, c-format +msgid "%s: plugin \"%s\" is not loaded" +msgstr "%s%s: script \"%s\" non caricato" + #, fuzzy, c-format msgid "%s: script \"%s\" is not loaded" msgstr "%s%s: script \"%s\" non caricato" @@ -8476,10 +8480,21 @@ msgstr "%s%s: script \"%s\" non caricato" msgid "%s%s: error downloading script \"%s\": %s" msgstr "%s: scaricamento dello script \"%s\"" +#, fuzzy, c-format +msgid "" +"%s: script \"%s\" can not be installed because plugin \"%s\" is not loaded" +msgstr "" +"%sErrore: funzione \"%s\" non trovata nel plugin \"%s\", impossibile " +"caricarlo" + #, fuzzy, c-format msgid "%s: downloading script \"%s\"..." msgstr "%s: scaricamento dello script \"%s\"" +#, fuzzy, c-format +msgid "%s: script \"%s\" not found" +msgstr "%s%s: script \"%s\" non trovato" + #, fuzzy, c-format msgid "%s: script \"%s\" is not installed" msgstr "%s%s: script \"%s\" non caricato" @@ -8489,8 +8504,11 @@ msgid "%s: script \"%s\" is held" msgstr "%s: script \"%s\" scaricato" #, fuzzy, c-format -msgid "%s: script \"%s\" not found" -msgstr "%s%s: script \"%s\" non trovato" +msgid "" +"%s: script \"%s\" can not be removed because plugin \"%s\" is not loaded" +msgstr "" +"%sErrore: funzione \"%s\" non trovata nel plugin \"%s\", impossibile " +"caricarlo" #, fuzzy, c-format msgid "%s: script \"%s\" is not held any more" diff --git a/po/ja.po b/po/ja.po index 4e60a3887..f5ce5902a 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 10:12+0200\n" +"POT-Creation-Date: 2012-09-04 12:56+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" @@ -8267,6 +8267,10 @@ msgstr "ロードされた %s スクリプト:" msgid "%s: unknown language for script \"%s\"" msgstr "%s: スクリプト \"%s\" のアンロード中" +#, fuzzy, c-format +msgid "%s: plugin \"%s\" is not loaded" +msgstr "%s%s: スクリプト \"%s\" はロードされていません" + #, fuzzy, c-format msgid "%s: script \"%s\" is not loaded" msgstr "%s%s: スクリプト \"%s\" はロードされていません" @@ -8275,10 +8279,20 @@ msgstr "%s%s: スクリプト \"%s\" はロードされていません" msgid "%s%s: error downloading script \"%s\": %s" msgstr "%s: スクリプト \"%s\" のアンロード中" +#, fuzzy, c-format +msgid "" +"%s: script \"%s\" can not be installed because plugin \"%s\" is not loaded" +msgstr "" +"%sエラー: 関数 \"%s\" がプラグイン \"%s\" の中に見つかりません、ロード失敗" + #, fuzzy, c-format msgid "%s: downloading script \"%s\"..." msgstr "%s: スクリプト \"%s\" のアンロード中" +#, fuzzy, c-format +msgid "%s: script \"%s\" not found" +msgstr "%s%s: スクリプト \"%s\" が見つかりません" + #, fuzzy, c-format msgid "%s: script \"%s\" is not installed" msgstr "%s%s: スクリプト \"%s\" はロードされていません" @@ -8288,8 +8302,10 @@ msgid "%s: script \"%s\" is held" msgstr "%s: スクリプト \"%s\" がアンロードされました" #, fuzzy, c-format -msgid "%s: script \"%s\" not found" -msgstr "%s%s: スクリプト \"%s\" が見つかりません" +msgid "" +"%s: script \"%s\" can not be removed because plugin \"%s\" is not loaded" +msgstr "" +"%sエラー: 関数 \"%s\" がプラグイン \"%s\" の中に見つかりません、ロード失敗" #, fuzzy, c-format msgid "%s: script \"%s\" is not held any more" diff --git a/po/pl.po b/po/pl.po index ecb1771c3..98ad84b46 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 10:12+0200\n" +"POT-Creation-Date: 2012-09-04 12:56+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: weechat-dev \n" @@ -8401,6 +8401,10 @@ msgstr "załadowano skrypt %s:" msgid "%s: unknown language for script \"%s\"" msgstr "%s: wyładowuję skrypt \"%s\"" +#, fuzzy, c-format +msgid "%s: plugin \"%s\" is not loaded" +msgstr "%s%s: skrypt \"%s\" nie załadowany" + #, fuzzy, c-format msgid "%s: script \"%s\" is not loaded" msgstr "%s%s: skrypt \"%s\" nie załadowany" @@ -8409,10 +8413,21 @@ msgstr "%s%s: skrypt \"%s\" nie załadowany" msgid "%s%s: error downloading script \"%s\": %s" msgstr "%s: wyładowuję skrypt \"%s\"" +#, fuzzy, c-format +msgid "" +"%s: script \"%s\" can not be installed because plugin \"%s\" is not loaded" +msgstr "" +"%sBłąd: funkcja \"%s\" nie znaleziona we wtyczce \"%s\", nie udało się " +"załadować" + #, fuzzy, c-format msgid "%s: downloading script \"%s\"..." msgstr "%s: wyładowuję skrypt \"%s\"" +#, fuzzy, c-format +msgid "%s: script \"%s\" not found" +msgstr "%s%s: nie znaleziono skryptu \"%s\"" + #, fuzzy, c-format msgid "%s: script \"%s\" is not installed" msgstr "%s%s: skrypt \"%s\" nie załadowany" @@ -8422,8 +8437,11 @@ msgid "%s: script \"%s\" is held" msgstr "%s: skrypt \"%s\" wyładowano" #, fuzzy, c-format -msgid "%s: script \"%s\" not found" -msgstr "%s%s: nie znaleziono skryptu \"%s\"" +msgid "" +"%s: script \"%s\" can not be removed because plugin \"%s\" is not loaded" +msgstr "" +"%sBłąd: funkcja \"%s\" nie znaleziona we wtyczce \"%s\", nie udało się " +"załadować" #, fuzzy, c-format msgid "%s: script \"%s\" is not held any more" diff --git a/po/pt_BR.po b/po/pt_BR.po index ab432430b..97e221d0b 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 10:12+0200\n" +"POT-Creation-Date: 2012-09-04 12:56+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Sergio Durigan Junior \n" "Language-Team: weechat-dev \n" @@ -7834,6 +7834,10 @@ msgstr "scripts %s carregados:" msgid "%s: unknown language for script \"%s\"" msgstr "%s: descarregando script \"%s\"" +#, fuzzy, c-format +msgid "%s: plugin \"%s\" is not loaded" +msgstr "%s%s: script \"%s\" não carregado" + #, fuzzy, c-format msgid "%s: script \"%s\" is not loaded" msgstr "%s%s: script \"%s\" não carregado" @@ -7842,10 +7846,20 @@ msgstr "%s%s: script \"%s\" não carregado" msgid "%s%s: error downloading script \"%s\": %s" msgstr "%s: descarregando script \"%s\"" +#, fuzzy, c-format +msgid "" +"%s: script \"%s\" can not be installed because plugin \"%s\" is not loaded" +msgstr "" +"%sErro: função \"%s\" não encontrada no plugin \"%s\", falhou ao carregar" + #, fuzzy, c-format msgid "%s: downloading script \"%s\"..." msgstr "%s: descarregando script \"%s\"" +#, fuzzy, c-format +msgid "%s: script \"%s\" not found" +msgstr "%s%s: script \"%s\" não encontrado" + #, fuzzy, c-format msgid "%s: script \"%s\" is not installed" msgstr "%s%s: script \"%s\" não carregado" @@ -7855,8 +7869,10 @@ msgid "%s: script \"%s\" is held" msgstr "%s: script \"%s\" descarregado" #, fuzzy, c-format -msgid "%s: script \"%s\" not found" -msgstr "%s%s: script \"%s\" não encontrado" +msgid "" +"%s: script \"%s\" can not be removed because plugin \"%s\" is not loaded" +msgstr "" +"%sErro: função \"%s\" não encontrada no plugin \"%s\", falhou ao carregar" #, fuzzy, c-format msgid "%s: script \"%s\" is not held any more" diff --git a/po/ru.po b/po/ru.po index 56bfc5931..a09946702 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 10:12+0200\n" +"POT-Creation-Date: 2012-09-04 12:56+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -7704,6 +7704,10 @@ msgstr "FIFO pipe закрыт\n" msgid "%s: unknown language for script \"%s\"" msgstr "сессия: загружаю сервер \"%s\"\n" +#, fuzzy, c-format +msgid "%s: plugin \"%s\" is not loaded" +msgstr "%s сервер \"%s\" не найден\n" + #, fuzzy, c-format msgid "%s: script \"%s\" is not loaded" msgstr "%s сервер \"%s\" не найден\n" @@ -7712,10 +7716,21 @@ msgstr "%s сервер \"%s\" не найден\n" msgid "%s%s: error downloading script \"%s\": %s" msgstr "сессия: загружаю сервер \"%s\"\n" +#, fuzzy, c-format +msgid "" +"%s: script \"%s\" can not be installed because plugin \"%s\" is not loaded" +msgstr "" +"%s функция \"weechat_plugin_init\" не найдена в plugin'е \"%s\", загрузка не " +"удалась\n" + #, fuzzy, c-format msgid "%s: downloading script \"%s\"..." msgstr "сессия: загружаю сервер \"%s\"\n" +#, fuzzy, c-format +msgid "%s: script \"%s\" not found" +msgstr "%s сервер \"%s\" не найден\n" + #, fuzzy, c-format msgid "%s: script \"%s\" is not installed" msgstr "%s сервер \"%s\" не найден\n" @@ -7725,8 +7740,11 @@ msgid "%s: script \"%s\" is held" msgstr "Plugin \"%s\" выгружен.\n" #, fuzzy, c-format -msgid "%s: script \"%s\" not found" -msgstr "%s сервер \"%s\" не найден\n" +msgid "" +"%s: script \"%s\" can not be removed because plugin \"%s\" is not loaded" +msgstr "" +"%s функция \"weechat_plugin_init\" не найдена в plugin'е \"%s\", загрузка не " +"удалась\n" #, fuzzy, c-format msgid "%s: script \"%s\" is not held any more" diff --git a/po/weechat.pot b/po/weechat.pot index f006868d3..f84009f8f 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: 2012-09-03 10:12+0200\n" +"POT-Creation-Date: 2012-09-04 12:56+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -6762,6 +6762,10 @@ msgstr "" msgid "%s: unknown language for script \"%s\"" msgstr "" +#, c-format +msgid "%s: plugin \"%s\" is not loaded" +msgstr "" + #, c-format msgid "%s: script \"%s\" is not loaded" msgstr "" @@ -6770,10 +6774,19 @@ msgstr "" msgid "%s%s: error downloading script \"%s\": %s" msgstr "" +#, c-format +msgid "" +"%s: script \"%s\" can not be installed because plugin \"%s\" is not loaded" +msgstr "" + #, c-format msgid "%s: downloading script \"%s\"..." msgstr "" +#, c-format +msgid "%s: script \"%s\" not found" +msgstr "" + #, c-format msgid "%s: script \"%s\" is not installed" msgstr "" @@ -6783,7 +6796,8 @@ msgid "%s: script \"%s\" is held" msgstr "" #, c-format -msgid "%s: script \"%s\" not found" +msgid "" +"%s: script \"%s\" can not be removed because plugin \"%s\" is not loaded" msgstr "" #, c-format diff --git a/src/plugins/script/script-action.c b/src/plugins/script/script-action.c index a55a87fdf..2f8ebab50 100644 --- a/src/plugins/script/script-action.c +++ b/src/plugins/script/script-action.c @@ -61,7 +61,7 @@ script_action_list () scripts_loaded = 0; - for (i = 0; script_language[i]; i++) + for (i = 0; i < SCRIPT_NUM_LANGUAGES; i++) { snprintf (hdata_name, sizeof (hdata_name), "%s_script", script_language[i]); @@ -114,7 +114,7 @@ script_action_list_input (int send_to_buffer) buf[0] = '\0'; length = 0; - for (i = 0; script_language[i]; i++) + for (i = 0; i < SCRIPT_NUM_LANGUAGES; i++) { snprintf (hdata_name, sizeof (hdata_name), "%s_script", script_language[i]); @@ -178,6 +178,15 @@ script_action_load (const char *name, int quiet) return; } + /* check that plugin for this language is loaded */ + if (!script_plugin_loaded[language]) + { + weechat_printf (NULL, + _("%s: plugin \"%s\" is not loaded"), + SCRIPT_PLUGIN_NAME, script_language[language]); + return; + } + /* execute command (for example: "/perl load iset.pl") */ snprintf (str_command, sizeof (str_command), "/%s load %s%s", @@ -260,7 +269,7 @@ script_action_unload (const char *name, int quiet) else { /* unload script by using name (example: "iset") */ - for (i = 0; script_language[i]; i++) + for (i = 0; i < SCRIPT_NUM_LANGUAGES; i++) { snprintf (hdata_name, sizeof (hdata_name), "%s_script", script_language[i]); @@ -366,7 +375,7 @@ script_action_reload (const char *name, int quiet) else { /* reload script by using name (example: "iset") */ - for (i = 0; script_language[i]; i++) + for (i = 0; i < SCRIPT_NUM_LANGUAGES; i++) { snprintf (hdata_name, sizeof (hdata_name), "%s_script", script_language[i]); @@ -426,7 +435,7 @@ script_action_install_process_cb (void *data, const char *command, { char *pos, *filename, *filename2, str_signal[256]; int quiet, length; - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; quiet = (data) ? 1 : 0; @@ -485,20 +494,19 @@ script_action_install_process_cb (void *data, const char *command, } /* - * script_action_install: install script(s) marked for install + * script_action_get_next_script_to_install: get next script to install + * according to "install_order" in + * script */ -void -script_action_install (int quiet) +struct t_script_repo * +script_action_get_next_script_to_install () { - struct t_repo_script *ptr_script, *ptr_script_to_install; - char *filename, *url; - int length; - struct t_hashtable *options; + struct t_script_repo *ptr_script, *ptr_script_to_install; ptr_script_to_install = NULL; - for (ptr_script = repo_scripts; ptr_script; + for (ptr_script = scripts_repo; ptr_script; ptr_script = ptr_script->next_script) { if (ptr_script->install_order > 0) @@ -509,43 +517,79 @@ script_action_install (int quiet) } } - if (ptr_script_to_install) - { - filename = script_config_get_script_download_filename (ptr_script_to_install, - NULL); - if (filename) - { - options = weechat_hashtable_new (8, - WEECHAT_HASHTABLE_STRING, - WEECHAT_HASHTABLE_STRING, - NULL, - NULL); - if (options) - { - length = 4 + strlen (ptr_script_to_install->url) + 1; - url = malloc (length); - if (url) - { - if (!weechat_config_boolean (script_config_look_quiet_actions)) - { - weechat_printf (NULL, - _("%s: downloading script \"%s\"..."), - SCRIPT_PLUGIN_NAME, - ptr_script_to_install->name_with_extension); - } + return ptr_script_to_install; +} - snprintf (url, length, "url:%s", - ptr_script_to_install->url); - weechat_hashtable_set (options, "file_out", filename); - weechat_hook_process_hashtable (url, options, 30000, - &script_action_install_process_cb, - (quiet) ? (void *)1 : (void *)0); - free (url); +/* + * script_action_install: install script(s) marked for install + */ + +void +script_action_install (int quiet) +{ + struct t_script_repo *ptr_script_to_install; + char *filename, *url; + int length; + struct t_hashtable *options; + + while (1) + { + ptr_script_to_install = script_action_get_next_script_to_install (); + + /* no more script to install? just exit function */ + if (!ptr_script_to_install) + return; + + /* + * script to install and plugin is loaded: exit loop and go on with + * install + */ + if (script_plugin_loaded[ptr_script_to_install->language]) + break; + + /* plugin not loaded for language of script: display error */ + weechat_printf (NULL, + _("%s: script \"%s\" can not be installed because " + "plugin \"%s\" is not loaded"), + SCRIPT_PLUGIN_NAME, + ptr_script_to_install->name_with_extension, + script_language[ptr_script_to_install->language]); + } + + filename = script_config_get_script_download_filename (ptr_script_to_install, + NULL); + if (filename) + { + options = weechat_hashtable_new (8, + WEECHAT_HASHTABLE_STRING, + WEECHAT_HASHTABLE_STRING, + NULL, + NULL); + if (options) + { + length = 4 + strlen (ptr_script_to_install->url) + 1; + url = malloc (length); + if (url) + { + if (!weechat_config_boolean (script_config_look_quiet_actions)) + { + weechat_printf (NULL, + _("%s: downloading script \"%s\"..."), + SCRIPT_PLUGIN_NAME, + ptr_script_to_install->name_with_extension); } - weechat_hashtable_free (options); + + snprintf (url, length, "url:%s", + ptr_script_to_install->url); + weechat_hashtable_set (options, "file_out", filename); + weechat_hook_process_hashtable (url, options, 30000, + &script_action_install_process_cb, + (quiet) ? (void *)1 : (void *)0); + free (url); } - free (filename); + weechat_hashtable_free (options); } + free (filename); } } @@ -556,52 +600,12 @@ script_action_install (int quiet) void script_action_remove (const char *name, int quiet) { - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; char str_signal[256], *filename; int length; ptr_script = script_repo_search_by_name_ext (name); - if (ptr_script) - { - if (!(ptr_script->status & SCRIPT_STATUS_INSTALLED)) - { - if (!quiet) - { - weechat_printf (NULL, - _("%s: script \"%s\" is not installed"), - SCRIPT_PLUGIN_NAME, name); - } - } - else if (ptr_script->status & SCRIPT_STATUS_HELD) - { - if (!quiet) - { - weechat_printf (NULL, - _("%s: script \"%s\" is held"), - SCRIPT_PLUGIN_NAME, name); - } - } - else - { - length = 3 + strlen (ptr_script->name_with_extension) + 1; - filename = malloc (length); - if (filename) - { - snprintf (filename, length, - "%s%s", - (quiet && weechat_config_boolean (script_config_look_quiet_actions)) ? "-q " : "", - ptr_script->name_with_extension); - snprintf (str_signal, sizeof (str_signal), - "%s_script_remove", - script_language[ptr_script->language]); - weechat_hook_signal_send (str_signal, - WEECHAT_HOOK_SIGNAL_STRING, - filename); - free (filename); - } - } - } - else + if (!ptr_script) { if (!quiet) { @@ -609,6 +613,61 @@ script_action_remove (const char *name, int quiet) _("%s: script \"%s\" not found"), SCRIPT_PLUGIN_NAME, name); } + return; + } + + /* check that script is installed */ + if (!(ptr_script->status & SCRIPT_STATUS_INSTALLED)) + { + if (!quiet) + { + weechat_printf (NULL, + _("%s: script \"%s\" is not installed"), + SCRIPT_PLUGIN_NAME, name); + } + return; + } + + /* check that script is not held */ + if (ptr_script->status & SCRIPT_STATUS_HELD) + { + if (!quiet) + { + weechat_printf (NULL, + _("%s: script \"%s\" is held"), + SCRIPT_PLUGIN_NAME, name); + } + return; + } + + /* check that plugin for this language is loaded */ + if (!script_plugin_loaded[ptr_script->language]) + { + weechat_printf (NULL, + _("%s: script \"%s\" can not be removed " + "because plugin \"%s\" is not loaded"), + SCRIPT_PLUGIN_NAME, + ptr_script->name_with_extension, + script_language[ptr_script->language]); + return; + } + + /* ask plugin to remove script */ + length = 3 + strlen (ptr_script->name_with_extension) + 1; + filename = malloc (length); + if (filename) + { + snprintf (filename, length, + "%s%s", + (quiet && weechat_config_boolean (script_config_look_quiet_actions)) ? "-q " : "", + ptr_script->name_with_extension); + snprintf (str_signal, sizeof (str_signal), + "%s_script_remove", + script_language[ptr_script->language]); + weechat_hook_signal_send (str_signal, + WEECHAT_HOOK_SIGNAL_STRING, + filename); + free (filename); } } @@ -620,7 +679,7 @@ script_action_remove (const char *name, int quiet) int script_action_hold (const char *name, int quiet) { - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; ptr_script = script_repo_search_by_name_ext (name); if (ptr_script) @@ -768,7 +827,7 @@ script_action_show_source_process_cb (void *data, const char *command, char *pos, *filename, *filename_loaded, line[4096], *ptr_line; char *diff_command; const char *ptr_diff_command; - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; FILE *file; int length, diff_made; @@ -898,7 +957,7 @@ script_action_show_source_process_cb (void *data, const char *command, void script_action_show (const char *name, int quiet) { - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; char *filename, *url; int length; struct t_hashtable *options; @@ -1016,7 +1075,7 @@ script_action_run () { char **actions, **argv, **argv_eol, *ptr_action; int num_actions, argc, i, j, quiet, script_found; - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; if (!script_actions) return 0; @@ -1204,7 +1263,7 @@ script_action_run () else if (weechat_strcasecmp (argv[0], "upgrade") == 0) { script_found = 0; - for (ptr_script = repo_scripts; ptr_script; + for (ptr_script = scripts_repo; ptr_script; ptr_script = ptr_script->next_script) { /* @@ -1287,7 +1346,7 @@ script_action_schedule (const char *action, int need_repository, int quiet) { if (script_repo_file_is_uptodate ()) { - if (!repo_scripts) + if (!scripts_repo) script_repo_file_read (quiet); script_action_run (); } diff --git a/src/plugins/script/script-buffer.c b/src/plugins/script/script-buffer.c index 1be10b02e..4192b6c73 100644 --- a/src/plugins/script/script-buffer.c +++ b/src/plugins/script/script-buffer.c @@ -35,7 +35,7 @@ struct t_gui_buffer *script_buffer = NULL; int script_buffer_selected_line = 0; -struct t_repo_script *script_buffer_detail_script = NULL; +struct t_script_repo *script_buffer_detail_script = NULL; int script_buffer_detail_script_last_line = 0; int script_buffer_detail_script_line_diff = -1; @@ -45,7 +45,7 @@ int script_buffer_detail_script_line_diff = -1; */ void -script_buffer_display_line_script (int line, struct t_repo_script *script) +script_buffer_display_line_script (int line, struct t_script_repo *script) { char str_line[16384], str_item[1024], str_color_name[256], str_color[32]; char str_format[256], str_date[64], str_key[2], utf_char[16], *tags; @@ -359,7 +359,7 @@ script_buffer_detail_label (const char *text, int max_length) */ void -script_buffer_display_detail_script (struct t_repo_script *script) +script_buffer_display_detail_script (struct t_script_repo *script) { struct tm *tm; char str_time[1024]; @@ -487,7 +487,7 @@ script_buffer_display_detail_script (struct t_repo_script *script) void script_buffer_refresh (int clear) { - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; int line; char str_title[1024]; @@ -530,7 +530,7 @@ script_buffer_refresh (int clear) { /* list of scripts */ line = 0; - for (ptr_script = repo_scripts; ptr_script; + for (ptr_script = scripts_repo; ptr_script; ptr_script = ptr_script->next_script) { if (ptr_script->displayed) @@ -568,7 +568,7 @@ script_buffer_set_current_line (int line) */ void -script_buffer_show_detail_script (struct t_repo_script *script) +script_buffer_show_detail_script (struct t_script_repo *script) { if (!script_buffer) return; @@ -743,7 +743,7 @@ script_buffer_input_cb (void *data, struct t_gui_buffer *buffer, /* refresh buffer */ if (strcmp (input_data, "$") == 0) { - script_get_loaded_scripts (); + script_get_loaded_plugins_and_scripts (); script_repo_remove_all (); script_repo_file_read (1); script_buffer_refresh (1); diff --git a/src/plugins/script/script-buffer.h b/src/plugins/script/script-buffer.h index 407c66460..d8f00a110 100644 --- a/src/plugins/script/script-buffer.h +++ b/src/plugins/script/script-buffer.h @@ -22,17 +22,17 @@ #define SCRIPT_BUFFER_NAME "scripts" -struct t_repo_script; +struct t_script_repo; extern struct t_gui_buffer *script_buffer; extern int script_buffer_selected_line; -extern struct t_repo_script *script_buffer_detail_script; +extern struct t_script_repo *script_buffer_detail_script; extern int script_buffer_detail_script_last_line; extern int script_buffer_detail_script_line_diff; extern void script_buffer_refresh (int clear); extern void script_buffer_set_current_line (int line); -extern void script_buffer_show_detail_script (struct t_repo_script *script); +extern void script_buffer_show_detail_script (struct t_script_repo *script); extern void script_buffer_get_window_info (struct t_gui_window *window, int *start_line_y, int *chat_height); extern void script_buffer_check_line_outside_window (); diff --git a/src/plugins/script/script-command.c b/src/plugins/script/script-command.c index 6f3ae7d5d..b8c230967 100644 --- a/src/plugins/script/script-command.c +++ b/src/plugins/script/script-command.c @@ -42,7 +42,7 @@ void script_command_action (struct t_gui_buffer *buffer, const char *action, const char *arguments, int need_repository) { - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; char str_action[4096]; long value; char *error; @@ -155,7 +155,7 @@ script_command_script (void *data, struct t_gui_buffer *buffer, int argc, if (weechat_strcasecmp (argv[1], "search") == 0) { - if (repo_scripts) + if (scripts_repo) script_repo_filter_scripts ((argc > 2) ? argv_eol[2] : NULL); else script_repo_set_filter ((argc > 2) ? argv_eol[2] : NULL); diff --git a/src/plugins/script/script-completion.c b/src/plugins/script/script-completion.c index e6b61a6a0..3c0db35cd 100644 --- a/src/plugins/script/script-completion.c +++ b/src/plugins/script/script-completion.c @@ -41,14 +41,14 @@ script_completion_scripts_cb (void *data, const char *completion_item, struct t_gui_buffer *buffer, struct t_gui_completion *completion) { - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; /* make C compiler happy */ (void) data; (void) completion_item; (void) buffer; - for (ptr_script = repo_scripts; ptr_script; + for (ptr_script = scripts_repo; ptr_script; ptr_script = ptr_script->next_script) { weechat_hook_completion_list_add (completion, @@ -69,14 +69,14 @@ script_completion_scripts_installed_cb (void *data, const char *completion_item, struct t_gui_buffer *buffer, struct t_gui_completion *completion) { - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; /* make C compiler happy */ (void) data; (void) completion_item; (void) buffer; - for (ptr_script = repo_scripts; ptr_script; + for (ptr_script = scripts_repo; ptr_script; ptr_script = ptr_script->next_script) { if (ptr_script->status & SCRIPT_STATUS_INSTALLED) @@ -150,7 +150,7 @@ script_completion_scripts_files_cb (void *data, const char *completion_item, directory = malloc (length); if (directory) { - for (i = 0; script_language[i]; i++) + for (i = 0; i < SCRIPT_NUM_LANGUAGES; i++) { pointers[0] = completion; pointers[1] = script_extension[i]; @@ -183,7 +183,7 @@ script_completion_tags_cb (void *data, const char *completion_item, struct t_gui_buffer *buffer, struct t_gui_completion *completion) { - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; char **list_tags; int num_tags, i; @@ -192,7 +192,7 @@ script_completion_tags_cb (void *data, const char *completion_item, (void) completion_item; (void) buffer; - for (ptr_script = repo_scripts; ptr_script; + for (ptr_script = scripts_repo; ptr_script; ptr_script = ptr_script->next_script) { if (ptr_script->tags) diff --git a/src/plugins/script/script-config.c b/src/plugins/script/script-config.c index cedda6f42..b2997df4b 100644 --- a/src/plugins/script/script-config.c +++ b/src/plugins/script/script-config.c @@ -204,7 +204,7 @@ script_config_get_xml_filename () */ char * -script_config_get_script_download_filename (struct t_repo_script *script, +script_config_get_script_download_filename (struct t_script_repo *script, const char *suffix) { char *path, *filename; @@ -254,7 +254,7 @@ script_config_reload_scripts_cb (void *data, struct t_config_option *option) (void) data; (void) option; - if (repo_scripts) + if (scripts_repo) { script_repo_remove_all (); script_repo_file_read (1); diff --git a/src/plugins/script/script-config.h b/src/plugins/script/script-config.h index af54eed2b..543af5b06 100644 --- a/src/plugins/script/script-config.h +++ b/src/plugins/script/script-config.h @@ -22,7 +22,7 @@ #define SCRIPT_CONFIG_NAME "script" -struct t_repo_script; +struct t_script_repo; extern struct t_config_option *script_config_look_columns; extern struct t_config_option *script_config_look_diff_color; @@ -68,7 +68,7 @@ extern struct t_config_option *script_config_scripts_url; extern const char *script_config_get_diff_command (); extern char *script_config_get_dir (); extern char *script_config_get_xml_filename (); -extern char *script_config_get_script_download_filename (struct t_repo_script *script, +extern char *script_config_get_script_download_filename (struct t_script_repo *script, const char *suffix); extern void script_config_hold (const char *name_with_extension); extern void script_config_unhold (const char *name_with_extension); diff --git a/src/plugins/script/script-info.c b/src/plugins/script/script-info.c index c04959223..2b08216ed 100644 --- a/src/plugins/script/script-info.c +++ b/src/plugins/script/script-info.c @@ -39,7 +39,7 @@ script_info_get_infolist_cb (void *data, const char *infolist_name, void *pointer, const char *arguments) { struct t_infolist *ptr_infolist; - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; /* make C compiler happy */ (void) data; @@ -68,7 +68,7 @@ script_info_get_infolist_cb (void *data, const char *infolist_name, else { /* build list with all scripts matching arguments */ - for (ptr_script = repo_scripts; ptr_script; + for (ptr_script = scripts_repo; ptr_script; ptr_script = ptr_script->next_script) { if (!arguments || !arguments[0] diff --git a/src/plugins/script/script-repo.c b/src/plugins/script/script-repo.c index 5b140eb63..dd9e3533e 100644 --- a/src/plugins/script/script-repo.c +++ b/src/plugins/script/script-repo.c @@ -42,8 +42,8 @@ #include "script-config.h" -struct t_repo_script *repo_scripts = NULL; -struct t_repo_script *last_repo_script = NULL; +struct t_script_repo *scripts_repo = NULL; +struct t_script_repo *last_script_repo = NULL; int script_repo_count = 0; int script_repo_count_displayed = 0; struct t_hashtable *script_repo_max_length_field = NULL; @@ -57,14 +57,14 @@ char *script_repo_filter = NULL; */ int -script_repo_script_valid (struct t_repo_script *script) +script_repo_script_valid (struct t_script_repo *script) { - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; if (!script) return 0; - for (ptr_script = repo_scripts; ptr_script; + for (ptr_script = scripts_repo; ptr_script; ptr_script = ptr_script->next_script) { if (ptr_script == script) @@ -80,17 +80,17 @@ script_repo_script_valid (struct t_repo_script *script) * (first script displayed is 0) */ -struct t_repo_script * +struct t_script_repo * script_repo_search_displayed_by_number (int number) { - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; int i; if (number < 0) return NULL; i = 0; - for (ptr_script = repo_scripts; ptr_script; + for (ptr_script = scripts_repo; ptr_script; ptr_script = ptr_script->next_script) { if (ptr_script->displayed) @@ -110,12 +110,12 @@ script_repo_search_displayed_by_number (int number) * (example: "iset") */ -struct t_repo_script * +struct t_script_repo * script_repo_search_by_name (const char *name) { - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; - for (ptr_script = repo_scripts; ptr_script; + for (ptr_script = scripts_repo; ptr_script; ptr_script = ptr_script->next_script) { if (strcmp (ptr_script->name, name) == 0) @@ -131,12 +131,12 @@ script_repo_search_by_name (const char *name) * (example: "iset.pl") */ -struct t_repo_script * +struct t_script_repo * script_repo_search_by_name_ext (const char *name_with_extension) { - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; - for (ptr_script = repo_scripts; ptr_script; + for (ptr_script = scripts_repo; ptr_script; ptr_script = ptr_script->next_script) { if (strcmp (ptr_script->name_with_extension, name_with_extension) == 0) @@ -155,7 +155,7 @@ script_repo_search_by_name_ext (const char *name_with_extension) */ char * -script_repo_get_filename_loaded (struct t_repo_script *script) +script_repo_get_filename_loaded (struct t_script_repo *script) { const char *weechat_home; char *filename, resolved_path[PATH_MAX]; @@ -209,7 +209,7 @@ script_repo_get_filename_loaded (struct t_repo_script *script) */ const char * -script_repo_get_status_for_display (struct t_repo_script *script, +script_repo_get_status_for_display (struct t_script_repo *script, const char *list, int collapse) { @@ -267,7 +267,7 @@ script_repo_get_status_for_display (struct t_repo_script *script, */ const char * -script_repo_get_status_desc_for_display (struct t_repo_script *script, +script_repo_get_status_desc_for_display (struct t_script_repo *script, const char *list) { static char str_status[256]; @@ -346,10 +346,10 @@ script_repo_get_status_desc_for_display (struct t_repo_script *script, * script_repo_alloc: allocate a script structure */ -struct t_repo_script * +struct t_script_repo * script_repo_alloc () { - struct t_repo_script *new_script; + struct t_script_repo *new_script; new_script = malloc (sizeof (*new_script)); if (new_script) @@ -388,8 +388,8 @@ script_repo_alloc () */ int -script_repo_compare_scripts (struct t_repo_script *script1, - struct t_repo_script *script2) +script_repo_compare_scripts (struct t_script_repo *script1, + struct t_script_repo *script2) { const char *ptr_sort; int cmp, reverse; @@ -484,12 +484,12 @@ script_repo_compare_scripts (struct t_repo_script *script1, * script_repo_find_pos: find position for script in list */ -struct t_repo_script * -script_repo_find_pos (struct t_repo_script *script) +struct t_script_repo * +script_repo_find_pos (struct t_script_repo *script) { - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; - for (ptr_script = repo_scripts; ptr_script; + for (ptr_script = scripts_repo; ptr_script; ptr_script = ptr_script->next_script) { if (script_repo_compare_scripts (ptr_script, script) > 0) @@ -520,9 +520,9 @@ script_repo_set_max_length_field (const char *field, int length) */ void -script_repo_add (struct t_repo_script *script) +script_repo_add (struct t_script_repo *script) { - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; ptr_script = script_repo_find_pos (script); if (ptr_script) @@ -533,19 +533,19 @@ script_repo_add (struct t_repo_script *script) if (ptr_script->prev_script) (ptr_script->prev_script)->next_script = script; else - repo_scripts = script; + scripts_repo = script; ptr_script->prev_script = script; } else { /* add script to the end */ - script->prev_script = last_repo_script; + script->prev_script = last_script_repo; script->next_script = NULL; - if (repo_scripts) - last_repo_script->next_script = script; + if (scripts_repo) + last_script_repo->next_script = script; else - repo_scripts = script; - last_repo_script = script; + scripts_repo = script; + last_script_repo = script; } /* set max length for fields */ @@ -587,7 +587,7 @@ script_repo_add (struct t_repo_script *script) */ void -script_repo_free (struct t_repo_script *script) +script_repo_free (struct t_script_repo *script) { if (script->name) free (script->name); @@ -626,20 +626,20 @@ script_repo_free (struct t_repo_script *script) */ void -script_repo_remove (struct t_repo_script *script) +script_repo_remove (struct t_script_repo *script) { - struct t_repo_script *new_repo_scripts; + struct t_script_repo *new_scripts_repo; /* remove script from list */ - if (last_repo_script == script) - last_repo_script = script->prev_script; + if (last_script_repo == script) + last_script_repo = script->prev_script; if (script->prev_script) { (script->prev_script)->next_script = script->next_script; - new_repo_scripts = repo_scripts; + new_scripts_repo = scripts_repo; } else - new_repo_scripts = script->next_script; + new_scripts_repo = script->next_script; if (script->next_script) (script->next_script)->prev_script = script->prev_script; @@ -648,7 +648,7 @@ script_repo_remove (struct t_repo_script *script) script_repo_count_displayed--; script_repo_free (script); - repo_scripts = new_repo_scripts; + scripts_repo = new_scripts_repo; script_repo_count--; @@ -666,9 +666,9 @@ script_repo_remove (struct t_repo_script *script) void script_repo_remove_all () { - while (repo_scripts) + while (scripts_repo) { - script_repo_remove (repo_scripts); + script_repo_remove (scripts_repo); } if (script_repo_max_length_field) { @@ -682,7 +682,7 @@ script_repo_remove_all () */ int -script_repo_script_is_held (struct t_repo_script *script) +script_repo_script_is_held (struct t_script_repo *script) { const char *hold; char *pos; @@ -764,13 +764,13 @@ script_repo_md5sum_file (const char *filename) */ void -script_repo_update_status (struct t_repo_script *script) +script_repo_update_status (struct t_script_repo *script) { const char *weechat_home, *version; char *filename, *md5sum; struct stat st; int length; - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; script->status = 0; md5sum = NULL; @@ -837,7 +837,7 @@ script_repo_update_status (struct t_repo_script *script) { length = 0; weechat_hashtable_set (script_repo_max_length_field, "V", &length); - for (ptr_script = repo_scripts; ptr_script; + for (ptr_script = scripts_repo; ptr_script; ptr_script = ptr_script->next_script) { if (ptr_script->version_loaded) @@ -856,9 +856,9 @@ script_repo_update_status (struct t_repo_script *script) void script_repo_update_status_all () { - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; - for (ptr_script = repo_scripts; ptr_script; + for (ptr_script = scripts_repo; ptr_script; ptr_script = ptr_script->next_script) { script_repo_update_status (ptr_script); @@ -883,7 +883,7 @@ script_repo_set_filter (const char *filter) */ int -script_repo_match_filter (struct t_repo_script *script) +script_repo_match_filter (struct t_script_repo *script) { char **words, **tags; int num_words, num_tags, has_tag, match, i, j; @@ -957,13 +957,13 @@ script_repo_match_filter (struct t_repo_script *script) void script_repo_filter_scripts (const char *search) { - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; script_repo_set_filter (search); script_repo_count_displayed = 0; - for (ptr_script = repo_scripts; ptr_script; + for (ptr_script = scripts_repo; ptr_script; ptr_script = ptr_script->next_script) { ptr_script->displayed = (script_repo_match_filter (ptr_script)); @@ -1066,12 +1066,12 @@ script_repo_file_read (int quiet) char *locale, *locale_language; const char *version, *ptr_locale, *ptr_desc; gzFile file; - struct t_repo_script *script; + struct t_script_repo *script; int version_number, version_ok, script_ok, length; struct tm tm_script; struct t_hashtable *descriptions; - script_get_loaded_scripts (); + script_get_loaded_plugins_and_scripts (); script_repo_remove_all (); @@ -1327,7 +1327,7 @@ script_repo_file_read (int quiet) gzclose (file); - if (repo_scripts && !quiet) + if (scripts_repo && !quiet) { weechat_printf (NULL, _("%s: %d scripts for WeeChat %s"), @@ -1335,7 +1335,7 @@ script_repo_file_read (int quiet) weechat_info_get ("version", NULL)); } - if (!repo_scripts) + if (!scripts_repo) { weechat_printf (NULL, _("%s%s: list of scripts is empty (repository file " @@ -1383,7 +1383,7 @@ script_repo_file_update_process_cb (void *data, const char *command, return WEECHAT_RC_OK; } - if (script_repo_file_read (quiet) && repo_scripts) + if (script_repo_file_read (quiet) && scripts_repo) { if (!script_action_run ()) script_buffer_refresh (1); @@ -1460,31 +1460,31 @@ script_repo_hdata_script_cb (void *data, const char *hdata_name) 0, NULL, NULL); if (hdata) { - WEECHAT_HDATA_VAR(struct t_repo_script, name, STRING, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, name_with_extension, STRING, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, language, INTEGER, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, author, STRING, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, mail, STRING, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, version, STRING, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, license, STRING, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, description, STRING, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, tags, STRING, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, requirements, STRING, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, min_weechat, STRING, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, max_weechat, STRING, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, md5sum, STRING, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, url, STRING, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, popularity, INTEGER, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, date_added, TIME, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, date_updated, TIME, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, status, INTEGER, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, version_loaded, STRING, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, displayed, INTEGER, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, install_order, INTEGER, 0, NULL, NULL); - WEECHAT_HDATA_VAR(struct t_repo_script, prev_script, POINTER, 0, NULL, hdata_name); - WEECHAT_HDATA_VAR(struct t_repo_script, next_script, POINTER, 0, NULL, hdata_name); - WEECHAT_HDATA_LIST(repo_scripts); - WEECHAT_HDATA_LIST(last_repo_script); + WEECHAT_HDATA_VAR(struct t_script_repo, name, STRING, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, name_with_extension, STRING, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, language, INTEGER, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, author, STRING, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, mail, STRING, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, version, STRING, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, license, STRING, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, description, STRING, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, tags, STRING, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, requirements, STRING, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, min_weechat, STRING, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, max_weechat, STRING, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, md5sum, STRING, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, url, STRING, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, popularity, INTEGER, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, date_added, TIME, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, date_updated, TIME, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, status, INTEGER, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, version_loaded, STRING, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, displayed, INTEGER, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, install_order, INTEGER, 0, NULL, NULL); + WEECHAT_HDATA_VAR(struct t_script_repo, prev_script, POINTER, 0, NULL, hdata_name); + WEECHAT_HDATA_VAR(struct t_script_repo, next_script, POINTER, 0, NULL, hdata_name); + WEECHAT_HDATA_LIST(scripts_repo); + WEECHAT_HDATA_LIST(last_script_repo); } return hdata; } @@ -1496,7 +1496,7 @@ script_repo_hdata_script_cb (void *data, const char *hdata_name) int script_repo_add_to_infolist (struct t_infolist *infolist, - struct t_repo_script *script) + struct t_script_repo *script) { struct t_infolist_item *ptr_item; @@ -1560,9 +1560,9 @@ script_repo_add_to_infolist (struct t_infolist *infolist, void script_repo_print_log () { - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; - for (ptr_script = repo_scripts; ptr_script; + for (ptr_script = scripts_repo; ptr_script; ptr_script = ptr_script->next_script) { weechat_log_printf (""); diff --git a/src/plugins/script/script-repo.h b/src/plugins/script/script-repo.h index 588f5644f..f7f1df5df 100644 --- a/src/plugins/script/script-repo.h +++ b/src/plugins/script/script-repo.h @@ -27,7 +27,7 @@ #define SCRIPT_STATUS_RUNNING 8 #define SCRIPT_STATUS_NEW_VERSION 16 -struct t_repo_script +struct t_script_repo { char *name; /* script name */ char *name_with_extension; /* script name with extension */ @@ -50,28 +50,28 @@ struct t_repo_script char *version_loaded; /* version of script loaded */ int displayed; /* script displayed? */ int install_order; /* order for install script (if >0)*/ - struct t_repo_script *prev_script; /* link to previous script */ - struct t_repo_script *next_script; /* link to next script */ + struct t_script_repo *prev_script; /* link to previous script */ + struct t_script_repo *next_script; /* link to next script */ }; -extern struct t_repo_script *repo_scripts; -extern struct t_repo_script *last_repo_script; +extern struct t_script_repo *scripts_repo; +extern struct t_script_repo *last_script_repo; extern int script_repo_count, script_repo_count_displayed; struct t_hashtable *script_repo_max_length_field; extern char *script_repo_filter; -extern int script_repo_script_valid (struct t_repo_script *script); -extern struct t_repo_script *script_repo_search_displayed_by_number (int number); -extern struct t_repo_script *script_repo_search_by_name (const char *name); -extern struct t_repo_script *script_repo_search_by_name_ext (const char *name_with_extension); -extern char *script_repo_get_filename_loaded (struct t_repo_script *script); -extern const char *script_repo_get_status_for_display (struct t_repo_script *script, +extern int script_repo_script_valid (struct t_script_repo *script); +extern struct t_script_repo *script_repo_search_displayed_by_number (int number); +extern struct t_script_repo *script_repo_search_by_name (const char *name); +extern struct t_script_repo *script_repo_search_by_name_ext (const char *name_with_extension); +extern char *script_repo_get_filename_loaded (struct t_script_repo *script); +extern const char *script_repo_get_status_for_display (struct t_script_repo *script, const char *list, int collapse); -extern const char *script_repo_get_status_desc_for_display (struct t_repo_script *script, +extern const char *script_repo_get_status_desc_for_display (struct t_script_repo *script, const char *list); extern void script_repo_remove_all (); -extern void script_repo_update_status (struct t_repo_script *script); +extern void script_repo_update_status (struct t_script_repo *script); extern void script_repo_update_status_all (); extern void script_repo_set_filter (const char *filter); extern void script_repo_filter_scripts (const char *search); @@ -82,7 +82,7 @@ extern void script_repo_file_update (int quiet); extern struct t_hdata *script_repo_hdata_script_cb (void *data, const char *hdata_name); extern int script_repo_add_to_infolist (struct t_infolist *infolist, - struct t_repo_script *script); + struct t_script_repo *script); extern void script_repo_print_log (); #endif /* __WEECHAT_SCRIPT_REPO_H */ diff --git a/src/plugins/script/script.c b/src/plugins/script/script.c index ea2f3dfc6..ab8afc52b 100644 --- a/src/plugins/script/script.c +++ b/src/plugins/script/script.c @@ -45,9 +45,12 @@ WEECHAT_PLUGIN_LICENSE(WEECHAT_LICENSE); struct t_weechat_plugin *weechat_script_plugin = NULL; -char *script_language[] = { "guile", "lua", "perl", "python", "ruby", "tcl", NULL }; -char *script_extension[] = { "scm", "lua", "pl", "py", "rb", "tcl", NULL }; +char *script_language[SCRIPT_NUM_LANGUAGES] = +{ "guile", "lua", "perl", "python", "ruby", "tcl" }; +char *script_extension[SCRIPT_NUM_LANGUAGES] = +{ "scm", "lua", "pl", "py", "rb", "tcl" }; +int script_plugin_loaded[SCRIPT_NUM_LANGUAGES]; struct t_hashtable *script_loaded = NULL; struct t_hook *script_timer_refresh = NULL; @@ -62,7 +65,7 @@ script_language_search (const char *language) { int i; - for (i = 0; script_language[i]; i++) + for (i = 0; i < SCRIPT_NUM_LANGUAGES; i++) { if (strcmp (script_language[i], language) == 0) return i; @@ -83,7 +86,7 @@ script_language_search_by_extension (const char *extension) { int i; - for (i = 0; script_extension[i]; i++) + for (i = 0; i < SCRIPT_NUM_LANGUAGES; i++) { if (strcmp (script_extension[i], extension) == 0) return i; @@ -94,18 +97,37 @@ script_language_search_by_extension (const char *extension) } /* - * script_get_loaded_scripts: get loaded scripts (in hashtable) + * script_get_loaded_plugins_and_scripts: get loaded plugins (in array of + * integers) and scripts (in hashtable) */ void -script_get_loaded_scripts () +script_get_loaded_plugins_and_scripts () { - int i; + int i, language; char hdata_name[128], *filename, *ptr_base_name; const char *ptr_filename; struct t_hdata *hdata; - void *ptr_script; + void *ptr_plugin, *ptr_script; + /* get loaded plugins */ + for (i = 0; i < SCRIPT_NUM_LANGUAGES; i++) + { + script_plugin_loaded[i] = 0; + } + hdata = weechat_hdata_get ("plugin"); + ptr_plugin = weechat_hdata_get_list (hdata, "weechat_plugins"); + while (ptr_plugin) + { + language = script_language_search (weechat_hdata_string (hdata, + ptr_plugin, + "name")); + if (language >= 0) + script_plugin_loaded[language] = 1; + ptr_plugin = weechat_hdata_move (hdata, ptr_plugin, 1); + } + + /* get loaded scripts */ if (!script_loaded) { script_loaded = weechat_hashtable_new (16, @@ -117,7 +139,7 @@ script_get_loaded_scripts () else weechat_hashtable_remove_all (script_loaded); - for (i = 0; script_language[i]; i++) + for (i = 0; i < SCRIPT_NUM_LANGUAGES; i++) { snprintf (hdata_name, sizeof (hdata_name), "%s_script", script_language[i]); @@ -184,7 +206,7 @@ script_timer_refresh_cb (void *data, int remaining_calls) /* make C compiler happy */ (void) data; - script_get_loaded_scripts (); + script_get_loaded_plugins_and_scripts (); script_repo_update_status_all (); script_buffer_refresh (0); @@ -194,6 +216,35 @@ script_timer_refresh_cb (void *data, int remaining_calls) return WEECHAT_RC_OK; } +/* + * script_signal_plugin_cb: callback for signals "plugin_loaded" and + * "plugin_unloaded" + */ + +int +script_signal_plugin_cb (void *data, const char *signal, const char *type_data, + void *signal_data) +{ + /* make C compiler happy */ + (void) data; + (void) type_data; + + if (weechat_script_plugin->debug >= 2) + { + weechat_printf (NULL, "%s: signal: %s, data: %s", + SCRIPT_PLUGIN_NAME, + signal, (char *)signal_data); + } + + if (!script_timer_refresh) + { + script_timer_refresh = weechat_hook_timer (50, 0, 1, + &script_timer_refresh_cb, NULL); + } + + return WEECHAT_RC_OK; +} + /* * script_signal_script_cb: callback for signals "xxx_script_yyy" * (example: "python_script_loaded") @@ -205,12 +256,14 @@ script_signal_script_cb (void *data, const char *signal, const char *type_data, { /* make C compiler happy */ (void) data; - (void) signal; (void) type_data; - (void) signal_data; if (weechat_script_plugin->debug >= 2) - weechat_printf (NULL, "signal: %s, data: %s", signal, (char *)signal_data); + { + weechat_printf (NULL, "%s: signal: %s, data: %s", + SCRIPT_PLUGIN_NAME, + signal, (char *)signal_data); + } if (!script_timer_refresh) { @@ -234,7 +287,7 @@ script_focus_chat_cb (void *data, struct t_hashtable *info) struct t_gui_buffer *ptr_buffer; long x; char *error, str_date[64]; - struct t_repo_script *ptr_script; + struct t_script_repo *ptr_script; struct tm *tm; /* make C compiler happy */ @@ -305,12 +358,19 @@ script_focus_chat_cb (void *data, struct t_hashtable *info) int weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) { + int i; + /* make C compiler happy */ (void) argc; (void) argv; weechat_plugin = plugin; + for (i = 0; i < SCRIPT_NUM_LANGUAGES; i++) + { + script_plugin_loaded[i] = 0; + } + script_buffer_set_callbacks (); if (!script_config_init ()) @@ -327,6 +387,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) weechat_hook_signal ("debug_dump", &script_debug_dump_cb, NULL); weechat_hook_signal ("window_scrolled", &script_buffer_window_scrolled_cb, NULL); + weechat_hook_signal ("plugin_*", &script_signal_plugin_cb, NULL); weechat_hook_signal ("*_script_*", &script_signal_script_cb, NULL); weechat_hook_focus ("chat", &script_focus_chat_cb, NULL); diff --git a/src/plugins/script/script.h b/src/plugins/script/script.h index e922c3011..682476796 100644 --- a/src/plugins/script/script.h +++ b/src/plugins/script/script.h @@ -23,15 +23,18 @@ #define weechat_plugin weechat_script_plugin #define SCRIPT_PLUGIN_NAME "script" +#define SCRIPT_NUM_LANGUAGES 6 + extern struct t_weechat_plugin *weechat_script_plugin; -extern char *script_language[]; -extern char *script_extension[]; +extern char *script_language[SCRIPT_NUM_LANGUAGES]; +extern char *script_extension[SCRIPT_NUM_LANGUAGES]; +extern int script_plugin_loaded[SCRIPT_NUM_LANGUAGES]; extern struct t_hashtable *script_loaded; extern int script_language_search (const char *language); extern int script_language_search_by_extension (const char *extension); extern void script_actions_add (const char *action); -extern void script_get_loaded_scripts (); +extern void script_get_loaded_plugins_and_scripts (); #endif /* __WEECHAT_SCRIPT_H */