diff options
-rw-r--r-- | po/cs.po | 9 | ||||
-rw-r--r-- | po/de.po | 10 | ||||
-rw-r--r-- | po/es.po | 10 | ||||
-rw-r--r-- | po/fr.po | 12 | ||||
-rw-r--r-- | po/hu.po | 10 | ||||
-rw-r--r-- | po/pl.po | 8 | ||||
-rw-r--r-- | po/ru.po | 9 | ||||
-rw-r--r-- | po/weechat.pot | 8 | ||||
-rw-r--r-- | src/plugins/plugin.c | 33 | ||||
-rw-r--r-- | src/plugins/weechat-plugin.h | 8 |
10 files changed, 103 insertions, 14 deletions
@@ -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-04-29 14:30+0200\n" +"POT-Creation-Date: 2009-05-02 22:43+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4891,6 +4891,13 @@ msgstr "" #, fuzzy, c-format msgid "" +"%sError: API mismatch for plugin \"%s\" (current API: \"%s\", plugin API: \"%" +"s\"), failed to load" +msgstr "" +"%s symbol \"plugin_name\" nebyl v pluginu \"%s\" nalezen, načtení selhalo\n" + +#, fuzzy, c-format +msgid "" "%sError: unable to load plugin \"%s\": a plugin with same name already exists" msgstr "" "%s nemohu načíst plugin \"%s\": plugin se stejným jménem již existuje\n" @@ -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-04-29 14:30+0200\n" +"POT-Creation-Date: 2009-05-02 22:43+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4843,6 +4843,14 @@ msgstr "" #, fuzzy, c-format msgid "" +"%sError: API mismatch for plugin \"%s\" (current API: \"%s\", plugin API: \"%" +"s\"), failed to load" +msgstr "" +"%s Symbol \"plugin_name\" in Plugin \"%s\" nicht gefunden, Laden " +"gescheitert\n" + +#, fuzzy, c-format +msgid "" "%sError: unable to load plugin \"%s\": a plugin with same name already exists" msgstr "" "%s kann Plugin \"%s\" nicht laden: ein gleichnamiges Plugin existiert " @@ -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-04-29 14:30+0200\n" +"POT-Creation-Date: 2009-05-02 22:43+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4831,6 +4831,14 @@ msgstr "" #, fuzzy, c-format msgid "" +"%sError: API mismatch for plugin \"%s\" (current API: \"%s\", plugin API: \"%" +"s\"), failed to load" +msgstr "" +"%s sÃmbolo \"plugin_name\" no encontrado en el plugin \"%s\", falló al " +"cargar\n" + +#, fuzzy, c-format +msgid "" "%sError: unable to load plugin \"%s\": a plugin with same name already exists" msgstr "" "%s no ha sido posible cargar el plugin \"%s\": un plugin con el mismo nombre " @@ -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-04-29 14:30+0200\n" -"PO-Revision-Date: 2009-04-29 14:30+0200\n" +"POT-Creation-Date: 2009-05-02 22:43+0200\n" +"PO-Revision-Date: 2009-05-02 22:44+0200\n" "Last-Translator: FlashCode <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "MIME-Version: 1.0\n" @@ -5011,6 +5011,14 @@ msgstr "" #, c-format msgid "" +"%sError: API mismatch for plugin \"%s\" (current API: \"%s\", plugin API: \"%" +"s\"), failed to load" +msgstr "" +"%sErreur: API non concordante pour l'extension \"%s\" (API courante: \"%s\", " +"API extension: \"%s\"), échec de chargement" + +#, c-format +msgid "" "%sError: unable to load plugin \"%s\": a plugin with same name already exists" msgstr "" "%sErreur: impossible de charger l'extension \"%s\": une extension avec le " @@ -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-04-29 14:30+0200\n" +"POT-Creation-Date: 2009-05-02 22:43+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4901,6 +4901,14 @@ msgstr "" #, fuzzy, c-format msgid "" +"%sError: API mismatch for plugin \"%s\" (current API: \"%s\", plugin API: \"%" +"s\"), failed to load" +msgstr "" +"%s a \"plugin_name\" szimbólum nem található a \"%s\" modulban, betöltés " +"sikertelen\n" + +#, fuzzy, c-format +msgid "" "%sError: unable to load plugin \"%s\": a plugin with same name already exists" msgstr "%s nem sikerült a \"%s\" modult betölteni: már van ilyen nevű modul\n" @@ -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-04-29 14:30+0200\n" +"POT-Creation-Date: 2009-05-02 22:43+0200\n" "PO-Revision-Date: 2009-04-29 08:07+0200\n" "Last-Translator: <soltys@szluug.org>\n" "Language-Team: Polish\n" @@ -4224,6 +4224,12 @@ msgstr "" #, c-format msgid "" +"%sError: API mismatch for plugin \"%s\" (current API: \"%s\", plugin API: \"%" +"s\"), failed to load" +msgstr "" + +#, c-format +msgid "" "%sError: unable to load plugin \"%s\": a plugin with same name already exists" msgstr "" @@ -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-04-29 14:30+0200\n" +"POT-Creation-Date: 2009-05-02 22:43+0200\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4876,6 +4876,13 @@ msgstr "" #, fuzzy, c-format msgid "" +"%sError: API mismatch for plugin \"%s\" (current API: \"%s\", plugin API: \"%" +"s\"), failed to load" +msgstr "" +"%s символ \"plugin_name\" не найден в plugin'е \"%s\", загрузка не удалась\n" + +#, fuzzy, c-format +msgid "" "%sError: unable to load plugin \"%s\": a plugin with same name already exists" msgstr "" "%s не могу загрузить plugin \"%s\": одноимённый plugin уже существует\n" diff --git a/po/weechat.pot b/po/weechat.pot index c3d41bf80..ff8dae6c7 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-04-29 14:30+0200\n" +"POT-Creation-Date: 2009-05-02 22:43+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -4187,6 +4187,12 @@ msgstr "" #, c-format msgid "" +"%sError: API mismatch for plugin \"%s\" (current API: \"%s\", plugin API: \"%" +"s\"), failed to load" +msgstr "" + +#, c-format +msgid "" "%sError: unable to load plugin \"%s\": a plugin with same name already exists" msgstr "" diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index ec7f4f12b..d5d751f94 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -155,8 +155,8 @@ plugin_load (const char *filename) { char *ptr_home, *full_name, *full_name2; void *handle; - char *name, *author, *description, *version, *weechat_version, *license; - char *charset; + char *name, *api_version, *author, *description, *version; + char *weechat_version, *license, *charset; t_weechat_init_func *init_func; int rc, i, argc; char **argv; @@ -206,6 +206,34 @@ plugin_load (const char *filename) return NULL; } + /* look for API version */ + api_version = dlsym (handle, "weechat_plugin_api_version"); + if (!api_version) + { + gui_chat_printf (NULL, + _("%sError: symbol \"%s\" not found in " + "plugin \"%s\", failed to load"), + gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], + "weechat_plugin_api_version", + full_name); + dlclose (handle); + free (full_name); + return NULL; + } + if (strcmp (api_version, WEECHAT_PLUGIN_API_VERSION) != 0) + { + gui_chat_printf (NULL, + _("%sError: API mismatch for plugin \"%s\" (current " + "API: \"%s\", plugin API: \"%s\"), failed to load"), + gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], + full_name, + WEECHAT_PLUGIN_API_VERSION, + api_version); + dlclose (handle); + free (full_name); + return NULL; + } + /* check for plugin with same name */ if (plugin_search (name)) { @@ -278,7 +306,6 @@ plugin_load (const char *filename) free (full_name); return NULL; } - if (util_weechat_version_cmp (PACKAGE_VERSION, weechat_version) != 0) { gui_chat_printf (NULL, diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h index 19bfd25ae..9af6bbe16 100644 --- a/src/plugins/weechat-plugin.h +++ b/src/plugins/weechat-plugin.h @@ -32,9 +32,13 @@ struct t_gui_completion; struct t_infolist; struct t_weelist; +/* API version (used to check that plugin has same API and can be loaded) */ +#define WEECHAT_PLUGIN_API_VERSION "20090502-01" + /* macros for defining plugin infos */ -#define WEECHAT_PLUGIN_NAME(__name) \ - char weechat_plugin_name[] = __name; +#define WEECHAT_PLUGIN_NAME(__name) \ + char weechat_plugin_name[] = __name; \ + char weechat_plugin_api_version[] = WEECHAT_PLUGIN_API_VERSION; #define WEECHAT_PLUGIN_AUTHOR(__author) \ char weechat_plugin_author[] = __author; #define WEECHAT_PLUGIN_DESCRIPTION(__desc) \ |