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(
|
def get_letter_counts(
|
||||||
defs: dict, lang: dict, build_version: str
|
defs: dict, lang: dict, build_version: str
|
||||||
) -> Tuple[List[str], Dict[str, int]]:
|
) -> Tuple[List[str], Dict[str, int]]:
|
||||||
@@ -189,6 +201,7 @@ def get_letter_counts(
|
|||||||
for x in constants:
|
for x in constants:
|
||||||
text_list.append(x[1])
|
text_list.append(x[1])
|
||||||
text_list.extend(get_debug_menu())
|
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
|
# 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'
|
f'\t "{convert_string(symbol_conversion_table, c)}",//{c} \n'
|
||||||
)
|
)
|
||||||
translation_common_text += "};\n\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
|
return translation_common_text
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user