Update translations and logs for setting config parameters

reverse-scroll
nirenjan 2021-07-26 11:02:38 -07:00
parent bd2dbbb9cc
commit f422202ec8
4 changed files with 160 additions and 16 deletions

View File

@ -25,14 +25,14 @@ static int clock_primary_is_local = false;
void x52d_cfg_set_Clock_Enabled(bool enabled) void x52d_cfg_set_Clock_Enabled(bool enabled)
{ {
PINELOG_DEBUG(_("Setting clock enable to %s"), PINELOG_DEBUG(_("Setting clock enable to %s"),
enabled ? "on" : "off"); enabled ? _("on") : _("off"));
clock_enabled = enabled; clock_enabled = enabled;
} }
void x52d_cfg_set_Clock_PrimaryIsLocal(bool param) void x52d_cfg_set_Clock_PrimaryIsLocal(bool param)
{ {
PINELOG_DEBUG(_("Setting primary clock timezone to %s"), PINELOG_DEBUG(_("Setting primary clock timezone to %s"),
param ? "local" : "UTC"); param ? _("local") : _("UTC"));
clock_primary_is_local = !!param; clock_primary_is_local = !!param;
} }
@ -102,26 +102,26 @@ cleanup:
} }
tzset(); tzset();
PINELOG_DEBUG("Offset for timezone '%s' is %d", tz, offset); PINELOG_TRACE("Offset for timezone '%s' is %d", tz, offset);
return offset; return offset;
} }
void x52d_cfg_set_Clock_Secondary(char* param) 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)); x52d_dev_set_clock_timezone(LIBX52_CLOCK_2, get_tz_offset(param));
} }
void x52d_cfg_set_Clock_Tertiary(char* 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)); 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) 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, PINELOG_DEBUG(_("Setting %s clock format to %s"), name,
fmt == LIBX52_CLOCK_FORMAT_12HR ? "12 hour" : "24 hour"); fmt == LIBX52_CLOCK_FORMAT_12HR ? _("12 hour") : _("24 hour"));
x52d_dev_set_clock_format(id, fmt); x52d_dev_set_clock_format(id, fmt);
} }
@ -147,7 +147,7 @@ void x52d_cfg_set_Clock_DateFormat(libx52_date_format fmt)
"mm-dd-yy", "mm-dd-yy",
"yy-mm-dd" "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); x52d_dev_set_date_format(fmt);
} }

View File

@ -155,11 +155,11 @@ int main(int argc, char **argv)
} }
} }
PINELOG_DEBUG("Foreground = %s", foreground ? "true" : "false"); PINELOG_DEBUG(_("Foreground = %s"), foreground ? _("true") : _("false"));
PINELOG_DEBUG("Quiet = %s", quiet ? "true" : "false"); PINELOG_DEBUG(_("Quiet = %s"), quiet ? _("true") : _("false"));
PINELOG_DEBUG("Verbosity = %d", verbosity); PINELOG_DEBUG(_("Verbosity = %d"), verbosity);
PINELOG_DEBUG("Log file = %s", log_file); PINELOG_DEBUG(_("Log file = %s"), log_file);
PINELOG_DEBUG("Config file = %s", conf_file); PINELOG_DEBUG(_("Config file = %s"), conf_file);
set_log_file(foreground, log_file); set_log_file(foreground, log_file);
x52d_config_load(conf_file); x52d_config_load(conf_file);

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: x52pro-linux 0.2.1\n" "Project-Id-Version: x52pro-linux 0.2.1\n"
"Report-Msgid-Bugs-To: https://github.com/nirenjan/x52pro-linux/issues\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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -390,6 +390,39 @@ msgstr ""
msgid "Unable to parse configuration override '%s'\n" msgid "Unable to parse configuration override '%s'\n"
msgstr "" 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 #: daemon/x52d_main.c:188
msgid "Reloading X52 configuration" msgid "Reloading X52 configuration"
msgstr "" msgstr ""
@ -403,11 +436,27 @@ msgstr ""
msgid "Setting clock enable to %s" msgid "Setting clock enable to %s"
msgstr "" msgstr ""
#: daemon/x52d_clock.c:28
msgid "on"
msgstr ""
#: daemon/x52d_clock.c:28
msgid "off"
msgstr ""
#: daemon/x52d_clock.c:34 #: daemon/x52d_clock.c:34
#, c-format #, c-format
msgid "Setting primary clock timezone to %s" msgid "Setting primary clock timezone to %s"
msgstr "" msgstr ""
#: daemon/x52d_clock.c:35
msgid "local"
msgstr ""
#: daemon/x52d_clock.c:35
msgid "UTC"
msgstr ""
#: daemon/x52d_clock.c:52 #: daemon/x52d_clock.c:52
msgid "Unable to allocate memory for timezone. Falling back to UTC" msgid "Unable to allocate memory for timezone. Falling back to UTC"
msgstr "" msgstr ""
@ -416,6 +465,29 @@ msgstr ""
msgid "Unable to backup timezone environment. Falling back to UTC" msgid "Unable to backup timezone environment. Falling back to UTC"
msgstr "" 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 #: daemon/x52d_clock.c:160
msgid "Starting X52 clock manager thread" msgid "Starting X52 clock manager thread"
msgstr "" msgstr ""

View File

@ -7,8 +7,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: x52pro-linux 0.2.1\n" "Project-Id-Version: x52pro-linux 0.2.1\n"
"Report-Msgid-Bugs-To: https://github.com/nirenjan/x52pro-linux/issues\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: 2021-07-26 10:27-0700\n" "PO-Revision-Date: 2021-07-26 11:00-0700\n"
"Last-Translator: Nirenjan Krishnan <nirenjan@gmail.com>\n" "Last-Translator: Nirenjan Krishnan <nirenjan@gmail.com>\n"
"Language-Team: Dummy Language for testing i18n\n" "Language-Team: Dummy Language for testing i18n\n"
"Language: xx_PL\n" "Language: xx_PL\n"
@ -435,6 +435,39 @@ msgstr ""
msgid "Unable to parse configuration override '%s'\n" msgid "Unable to parse configuration override '%s'\n"
msgstr "Unableay otay arsepay onfigurationcay overrideay '%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 #: daemon/x52d_main.c:188
msgid "Reloading X52 configuration" msgid "Reloading X52 configuration"
msgstr "Eloadingray X52 onfigurationcay" msgstr "Eloadingray X52 onfigurationcay"
@ -448,11 +481,27 @@ msgstr "Uttingshay ownday X52 aemonday"
msgid "Setting clock enable to %s" msgid "Setting clock enable to %s"
msgstr "Ettingsay ockclay enableay otay %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 #: daemon/x52d_clock.c:34
#, c-format #, c-format
msgid "Setting primary clock timezone to %s" msgid "Setting primary clock timezone to %s"
msgstr "Ettingsay imarypray ockclay imezonetay otay %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 #: daemon/x52d_clock.c:52
msgid "Unable to allocate memory for timezone. Falling back to UTC" msgid "Unable to allocate memory for timezone. Falling back to UTC"
msgstr "" msgstr ""
@ -464,6 +513,29 @@ msgid "Unable to backup timezone environment. Falling back to UTC"
msgstr "" msgstr ""
"Unableay otay ackupbay imezonetay environmentay. Allingfay ackbay otay UTCay" "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 #: daemon/x52d_clock.c:160
msgid "Starting X52 clock manager thread" msgid "Starting X52 clock manager thread"
msgstr "Artingstay X52 ockclay anagermay eadthray" msgstr "Artingstay X52 ockclay anagermay eadthray"