From 2359148d418bd27d7071ddb62a7bfdcf70219eb3 Mon Sep 17 00:00:00 2001 From: ngn Date: Sun, 4 Aug 2024 15:39:07 +0300 Subject: [PATCH] update: better unknown configuration error --- locale/tr/LC_MESSAGES/pooler.po | 15 ++++++++++----- src/config.c | 5 ++++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/locale/tr/LC_MESSAGES/pooler.po b/locale/tr/LC_MESSAGES/pooler.po index c83470a..9440e40 100644 --- a/locale/tr/LC_MESSAGES/pooler.po +++ b/locale/tr/LC_MESSAGES/pooler.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-04 15:26+0300\n" +"POT-Creation-Date: 2024-08-04 15:38+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,22 +17,27 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: src/config.c:124 +#: src/config.c:125 +#, c-format +msgid "Unknown configuration option: %s" +msgstr "" + +#: src/config.c:127 #, c-format msgid "Unknown configuration option: %s/%s" msgstr "" -#: src/config.c:132 +#: src/config.c:135 #, fuzzy, c-format msgid "Failed to access the configuration file: %s" msgstr "Kayıt dosyasını açmak başarısız oldu: %s" -#: src/config.c:137 +#: src/config.c:140 #, fuzzy msgid "Failed to parse the configuration" msgstr "Kayıt dosyasını açmak başarısız oldu: %s" -#: src/config.c:144 +#: src/config.c:147 #, fuzzy, c-format msgid "Hostname not specified for the pool: %s" msgstr "Ana makine adı havuz konfigürasyonunda belirtilmedi, geçiliyor: %s" diff --git a/src/config.c b/src/config.c index 707aa20..e672719 100644 --- a/src/config.c +++ b/src/config.c @@ -121,7 +121,10 @@ int config_load_handler(void *data, const char *_section, const char *_key, cons return 1; unknown: - error(_("Unknown configuration option: %s/%s"), section, key); + if (NULL == section || section[0] == '\0') + error(_("Unknown configuration option: %s"), key); + else + error(_("Unknown configuration option: %s/%s"), section, key); return 0; }