INNER CODE UNIT · Python
locale_path
emanuele-f/PCAPdroid · tools/weblate.py:35
def locale_path(locale):
return f"{STRINGS_BASE}/values-{locale}/strings.xml"
# ---------------------------------------------------------------------------
# Status file: one "locale=commit_hash" per line
# ---------------------------------------------------------------------------
def load_status():
status = {}
if os.path.exists(STATUS_FILE):
with open(STATUS_FILE) as f:
for line in f:
line = line.strip()
if (not line) or line.startswith("#"):
continue
locale, commit = line.split("=", 1)
status[locale] = commit
return status