DataOlllo interface translations
==============================

English is the source language. It intentionally uses gettext's source-string
fallback and does not need an app.mo file. Chinese (zh), Japanese (ja), German
(de), and French (fr) each ship an editable app.po and a compiled app.mo under
<language>/LC_MESSAGES/.

After editing translations, rebuild and validate all runtime catalogs:

    python locales/check_locales.py --compile

To check without changing files:

    python locales/check_locales.py

The checker requires GNU gettext (msgfmt). It checks recursively extracted
Python UI messages, tool and regex names/hints in mydata's shipped JSON maps,
matching catalog keys, formatting placeholders, and PO/MO synchronization.
It also flags Qt labels and dialog text that bypass translation, and checks
Visual Explorer resource keys and interpolation placeholders.
Do not translate placeholder names or format specifiers such as {count},
{name}, {count:,}, and {size:.2f}. Keep file extensions, API identifiers, SQL,
regex patterns, JSON keys, provider/model names, and user data literal.

The saved Language.lang index takes priority over the operating system:
0 = Chinese, 1 = English, 2 = Japanese, 3 = German, 4 = French.
-1 or an invalid value selects the system language (English if unsupported).

The PySide6 interface also loads Qt's qtbase language catalog for standard
buttons and dialogs, and sets Qt's date locale to the selected language.
Include the relevant Qt translations when packaging.
mygui/pyside6/ui_text.py retains supplemental presentation entries for existing
callers; all current entries are also present in these shared PO/MO catalogs.

Visual Explorer receives the selected locale through Graphic Walker's
i18nLang option. Its bundled resources cover English, Chinese and Japanese.
visual_explorer.json supplies complete German and French resource bundles,
with an English structure for validation. Preserve Graphic Walker keys and
i18next placeholders such as {{idx}}, {{type}} and {{ count }}. Include this
file when packaging the locales directory.

For offline language selection, live switching, rendered dashboard labels,
result history, user-content preservation and explorer locale checks, run:

    PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 QT_QPA_PLATFORM=offscreen python -m pytest mytest/test_locales.py mytest/test_ai_locales.py mytest/test_ui_locales.py
