feedback5 W5S: i18n phase 2, render labels — the battlefield canvas label, the 2D fallback field (bench label, piece names, empty enemy pen), the facing wheel (prompt, cancel hints, the four directions) through t(); English for the 3 new msgids; Chinese output unchanged (zh render proof)
This commit is contained in:
1 parent
5741dc129b
commit
7e262dc809
5 files changed
+20
-13
No files matched your search
@@ -14,6 +14,7 @@
|
||||
|
||||
import { GEO } from '../../../shared/constants.js';
|
||||
import { attackRangeGrid } from '../../../shared/loadoutRecord.js';
|
||||
import { N_ } from '../../../shared/i18n.js';
|
||||
|
||||
export const DIRS = Object.freeze(['UP', 'RIGHT', 'DOWN', 'LEFT']);
|
||||
export const DEFAULT_DIR = 'RIGHT';
|
||||
@@ -29,7 +30,7 @@ export const DIR_VEC = Object.freeze({
|
||||
});
|
||||
|
||||
/** Chinese label (for aria / tooltips). */
|
||||
export const DIR_LABEL = Object.freeze({ UP: '上', RIGHT: '右', DOWN: '下', LEFT: '左' });
|
||||
export const DIR_LABEL = Object.freeze({ UP: N_('上'), RIGHT: N_('右'), DOWN: N_('下'), LEFT: N_('左') });
|
||||
|
||||
/** Normalise any direction spelling ('up', 'Right', 1/−1 facing) to UP|RIGHT|DOWN|LEFT; unknown → `fallback`. */
|
||||
export function normDir(d, fallback = DEFAULT_DIR) {
|
||||
|
||||
Reference in new issue
Block a user