diff --git a/lib/I18n/translations/english.yaml b/lib/I18n/translations/english.yaml index 4cd522d8..891beed4 100644 --- a/lib/I18n/translations/english.yaml +++ b/lib/I18n/translations/english.yaml @@ -478,7 +478,7 @@ STR_READER_APPEARANCE: "Appearance" STR_MENU_SYS_SYSTEM: "System" STR_MENU_SYS_NETWORK: "Network" STR_MENU_SYS_TOOLS: "Tools" -STR_MENU_DISP_SLEEP: "Sleepscreen" +STR_MENU_DISP_SLEEP: "Sleep Screen" STR_MENU_DISP_BATTERY: "Battery symbol" STR_MENU_DISP_REFRESH: "Screen refresh" STR_MENU_READER_FONT: "Reader Font" diff --git a/scripts/gen_i18n.py b/scripts/gen_i18n.py index b593a043..38a8ea71 100755 --- a/scripts/gen_i18n.py +++ b/scripts/gen_i18n.py @@ -281,7 +281,29 @@ def find_used_string_keys( except OSError: continue for line in text.splitlines(): - line = line.split("//", 1)[0] + quote_char = None + escaped = False + comment_index = None + for idx, ch in enumerate(line): + if escaped: + escaped = False + continue + if quote_char is None: + if ch == '"' or ch == "'": + quote_char = ch + continue + if ch == "/" and idx + 1 < len(line) and line[idx + 1] == "/": + comment_index = idx + break + else: + if ch == "\\": + escaped = True + continue + if ch == quote_char: + quote_char = None + continue + if comment_index is not None: + line = line[:comment_index] for m in pattern.finditer(line): used.add(m.group(0)) diff --git a/src/activities/settings/SettingInfo.cpp b/src/activities/settings/SettingInfo.cpp index d1356ca4..7525c1ff 100644 --- a/src/activities/settings/SettingInfo.cpp +++ b/src/activities/settings/SettingInfo.cpp @@ -73,9 +73,9 @@ void SettingInfo::toggleValue() const { case SettingType::VALUE: if (valuePtr) { - const auto current = static_cast(SETTINGS.*(valuePtr)); - SETTINGS.*(valuePtr) = - (current + valueRange.step > valueRange.max) ? valueRange.min : current + valueRange.step; + const unsigned current = SETTINGS.*(valuePtr); + SETTINGS.*(valuePtr) = static_cast( + (current + valueRange.step > valueRange.max) ? valueRange.min : current + valueRange.step); } break; diff --git a/src/main.cpp b/src/main.cpp index ceb16897..2f8894ed 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -204,12 +204,9 @@ void setup() { HalSystem::checkPanic(); HalSystem::clearPanic(); // TODO: move this to an activity when we have one to display the panic info - LOG_DBG("MAIN", "System initialized, now setting up environment, millis=%lu", millis()); SETTINGS.loadFromFile(); - LOG_DBG("MAIN", "Settings loaded, now setting up clock and localization, millis=%lu", millis()); HalClock::applyTimezone(SETTINGS.timeZone); I18N.loadSettings(); - LOG_DBG("MAIN", "Localization loaded, now setting up theme and button navigation, millis=%lu", millis()); KOREADER_STORE.loadFromFile(); WEATHER_SETTINGS.loadFromFile(); UITheme::getInstance().reload();