- replace the ~100-option avatar <select>s in Add Relic / Add Light Cone with a searchable picker modal (keep-in-inventory card + avatar cards with element/path/level) - warn when the chosen character already wears a relic in that slot or a light cone - click+Confirm or double-click applies; Esc closes only the picker; search autofocused - localize all new strings (th/en, other locales fall back to en) and refresh chips/picker on language change - add AGENTS.md with localization and cache-busting rules - bump app.js v3.20, styles.css v2.29, i18n.js v2.17 and align all i18n imports
1.1 KiB
1.1 KiB
Project Rules
Localization (required)
Every user-facing string must go through js/i18n.js. Never hardcode Thai or English UI text in HTML or JS.
- Use
data-i18n,data-i18n-placeholder,data-i18n-title,data-i18n-altordata-i18n-aria-labelinindex.html. - Use
t('key', { ...vars })for strings rendered from JavaScript (includinginnerHTMLtemplates). - Add every new key to
MODAL_AND_TOOL_TRANSLATIONSinjs/i18n.jsfor boththanden. Other locales intentionally fall back to English throught(), so they do not need duplicate entries. - When a language changes, dynamic content must refresh. Call the render function from
applyTranslations()(for examplerenderEquipTargetDisplay()andrenderAvatarAssignGrid()). - Keep every import of
i18n.json the same?v=query string so the browser uses a single module instance. Bump it wheneverjs/i18n.jschanges.
Cache busting
When css/styles.css or js/app.js changes, bump its ?v= query string in index.html.
Scope
Do not modify README.md or the untracked docs/ folder unless the task explicitly asks for it.