Tactility/Translations/generate-all.py
Ken Van Hoeylandt 0ebd471cc0
Reduce internal RAM use: embedded assets, fonts in flash, PSRAM stacks, file_ops (#701)
- The `/system` FAT volume is removed. Its files are embedded in the firmware as generated C arrays.
- Default-size fonts are generated at build time and used from flash.
- The LVGL task and the Launcher run on PSRAM-preferred stacks. A new kernel `file_ops` API takes the file work off those threads.
- `MainDispatcher` is reimplemented as an on-demand task.
- More long-lived state is allocated with the PSRAM-preferring helpers.
- Other fixes and improvements
2026-10-18 17:30:43 +02:00

31 lines
973 B
Python

import os
from pathlib import Path
def get_project_root():
return Path(__file__).parent.parent.resolve()
def generate(csv_file, header_file, header_namespace, data_path):
csv_file_path = f"{get_project_root()}/Translations/{csv_file}"
if os.path.isfile(csv_file_path):
print(f"Processing {csv_file}")
script_path = f"{get_project_root()}/Translations/generate.py"
os.system(f"python {script_path} {csv_file} {header_file} {header_namespace} {data_path}")
else:
print(f"Skipping {csv_file} (not found)")
if __name__ == "__main__":
# Core translations
generate(
"Core.csv",
"Tactility/Include/Tactility/i18n/CoreTextResources.h",
"tt::i18n::core",
"Data/system/i18n/core"
)
# Launcher app
generate(
"Launcher.csv",
"Tactility/Private/Tactility/app/launcher/TextResources.h",
"tt::app::launcher::i18n",
"Data/system/app/Launcher/i18n"
)