diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-04-15 11:09:59 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-04-15 11:09:59 +0200 |
commit | 72477b49d7b7077eb78a836b0e4b01ced2339c44 (patch) | |
tree | 3d2590dbcb897f219b1e9cacc0fa125697dca0bb | |
parent | 15d5fce00a5f46da42c7c2b0c6128b1ed9d0741b (diff) | |
download | weechat-72477b49d7b7077eb78a836b0e4b01ced2339c44.zip |
api: add optional argument with version in info "version_number"
-rw-r--r-- | ChangeLog.adoc | 1 | ||||
-rw-r--r-- | po/cs.po | 6 | ||||
-rw-r--r-- | po/de.po | 6 | ||||
-rw-r--r-- | po/es.po | 6 | ||||
-rw-r--r-- | po/fr.po | 10 | ||||
-rw-r--r-- | po/hu.po | 6 | ||||
-rw-r--r-- | po/it.po | 6 | ||||
-rw-r--r-- | po/ja.po | 6 | ||||
-rw-r--r-- | po/pl.po | 6 | ||||
-rw-r--r-- | po/pt.po | 6 | ||||
-rw-r--r-- | po/pt_BR.po | 6 | ||||
-rw-r--r-- | po/ru.po | 6 | ||||
-rw-r--r-- | po/sr.po | 6 | ||||
-rw-r--r-- | po/tr.po | 6 | ||||
-rw-r--r-- | po/weechat.pot | 6 | ||||
-rw-r--r-- | src/plugins/plugin-api-info.c | 10 |
16 files changed, 81 insertions, 18 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index ab14f281a..57f8b4b9d 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -35,6 +35,7 @@ New features:: * core, plugins: make many identifiers case sensitive (issue #1872, issue #398, bug #32213) * core: add item "mouse_status" in default status bar, change default color to lightgreen * api: add function config_set_version (issue #1238) + * api: add optional argument with version in info "version_number" * alias: use lower case for default aliases, rename all aliases to lower case on upgrade (issue #1872) * irc: rename "ssl" options to "tls", connect with TLS and port 6697 by default * irc: add command `/rules` (issue #1864) @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-04-13 13:49+0200\n" +"POT-Creation-Date: 2023-04-15 11:04+0200\n" "PO-Revision-Date: 2023-03-25 21:13+0100\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -10990,6 +10990,10 @@ msgid "WeeChat version (as number)" msgstr "verze WeeChat (jako číslo)" msgid "" +"version (optional, by default the version of the running WeeChat is returned)" +msgstr "" + +msgid "" "WeeChat git version (output of command \"git describe\" for a development " "version only, empty for a stable release)" msgstr "" @@ -26,7 +26,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-04-13 13:49+0200\n" +"POT-Creation-Date: 2023-04-15 11:04+0200\n" "PO-Revision-Date: 2023-04-13 20:09+0200\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German - Germany <weechatter@arcor.de>\n" @@ -13342,6 +13342,10 @@ msgid "WeeChat version (as number)" msgstr "WeeChat-Version (als Zahl)" msgid "" +"version (optional, by default the version of the running WeeChat is returned)" +msgstr "" + +msgid "" "WeeChat git version (output of command \"git describe\" for a development " "version only, empty for a stable release)" msgstr "" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-04-13 13:49+0200\n" +"POT-Creation-Date: 2023-04-15 11:04+0200\n" "PO-Revision-Date: 2023-03-25 21:13+0100\n" "Last-Translator: Santiago Forero <santiago@forero.xyz>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -11724,6 +11724,10 @@ msgid "WeeChat version (as number)" msgstr "versión de WeeChat (como un número)" msgid "" +"version (optional, by default the version of the running WeeChat is returned)" +msgstr "" + +msgid "" "WeeChat git version (output of command \"git describe\" for a development " "version only, empty for a stable release)" msgstr "" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-04-13 13:49+0200\n" -"PO-Revision-Date: 2023-04-13 20:08+0200\n" +"POT-Creation-Date: 2023-04-15 11:04+0200\n" +"PO-Revision-Date: 2023-04-15 11:04+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -13075,6 +13075,12 @@ msgid "WeeChat version (as number)" msgstr "version de WeeChat (sous forme de nombre)" msgid "" +"version (optional, by default the version of the running WeeChat is returned)" +msgstr "" +"version (optionnelle, par défaut la version du WeeChat en cours d'exécution " +"est retournée)" + +msgid "" "WeeChat git version (output of command \"git describe\" for a development " "version only, empty for a stable release)" msgstr "" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-04-13 13:49+0200\n" +"POT-Creation-Date: 2023-04-15 11:04+0200\n" "PO-Revision-Date: 2022-10-15 22:51+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -10391,6 +10391,10 @@ msgid "WeeChat version (as number)" msgstr "WeeChat szlogen" msgid "" +"version (optional, by default the version of the running WeeChat is returned)" +msgstr "" + +msgid "" "WeeChat git version (output of command \"git describe\" for a development " "version only, empty for a stable release)" msgstr "" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-04-13 13:49+0200\n" +"POT-Creation-Date: 2023-04-15 11:04+0200\n" "PO-Revision-Date: 2023-03-25 21:13+0100\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -11444,6 +11444,10 @@ msgid "WeeChat version (as number)" msgstr "versione di WeeChat (come numero)" msgid "" +"version (optional, by default the version of the running WeeChat is returned)" +msgstr "" + +msgid "" "WeeChat git version (output of command \"git describe\" for a development " "version only, empty for a stable release)" msgstr "" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-04-13 13:49+0200\n" +"POT-Creation-Date: 2023-04-15 11:04+0200\n" "PO-Revision-Date: 2023-03-25 21:13+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/" @@ -12617,6 +12617,10 @@ msgid "WeeChat version (as number)" msgstr "WeeChat のバージョン (数字)" msgid "" +"version (optional, by default the version of the running WeeChat is returned)" +msgstr "" + +msgid "" "WeeChat git version (output of command \"git describe\" for a development " "version only, empty for a stable release)" msgstr "" @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-04-13 13:49+0200\n" +"POT-Creation-Date: 2023-04-15 11:04+0200\n" "PO-Revision-Date: 2023-04-13 20:09+0200\n" "Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n" "Language-Team: Polish <kde-i18n-doc@kde.org>\n" @@ -13590,6 +13590,10 @@ msgid "WeeChat version (as number)" msgstr "Wersja WeeChat (jako liczba)" msgid "" +"version (optional, by default the version of the running WeeChat is returned)" +msgstr "" + +msgid "" "WeeChat git version (output of command \"git describe\" for a development " "version only, empty for a stable release)" msgstr "" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-04-13 13:49+0200\n" +"POT-Creation-Date: 2023-04-15 11:04+0200\n" "PO-Revision-Date: 2023-03-25 21:13+0100\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Language-Team: Portuguese <>\n" @@ -12404,6 +12404,10 @@ msgid "WeeChat version (as number)" msgstr "versão do WeeChat (forma numérica)" msgid "" +"version (optional, by default the version of the running WeeChat is returned)" +msgstr "" + +msgid "" "WeeChat git version (output of command \"git describe\" for a development " "version only, empty for a stable release)" msgstr "" diff --git a/po/pt_BR.po b/po/pt_BR.po index d6e0279c8..8282a5834 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-04-13 13:49+0200\n" +"POT-Creation-Date: 2023-04-15 11:04+0200\n" "PO-Revision-Date: 2023-03-25 21:13+0100\n" "Last-Translator: Érico Nogueira <ericonr@disroot.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -10931,6 +10931,10 @@ msgid "WeeChat version (as number)" msgstr "versão do WeeChat (como um número)" msgid "" +"version (optional, by default the version of the running WeeChat is returned)" +msgstr "" + +msgid "" "WeeChat git version (output of command \"git describe\" for a development " "version only, empty for a stable release)" msgstr "" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-04-13 13:49+0200\n" +"POT-Creation-Date: 2023-04-15 11:04+0200\n" "PO-Revision-Date: 2023-03-25 21:13+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -10429,6 +10429,10 @@ msgid "WeeChat version (as number)" msgstr "слоган WeeChat" msgid "" +"version (optional, by default the version of the running WeeChat is returned)" +msgstr "" + +msgid "" "WeeChat git version (output of command \"git describe\" for a development " "version only, empty for a stable release)" msgstr "" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-04-13 13:49+0200\n" +"POT-Creation-Date: 2023-04-15 11:04+0200\n" "PO-Revision-Date: 2023-04-13 20:10+0200\n" "Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -13280,6 +13280,10 @@ msgid "WeeChat version (as number)" msgstr "верзија програма WeeChat (као број)" msgid "" +"version (optional, by default the version of the running WeeChat is returned)" +msgstr "" + +msgid "" "WeeChat git version (output of command \"git describe\" for a development " "version only, empty for a stable release)" msgstr "" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-04-13 13:49+0200\n" +"POT-Creation-Date: 2023-04-15 11:04+0200\n" "PO-Revision-Date: 2023-03-25 21:13+0100\n" "Last-Translator: Emir SARI <emir_sari@icloud.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -13542,6 +13542,10 @@ msgid "WeeChat version (as number)" msgstr "WeeChat sürümü (sayı olarak)" msgid "" +"version (optional, by default the version of the running WeeChat is returned)" +msgstr "" + +msgid "" "WeeChat git version (output of command \"git describe\" for a development " "version only, empty for a stable release)" msgstr "" diff --git a/po/weechat.pot b/po/weechat.pot index e0bb5b81d..508169df3 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2023-04-13 13:49+0200\n" +"POT-Creation-Date: 2023-04-15 11:04+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -9391,6 +9391,10 @@ msgid "WeeChat version (as number)" msgstr "" msgid "" +"version (optional, by default the version of the running WeeChat is returned)" +msgstr "" + +msgid "" "WeeChat git version (output of command \"git describe\" for a development " "version only, empty for a stable release)" msgstr "" diff --git a/src/plugins/plugin-api-info.c b/src/plugins/plugin-api-info.c index ec7bfdb41..a476a015e 100644 --- a/src/plugins/plugin-api-info.c +++ b/src/plugins/plugin-api-info.c @@ -96,8 +96,10 @@ plugin_api_info_version_number_cb (const void *pointer, void *data, (void) info_name; (void) arguments; - snprintf (version_number, sizeof (version_number), "%d", - util_version_number (version_get_version ())); + snprintf ( + version_number, sizeof (version_number), "%d", + util_version_number ( + (arguments && arguments[0]) ? arguments : version_get_version ())); return strdup (version_number); } @@ -1880,7 +1882,9 @@ plugin_api_info_init () NULL, &plugin_api_info_version_cb, NULL, NULL); hook_info (NULL, "version_number", N_("WeeChat version (as number)"), - NULL, &plugin_api_info_version_number_cb, NULL, NULL); + N_("version (optional, by default the version of the running " + "WeeChat is returned)"), + &plugin_api_info_version_number_cb, NULL, NULL); hook_info (NULL, "version_git", N_("WeeChat git version (output of command \"git describe\" " "for a development version only, empty for a stable " |