Repository navigation
Localization and Prompts
PAIOS ships full multilingual UI + overlay localization in 6 languages alongside transparent, editable Markdown system prompts and Android SAF folder synchronization.
Defined in assets/translations/languages.json and registered in pubspec.yaml:
| ID | Language | Native Name (origin) |
Notes |
|---|---|---|---|
en |
English | English | Primary fallback locale |
uk |
Ukrainian | Українська | Full app & overlay parity |
zh |
Traditional Chinese | 繁體中文 | Resolved for Hant, TW, HK, MO
|
zh-Hans |
Simplified Chinese | 简体中文 | Added in v1.8.8 / completed in v1.8.9 (PR #36); resolved for Hans, CN, SG, MY
|
de |
German | Deutsch | Full app & overlay parity |
tr |
Turkish | Türkçe | Full app & overlay parity |
Both Dictionary.resolveSupportedLocaleCode (Dart lib/parts/translator.dart) and MeshOverlayActivity.resolveOverlayLanguage (Kotlin) inspect full BCP-47 tags (languageCode, scriptCode, countryCode):
-
Hans,CN,SG, orMY->zh-Hans -
Hant,TW,HK,MO(or genericzhfallback) ->zh
Dictionary (lib/parts/translator.dart) follows a 3-tier SWR strategy:
-
Tier 1 — Bundled Assets (
assets/translations/<id>.json): Always available offline at startup (and used exclusively in debug builds unless testing remote). -
Tier 2 — Hive Cache (
'paios_storage'): Persists refreshed translations locally (cached_dict_<langId>). -
Tier 3 — Remote GitHub JSON: Fetches updated strings in release builds with a
5-second timeout and explicitutf8.decode(response.bodyBytes).
Dictionary.hasMojibake, repairMojibake, and sanitizeTranslationValue detect and repair CP1251 and Windows-1252 UTF-8 corruption (such as "…", "•", "—", "…", "РџСЂРёРІС–С‚") without false-positiving on legitimate Ukrainian text ("Рік", "Сім", "Рецепт"). Poisoned remote or cached strings can never overwrite clean bundled translations, and corrupted Hive cache entries self-heal on startup.
Since v1.8.8, assets/prompts/system_default.md is intentionally kept to 2 sentences:
You are PAIOS, a helpful, private on-device AI assistant. Use query_aicore_documentation when asked who you are, to tell about yourself, or about PAIOS and AICore.
- Both
PromptRepository.initFromHive(Dart) andMeshOverlayActivity.resolveActivePersonaContent(Kotlin) always refresh the default persona from bundled assets so stale cached prompts cannot persist across updates. - Keeping the baseline minimal preserves maximum token headroom inside Gemini Nano's
4,096-token window while delegating detailed PAIOS self-knowledge toquery_aicore_documentationon demand.
Users can create, edit, import, and export custom [USER INSTRUCTIONS] personas in Settings -> Prompts:
-
UTF-8 Export (
FileAccessService.exportMd): Encodes.mdfiles with explicitutf8.encodeso multi-byte CJK/Ukrainian/German/Turkish text never truncates. -
Unicode SAF Filenames (
FileAccessService.nameToFilename): Preserves Unicode letters and digits (\p{L}\p{N}) when mapping persona names to.mdfilenames. -
Immediate Folder Import: Selecting a linked folder via Android Storage Access Framework (
pickPromptsFolder) triggersimportAllFromLinkedFolder()automatically.
Related Pages: Offline Tooling & Built-in Documentation · Architecture & Model Variants · Building from Source
PAIOS (page.puzzak.paios) — Synced with v1.8.9+26112001 | GitHub Repository · Nightly Google Group · Play Testing Opt-In · Report an Issue