mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
core: display a message when a configuration file is updated to a newer version
This commit is contained in:
@@ -15,6 +15,7 @@ For a list of important changes that require manual actions, please look at rele
|
||||
|
||||
New features::
|
||||
|
||||
* core: display a message when a configuration file is updated to a newer version
|
||||
* python: make stub (weechat.pyi) compatible with Python 3.8 and 3.9 (issue #2006)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-09-11 09:32+0200\n"
|
||||
"PO-Revision-Date: 2023-06-25 00:48+0200\n"
|
||||
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -4427,6 +4427,12 @@ msgstr "%sChyba: nemohu vytvořit soubor \"%s\""
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "%sChyba při zápisu konfiguračního souboru \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "%sVAROVÁNÍ: selhalo čtení konfiguračního souboru \"%s\" (%s)"
|
||||
|
||||
@@ -26,7 +26,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-09-11 09:32+0200\n"
|
||||
"PO-Revision-Date: 2023-07-05 21:25+0200\n"
|
||||
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
|
||||
"Language-Team: German <kde-i18n-de@kde.org>\n"
|
||||
@@ -5585,6 +5585,12 @@ msgid "%sError writing configuration file \"%s\""
|
||||
msgstr ""
|
||||
"%sEs ist ein Fehler beim Speichern der Konfigurationsdatei \"%s\" aufgetreten"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "%sWARNUNG: Konfigurationsdatei \"%s\" konnte nicht geladen werden (%s)"
|
||||
|
||||
@@ -22,7 +22,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-09-11 09:32+0200\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Santiago Forero <santiago@forero.xyz>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -5052,6 +5052,12 @@ msgstr "%sError: no es posible crear el archivo \"%s\""
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "%sError al escribir el archivo de configuración \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "Guardando archivo de configuración %s %s"
|
||||
|
||||
@@ -21,8 +21,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"PO-Revision-Date: 2023-07-05 21:25+0200\n"
|
||||
"POT-Creation-Date: 2023-09-11 09:32+0200\n"
|
||||
"PO-Revision-Date: 2023-09-11 09:33+0200\n"
|
||||
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
"Language: fr\n"
|
||||
@@ -5452,6 +5452,14 @@ msgstr "%sImpossible de créer le fichier \"%s\""
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "%sErreur d'écriture du fichier de configuration \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
"%sImportant : le fichier %s a été mis à jour de la version %d à %d, il n'est "
|
||||
"plus compatible et ne peut plus être chargé avec toute version plus ancienne"
|
||||
|
||||
#, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "%sATTENTION : échec de lecture du fichier de configuration \"%s\" (%s)"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-09-11 09:32+0200\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -3972,6 +3972,12 @@ msgstr "%s nem sikerült a \"%s\" fájlt létrehozni\n"
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "szerver konfigurációs fájljának újraolvastatása"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "beállítások mentése kilépéskor"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-09-11 09:32+0200\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -4689,6 +4689,12 @@ msgstr "%sErrore: impossibile creare il file \"%s\""
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "%sErrore: impossibile scrivere sul file di configurazione \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "Salvataggio del file di configurazione %s %s"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-09-11 09:32+0200\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
|
||||
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
|
||||
@@ -5294,6 +5294,12 @@ msgstr "%sエラー: ファイル \"%s\" の作成に失敗"
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "%s設定ファイル \"%s\" の書き込み中にエラー"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "%s警告: 設定ファイル \"%s\" (%s) の読み込みに失敗"
|
||||
|
||||
@@ -22,7 +22,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-09-11 09:32+0200\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
|
||||
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
|
||||
@@ -5731,6 +5731,12 @@ msgstr "%sNie można utworzyć pliku \"%s\""
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "%sBłąd podczas zapisu pliku konfiguracyjnego \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "%sUWAGA: nie powiódł się odczyt pliku konfiguracyjnego \"%s\" (%s)"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-09-11 09:32+0200\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
|
||||
"Language-Team: Portuguese <>\n"
|
||||
@@ -5324,6 +5324,12 @@ msgstr "%sErro: não é possível criar o ficheiro \"%s\""
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "%sErro ao escrever o ficheiro de configuração \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "%sAVISO: falha ao ler o ficheiro de configuração \"%s\" (%s)"
|
||||
|
||||
+7
-1
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-09-11 09:32+0200\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -4698,6 +4698,12 @@ msgstr "%sErro: não foi possível criar arquivo \"%s\""
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "%sErro escrevendo arquivo de configuração \"%s\""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "Escrevendo arquivo de configurações %s %s"
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-09-11 09:32+0200\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -4000,6 +4000,12 @@ msgstr "%s не могу создать файл \"%s\"\n"
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "перезагрузить конфигурационный файл сервера"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "сохранять конфигурационный файл при выходе"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-09-11 09:32+0200\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -5377,6 +5377,12 @@ msgstr "%sНе може да се креира фајл „%s”"
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "%sГрешка при уписивању конфигурационог фајла „%s”"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "%sУПОЗОРЕЊЕ: није могао да се прочита конфигурациони фајл „%s” (%s)"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-09-11 09:32+0200\n"
|
||||
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
|
||||
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -5375,6 +5375,12 @@ msgstr "%s\"%s\" dosyası oluşturulamıyor"
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr "%s\"%s\" yapılandırma dosyası yazılırken hata"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr "%sUYARI: \"%s\" yapılandırma dosyası okunamadı (%s)"
|
||||
|
||||
+7
-1
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
|
||||
"POT-Creation-Date: 2023-09-11 09:32+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"
|
||||
@@ -3624,6 +3624,12 @@ msgstr ""
|
||||
msgid "%sError writing configuration file \"%s\""
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"%sImportant: file %s has been updated from version %d to %d, it is not "
|
||||
"compatible and can not be loaded any more with any older version"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "%sWARNING: failed to read configuration file \"%s\" (%s)"
|
||||
msgstr ""
|
||||
|
||||
@@ -3173,6 +3173,10 @@ config_file_parse_version (const char *version)
|
||||
*
|
||||
* Section can be updated only if option and value are NULL (ie if we are
|
||||
* reading a section line like "[section]").
|
||||
*
|
||||
* Integer warning_update_displayed is set to 1 if a warning is displayed,
|
||||
* when the file is updated to a newer version (then it's not compatible any
|
||||
* more with previous versions).
|
||||
*/
|
||||
|
||||
void
|
||||
@@ -3182,7 +3186,8 @@ config_file_update_data_read (struct t_config_file *config_file,
|
||||
const char *value,
|
||||
char **ret_section,
|
||||
char **ret_option,
|
||||
char **ret_value)
|
||||
char **ret_value,
|
||||
int *warning_update_displayed)
|
||||
{
|
||||
struct t_hashtable *data_read, *hashtable;
|
||||
const char *ptr_section, *ptr_option, *ptr_value;
|
||||
@@ -3192,6 +3197,21 @@ config_file_update_data_read (struct t_config_file *config_file,
|
||||
if (config_file->version_read >= config_file->version)
|
||||
return;
|
||||
|
||||
if (!*warning_update_displayed
|
||||
&& (config_file->version_read < config_file->version))
|
||||
{
|
||||
gui_chat_printf (
|
||||
NULL,
|
||||
_("%sImportant: file %s has been updated from version %d to %d, "
|
||||
"it is not compatible and can not be loaded any more with any "
|
||||
"older version"),
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
|
||||
config_file->filename,
|
||||
config_file->version_read,
|
||||
config_file->version);
|
||||
*warning_update_displayed = 1;
|
||||
}
|
||||
|
||||
/* do nothing if there's no update callback */
|
||||
if (!config_file->callback_update)
|
||||
return;
|
||||
@@ -3289,6 +3309,7 @@ int
|
||||
config_file_read_internal (struct t_config_file *config_file, int reload)
|
||||
{
|
||||
int filename_length, line_number, rc, length, version;
|
||||
int warning_update_displayed;
|
||||
char *filename, *section, *option, *value;
|
||||
struct t_config_section *ptr_section;
|
||||
struct t_config_option *ptr_option;
|
||||
@@ -3298,6 +3319,7 @@ config_file_read_internal (struct t_config_file *config_file, int reload)
|
||||
return WEECHAT_CONFIG_READ_FILE_NOT_FOUND;
|
||||
|
||||
config_file->version_read = 1;
|
||||
warning_update_displayed = 0;
|
||||
|
||||
/* build filename */
|
||||
filename_length = strlen (weechat_config_dir) + strlen (DIR_SEPARATOR) +
|
||||
@@ -3398,7 +3420,8 @@ config_file_read_internal (struct t_config_file *config_file, int reload)
|
||||
{
|
||||
config_file_update_data_read (config_file,
|
||||
section, NULL, NULL,
|
||||
§ion, NULL, NULL);
|
||||
§ion, NULL, NULL,
|
||||
&warning_update_displayed);
|
||||
ptr_section = config_file_search_section (config_file,
|
||||
section);
|
||||
if (!ptr_section)
|
||||
@@ -3515,7 +3538,8 @@ config_file_read_internal (struct t_config_file *config_file, int reload)
|
||||
|
||||
config_file_update_data_read (config_file,
|
||||
ptr_section->name, option, value,
|
||||
NULL, &option, &value);
|
||||
NULL, &option, &value,
|
||||
&warning_update_displayed);
|
||||
|
||||
/* option has been ignored by the update callback? */
|
||||
if (!option || !option[0])
|
||||
|
||||
Reference in New Issue
Block a user