From f422202ec884df2ae17e25dc2aabf0f6d1e3779f Mon Sep 17 00:00:00 2001 From: nirenjan Date: Mon, 26 Jul 2021 11:02:38 -0700 Subject: [PATCH] Update translations and logs for setting config parameters --- daemon/x52d_clock.c | 16 +++++----- daemon/x52d_main.c | 10 +++--- po/x52pro-linux.pot | 74 ++++++++++++++++++++++++++++++++++++++++++- po/xx_PL.po | 76 +++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 160 insertions(+), 16 deletions(-) diff --git a/daemon/x52d_clock.c b/daemon/x52d_clock.c index 7de5499..174cd00 100644 --- a/daemon/x52d_clock.c +++ b/daemon/x52d_clock.c @@ -25,14 +25,14 @@ static int clock_primary_is_local = false; void x52d_cfg_set_Clock_Enabled(bool enabled) { PINELOG_DEBUG(_("Setting clock enable to %s"), - enabled ? "on" : "off"); + enabled ? _("on") : _("off")); clock_enabled = enabled; } void x52d_cfg_set_Clock_PrimaryIsLocal(bool param) { PINELOG_DEBUG(_("Setting primary clock timezone to %s"), - param ? "local" : "UTC"); + param ? _("local") : _("UTC")); clock_primary_is_local = !!param; } @@ -102,26 +102,26 @@ cleanup: } tzset(); - PINELOG_DEBUG("Offset for timezone '%s' is %d", tz, offset); + PINELOG_TRACE("Offset for timezone '%s' is %d", tz, offset); return offset; } void x52d_cfg_set_Clock_Secondary(char* param) { - PINELOG_TRACE("Setting secondary clock timezone to %s", param); + PINELOG_DEBUG(("Setting secondary clock timezone to %s"), param); x52d_dev_set_clock_timezone(LIBX52_CLOCK_2, get_tz_offset(param)); } void x52d_cfg_set_Clock_Tertiary(char* param) { - PINELOG_TRACE("Setting tertiary clock timezone to %s", param); + PINELOG_DEBUG(_("Setting tertiary clock timezone to %s"), param); x52d_dev_set_clock_timezone(LIBX52_CLOCK_3, get_tz_offset(param)); } static void set_clock_format(const char *name, libx52_clock_id id, libx52_clock_format fmt) { - PINELOG_TRACE("Setting %s clock format to %s", name, - fmt == LIBX52_CLOCK_FORMAT_12HR ? "12 hour" : "24 hour"); + PINELOG_DEBUG(_("Setting %s clock format to %s"), name, + fmt == LIBX52_CLOCK_FORMAT_12HR ? _("12 hour") : _("24 hour")); x52d_dev_set_clock_format(id, fmt); } @@ -147,7 +147,7 @@ void x52d_cfg_set_Clock_DateFormat(libx52_date_format fmt) "mm-dd-yy", "yy-mm-dd" }; - PINELOG_TRACE("Setting date format to %s", formats[fmt]); + PINELOG_DEBUG(_("Setting date format to %s"), formats[fmt]); x52d_dev_set_date_format(fmt); } diff --git a/daemon/x52d_main.c b/daemon/x52d_main.c index 3c7e6a2..06a515d 100644 --- a/daemon/x52d_main.c +++ b/daemon/x52d_main.c @@ -155,11 +155,11 @@ int main(int argc, char **argv) } } - PINELOG_DEBUG("Foreground = %s", foreground ? "true" : "false"); - PINELOG_DEBUG("Quiet = %s", quiet ? "true" : "false"); - PINELOG_DEBUG("Verbosity = %d", verbosity); - PINELOG_DEBUG("Log file = %s", log_file); - PINELOG_DEBUG("Config file = %s", conf_file); + PINELOG_DEBUG(_("Foreground = %s"), foreground ? _("true") : _("false")); + PINELOG_DEBUG(_("Quiet = %s"), quiet ? _("true") : _("false")); + PINELOG_DEBUG(_("Verbosity = %d"), verbosity); + PINELOG_DEBUG(_("Log file = %s"), log_file); + PINELOG_DEBUG(_("Config file = %s"), conf_file); set_log_file(foreground, log_file); x52d_config_load(conf_file); diff --git a/po/x52pro-linux.pot b/po/x52pro-linux.pot index acdeb59..b230869 100644 --- a/po/x52pro-linux.pot +++ b/po/x52pro-linux.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: x52pro-linux 0.2.1\n" "Report-Msgid-Bugs-To: https://github.com/nirenjan/x52pro-linux/issues\n" -"POT-Creation-Date: 2021-07-26 10:20-0700\n" +"POT-Creation-Date: 2021-07-26 11:01-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -390,6 +390,39 @@ msgstr "" msgid "Unable to parse configuration override '%s'\n" msgstr "" +#: daemon/x52d_main.c:158 +#, c-format +msgid "Foreground = %s" +msgstr "" + +#: daemon/x52d_main.c:158 daemon/x52d_main.c:159 +msgid "true" +msgstr "" + +#: daemon/x52d_main.c:158 daemon/x52d_main.c:159 +msgid "false" +msgstr "" + +#: daemon/x52d_main.c:159 +#, c-format +msgid "Quiet = %s" +msgstr "" + +#: daemon/x52d_main.c:160 +#, c-format +msgid "Verbosity = %d" +msgstr "" + +#: daemon/x52d_main.c:161 +#, c-format +msgid "Log file = %s" +msgstr "" + +#: daemon/x52d_main.c:162 +#, c-format +msgid "Config file = %s" +msgstr "" + #: daemon/x52d_main.c:188 msgid "Reloading X52 configuration" msgstr "" @@ -403,11 +436,27 @@ msgstr "" msgid "Setting clock enable to %s" msgstr "" +#: daemon/x52d_clock.c:28 +msgid "on" +msgstr "" + +#: daemon/x52d_clock.c:28 +msgid "off" +msgstr "" + #: daemon/x52d_clock.c:34 #, c-format msgid "Setting primary clock timezone to %s" msgstr "" +#: daemon/x52d_clock.c:35 +msgid "local" +msgstr "" + +#: daemon/x52d_clock.c:35 +msgid "UTC" +msgstr "" + #: daemon/x52d_clock.c:52 msgid "Unable to allocate memory for timezone. Falling back to UTC" msgstr "" @@ -416,6 +465,29 @@ msgstr "" msgid "Unable to backup timezone environment. Falling back to UTC" msgstr "" +#: daemon/x52d_clock.c:117 +#, c-format +msgid "Setting tertiary clock timezone to %s" +msgstr "" + +#: daemon/x52d_clock.c:123 +#, c-format +msgid "Setting %s clock format to %s" +msgstr "" + +#: daemon/x52d_clock.c:124 +msgid "12 hour" +msgstr "" + +#: daemon/x52d_clock.c:124 +msgid "24 hour" +msgstr "" + +#: daemon/x52d_clock.c:150 +#, c-format +msgid "Setting date format to %s" +msgstr "" + #: daemon/x52d_clock.c:160 msgid "Starting X52 clock manager thread" msgstr "" diff --git a/po/xx_PL.po b/po/xx_PL.po index fc00568..5045bea 100644 --- a/po/xx_PL.po +++ b/po/xx_PL.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: x52pro-linux 0.2.1\n" "Report-Msgid-Bugs-To: https://github.com/nirenjan/x52pro-linux/issues\n" -"POT-Creation-Date: 2021-07-26 10:20-0700\n" -"PO-Revision-Date: 2021-07-26 10:27-0700\n" +"POT-Creation-Date: 2021-07-26 11:01-0700\n" +"PO-Revision-Date: 2021-07-26 11:00-0700\n" "Last-Translator: Nirenjan Krishnan \n" "Language-Team: Dummy Language for testing i18n\n" "Language: xx_PL\n" @@ -435,6 +435,39 @@ msgstr "" msgid "Unable to parse configuration override '%s'\n" msgstr "Unableay otay arsepay onfigurationcay overrideay '%s'\n" +#: daemon/x52d_main.c:158 +#, c-format +msgid "Foreground = %s" +msgstr "Oregroundfay = %s" + +#: daemon/x52d_main.c:158 daemon/x52d_main.c:159 +msgid "true" +msgstr "uetray" + +#: daemon/x52d_main.c:158 daemon/x52d_main.c:159 +msgid "false" +msgstr "alsefay" + +#: daemon/x52d_main.c:159 +#, c-format +msgid "Quiet = %s" +msgstr "Uietqay = %s" + +#: daemon/x52d_main.c:160 +#, c-format +msgid "Verbosity = %d" +msgstr "Erbosityvay = %d" + +#: daemon/x52d_main.c:161 +#, c-format +msgid "Log file = %s" +msgstr "Oglay ilefay = %s" + +#: daemon/x52d_main.c:162 +#, c-format +msgid "Config file = %s" +msgstr "Onfigcay ilefay = %s" + #: daemon/x52d_main.c:188 msgid "Reloading X52 configuration" msgstr "Eloadingray X52 onfigurationcay" @@ -448,11 +481,27 @@ msgstr "Uttingshay ownday X52 aemonday" msgid "Setting clock enable to %s" msgstr "Ettingsay ockclay enableay otay %s" +#: daemon/x52d_clock.c:28 +msgid "on" +msgstr "onay" + +#: daemon/x52d_clock.c:28 +msgid "off" +msgstr "offay" + #: daemon/x52d_clock.c:34 #, c-format msgid "Setting primary clock timezone to %s" msgstr "Ettingsay imarypray ockclay imezonetay otay %s" +#: daemon/x52d_clock.c:35 +msgid "local" +msgstr "ocallay" + +#: daemon/x52d_clock.c:35 +msgid "UTC" +msgstr "UTCay" + #: daemon/x52d_clock.c:52 msgid "Unable to allocate memory for timezone. Falling back to UTC" msgstr "" @@ -464,6 +513,29 @@ msgid "Unable to backup timezone environment. Falling back to UTC" msgstr "" "Unableay otay ackupbay imezonetay environmentay. Allingfay ackbay otay UTCay" +#: daemon/x52d_clock.c:117 +#, c-format +msgid "Setting tertiary clock timezone to %s" +msgstr "Ettingsay ertiarytay ockclay imezonetay otay %s" + +#: daemon/x52d_clock.c:123 +#, c-format +msgid "Setting %s clock format to %s" +msgstr "Ettingsay %s ockclay ormatfay otay %s" + +#: daemon/x52d_clock.c:124 +msgid "12 hour" +msgstr "12 ourhay" + +#: daemon/x52d_clock.c:124 +msgid "24 hour" +msgstr "24 ourhay" + +#: daemon/x52d_clock.c:150 +#, c-format +msgid "Setting date format to %s" +msgstr "Ettingsay ateday ormatfay otay %s" + #: daemon/x52d_clock.c:160 msgid "Starting X52 clock manager thread" msgstr "Artingstay X52 ockclay anagermay eadthray"