Review fixes
This commit is contained in:
@@ -478,7 +478,7 @@ STR_READER_APPEARANCE: "Appearance"
|
|||||||
STR_MENU_SYS_SYSTEM: "System"
|
STR_MENU_SYS_SYSTEM: "System"
|
||||||
STR_MENU_SYS_NETWORK: "Network"
|
STR_MENU_SYS_NETWORK: "Network"
|
||||||
STR_MENU_SYS_TOOLS: "Tools"
|
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_BATTERY: "Battery symbol"
|
||||||
STR_MENU_DISP_REFRESH: "Screen refresh"
|
STR_MENU_DISP_REFRESH: "Screen refresh"
|
||||||
STR_MENU_READER_FONT: "Reader Font"
|
STR_MENU_READER_FONT: "Reader Font"
|
||||||
|
|||||||
+23
-1
@@ -281,7 +281,29 @@ def find_used_string_keys(
|
|||||||
except OSError:
|
except OSError:
|
||||||
continue
|
continue
|
||||||
for line in text.splitlines():
|
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):
|
for m in pattern.finditer(line):
|
||||||
used.add(m.group(0))
|
used.add(m.group(0))
|
||||||
|
|
||||||
|
|||||||
@@ -73,9 +73,9 @@ void SettingInfo::toggleValue() const {
|
|||||||
|
|
||||||
case SettingType::VALUE:
|
case SettingType::VALUE:
|
||||||
if (valuePtr) {
|
if (valuePtr) {
|
||||||
const auto current = static_cast<int8_t>(SETTINGS.*(valuePtr));
|
const unsigned current = SETTINGS.*(valuePtr);
|
||||||
SETTINGS.*(valuePtr) =
|
SETTINGS.*(valuePtr) = static_cast<uint8_t>(
|
||||||
(current + valueRange.step > valueRange.max) ? valueRange.min : current + valueRange.step;
|
(current + valueRange.step > valueRange.max) ? valueRange.min : current + valueRange.step);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -204,12 +204,9 @@ void setup() {
|
|||||||
|
|
||||||
HalSystem::checkPanic();
|
HalSystem::checkPanic();
|
||||||
HalSystem::clearPanic(); // TODO: move this to an activity when we have one to display the panic info
|
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();
|
SETTINGS.loadFromFile();
|
||||||
LOG_DBG("MAIN", "Settings loaded, now setting up clock and localization, millis=%lu", millis());
|
|
||||||
HalClock::applyTimezone(SETTINGS.timeZone);
|
HalClock::applyTimezone(SETTINGS.timeZone);
|
||||||
I18N.loadSettings();
|
I18N.loadSettings();
|
||||||
LOG_DBG("MAIN", "Localization loaded, now setting up theme and button navigation, millis=%lu", millis());
|
|
||||||
KOREADER_STORE.loadFromFile();
|
KOREADER_STORE.loadFromFile();
|
||||||
WEATHER_SETTINGS.loadFromFile();
|
WEATHER_SETTINGS.loadFromFile();
|
||||||
UITheme::getInstance().reload();
|
UITheme::getInstance().reload();
|
||||||
|
|||||||
Reference in New Issue
Block a user