a142d52d05
Adds full Traditional Chinese translation (628 keys, 100% parity with
en.json) and the registration plumbing to make it pickable in the UI.
Registration spans three layers that all needed updating for the locale
to actually be selectable end-to-end:
- static/locales/zh-TW.json (new) — TW vocabulary (儲存/雲端/檔案/偵測),
uses 「」 corner brackets for in-string quoting
- core/i18n.js: add 'zh-TW' to supportedLocales — without this,
setLocale('zh-TW') was silently rejected by the whitelist and the
previous locale stayed active (visible as the "picked 繁中 but the
setup step still shows 簡中" bug)
- core/languageSelector.js: add 'zh-TW' to AVAILABLE_LOCALES + fallback
- features/auth/auth.js: add 'zh-TW' to ALL_LANGUAGES (🇹🇼 繁體中文)
and LANGUAGE_TEXTS bootstrap table (used before i18n loads)
Browser detection rewrite (i18n.js + auth.js detectBrowserLanguage):
The previous navigator.language?.substring(0, 2) truncated zh-TW → zh
and routed Traditional Chinese browsers to Simplified. Replaced with
three-tier matching: exact full-tag > Chinese script/region heuristic
(zh-Hant*, zh-{TW,HK,MO}) > primary subtag fallback.
Disambiguates the existing zh entry: "Chinese / 中文" became
"Simplified Chinese / 简体中文".
Drive-by cleanups discovered while wiring up the above:
- Remove dead t() in i18n.js (export uses safeT, no callers of bare t)
- Remove dead fetchUserData() and logout() in auth.js (userMenu.js has
its own local logout())
- Extract errMessage(unknown→string) and inputVal(id) helpers for the
catch sites and getElementById('x').value sites that needed TS
narrowing under checkJs
- Type-annotate module-scope let forms/errors/panels with
HTMLFormElement and HTMLElement so .addEventListener and .reset()
resolve under strict
- Drop navigator.userLanguage IE legacy fallback (DOM lib has no field)
- jsconfig.json: drop exactOptionalPropertyTypes (only valid with
strictNullChecks, which the project deliberately disables)
- .gitignore: ignore docker-compose.override.yml for local bind-mount
dev workflow
Verified clean before commit: biome ci, tsc --noEmit, i18n key parity
(628/628), HTTP smoke test against running container.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
101 lines
1.6 KiB
Plaintext
101 lines
1.6 KiB
Plaintext
# Generated by Cargo
|
|
/target/
|
|
**/target/
|
|
|
|
# Processed static assets (generated by build.rs in release mode)
|
|
/static-dist/
|
|
|
|
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
|
|
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
|
|
# Cargo.lock
|
|
|
|
# These are backup files generated by rustfmt
|
|
**/*.rs.bk
|
|
|
|
# MSVC Windows builds of rustc generate these, which store debugging information
|
|
*.pdb
|
|
|
|
# Rust debug symbols
|
|
*.dSYM/
|
|
*.su
|
|
*.idb
|
|
|
|
# Build cache (keep .cargo/config.toml for project build settings, keep audit config)
|
|
.cargo/*
|
|
!.cargo/config.toml
|
|
!.cargo/audit.toml
|
|
|
|
# temporary file to tools
|
|
tmp/
|
|
|
|
# Visual Studio Code directory
|
|
.vscode/
|
|
|
|
# JetBrains IDEs
|
|
.idea/
|
|
|
|
# MacOS specific
|
|
.DS_Store
|
|
.AppleDouble
|
|
.LSOverride
|
|
|
|
# Linux specific
|
|
*~
|
|
.directory
|
|
.Trash-*
|
|
|
|
# Windows specific
|
|
Thumbs.db
|
|
ehthumbs.db
|
|
Desktop.ini
|
|
|
|
# Node.js (if used for frontend)
|
|
node_modules/
|
|
npm-debug.log
|
|
|
|
# Environment variables
|
|
.env
|
|
.env.local
|
|
.env.development.local
|
|
.env.test.local
|
|
.env.production.local
|
|
|
|
# Docker Compose local overrides (e.g. dev-only bind mounts)
|
|
docker-compose.override.yml
|
|
|
|
# Log files
|
|
*.log
|
|
logs/
|
|
|
|
# Storage data (user files, blobs — never commit)
|
|
storage/
|
|
|
|
# TLS certificates and private keys — NEVER commit
|
|
*.pem
|
|
*.key
|
|
*.p12
|
|
*.pfx
|
|
*.crt
|
|
*.csr
|
|
|
|
# Temporary files
|
|
*.tmp
|
|
*.bak
|
|
*.swp
|
|
*.swo
|
|
nohup.out
|
|
|
|
# Generated files (OpenAPI spec, etc.)
|
|
resources/gen/
|
|
|
|
# Helm chart dependencies
|
|
charts/*/charts/*
|
|
|
|
# Playwright
|
|
tests/e2e/node_modules/
|
|
tests/e2e/test-results/
|
|
tests/e2e/playwright-report/
|
|
tests/e2e/blob-report/
|
|
tests/e2e/playwright/.cache/
|
|
tests/e2e/playwright/.auth/
|