From 85d7c9b6c5155db0156cd36c7b3127eb516399ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 17 Nov 2018 10:36:58 +0100 Subject: [PATCH] core: add command line option "-t" (or "--temp-dir") to create a temporary WeeChat home (deleted on exit) --- ChangeLog.adoc | 5 +- doc/cs/cmdline_options.cs.adoc | 12 ++++ doc/cs/weechat-headless.1.cs.adoc | 2 +- doc/cs/weechat.1.cs.adoc | 2 +- doc/de/cmdline_options.de.adoc | 12 ++++ doc/de/weechat-headless.1.de.adoc | 2 +- doc/de/weechat.1.de.adoc | 2 +- doc/en/cmdline_options.en.adoc | 11 ++++ doc/en/weechat-headless.1.en.adoc | 2 +- doc/en/weechat.1.en.adoc | 2 +- doc/fr/cmdline_options.fr.adoc | 11 ++++ doc/fr/weechat-headless.1.fr.adoc | 2 +- doc/fr/weechat.1.fr.adoc | 2 +- doc/it/cmdline_options.it.adoc | 12 ++++ doc/it/weechat-headless.1.it.adoc | 2 +- doc/it/weechat.1.it.adoc | 2 +- doc/ja/cmdline_options.ja.adoc | 12 ++++ doc/ja/weechat-headless.1.ja.adoc | 2 +- doc/ja/weechat.1.ja.adoc | 2 +- doc/pl/cmdline_options.pl.adoc | 12 ++++ doc/pl/weechat-headless.1.pl.adoc | 2 +- doc/pl/weechat.1.pl.adoc | 2 +- doc/ru/cmdline_options.ru.adoc | 12 ++++ doc/ru/weechat-headless.1.ru.adoc | 2 +- doc/ru/weechat.1.ru.adoc | 2 +- po/cs.po | 23 +++++--- po/de.po | 25 ++++++--- po/es.po | 24 +++++--- po/fr.po | 28 +++++++--- po/hu.po | 25 ++++++--- po/it.po | 23 +++++--- po/ja.po | 24 +++++--- po/pl.po | 24 +++++--- po/pt.po | 23 +++++--- po/pt_BR.po | 24 +++++--- po/ru.po | 25 ++++++--- po/tr.po | 20 +++++-- po/weechat.pot | 16 +++++- src/core/wee-debug.c | 8 ++- src/core/wee-util.c | 93 +++++++++++++++++++++++++++++++ src/core/wee-util.h | 15 +++++ src/core/weechat.c | 80 +++++++++++++++++++++++++- src/core/weechat.h | 1 + 43 files changed, 521 insertions(+), 111 deletions(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index b71ce3a94..2fa18c96b 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -20,6 +20,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] New features:: + * core: add command line option "-t" (or "--temp-dir") to create a temporary WeeChat home (deleted on exit) * api: add functions string_base_encode and string_base_decode, remove functions string_encode_base64 and string_decode_base64 * api: add support of Time-based One-Time Password (TOTP), add infos "totp_generate" and "totp_validate" * buflist: add variable ${number2}, always set with the indented buffer number @@ -44,8 +45,8 @@ New features:: * core: add repeat of string in evaluation of expressions with "repeat:count,string" (issue #958) * core: allow specifying buffer number/name for /buffer localvar (issue #1259) * core: allow multiple arguments in command /buffer close - * core: allow multiple options "-r" ("--run-command") in command line arguments (issue #1248) - * core: add option "-P" (or "--plugins") to customize the plugins to load at startup + * core: allow multiple options "-r" (or "--run-command") in command line arguments (issue #1248) + * core: add command line option "-P" (or "--plugins") to customize the plugins to load at startup * core: allow partial buffer name in command /buffer close (issue #1226) * api: add function hook_line * irc: display a warning when the value of option irc.server.xxx.autojoin is set to an invalid value diff --git a/doc/cs/cmdline_options.cs.adoc b/doc/cs/cmdline_options.cs.adoc index 3331559cd..440404e96 100644 --- a/doc/cs/cmdline_options.cs.adoc +++ b/doc/cs/cmdline_options.cs.adoc @@ -17,6 +17,18 @@ Pokud tato volba není zadána, použije se promněná prostředí WEECHAT_HOME (pokud není prázdná) +// TRANSLATION MISSING +*-t*, *--temp-dir*:: + Create a temporary WeeChat home directory and delete it on exit + (incompatible with option "-d"). + + The name of the directory is automatically built by WeeChat, with this + template: "weechat_temp_XXXXXX" (where "XXXXXX" is random). It it created + in the first available directory in this list: environment variable "TMPDIR", + "/tmp" (may be different according to the operating system), environment + variable "HOME", current directory. + + The temporary home directory has permissions 0700 (only owner can read, + write and execute). + *-h*, *--help*:: Zobrazí nápovědu. diff --git a/doc/cs/weechat-headless.1.cs.adoc b/doc/cs/weechat-headless.1.cs.adoc index 9c33e1619..74cef105d 100644 --- a/doc/cs/weechat-headless.1.cs.adoc +++ b/doc/cs/weechat-headless.1.cs.adoc @@ -16,7 +16,7 @@ weechat-headless - the extensible chat client (headless version) // TRANSLATION MISSING [verse] -*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir ] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] +*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir ] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] *weechat-headless* [-c|--colors] *weechat-headless* [-h|--help] *weechat-headless* [-l|--license] diff --git a/doc/cs/weechat.1.cs.adoc b/doc/cs/weechat.1.cs.adoc index d7b9da77a..04847d2f3 100644 --- a/doc/cs/weechat.1.cs.adoc +++ b/doc/cs/weechat.1.cs.adoc @@ -15,7 +15,7 @@ weechat - the extensible chat client // TRANSLATION MISSING [verse] -*weechat* [-a|--no-connect] [-d|--dir ] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] +*weechat* [-a|--no-connect] [-d|--dir ] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] *weechat* [-c|--colors] *weechat* [-h|--help] *weechat* [-l|--license] diff --git a/doc/de/cmdline_options.de.adoc b/doc/de/cmdline_options.de.adoc index af0211ce0..34bf4c71d 100644 --- a/doc/de/cmdline_options.de.adoc +++ b/doc/de/cmdline_options.de.adoc @@ -15,6 +15,18 @@ Wird diese Option nicht genutzt, wird die Umgebungsvariable WEECHAT_HOME genutzt (sofern diese vorhanden ist). +// TRANSLATION MISSING +*-t*, *--temp-dir*:: + Create a temporary WeeChat home directory and delete it on exit + (incompatible with option "-d"). + + The name of the directory is automatically built by WeeChat, with this + template: "weechat_temp_XXXXXX" (where "XXXXXX" is random). It it created + in the first available directory in this list: environment variable "TMPDIR", + "/tmp" (may be different according to the operating system), environment + variable "HOME", current directory. + + The temporary home directory has permissions 0700 (only owner can read, + write and execute). + *-h*, *--help*:: zeigt einen Hilfstext an. diff --git a/doc/de/weechat-headless.1.de.adoc b/doc/de/weechat-headless.1.de.adoc index c0f296951..d999c49be 100644 --- a/doc/de/weechat-headless.1.de.adoc +++ b/doc/de/weechat-headless.1.de.adoc @@ -13,7 +13,7 @@ weechat-headless - der erweiterbare Chat Client (headless version) == SYNOPSIS [verse] -*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir ] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] +*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir ] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] *weechat-headless* [-c|--colors] *weechat-headless* [-h|--help] *weechat-headless* [-l|--license] diff --git a/doc/de/weechat.1.de.adoc b/doc/de/weechat.1.de.adoc index 0a6dd9677..7ba1e2451 100644 --- a/doc/de/weechat.1.de.adoc +++ b/doc/de/weechat.1.de.adoc @@ -13,7 +13,7 @@ weechat - der erweiterbare Chat Client == SYNOPSIS [verse] -*weechat* [-a|--no-connect] [-d|--dir ] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] +*weechat* [-a|--no-connect] [-d|--dir ] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] *weechat* [-c|--colors] *weechat* [-h|--help] *weechat* [-l|--license] diff --git a/doc/en/cmdline_options.en.adoc b/doc/en/cmdline_options.en.adoc index e09ff973c..d43a2426c 100644 --- a/doc/en/cmdline_options.en.adoc +++ b/doc/en/cmdline_options.en.adoc @@ -15,6 +15,17 @@ If this option is not given, the environment variable WEECHAT_HOME is used (if not empty). +*-t*, *--temp-dir*:: + Create a temporary WeeChat home directory and delete it on exit + (incompatible with option "-d"). + + The name of the directory is automatically built by WeeChat, with this + template: "weechat_temp_XXXXXX" (where "XXXXXX" is random). It it created + in the first available directory in this list: environment variable "TMPDIR", + "/tmp" (may be different according to the operating system), environment + variable "HOME", current directory. + + The temporary home directory has permissions 0700 (only owner can read, + write and execute). + *-h*, *--help*:: Display help. diff --git a/doc/en/weechat-headless.1.en.adoc b/doc/en/weechat-headless.1.en.adoc index ab00d84ad..49f875157 100644 --- a/doc/en/weechat-headless.1.en.adoc +++ b/doc/en/weechat-headless.1.en.adoc @@ -13,7 +13,7 @@ weechat-headless - the extensible chat client (headless version) == SYNOPSIS [verse] -*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir ] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] +*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir ] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] *weechat-headless* [-c|--colors] *weechat-headless* [-h|--help] *weechat-headless* [-l|--license] diff --git a/doc/en/weechat.1.en.adoc b/doc/en/weechat.1.en.adoc index c65b7b8d9..3b3237e5d 100644 --- a/doc/en/weechat.1.en.adoc +++ b/doc/en/weechat.1.en.adoc @@ -13,7 +13,7 @@ weechat - the extensible chat client == SYNOPSIS [verse] -*weechat* [-a|--no-connect] [-d|--dir ] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] +*weechat* [-a|--no-connect] [-d|--dir ] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] *weechat* [-c|--colors] *weechat* [-h|--help] *weechat* [-l|--license] diff --git a/doc/fr/cmdline_options.fr.adoc b/doc/fr/cmdline_options.fr.adoc index 330709a06..e8cd0021f 100644 --- a/doc/fr/cmdline_options.fr.adoc +++ b/doc/fr/cmdline_options.fr.adoc @@ -16,6 +16,17 @@ Si cette option n'est pas donnée, la variable d'environnement WEECHAT_HOME est utilisée (si non vide). +*-t*, *--temp-dir*:: + Créer un répertoire de base WeeChat temporaire et le supprimer en quittant + (incompatible avec l'option "-d"). + + Le nom du répertoire est automatiquement construit par WeeChat, avec ce + modèle : "weechat_temp_XXXXXX" (où "XXXXXX" est aléatoire). Il est créé dans + le premier répertoire disponible de cette liste : variable d'environnement + "TMPDIR", "/tmp" (cela peut être différent selon le système d'exploitation), + variable d'environnement "HOME", répertoire courant. + + Le répertoire de base temporaire a les permissions 0700 (seul le propriétaire + peut lire, écrire et exécuter). + *-h*, *--help*:: Afficher l'aide. diff --git a/doc/fr/weechat-headless.1.fr.adoc b/doc/fr/weechat-headless.1.fr.adoc index 6f7952b86..41f5053fd 100644 --- a/doc/fr/weechat-headless.1.fr.adoc +++ b/doc/fr/weechat-headless.1.fr.adoc @@ -13,7 +13,7 @@ weechat-headless - le client de discussion extensible (version sans interface) == SYNOPSIS [verse] -*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir ] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] +*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir ] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] *weechat-headless* [-c|--colors] *weechat-headless* [-h|--help] *weechat-headless* [-l|--license] diff --git a/doc/fr/weechat.1.fr.adoc b/doc/fr/weechat.1.fr.adoc index 90462312d..9fd925671 100644 --- a/doc/fr/weechat.1.fr.adoc +++ b/doc/fr/weechat.1.fr.adoc @@ -13,7 +13,7 @@ weechat - le client de discussion extensible == SYNOPSIS [verse] -*weechat* [-a|--no-connect] [-d|--dir ] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [extension:option...] +*weechat* [-a|--no-connect] [-d|--dir ] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [extension:option...] *weechat* [-c|--colors] *weechat* [-h|--help] *weechat* [-l|--license] diff --git a/doc/it/cmdline_options.it.adoc b/doc/it/cmdline_options.it.adoc index 294daf858..ff3fc215c 100644 --- a/doc/it/cmdline_options.it.adoc +++ b/doc/it/cmdline_options.it.adoc @@ -17,6 +17,18 @@ If this option is not given, the environment variable WEECHAT_HOME is used (if not empty). +// TRANSLATION MISSING +*-t*, *--temp-dir*:: + Create a temporary WeeChat home directory and delete it on exit + (incompatible with option "-d"). + + The name of the directory is automatically built by WeeChat, with this + template: "weechat_temp_XXXXXX" (where "XXXXXX" is random). It it created + in the first available directory in this list: environment variable "TMPDIR", + "/tmp" (may be different according to the operating system), environment + variable "HOME", current directory. + + The temporary home directory has permissions 0700 (only owner can read, + write and execute). + *-h*, *--help*:: Mostra l'aiuto. diff --git a/doc/it/weechat-headless.1.it.adoc b/doc/it/weechat-headless.1.it.adoc index 3f0eb3ab4..241bf516c 100644 --- a/doc/it/weechat-headless.1.it.adoc +++ b/doc/it/weechat-headless.1.it.adoc @@ -16,7 +16,7 @@ weechat-headless - the extensible chat client (headless version) // TRANSLATION MISSING [verse] -*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir ] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] +*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir ] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] *weechat-headless* [-c|--colors] *weechat-headless* [-h|--help] *weechat-headless* [-l|--license] diff --git a/doc/it/weechat.1.it.adoc b/doc/it/weechat.1.it.adoc index e529538b5..659026c1e 100644 --- a/doc/it/weechat.1.it.adoc +++ b/doc/it/weechat.1.it.adoc @@ -16,7 +16,7 @@ weechat - the extensible chat client // TRANSLATION MISSING [verse] -*weechat* [-a|--no-connect] [-d|--dir ] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] +*weechat* [-a|--no-connect] [-d|--dir ] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] *weechat* [-c|--colors] *weechat* [-h|--help] *weechat* [-l|--license] diff --git a/doc/ja/cmdline_options.ja.adoc b/doc/ja/cmdline_options.ja.adoc index 784f28af4..ccb2e29ff 100644 --- a/doc/ja/cmdline_options.ja.adoc +++ b/doc/ja/cmdline_options.ja.adoc @@ -15,6 +15,18 @@ このオプションを指定しなかった場合、環境変数 WEECHAT_HOME を使います (空でない限り)。 +// TRANSLATION MISSING +*-t*, *--temp-dir*:: + Create a temporary WeeChat home directory and delete it on exit + (incompatible with option "-d"). + + The name of the directory is automatically built by WeeChat, with this + template: "weechat_temp_XXXXXX" (where "XXXXXX" is random). It it created + in the first available directory in this list: environment variable "TMPDIR", + "/tmp" (may be different according to the operating system), environment + variable "HOME", current directory. + + The temporary home directory has permissions 0700 (only owner can read, + write and execute). + *-h*, *--help*:: ヘルプを表示 diff --git a/doc/ja/weechat-headless.1.ja.adoc b/doc/ja/weechat-headless.1.ja.adoc index 25afa398d..b36d1d2d6 100644 --- a/doc/ja/weechat-headless.1.ja.adoc +++ b/doc/ja/weechat-headless.1.ja.adoc @@ -13,7 +13,7 @@ weechat-headless - 拡張可能なチャットクライアント (ヘッドレ == 書式 [verse] -*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir ] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] +*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir ] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] *weechat-headless* [-c|--colors] *weechat-headless* [-h|--help] *weechat-headless* [-l|--license] diff --git a/doc/ja/weechat.1.ja.adoc b/doc/ja/weechat.1.ja.adoc index 66322d780..e0ced14fb 100644 --- a/doc/ja/weechat.1.ja.adoc +++ b/doc/ja/weechat.1.ja.adoc @@ -13,7 +13,7 @@ weechat - 拡張可能なチャットクライアント == 書式 [verse] -*weechat* [-a|--no-connect] [-d|--dir ] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] +*weechat* [-a|--no-connect] [-d|--dir ] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] *weechat* [-c|--colors] *weechat* [-h|--help] *weechat* [-l|--license] diff --git a/doc/pl/cmdline_options.pl.adoc b/doc/pl/cmdline_options.pl.adoc index eb129c309..f04557ef3 100644 --- a/doc/pl/cmdline_options.pl.adoc +++ b/doc/pl/cmdline_options.pl.adoc @@ -14,6 +14,18 @@ Jeśli ta opcja nie zostanie podada, użyta zostanie zawartość zmiennej WEECHAT_HOME (jeśli została ustawiona). +// TRANSLATION MISSING +*-t*, *--temp-dir*:: + Create a temporary WeeChat home directory and delete it on exit + (incompatible with option "-d"). + + The name of the directory is automatically built by WeeChat, with this + template: "weechat_temp_XXXXXX" (where "XXXXXX" is random). It it created + in the first available directory in this list: environment variable "TMPDIR", + "/tmp" (may be different according to the operating system), environment + variable "HOME", current directory. + + The temporary home directory has permissions 0700 (only owner can read, + write and execute). + *-h*, *--help*:: Wyświetla pomoc. diff --git a/doc/pl/weechat-headless.1.pl.adoc b/doc/pl/weechat-headless.1.pl.adoc index 8ad699887..abd9b722c 100644 --- a/doc/pl/weechat-headless.1.pl.adoc +++ b/doc/pl/weechat-headless.1.pl.adoc @@ -13,7 +13,7 @@ weechat-headless - rozszerzalny klient rozmów (wersja headless) == SKŁADNIA [verse] -*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir ] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [wtyczka:opcja...] +*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir ] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [wtyczka:opcja...] *weechat-headless* [-c|--colors] *weechat-headless* [-h|--help] *weechat-headless* [-l|--license] diff --git a/doc/pl/weechat.1.pl.adoc b/doc/pl/weechat.1.pl.adoc index c31478fd3..d317313f4 100644 --- a/doc/pl/weechat.1.pl.adoc +++ b/doc/pl/weechat.1.pl.adoc @@ -13,7 +13,7 @@ weechat - rozszerzalny klient rozmów == SKŁADNIA [verse] -*weechat* [-a|--no-connect] [-d|--dir <ścieżka>] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [wtyczka:opcja...] +*weechat* [-a|--no-connect] [-d|--dir <ścieżka>] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [wtyczka:opcja...] *weechat* [-c|--colors] *weechat* [-h|--help] *weechat* [-l|--license] diff --git a/doc/ru/cmdline_options.ru.adoc b/doc/ru/cmdline_options.ru.adoc index 930b5a43c..87f3d918f 100644 --- a/doc/ru/cmdline_options.ru.adoc +++ b/doc/ru/cmdline_options.ru.adoc @@ -17,6 +17,18 @@ Если эта опция не задана, будет использована переменная окружения WEECHAT_HOME (если такая переменная задана). +// TRANSLATION MISSING +*-t*, *--temp-dir*:: + Create a temporary WeeChat home directory and delete it on exit + (incompatible with option "-d"). + + The name of the directory is automatically built by WeeChat, with this + template: "weechat_temp_XXXXXX" (where "XXXXXX" is random). It it created + in the first available directory in this list: environment variable "TMPDIR", + "/tmp" (may be different according to the operating system), environment + variable "HOME", current directory. + + The temporary home directory has permissions 0700 (only owner can read, + write and execute). + *-h*, *--help*:: Вывести справку. diff --git a/doc/ru/weechat-headless.1.ru.adoc b/doc/ru/weechat-headless.1.ru.adoc index 2d12e8f93..821959f86 100644 --- a/doc/ru/weechat-headless.1.ru.adoc +++ b/doc/ru/weechat-headless.1.ru.adoc @@ -16,7 +16,7 @@ weechat-headless - расширяемый чат-клиент (headless version) // TRANSLATION MISSING [verse] -*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir ] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] +*weechat-headless* [-a|--no-connect] [--daemon] [-d|--dir ] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command ] [-s|--no-script] [--upgrade] [plugin:option...] *weechat-headless* [-c|--colors] *weechat-headless* [-h|--help] *weechat-headless* [-l|--license] diff --git a/doc/ru/weechat.1.ru.adoc b/doc/ru/weechat.1.ru.adoc index de4c79607..fedd963a5 100644 --- a/doc/ru/weechat.1.ru.adoc +++ b/doc/ru/weechat.1.ru.adoc @@ -15,7 +15,7 @@ weechat - расширяемый чат-клиент // TRANSLATION MISSING [verse] -*weechat* [-a|--no-connect] [-d|--dir <путь>] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command <команда>] [-s|--no-script] [--upgrade] [<плагин>:<параметр>...] +*weechat* [-a|--no-connect] [-d|--dir <путь>] [-t|--temp-dir] [-p|--no-plugin] [-P|--plugins ] [-r|--run-command <команда>] [-s|--no-script] [--upgrade] [<плагин>:<параметр>...] *weechat* [-c|--colors] *weechat* [-h|--help] *weechat* [-l|--license] diff --git a/po/cs.po b/po/cs.po index f2a27c5e0..c57f8fda1 100644 --- a/po/cs.po +++ b/po/cs.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2018-11-12 21:00+0100\n" -"PO-Revision-Date: 2018-11-04 21:44+0100\n" +"POT-Creation-Date: 2018-11-17 08:09+0100\n" +"PO-Revision-Date: 2018-11-17 10:36+0100\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" "Language: cs\n" @@ -163,6 +163,9 @@ msgid "" " -d, --dir set WeeChat home directory (default: ~/.weechat)\n" " (environment variable WEECHAT_HOME is read if " "this option is not given)\n" +" -t, --temp-dir create a temporary WeeChat homedirectory and " +"delete it on exit\n" +" (incompatible with option \"-d\")\n" " -h, --help display this help\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" @@ -217,6 +220,11 @@ msgstr "Chyba: nemohu získat HOME adresář\n" msgid "Error: not enough memory for home directory\n" msgstr "Chyba: nedostatek paměti pro domácí adresář\n" +#, fuzzy, c-format +msgid "" +"Error: unable to create a temporary home directory (using template: \"%s\")\n" +msgstr "%s%s: nemohu vytvořit adresář pro logy (\"%s\")" + msgid "Error: WEECHAT_HOME is undefined, check build options\n" msgstr "Chyba: není definována WEECHAT_HOME, zkontroluj build promněné\n" @@ -4103,8 +4111,12 @@ msgstr "Využití pamětí není dostupné (funkce \"mallinfo\" nenalezena)" msgid "Directories:" msgstr "Složky:" -msgid "default" -msgstr "výchozí" +msgid "(TEMPORARY, deleted on exit)" +msgstr "" + +#, fuzzy, c-format +msgid " (default: %s)" +msgstr " signál: %s" #, c-format msgid "%sError sending signal %d to pid %d: %s" @@ -12645,6 +12657,3 @@ msgstr "%s%s: vypršel časový limit \"%s\" pro %s" #, c-format msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: nemohu se připojit\" neočekávaná chyba (%d)" - -#~ msgid "merge server buffers" -#~ msgstr "spojit buffery serverů" diff --git a/po/de.po b/po/de.po index 773ceef9d..b264efea1 100644 --- a/po/de.po +++ b/po/de.po @@ -24,8 +24,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2018-11-12 21:00+0100\n" -"PO-Revision-Date: 2018-11-12 22:35+0100\n" +"POT-Creation-Date: 2018-11-17 08:09+0100\n" +"PO-Revision-Date: 2018-11-17 10:36+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" "Language: de\n" @@ -163,12 +163,16 @@ msgstr "" msgid "Usage: %s [option...] [plugin:option...]\n" msgstr "Aufruf: %s [Option...] [Erweiterung:Option...]\n" +#, fuzzy msgid "" " -a, --no-connect disable auto-connect to servers at startup\n" " -c, --colors display default colors in terminal\n" " -d, --dir set WeeChat home directory (default: ~/.weechat)\n" " (environment variable WEECHAT_HOME is read if " "this option is not given)\n" +" -t, --temp-dir create a temporary WeeChat homedirectory and " +"delete it on exit\n" +" (incompatible with option \"-d\")\n" " -h, --help display this help\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" @@ -236,6 +240,12 @@ msgstr "Fehler: Das HOME-Verzeichnis kann nicht ermittelt werden\n" msgid "Error: not enough memory for home directory\n" msgstr "Fehler: nicht genug Speicher für das HOME-Verzeichnis\n" +#, fuzzy, c-format +msgid "" +"Error: unable to create a temporary home directory (using template: \"%s\")\n" +msgstr "" +"%s%s: Verzeichnis für Protokoll-Dateien kann nicht erstellt werden (\"%s\")" + msgid "Error: WEECHAT_HOME is undefined, check build options\n" msgstr "" "Fehler: WEECHAT_HOME ist nicht definiert, bitte überprüfen Sie die build-" @@ -4944,8 +4954,12 @@ msgstr "Speicheranzeige nicht verfügbar (Funktion \"mallinfo\" nicht gefunden)" msgid "Directories:" msgstr "Verzeichnisse:" -msgid "default" -msgstr "voreingestellt" +msgid "(TEMPORARY, deleted on exit)" +msgstr "" + +#, fuzzy, c-format +msgid " (default: %s)" +msgstr " Signal: %s" #, c-format msgid "%sError sending signal %d to pid %d: %s" @@ -14758,6 +14772,3 @@ msgstr "%s%s: Zeitüberschreitung für \"%s\" mit %s" msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "" "%s%s: Verbindung konnte nicht hergestellt werden: unerwarteter Fehler (%d)" - -#~ msgid "merge server buffers" -#~ msgstr "Server-Buffer zusammenfügen" diff --git a/po/es.po b/po/es.po index b4b639f10..5890992db 100644 --- a/po/es.po +++ b/po/es.po @@ -22,8 +22,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2018-11-12 21:00+0100\n" -"PO-Revision-Date: 2018-11-04 21:44+0100\n" +"POT-Creation-Date: 2018-11-17 08:09+0100\n" +"PO-Revision-Date: 2018-11-17 10:36+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" "Language: es\n" @@ -170,6 +170,9 @@ msgid "" " -d, --dir set WeeChat home directory (default: ~/.weechat)\n" " (environment variable WEECHAT_HOME is read if " "this option is not given)\n" +" -t, --temp-dir create a temporary WeeChat homedirectory and " +"delete it on exit\n" +" (incompatible with option \"-d\")\n" " -h, --help display this help\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" @@ -228,6 +231,11 @@ msgstr "Error: no ha sido posible obtener el directorio HOME\n" msgid "Error: not enough memory for home directory\n" msgstr "Error: no hay suficiente memoria para el directorio home\n" +#, fuzzy, c-format +msgid "" +"Error: unable to create a temporary home directory (using template: \"%s\")\n" +msgstr "%s%s: imposible crear directorio para registros (\"%s\")" + msgid "Error: WEECHAT_HOME is undefined, check build options\n" msgstr "" "Error: WEECHAT_HOME no está definido, verifica las opciones de compilación\n" @@ -4296,9 +4304,12 @@ msgstr "Uso de memoria no disponible (función \"mallinfo\" no encontrada)" msgid "Directories:" msgstr "" -#, fuzzy -msgid "default" -msgstr "predeterminado: " +msgid "(TEMPORARY, deleted on exit)" +msgstr "" + +#, fuzzy, c-format +msgid " (default: %s)" +msgstr " señal: %s" #, c-format msgid "%sError sending signal %d to pid %d: %s" @@ -12923,6 +12934,3 @@ msgstr "%s%s: tiempo de espera máximo para \"%s\" con %s" #, fuzzy, c-format msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: no es posible conectarse al transmisor" - -#~ msgid "merge server buffers" -#~ msgstr "unir buffers de los servidores" diff --git a/po/fr.po b/po/fr.po index a29f6fd34..e03d151af 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: 2018-11-12 21:00+0100\n" -"PO-Revision-Date: 2018-11-12 21:01+0100\n" +"POT-Creation-Date: 2018-11-17 08:09+0100\n" +"PO-Revision-Date: 2018-11-17 10:35+0100\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -162,6 +162,9 @@ msgid "" " -d, --dir set WeeChat home directory (default: ~/.weechat)\n" " (environment variable WEECHAT_HOME is read if " "this option is not given)\n" +" -t, --temp-dir create a temporary WeeChat homedirectory and " +"delete it on exit\n" +" (incompatible with option \"-d\")\n" " -h, --help display this help\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" @@ -183,6 +186,9 @@ msgstr "" "(défaut : ~/.weechat)\n" " (la variable d'environnement WEECHAT_HOME est lue " "si cette option n'est pas donnée)\n" +" -t, --temp-dir créer un répertoire de base WeeChat temporaire et " +"le supprimer en quittant\n" +" (incompatible avec l'option \"-d\")\n" " -h, --help afficher cette aide\n" " -l, --license afficher la licence WeeChat\n" " -p, --no-plugin ne charger aucune extension au démarrage\n" @@ -225,6 +231,13 @@ msgstr "Erreur : impossible de lire le répertoire personnel\n" msgid "Error: not enough memory for home directory\n" msgstr "Erreur : pas assez de mémoire pour le répertoire personnel\n" +#, c-format +msgid "" +"Error: unable to create a temporary home directory (using template: \"%s\")\n" +msgstr "" +"Erreur : impossible de créer le répertoire de base temporaire (en utilisant " +"le modèle : \"%s\")\n" + msgid "Error: WEECHAT_HOME is undefined, check build options\n" msgstr "" "Erreur : WEECHAT_HOME n'est pas défini, vérifiez les options de " @@ -4816,8 +4829,12 @@ msgstr "Utilisation mémoire non disponible (fonction \"mallinfo\" non trouvée) msgid "Directories:" msgstr "Répertoires :" -msgid "default" -msgstr "défaut" +msgid "(TEMPORARY, deleted on exit)" +msgstr "(TEMPORAIRE, supprimé en quittant)" + +#, c-format +msgid " (default: %s)" +msgstr " (défaut : %s)" #, c-format msgid "%sError sending signal %d to pid %d: %s" @@ -14459,6 +14476,3 @@ msgstr "%s%s : délai d'attente dépassé pour \"%s\" avec %s" #, c-format msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s : impossible de se connecter : erreur inattendue (%d)" - -#~ msgid "merge server buffers" -#~ msgstr "mélanger les tampons de serveur" diff --git a/po/hu.po b/po/hu.po index 12698f744..e5b5f9e5c 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,8 +20,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2018-11-12 21:00+0100\n" -"PO-Revision-Date: 2018-11-04 21:44+0100\n" +"POT-Creation-Date: 2018-11-17 08:09+0100\n" +"PO-Revision-Date: 2018-11-17 10:36+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" "Language: hu\n" @@ -169,6 +169,9 @@ msgid "" " -d, --dir set WeeChat home directory (default: ~/.weechat)\n" " (environment variable WEECHAT_HOME is read if " "this option is not given)\n" +" -t, --temp-dir create a temporary WeeChat homedirectory and " +"delete it on exit\n" +" (incompatible with option \"-d\")\n" " -h, --help display this help\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" @@ -221,6 +224,11 @@ msgstr "%s nem sikerült a HOME könyvtárat beállítani\n" msgid "Error: not enough memory for home directory\n" msgstr "%s nincs elég memória a HOME könyvtárhoz\n" +#, fuzzy, c-format +msgid "" +"Error: unable to create a temporary home directory (using template: \"%s\")\n" +msgstr "%s nem sikerült a szervert létrehozni\n" + msgid "Error: WEECHAT_HOME is undefined, check build options\n" msgstr "" @@ -3670,9 +3678,12 @@ msgstr "" msgid "Directories:" msgstr "" -#, fuzzy -msgid "default" -msgstr " . alapérték: %d\n" +msgid "(TEMPORARY, deleted on exit)" +msgstr "" + +#, fuzzy, c-format +msgid " (default: %s)" +msgstr " IRC(%s)\n" #, c-format msgid "%sError sending signal %d to pid %d: %s" @@ -11923,7 +11934,3 @@ msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n" #, fuzzy, c-format msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s DCC: nem sikerült kapcsolódni a küldőhöz\n" - -#, fuzzy -#~ msgid "merge server buffers" -#~ msgstr "pufferek kezelése" diff --git a/po/it.po b/po/it.po index cac0aef50..e82a59180 100644 --- a/po/it.po +++ b/po/it.po @@ -20,8 +20,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2018-11-12 21:00+0100\n" -"PO-Revision-Date: 2018-11-04 21:44+0100\n" +"POT-Creation-Date: 2018-11-17 08:09+0100\n" +"PO-Revision-Date: 2018-11-17 10:36+0100\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" "Language: it\n" @@ -168,6 +168,9 @@ msgid "" " -d, --dir set WeeChat home directory (default: ~/.weechat)\n" " (environment variable WEECHAT_HOME is read if " "this option is not given)\n" +" -t, --temp-dir create a temporary WeeChat homedirectory and " +"delete it on exit\n" +" (incompatible with option \"-d\")\n" " -h, --help display this help\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" @@ -220,6 +223,11 @@ msgstr "Errore: impossibile aprire la directory HOME\n" msgid "Error: not enough memory for home directory\n" msgstr "Errore: spazio insufficiente per la directory home\n" +#, fuzzy, c-format +msgid "" +"Error: unable to create a temporary home directory (using template: \"%s\")\n" +msgstr "%s%s: impossibile creare la directory per i log (\"%s\")" + msgid "Error: WEECHAT_HOME is undefined, check build options\n" msgstr "" "Errore: WEECHAT_HOME non è definito, verificare le opzioni di compilazione\n" @@ -4411,8 +4419,12 @@ msgstr "Uso della memoria non disponibile (funzione \"mallinfo\" non trovata)" msgid "Directories:" msgstr "Directory:" -msgid "default" -msgstr "predefinito" +msgid "(TEMPORARY, deleted on exit)" +msgstr "" + +#, fuzzy, c-format +msgid " (default: %s)" +msgstr " segnale: %s" #, c-format msgid "%sError sending signal %d to pid %d: %s" @@ -13138,6 +13150,3 @@ msgstr "%s%s: timeout per \"%s\" con %s" #, fuzzy, c-format msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: impossibile connettersi al mittente" - -#~ msgid "merge server buffers" -#~ msgstr "unisci i buffer dei server" diff --git a/po/ja.po b/po/ja.po index a7b1d385e..04ca3aeb7 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,8 +20,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2018-11-12 21:00+0100\n" -"PO-Revision-Date: 2018-11-04 21:44+0100\n" +"POT-Creation-Date: 2018-11-17 08:09+0100\n" +"PO-Revision-Date: 2018-11-17 10:36+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" @@ -155,12 +155,16 @@ msgstr "" msgid "Usage: %s [option...] [plugin:option...]\n" msgstr "使い方: %s [オプション...] [プラグイン:オプション...]\n" +#, fuzzy msgid "" " -a, --no-connect disable auto-connect to servers at startup\n" " -c, --colors display default colors in terminal\n" " -d, --dir set WeeChat home directory (default: ~/.weechat)\n" " (environment variable WEECHAT_HOME is read if " "this option is not given)\n" +" -t, --temp-dir create a temporary WeeChat homedirectory and " +"delete it on exit\n" +" (incompatible with option \"-d\")\n" " -h, --help display this help\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" @@ -225,6 +229,11 @@ msgstr "エラー: HOME ディレクトリが不明です\n" msgid "Error: not enough memory for home directory\n" msgstr "エラー: ホームディレクトリ用のメモリが不足しています\n" +#, fuzzy, c-format +msgid "" +"Error: unable to create a temporary home directory (using template: \"%s\")\n" +msgstr "%s%s: ログ用のディレクトリを作成できません (\"%s\")" + msgid "Error: WEECHAT_HOME is undefined, check build options\n" msgstr "" "エラー: WEECHAT_HOME が定義されていません、ビルドオプションを確認してくださ" @@ -4606,8 +4615,12 @@ msgstr "メモリ使用量は利用できません (\"mallinfo\" 関数が見つ msgid "Directories:" msgstr "ディレクトリ:" -msgid "default" -msgstr "デフォルト" +msgid "(TEMPORARY, deleted on exit)" +msgstr "" + +#, fuzzy, c-format +msgid " (default: %s)" +msgstr " シグナル: %s" #, c-format msgid "%sError sending signal %d to pid %d: %s" @@ -13891,6 +13904,3 @@ msgstr "%s%s: \"%s\" のタイムアウト %s" #, c-format msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: 接続できません: 未定義のエラー (%d)" - -#~ msgid "merge server buffers" -#~ msgstr "サーババッファをマージ" diff --git a/po/pl.po b/po/pl.po index 4d07f3e80..77b057aa0 100644 --- a/po/pl.po +++ b/po/pl.po @@ -22,8 +22,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2018-11-12 21:00+0100\n" -"PO-Revision-Date: 2018-11-04 21:44+0100\n" +"POT-Creation-Date: 2018-11-17 08:09+0100\n" +"PO-Revision-Date: 2018-11-17 10:36+0100\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: Polish \n" "Language: pl\n" @@ -157,12 +157,16 @@ msgstr "" msgid "Usage: %s [option...] [plugin:option...]\n" msgstr "Użycie: %s [argumenty...] [wtyczka:opcje...]\n" +#, fuzzy msgid "" " -a, --no-connect disable auto-connect to servers at startup\n" " -c, --colors display default colors in terminal\n" " -d, --dir set WeeChat home directory (default: ~/.weechat)\n" " (environment variable WEECHAT_HOME is read if " "this option is not given)\n" +" -t, --temp-dir create a temporary WeeChat homedirectory and " +"delete it on exit\n" +" (incompatible with option \"-d\")\n" " -h, --help display this help\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" @@ -225,6 +229,11 @@ msgstr "Błąd: nie można pozyskać katalogu domowego\n" msgid "Error: not enough memory for home directory\n" msgstr "Błąd: za mało miejsca dla katalogu domowego\n" +#, fuzzy, c-format +msgid "" +"Error: unable to create a temporary home directory (using template: \"%s\")\n" +msgstr "%s%s: nie można utworzyć katalogu dla logów (\"%s\")" + msgid "Error: WEECHAT_HOME is undefined, check build options\n" msgstr "" "Błąd: WEECHAT_HOME nie ma zdefiniowanej wartości , sprawdź opcje kompilacji\n" @@ -4716,8 +4725,12 @@ msgstr "Zużycie pamięci niedostępne (nie znaleziono funkcji \"mallinfo\")" msgid "Directories:" msgstr "Katalogi:" -msgid "default" -msgstr "domyślny" +msgid "(TEMPORARY, deleted on exit)" +msgstr "" + +#, fuzzy, c-format +msgid " (default: %s)" +msgstr " sygnał: %s" #, c-format msgid "%sError sending signal %d to pid %d: %s" @@ -14108,6 +14121,3 @@ msgstr "%s%s: przekroczono czas na \"%s\" z %s" #, c-format msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: nie można połączyć: niespodziewany błąd (%d)" - -#~ msgid "merge server buffers" -#~ msgstr "połącz bufory serwerów" diff --git a/po/pt.po b/po/pt.po index 33263ffed..a768fa2db 100644 --- a/po/pt.po +++ b/po/pt.po @@ -20,8 +20,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2018-11-12 21:00+0100\n" -"PO-Revision-Date: 2018-11-04 21:44+0100\n" +"POT-Creation-Date: 2018-11-17 08:09+0100\n" +"PO-Revision-Date: 2018-11-17 10:36+0100\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" "Language: pt\n" @@ -163,6 +163,9 @@ msgid "" " -d, --dir set WeeChat home directory (default: ~/.weechat)\n" " (environment variable WEECHAT_HOME is read if " "this option is not given)\n" +" -t, --temp-dir create a temporary WeeChat homedirectory and " +"delete it on exit\n" +" (incompatible with option \"-d\")\n" " -h, --help display this help\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" @@ -219,6 +222,11 @@ msgstr "Erro: não foi possível obter o diretório HOME\n" msgid "Error: not enough memory for home directory\n" msgstr "Error: memória insuficiente para o diretório pessoal\n" +#, fuzzy, c-format +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\")" + msgid "Error: WEECHAT_HOME is undefined, check build options\n" msgstr "" "Erro: WEECHAT_HOME não está definido, verifique as opções de compilação\n" @@ -4661,8 +4669,12 @@ msgstr "" msgid "Directories:" msgstr "Diretórios:" -msgid "default" -msgstr "predefinição" +msgid "(TEMPORARY, deleted on exit)" +msgstr "" + +#, fuzzy, c-format +msgid " (default: %s)" +msgstr " sinal: %s" #, c-format msgid "%sError sending signal %d to pid %d: %s" @@ -13802,6 +13814,3 @@ msgstr "%s%s: tempo limite de \"%s\" com %s" #, c-format msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: não foi possível conectar: erro inesperado (%d)" - -#~ msgid "merge server buffers" -#~ msgstr "unir buffers de servidores" diff --git a/po/pt_BR.po b/po/pt_BR.po index ebedaa38c..465e57517 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2018-11-12 21:00+0100\n" -"PO-Revision-Date: 2018-11-04 21:44+0100\n" +"POT-Creation-Date: 2018-11-17 08:09+0100\n" +"PO-Revision-Date: 2018-11-17 10:36+0100\n" "Last-Translator: Eduardo Elias \n" "Language-Team: weechat-dev \n" "Language: pt_BR\n" @@ -196,6 +196,9 @@ msgid "" " -d, --dir set WeeChat home directory (default: ~/.weechat)\n" " (environment variable WEECHAT_HOME is read if " "this option is not given)\n" +" -t, --temp-dir create a temporary WeeChat homedirectory and " +"delete it on exit\n" +" (incompatible with option \"-d\")\n" " -h, --help display this help\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" @@ -252,6 +255,11 @@ msgstr "Erro: não foi possível obter o diretório do usuário (HOME)\n" msgid "Error: not enough memory for home directory\n" msgstr "Erro: não há memória suficiente para o diretório do usuário (HOME)\n" +#, fuzzy, c-format +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\")" + msgid "Error: WEECHAT_HOME is undefined, check build options\n" msgstr "" "Erro: WEECHAT_HOME não está definida, verifique as opções de compilação\n" @@ -4293,9 +4301,12 @@ msgstr "Uso de memória não disponível (função \"mallinfo\" não encontrada) msgid "Directories:" msgstr "" -#, fuzzy -msgid "default" -msgstr "valor padrão" +msgid "(TEMPORARY, deleted on exit)" +msgstr "" + +#, fuzzy, c-format +msgid " (default: %s)" +msgstr " sinal: %s" #, c-format msgid "%sError sending signal %d to pid %d: %s" @@ -12386,6 +12397,3 @@ msgstr "%s%s: tempo esgotado para \"%s\" com %s" #, fuzzy, c-format msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s%s: não foi possível conectar ao remetente" - -#~ msgid "merge server buffers" -#~ msgstr "mesclar buffers de servidores" diff --git a/po/ru.po b/po/ru.po index b11a3a056..6777cfe8b 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2018-11-12 21:00+0100\n" -"PO-Revision-Date: 2018-11-04 21:44+0100\n" +"POT-Creation-Date: 2018-11-17 08:09+0100\n" +"PO-Revision-Date: 2018-11-17 10:36+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" "Language: ru\n" @@ -177,6 +177,9 @@ msgid "" " -d, --dir set WeeChat home directory (default: ~/.weechat)\n" " (environment variable WEECHAT_HOME is read if " "this option is not given)\n" +" -t, --temp-dir create a temporary WeeChat homedirectory and " +"delete it on exit\n" +" (incompatible with option \"-d\")\n" " -h, --help display this help\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" @@ -230,6 +233,11 @@ msgstr "%s не могу получить домашний каталог\n" msgid "Error: not enough memory for home directory\n" msgstr "%s недостаточно памяти для домашней директории\n" +#, fuzzy, c-format +msgid "" +"Error: unable to create a temporary home directory (using template: \"%s\")\n" +msgstr "%s не могу создать сервер \"%s\"\n" + msgid "Error: WEECHAT_HOME is undefined, check build options\n" msgstr "Ошибка: WEECHAT_HOME не определена, проверьте опции сборки\n" @@ -3699,9 +3707,12 @@ msgstr "" msgid "Directories:" msgstr "" -#, fuzzy -msgid "default" -msgstr " . значение по умолчанию: %d\n" +msgid "(TEMPORARY, deleted on exit)" +msgstr "" + +#, fuzzy, c-format +msgid " (default: %s)" +msgstr " IRC(%s)\n" #, c-format msgid "%sError sending signal %d to pid %d: %s" @@ -11955,7 +11966,3 @@ msgstr "%s нет аргумента для параметра \"%s\"\n" #, fuzzy, c-format msgid "%s%s: unable to connect: unexpected error (%d)" msgstr "%s DCC: не могу соединиться с отправителем\n" - -#, fuzzy -#~ msgid "merge server buffers" -#~ msgstr "управление буферами" diff --git a/po/tr.po b/po/tr.po index af4483e47..1c39e1da9 100644 --- a/po/tr.po +++ b/po/tr.po @@ -20,8 +20,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2018-11-12 21:00+0100\n" -"PO-Revision-Date: 2018-11-04 21:44+0100\n" +"POT-Creation-Date: 2018-11-17 08:09+0100\n" +"PO-Revision-Date: 2018-11-17 10:36+0100\n" "Last-Translator: Hasan Kiran \n" "Language-Team: weechat-dev \n" "Language: tr\n" @@ -152,6 +152,9 @@ msgid "" " -d, --dir set WeeChat home directory (default: ~/.weechat)\n" " (environment variable WEECHAT_HOME is read if " "this option is not given)\n" +" -t, --temp-dir create a temporary WeeChat homedirectory and " +"delete it on exit\n" +" (incompatible with option \"-d\")\n" " -h, --help display this help\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" @@ -190,6 +193,11 @@ msgstr "" msgid "Error: not enough memory for home directory\n" msgstr "Hata: ev dizini için bellek yeterli değil\n" +#, c-format +msgid "" +"Error: unable to create a temporary home directory (using template: \"%s\")\n" +msgstr "" + msgid "Error: WEECHAT_HOME is undefined, check build options\n" msgstr "" @@ -3326,8 +3334,12 @@ msgstr "" msgid "Directories:" msgstr "" -msgid "default" -msgstr "varsayılan" +msgid "(TEMPORARY, deleted on exit)" +msgstr "" + +#, fuzzy, c-format +msgid " (default: %s)" +msgstr " dosya: %s" #, c-format msgid "%sError sending signal %d to pid %d: %s" diff --git a/po/weechat.pot b/po/weechat.pot index 8152446c3..be4242aa9 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: 2018-11-12 21:00+0100\n" +"POT-Creation-Date: 2018-11-17 08:09+0100\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -150,6 +150,9 @@ msgid "" " -d, --dir set WeeChat home directory (default: ~/.weechat)\n" " (environment variable WEECHAT_HOME is read if " "this option is not given)\n" +" -t, --temp-dir create a temporary WeeChat homedirectory and " +"delete it on exit\n" +" (incompatible with option \"-d\")\n" " -h, --help display this help\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" @@ -188,6 +191,11 @@ msgstr "" msgid "Error: not enough memory for home directory\n" msgstr "" +#, c-format +msgid "" +"Error: unable to create a temporary home directory (using template: \"%s\")\n" +msgstr "" + msgid "Error: WEECHAT_HOME is undefined, check build options\n" msgstr "" @@ -3316,7 +3324,11 @@ msgstr "" msgid "Directories:" msgstr "" -msgid "default" +msgid "(TEMPORARY, deleted on exit)" +msgstr "" + +#, c-format +msgid " (default: %s)" msgstr "" #, c-format diff --git a/src/core/wee-debug.c b/src/core/wee-debug.c index 44d20e616..b21a7d98a 100644 --- a/src/core/wee-debug.c +++ b/src/core/wee-debug.c @@ -581,8 +581,12 @@ debug_directories () gui_chat_printf (NULL, ""); gui_chat_printf (NULL, _("Directories:")); - gui_chat_printf (NULL, " home: %s (%s: %s)", - weechat_home, _("default"), WEECHAT_HOME); + gui_chat_printf (NULL, " home: %s%s%s", + weechat_home, + (weechat_home_temp) ? " " : "", + (weechat_home_temp) ? _("(TEMPORARY, deleted on exit)") : ""); + gui_chat_printf (NULL, _(" (default: %s)"), + WEECHAT_HOME); gui_chat_printf (NULL, " lib: %s", WEECHAT_LIBDIR); gui_chat_printf (NULL, " lib (extra): %s", (extra_libdir && extra_libdir[0]) ? extra_libdir : "-"); diff --git a/src/core/wee-util.c b/src/core/wee-util.c index 8760aacea..be2512d88 100644 --- a/src/core/wee-util.c +++ b/src/core/wee-util.c @@ -19,6 +19,14 @@ * along with WeeChat. If not, see . */ +/* for P_tmpdir in stdio.h */ +#ifndef __USE_XOPEN +#define __USE_XOPEN +#endif + +/* for nftw() */ +#define _XOPEN_SOURCE 700 + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -39,6 +47,7 @@ #include #include #include +#include #include "weechat.h" #include "wee-util.h" @@ -362,6 +371,49 @@ util_catch_signal (int signum, void (*handler)(int)) sigaction (signum, &act, NULL); } +/* + * Returns the path to a temporary directory, the first valid directory in + * this list: + * - content of environment variable "TMPDIR" + * - P_tmpdir (from stdio.h) + * - content of environment variable "HOME" (user home directory) + * - "." (current directory) + */ + +char * +util_get_temp_dir() +{ + char *tmpdir; + struct stat buf; + int rc; + + /* get directory from $TMPDIR */ + tmpdir = getenv ("TMPDIR"); + if (tmpdir && tmpdir[0]) + { + rc = stat (tmpdir, &buf); + if ((rc == 0) && S_ISDIR(buf.st_mode)) + return strdup (tmpdir); + } + + /* get directory from P_tmpdir */ + rc = stat (P_tmpdir, &buf); + if ((rc == 0) && S_ISDIR(buf.st_mode)) + return strdup (P_tmpdir); + + /* get directory from $HOME */ + tmpdir = getenv ("HOME"); + if (tmpdir && tmpdir[0]) + { + rc = stat (tmpdir, &buf); + if ((rc == 0) && S_ISDIR(buf.st_mode)) + return strdup (tmpdir); + } + + /* fallback on current directory */ + return strdup ("."); +} + /* * Creates a directory in WeeChat home. * @@ -482,6 +534,47 @@ util_mkdir_parents (const char *directory, int mode) return 1; } +/* + * Unlinks a file or directory; callback called by function util_rmtree(). + * + * Returns the return code of remove(): + * 0: OK + * -1: error + */ + +int +util_unlink_cb (const char *fpath, const struct stat *sb, int typeflag, + struct FTW *ftwbuf) +{ + /* make C compiler happy */ + (void) sb; + (void) typeflag; + (void) ftwbuf; + + return remove (fpath); +} + +/* + * Removes a directory and all files inside recursively. + * + * Returns: + * 1: OK + * 0: error + */ + +int +util_rmtree (const char *directory) +{ + int rc; + + if (!directory) + return 0; + + rc = nftw (directory, util_unlink_cb, 64, FTW_DEPTH | FTW_PHYS); + + return (rc == 0) ? 1 : 0; +} + /* * Finds files in a directory and executes a function on each file. */ diff --git a/src/core/wee-util.h b/src/core/wee-util.h index 53ae47535..cd41fc083 100644 --- a/src/core/wee-util.h +++ b/src/core/wee-util.h @@ -36,16 +36,27 @@ struct t_util_signal int signal; /* signal number */ }; +/* limits */ extern void util_setrlimit (); + +/* timeval */ extern int util_timeval_cmp (struct timeval *tv1, struct timeval *tv2); extern long long util_timeval_diff (struct timeval *tv1, struct timeval *tv2); extern void util_timeval_add (struct timeval *tv, long long interval); + +/* time */ extern const char *util_get_time_string (const time_t *date); + +/* signal */ extern int util_signal_search (const char *name); extern void util_catch_signal (int signum, void (*handler)(int)); + +/* files/directories */ +extern char *util_get_temp_dir(); extern int util_mkdir_home (const char *directory, int mode); extern int util_mkdir (const char *directory, int mode); extern int util_mkdir_parents (const char *directory, int mode); +extern int util_rmtree (const char *directory); extern void util_exec_on_files (const char *directory, int recurse_subdirs, int hidden_files, void (*callback)(void *data, @@ -54,7 +65,11 @@ extern void util_exec_on_files (const char *directory, int recurse_subdirs, extern char *util_search_full_lib_name (const char *filename, const char *sys_directory); extern char *util_file_get_content (const char *filename); + +/* version */ extern int util_version_number (const char *version); + +/* uptime */ extern void util_get_uptime (time_t *total_seconds, int *days, int *hours, int *minutes, int *seconds); diff --git a/src/core/weechat.c b/src/core/weechat.c index dee813023..7ddc636ea 100644 --- a/src/core/weechat.c +++ b/src/core/weechat.c @@ -94,6 +94,8 @@ volatile sig_atomic_t weechat_quit = 0; /* = 1 if quit request from user */ volatile sig_atomic_t weechat_quit_signal = 0; /* signal received, */ /* WeeChat must quit */ char *weechat_home = NULL; /* home dir. (default: ~/.weechat) */ +int weechat_home_temp = 0; /* 1 if using a temporary home */ +int weechat_home_delete_on_exit = 0; /* 1 if home is deleted on exit */ int weechat_locale_ok = 0; /* is locale OK? */ char *weechat_local_charset = NULL; /* example: ISO-8859-1, UTF-8 */ int weechat_server_cmd_line = 0; /* at least 1 server on cmd line */ @@ -152,6 +154,9 @@ weechat_display_usage () "(default: ~/.weechat)\n" " (environment variable WEECHAT_HOME is " "read if this option is not given)\n" + " -t, --temp-dir create a temporary WeeChat home" + "directory and delete it on exit\n" + " (incompatible with option \"-d\")\n" " -h, --help display this help\n" " -l, --license display WeeChat license\n" " -p, --no-plugin don't load any plugin at startup\n" @@ -199,6 +204,8 @@ weechat_parse_args (int argc, char *argv[]) weechat_argv0 = (argv[0]) ? strdup (argv[0]) : NULL; weechat_upgrading = 0; weechat_home = NULL; + weechat_home_temp = 0; + weechat_home_delete_on_exit = 0; weechat_server_cmd_line = 0; weechat_force_plugin_autoload = NULL; weechat_plugin_no_dlclose = 0; @@ -212,8 +219,10 @@ weechat_parse_args (int argc, char *argv[]) weechat_shutdown (EXIT_SUCCESS, 0); } else if ((strcmp (argv[i], "-d") == 0) - || (strcmp (argv[i], "--dir") == 0)) + || (strcmp (argv[i], "--dir") == 0)) { + if (weechat_home_temp) + weechat_home_temp = 0; if (i + 1 < argc) { if (weechat_home) @@ -228,6 +237,16 @@ weechat_parse_args (int argc, char *argv[]) weechat_shutdown (EXIT_FAILURE, 0); } } + else if ((strcmp (argv[i], "-t") == 0) + || (strcmp (argv[i], "--temp-dir") == 0)) + { + if (weechat_home) + { + free (weechat_home); + weechat_home = NULL; + } + weechat_home_temp = 1; + } else if ((strcmp (argv[i], "-h") == 0) || (strcmp (argv[i], "--help") == 0)) { @@ -383,9 +402,60 @@ weechat_set_home_path (char *home_path) void weechat_create_home_dir () { - char *ptr_weechat_home, *config_weechat_home; + char *temp_dir, *temp_home_template, *ptr_weechat_home; + char *config_weechat_home; + int length, add_separator; struct stat statinfo; + /* temporary WeeChat home */ + if (weechat_home_temp) + { + temp_dir = util_get_temp_dir (); + if (!temp_dir || !temp_dir[0]) + { + string_fprintf (stderr, + _("Error: not enough memory for home " + "directory\n")); + weechat_shutdown (EXIT_FAILURE, 0); + /* make C static analyzer happy (never executed) */ + return; + } + length = strlen (temp_dir) + 32 + 1; + temp_home_template = malloc (length); + if (!temp_home_template) + { + free (temp_dir); + string_fprintf (stderr, + _("Error: not enough memory for home " + "directory\n")); + weechat_shutdown (EXIT_FAILURE, 0); + /* make C static analyzer happy (never executed) */ + return; + } + add_separator = (temp_dir[strlen (temp_dir) - 1] != DIR_SEPARATOR_CHAR); + snprintf (temp_home_template, length, + "%s%sweechat_temp_XXXXXX", + temp_dir, + add_separator ? DIR_SEPARATOR : ""); + free (temp_dir); + ptr_weechat_home = mkdtemp (temp_home_template); + if (!ptr_weechat_home) + { + string_fprintf (stderr, + _("Error: unable to create a temporary " + "home directory (using template: \"%s\")\n"), + temp_home_template); + free (temp_home_template); + weechat_shutdown (EXIT_FAILURE, 0); + /* make C static analyzer happy (never executed) */ + return; + } + weechat_home = strdup (ptr_weechat_home); + free (temp_home_template); + weechat_home_delete_on_exit = 1; + return; + } + /* * weechat_home is not set yet: look for environment variable * "WEECHAT_HOME" @@ -637,6 +707,12 @@ weechat_shutdown (int return_code, int crash) network_end (); debug_end (); + if (!crash && weechat_home_delete_on_exit) + { + /* remove temporary home (only if not crashing) */ + util_rmtree (weechat_home); + } + if (weechat_argv0) free (weechat_argv0); if (weechat_home) diff --git a/src/core/weechat.h b/src/core/weechat.h index cbb565a03..9002de328 100644 --- a/src/core/weechat.h +++ b/src/core/weechat.h @@ -110,6 +110,7 @@ extern int weechat_upgrade_count; extern volatile sig_atomic_t weechat_quit; extern volatile sig_atomic_t weechat_quit_signal; extern char *weechat_home; +extern int weechat_home_temp; extern char *weechat_local_charset; extern int weechat_plugin_no_dlclose; extern int weechat_no_gnutls;