aboutsummaryrefslogtreecommitdiffstats
path: root/src/api.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-06-24 08:59:31 -0700
committerAdam Soltys <[email protected]>2026-06-24 08:59:31 -0700
commit17acf5ec80a0c0b0acc44a6a8373e154c68d4748 (patch)
treea3fb56b85cc9cd21962ed64b084294096948d75b /src/api.js
parentf59cca61111f38963099190bdbbce9a76bc3fafe (diff)
downloadcoinosv3-17acf5ec80a0c0b0acc44a6a8373e154c68d4748.tar.gz
coinosv3-17acf5ec80a0c0b0acc44a6a8373e154c68d4748.zip
Split translations into per-language files, lazy-loaded
Only English is bundled in index.html now; the other 19 languages are emitted as dist/locales/<code>.json and fetched on demand when a visitor actually uses one (via auto-detect, the picker, or ?lang=xx). This drops index.html from ~511KB to ~318KB; a non-English visitor fetches just their one ~8-10KB locale, which the service worker then caches for offline use. t() falls back to English until a locale resolves. - i18n.js keeps only en + a loadLocale() fetcher; locale data moved to src/locales/*.json. - build.js emits dist/locales/; dev.js serves /locales/<code>.json. - Deploy hook publishes the locales/ subdir. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Diffstat (limited to 'src/api.js')
0 files changed, 0 insertions, 0 deletions