mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Expand python code to auto-generate the array of names
This commit is contained in:
@@ -130,6 +130,18 @@ def get_debug_menu() -> List[str]:
|
||||
]
|
||||
|
||||
|
||||
def get_accel_names_list() -> List[str]:
|
||||
return [
|
||||
"Scanning",
|
||||
"None",
|
||||
"MMA",
|
||||
"LIS",
|
||||
"BMA",
|
||||
"MSA",
|
||||
"SC7",
|
||||
]
|
||||
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user