fix: escape @ in login email placeholder (vue-i18n linked syntax)

Production /login rendered a blank page (browser console: SyntaxError: 10
through the vue-i18n parser). Root cause proved with a RED regression
(RES: vue-i18n public API reproduces 'Invalid linked format' code 10) plus an
independent reviewer: auth.emailPlaceholder="name@company.com" is invalid
vue-i18n linked-message syntax, so createI18n() throws a message-compilation
SyntaxError while LoginView renders t('auth.emailPlaceholder').

Fix: escape the literal at-sign as name{'@'}company.com in th and en so the
message compiles and the visible label is unchanged (name@company.com). Add an
all-translations regression that translates every string in th/en (objects
and arrays) through vue-i18n's public createI18n/global.t API and asserts the
visible placeholder value.

Verification:
- RED test failed at th:auth.emailPlaceholder (code 10) before the fix.
- Independent reviewer verified reproduction + fix, finished PASS.
- Frontend tests 11 passed; production build passed (index-B4oVHpLg.js).
- Chrome headless rendered the login card, Thai heading, and name@company.com
  from the production dist. Artifact checksum hash 3621155075b3d9245d2d05511aaf39b1b0cbcaeea local vs server.
This commit is contained in:
Kunthawat Greethong
2026-09-01 12:11:40 +07:00
parent 16c0996eaf
commit 333f6ccc6e
6 changed files with 98 additions and 3 deletions

View File

@@ -35,7 +35,7 @@
"title": "Sign in to CrowdSight",
"subtitle": "Use your company account to continue.",
"email": "Email",
"emailPlaceholder": "name@company.com",
"emailPlaceholder": "name{'@'}company.com",
"password": "Password",
"passwordPlaceholder": "Enter your password",
"signIn": "Sign in",

View File

@@ -35,7 +35,7 @@
"title": "เข้าสู่ระบบ CrowdSight",
"subtitle": "ใช้บัญชีบริษัทเพื่อดำเนินการต่อ",
"email": "อีเมล",
"emailPlaceholder": "name@company.com",
"emailPlaceholder": "name{'@'}company.com",
"password": "รหัสผ่าน",
"passwordPlaceholder": "กรอกรหัสผ่าน",
"signIn": "เข้าสู่ระบบ",