feedback5: merge W5I — real i18n phase 1: shared/i18n.js (Chinese msgids, params, data names), English game texts from the official EN client data (data/i18n/en.json), the 中文 / English switch on the title screen and in 设置, title / lobby / room / settings converted, server toasts and ticker lines with msgid + params, tools/i18n.mjs, docs/I18N.md (PR #70's translations by @YuriRestia reused, credited)
Conflict: server/match/player/basics.js imports (W5G's checkNotOwned + W5I's msg / dn). data/i18n/en.json rebuilt on the merged data (tools/build-i18n.mjs --offline): the 自选 data adds texts of CN-only operators and modules the EN client lacks, so coverage is 97.6 % (skills 95.9, talents 95.1); the coverage floors in test/i18n-data.test.js and docs/I18N.md say so. Golden unchanged; i18n / lobby / match / ui suites 1144/1144 after the rebuild, i18n e2e 1/1.
This commit is contained in:
commit
a611cb013c
38 files changed
+4043
-194
No files matched your search
@@ -19,6 +19,8 @@
|
||||
// assumed 1).
|
||||
// Latched state lives in player counters (prefix `bondaddon:`); onPrice only reads them (pure).
|
||||
|
||||
import { msg, dn } from '../../../../../shared/i18n.js';
|
||||
|
||||
const C_VISI_PAID = 'bondaddon:visi:paid';
|
||||
const C_VISI_DISC = 'bondaddon:visi:disc';
|
||||
const C_MIRA_PAID = 'bondaddon:mira:paid';
|
||||
@@ -50,10 +52,10 @@ function settleCoins(ctx, bondId, counterKey, label) {
|
||||
const gain = (due - paid) * count;
|
||||
if (prepEnded(ctx)) {
|
||||
ctx.addPendingFunds(gain);
|
||||
ctx.toast(`【${label}】层数达成,下回合开始时获得${gain}资金`, 'info');
|
||||
ctx.toast(msg('【{label}】层数达成,下回合开始时获得{gain}资金', { label: dn(label), gain }), 'info');
|
||||
} else {
|
||||
ctx.addFunds(gain, `bond:${bondId}`);
|
||||
ctx.toast(`【${label}】层数达成,获得${gain}资金`, 'info');
|
||||
ctx.toast(msg('【{label}】层数达成,获得{gain}资金', { label: dn(label), gain }), 'info');
|
||||
}
|
||||
return gain;
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ import { spawnYanyou } from '../tokens.js';
|
||||
import { kjeragColdWind } from '../devices.js';
|
||||
import * as items from '../items.js';
|
||||
import { FORCED_EXIT } from '../../constants.js';
|
||||
import { msg } from '../../../../shared/i18n.js';
|
||||
|
||||
const num = S.num;
|
||||
|
||||
@@ -637,7 +638,7 @@ export function payHammers(ctx) {
|
||||
if (id && ctx.grantItem(id, { source: 'bond:victoriaShip' })) granted++;
|
||||
}
|
||||
}
|
||||
if (granted && typeof ctx.toast === 'function') ctx.toast(`【维多利亚】获得${granted}件维式重锤`, 'info');
|
||||
if (granted && typeof ctx.toast === 'function') ctx.toast(msg('【维多利亚】获得{n}件维式重锤', { n: granted }), 'info');
|
||||
return granted;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user