aboutsummaryrefslogtreecommitdiffhomepage
path: root/Translations/make_translation.py
diff options
context:
space:
mode:
Diffstat (limited to 'Translations/make_translation.py')
-rwxr-xr-xTranslations/make_translation.py25
1 files changed, 24 insertions, 1 deletions
diff --git a/Translations/make_translation.py b/Translations/make_translation.py
index 97c9c395..77bb7b81 100755
--- a/Translations/make_translation.py
+++ b/Translations/make_translation.py
@@ -124,12 +124,24 @@ def get_debug_menu() -> List[str]:
"CTip ",
"CHan ",
"Vin ",
- "PCB ",
+ "ACC ",
"PWR ",
"Max ",
]
+def get_accel_names_list() -> List[str]:
+ return [
+ "Scanning",
+ "None",
+ "MMA8652FC",
+ "LIS2DH12",
+ "BMA223",
+ "MSA301",
+ "SC7A20",
+ ]
+
+
def get_letter_counts(
defs: dict, lang: dict, build_version: str
) -> Tuple[List[str], Dict[str, int]]:
@@ -189,6 +201,7 @@ def get_letter_counts(
for x in constants:
text_list.append(x[1])
text_list.extend(get_debug_menu())
+ text_list.extend(get_accel_names_list())
# collapse all strings down into the composite letters and store totals for these
@@ -948,6 +961,16 @@ def get_translation_common_text(
f'\t "{convert_string(symbol_conversion_table, c)}",//{c} \n'
)
translation_common_text += "};\n\n"
+
+ # accel names
+ translation_common_text += "const char* AccelTypeNames[] = {\n"
+
+ for c in get_accel_names_list():
+ translation_common_text += (
+ f'\t "{convert_string(symbol_conversion_table, c)}",//{c} \n'
+ )
+ translation_common_text += "};\n\n"
+
return translation_common_text