summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.adoc1
-rw-r--r--po/cs.po7
-rw-r--r--po/de.po7
-rw-r--r--po/es.po7
-rw-r--r--po/fr.po7
-rw-r--r--po/hu.po6
-rw-r--r--po/it.po6
-rw-r--r--po/ja.po7
-rw-r--r--po/pl.po7
-rw-r--r--po/pt.po7
-rw-r--r--po/pt_BR.po6
-rw-r--r--po/ru.po6
-rw-r--r--po/sr.po7
-rw-r--r--po/tr.po7
-rw-r--r--po/weechat.pot5
-rw-r--r--src/core/wee-dir.c21
16 files changed, 94 insertions, 20 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index f18f72be6..cb646c578 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -23,6 +23,7 @@ New features::
Bug fixes::
+ * core: display an error on startup if environment variable "HOME" is not set
* core: fix crash when a custom bar item name is already used by a default bar item (issue #2034)
* core: fix random timeouts when a lot of concurrent processes are launched with hook_process (issue #2033)
* irc: revert compute of nick colors to case sensitive way, deprecate again infos "irc_nick_color" and "irc_nick_color_name" (issue #194, issue #2032)
diff --git a/po/cs.po b/po/cs.po
index db52c9fb5..b57646c2f 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-26 20:40+0200\n"
+"POT-Creation-Date: 2023-10-30 08:47+0100\n"
"PO-Revision-Date: 2023-10-20 13:09+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5167,6 +5167,11 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s%s: nemohu vytvořit adresář pro logy (\"%s\")"
+#, fuzzy
+#| msgid "Environment variable \"%s\" is not defined"
+msgid "Error: environment variable \"HOME\" is not defined\n"
+msgstr "Proměnná prostředí \"%s\" není definována"
+
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Chyba: domovský adresář (%s) není adresářem\n"
diff --git a/po/de.po b/po/de.po
index e8cbda9f8..aa7e2e6ed 100644
--- a/po/de.po
+++ b/po/de.po
@@ -26,7 +26,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-26 20:40+0200\n"
+"POT-Creation-Date: 2023-10-30 08:47+0100\n"
"PO-Revision-Date: 2023-10-24 16:55+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@@ -5735,6 +5735,11 @@ msgstr ""
"Fehler: es kann kein temporäres Heimatverzeichnis angelegt werden (mit "
"Befehl: \"%s\")\n"
+#, fuzzy
+#| msgid "Environment variable \"%s\" is not defined"
+msgid "Error: environment variable \"HOME\" is not defined\n"
+msgstr "Umgebungsvariable \"%s\" ist nicht definiert"
+
#, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Fehler: \"%s\" ist kein Verzeichnis\n"
diff --git a/po/es.po b/po/es.po
index 264ca97c9..f89077409 100644
--- a/po/es.po
+++ b/po/es.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-26 20:40+0200\n"
+"POT-Creation-Date: 2023-10-30 08:47+0100\n"
"PO-Revision-Date: 2023-10-20 13:09+0200\n"
"Last-Translator: Santiago Forero <santiago@forero.xyz>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5349,6 +5349,11 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s%s: imposible crear directorio para registros (\"%s\")"
+#, fuzzy
+#| msgid "Environment variable \"%s\" is not defined"
+msgid "Error: environment variable \"HOME\" is not defined\n"
+msgstr "Variable \"%s\" no definida"
+
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Error: home (%s) no es un directorio\n"
diff --git a/po/fr.po b/po/fr.po
index 87cb30293..ceb7917c4 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-26 20:40+0200\n"
-"PO-Revision-Date: 2023-10-26 20:39+0200\n"
+"POT-Creation-Date: 2023-10-30 08:47+0100\n"
+"PO-Revision-Date: 2023-10-30 23:10+0100\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -5731,6 +5731,9 @@ msgstr ""
"Erreur : impossible de créer le répertoire de base temporaire (en utilisant "
"le modèle : \"%s\")\n"
+msgid "Error: environment variable \"HOME\" is not defined\n"
+msgstr "Erreur : la variable d'environnement \"HOME\" n'est pas définie\n"
+
#, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Erreur : \"%s\" n'est pas un répertoire\n"
diff --git a/po/hu.po b/po/hu.po
index 082da7389..ca8e4934f 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-26 20:40+0200\n"
+"POT-Creation-Date: 2023-10-30 08:47+0100\n"
"PO-Revision-Date: 2023-10-20 13:09+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4886,6 +4886,10 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s nem sikerült a szervert létrehozni\n"
+#, fuzzy
+msgid "Error: environment variable \"HOME\" is not defined\n"
+msgstr " . típus: szám\n"
+
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "%s nem sikerült a \"%s\" könyvtárat létrehozni\n"
diff --git a/po/it.po b/po/it.po
index 28ad1ee21..1f880b1ca 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-26 20:40+0200\n"
+"POT-Creation-Date: 2023-10-30 08:47+0100\n"
"PO-Revision-Date: 2023-10-20 13:10+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5275,6 +5275,10 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s%s: impossibile creare la directory per i log (\"%s\")"
+#, fuzzy
+msgid "Error: environment variable \"HOME\" is not defined\n"
+msgstr "Variabili"
+
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Errore: home (%s) non è una directory\n"
diff --git a/po/ja.po b/po/ja.po
index 4a0527a2d..5214a57d5 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-26 20:40+0200\n"
+"POT-Creation-Date: 2023-10-30 08:47+0100\n"
"PO-Revision-Date: 2023-10-20 13:10+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -5437,6 +5437,11 @@ msgid ""
msgstr ""
"エラー: 一時的なホームディレクリ (テンプレート: \"%s\") を作成できません\n"
+#, fuzzy
+#| msgid "Environment variable \"%s\" is not defined"
+msgid "Error: environment variable \"HOME\" is not defined\n"
+msgstr "環境変数 \"%s\" が定義されていません"
+
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "エラー: ホーム (%s) はディレクトリではありません\n"
diff --git a/po/pl.po b/po/pl.po
index 54c162011..946fbdb1e 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-26 20:40+0200\n"
+"POT-Creation-Date: 2023-10-30 08:47+0100\n"
"PO-Revision-Date: 2023-10-20 13:10+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@@ -5594,6 +5594,11 @@ msgstr ""
"Błąd: nie można utworzyć tymczasowego katalogu domowego (używając szablonu: "
"\"%s\")\n"
+#, fuzzy
+#| msgid "Environment variable \"%s\" is not defined"
+msgid "Error: environment variable \"HOME\" is not defined\n"
+msgstr "Zmienna środowiskowa \"%s\" nie jest zdefiniowana"
+
#, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Błąd: „%s” nie jest katalogiem\n"
diff --git a/po/pt.po b/po/pt.po
index ddd470d1a..e85bb0c6f 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-26 20:40+0200\n"
+"POT-Creation-Date: 2023-10-30 08:47+0100\n"
"PO-Revision-Date: 2023-10-20 13:10+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -5490,6 +5490,11 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s%s: não foi possível criar diretório para registos (\"%s\")"
+#, fuzzy
+#| msgid "Environment variable \"%s\" is not defined"
+msgid "Error: environment variable \"HOME\" is not defined\n"
+msgstr "A variável de ambiente \"%s\" não está definida"
+
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Erro: a base (%s) não é um diretório\n"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 04a4d412d..c5b20b448 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-10-26 20:40+0200\n"
+"POT-Creation-Date: 2023-10-30 08:47+0100\n"
"PO-Revision-Date: 2023-10-20 13:11+0200\n"
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5231,6 +5231,10 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s%s: não foi possível criar diretório para registros (\"%s\")"
+#, fuzzy
+msgid "Error: environment variable \"HOME\" is not defined\n"
+msgstr "Variáveis"
+
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Erro: (%s) não é um diretório\n"
diff --git a/po/ru.po b/po/ru.po
index 0be1eed57..a3480f79d 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-26 20:40+0200\n"
+"POT-Creation-Date: 2023-10-30 08:47+0100\n"
"PO-Revision-Date: 2023-10-20 13:11+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4915,6 +4915,10 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr "%s не могу создать сервер \"%s\"\n"
+#, fuzzy
+msgid "Error: environment variable \"HOME\" is not defined\n"
+msgstr " . тип: целочисленный\n"
+
#, fuzzy, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "%s домашний каталог (%s) не является директорией\n"
diff --git a/po/sr.po b/po/sr.po
index 3a2f65e84..09e1c1b80 100644
--- a/po/sr.po
+++ b/po/sr.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-26 20:40+0200\n"
+"POT-Creation-Date: 2023-10-30 08:47+0100\n"
"PO-Revision-Date: 2023-10-20 13:11+0200\n"
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5498,6 +5498,11 @@ msgstr ""
"Грешка: не може да се креира привремени почетни директоријум (користећи "
"шаблон: \"%s\")\n"
+#, fuzzy
+#| msgid "Environment variable \"%s\" is not defined"
+msgid "Error: environment variable \"HOME\" is not defined\n"
+msgstr "Није дефинисана променљива окружења „%s”"
+
#, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Грешка: „%s” није директоријум\n"
diff --git a/po/tr.po b/po/tr.po
index 4c3eadce2..e789cb431 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-10-26 20:40+0200\n"
+"POT-Creation-Date: 2023-10-30 08:47+0100\n"
"PO-Revision-Date: 2023-10-20 13:11+0200\n"
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5491,6 +5491,11 @@ msgid ""
msgstr ""
"Hata: Geçici bir ev dizini oluşturulamıyor (kullanılan şablon: \"%s\")\n"
+#, fuzzy
+#| msgid "Environment variable \"%s\" is not defined"
+msgid "Error: environment variable \"HOME\" is not defined\n"
+msgstr "Ortam değişkeni \"%s\" tanımlanmamış"
+
#, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr "Hata: \"%s\" bir dizin değil\n"
diff --git a/po/weechat.pot b/po/weechat.pot
index 76a8a7752..f60591724 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-10-26 20:40+0200\n"
+"POT-Creation-Date: 2023-10-30 08:47+0100\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"
@@ -4529,6 +4529,9 @@ msgid ""
"Error: unable to create a temporary home directory (using template: \"%s\")\n"
msgstr ""
+msgid "Error: environment variable \"HOME\" is not defined\n"
+msgstr ""
+
#, c-format
msgid "Error: \"%s\" is not a directory\n"
msgstr ""
diff --git a/src/core/wee-dir.c b/src/core/wee-dir.c
index d05280861..969749b0e 100644
--- a/src/core/wee-dir.c
+++ b/src/core/wee-dir.c
@@ -442,6 +442,9 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
*runtime_dir = NULL;
ptr_home = getenv ("HOME");
+ if (!ptr_home)
+ goto error_home;
+
xdg_config_home = getenv ("XDG_CONFIG_HOME");
xdg_data_home = getenv ("XDG_DATA_HOME");
xdg_cache_home = getenv ("XDG_CACHE_HOME");
@@ -462,7 +465,7 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
}
*config_dir = strdup (path);
if (!*config_dir)
- goto error;
+ goto error_memory;
/* set data dir: $XDG_DATA_HOME/weechat or $HOME/.local/share/weechat */
if (xdg_data_home && xdg_data_home[0])
@@ -480,7 +483,7 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
}
*data_dir = strdup (path);
if (!*data_dir)
- goto error;
+ goto error_memory;
/* set cache dir: $XDG_CACHE_HOME/weechat or $HOME/.cache/weechat */
if (xdg_cache_home && xdg_cache_home[0])
@@ -497,7 +500,7 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
}
*cache_dir = strdup (path);
if (!*cache_dir)
- goto error;
+ goto error_memory;
/* set runtime dir: $XDG_RUNTIME_DIR/weechat or same as cache dir */
if (xdg_runtime_dir && xdg_runtime_dir[0])
@@ -512,10 +515,19 @@ dir_find_xdg_dirs (char **config_dir, char **data_dir, char **cache_dir,
*runtime_dir = strdup (*cache_dir);
}
if (!*runtime_dir)
- goto error;
+ goto error_memory;
return 1;
+error_home:
+ string_fprintf (stderr,
+ _("Error: environment variable \"HOME\" is not defined\n"));
+ goto error;
+
+error_memory:
+ string_fprintf (stderr, _("Error: not enough memory\n"));
+ goto error;
+
error:
if (*config_dir)
{
@@ -537,7 +549,6 @@ error:
free (*runtime_dir);
*runtime_dir = NULL;
}
- string_fprintf (stderr, _("Error: not enough memory\n"));
return 0;
}