INNER CODE UNIT · Python
import_translations
Zverik/every_door · tools/json_to_sqlite.py:394
def import_translations(cur, path: Optional[str]):
"""
This just reads all translation field for fields and presets (stored in the same file),
and prepares two tables from them + preset search terms.
What's tricky is also adding referenced translations.
"""
cur.execute("""create table field_tran (
lang text,
field_name text,
label text,
placeholder text,
options text
)""")
cur.execute("""create table preset_tran (
lang text,
preset_name text,
name text
)""")