156 lines
14 KiB
Python
156 lines
14 KiB
Python
"""Author the offline localization tables; no Unity asset references are edited here."""
|
||||
|
|
import json
|
|||
|
|
from pathlib import Path
|
|||
|
|
|
|||
|
|
ROWS = [
|
|||
|
|
('ui.home.subtitle', 'MECH RECOVERY OPERATIONS', '机甲回收行动'),
|
|||
|
|
('ui.home.loadout', 'STARTING LOADOUT', '出击配装'),
|
|||
|
|
('ui.slot.0', 'PRIMARY', '主武器'),
|
|||
|
|
('ui.slot.1', 'SECONDARY', '副武装'),
|
|||
|
|
('ui.slot.2', 'PROPULSION', '推进器'),
|
|||
|
|
('ui.slot.3', 'DEFENSE', '防护模块'),
|
|||
|
|
('ui.home.part', '{0} / {1} [{2} M / {3} P]', '{0} / {1} [载重 {2} / 功率 {3}]'),
|
|||
|
|
('ui.home.budget', 'MASS {0} / {1} POWER {2} / {3}', '载重 {0} / {1} 功率 {2} / {3}'),
|
|||
|
|
('ui.home.deploy', 'DEPLOY SORTIE', '开始出击'),
|
|||
|
|
('ui.home.range', 'DRIVING RANGE', '驾驶试验场'),
|
|||
|
|
('ui.home.resume', 'RESUME SORTIE', '继续出击'),
|
|||
|
|
('ui.home.locked', 'Selected advanced part needs schematic research. Try any loadout in the driving range.', '所选高级部件尚未研究蓝图。可在驾驶试验场试用任意配装。'),
|
|||
|
|
('ui.home.moveHint', 'WASD move / mouse aim / V perspective / Shift boost / Space jump & lift', 'WASD 移动 / 鼠标瞄准 / V 切换视角 / Shift 推进 / Space 跳跃与升空'),
|
|||
|
|
('ui.home.fireHint', 'LMB primary / RMB precision aim / Q secondary / F shield / E interact', '鼠标左键 主武器 / 右键 精瞄 / Q 副武装 / F 护盾 / E 交互'),
|
|||
|
|
('ui.home.inventory', 'HANGAR INVENTORY', '机库库存'),
|
|||
|
|
('ui.home.stock', 'ALLOY {0} CELLS {1} SCHEMATICS {2} EXTRACTIONS {3} ROUTES CLEARED {4}', '合金 {0} 电芯 {1} 蓝图 {2} 撤离 {3} 终局达成 {4}'),
|
|||
|
|
('ui.home.researched', '{0} / RESEARCHED', '{0} / 已研究'),
|
|||
|
|
('ui.home.research', '{0} / RESEARCH: 2 ALLOY + 1 CELL', '{0} / 研究:2 合金 + 1 电芯'),
|
|||
|
|
('ui.home.quit', 'QUIT', '退出游戏'),
|
|||
|
|
('ui.home.language', '语言 / Language · {0}', '语言 / Language · {0}'),
|
|||
|
|
('ui.home.languageHelp', 'Choose language', '选择语言'),
|
|||
|
|
('ui.language.current', '{0} / Selected', '{0} / 当前语言'),
|
|||
|
|
('ui.hud.operation', 'CURRENT OPERATION', '当前任务'),
|
|||
|
|
('ui.hud.armor', 'ARMOR {0}', '装甲 {0}'),
|
|||
|
|
('ui.hud.energy', 'ENERGY {0}', '能源 {0}'),
|
|||
|
|
('ui.hud.shield', 'SHIELD ACTIVE', '护盾生效'),
|
|||
|
|
('ui.hud.podUsed', 'POD USED / 1 OF 1', '回收舱已用 / 1 次机会'),
|
|||
|
|
('ui.hud.podPreparing', 'PREPARING POD...', '正在准备回收舱…'),
|
|||
|
|
('ui.hud.podReady', 'POD READY / SELECT IN TAB', '回收舱就绪 / Tab 选择货物'),
|
|||
|
|
('ui.hud.hint', 'V VIEW SHIFT BOOST SPACE LIFT Q SECONDARY F SHIELD E INTERACT TAB CARGO HOLD G SEND POD ESC PAUSE', 'V 视角 Shift 推进 Space 升空 Q 副武装 F 护盾 E 交互 Tab 货仓 按住 G 发射回收舱 Esc 暂停'),
|
|||
|
|
('ui.hud.zone', 'ZONE {0} / 5', '战区 {0} / 5'),
|
|||
|
|
('ui.hud.status', '{0} {1}', '{0} {1}'),
|
|||
|
|
('ui.hud.complete', 'MISSION COMPLETE / bring your cargo to extraction', '任务完成 / 携带货物前往撤离点'),
|
|||
|
|
('ui.hud.boss', 'Defeat the Overseer', '击败督军'),
|
|||
|
|
('ui.hud.escort', 'Escort the engineering crawler to the far gate', '护送工程履带车抵达远端闸门'),
|
|||
|
|
('ui.hud.routeOpen', 'Route unlocked / search, extract or proceed', '路线已开放 / 搜索、撤离或前往下一站'),
|
|||
|
|
('ui.hud.objective', 'Recover navigation data at the relay', '前往中继站回收导航数据'),
|
|||
|
|
('ui.hud.cockpit', 'COCKPIT', '第一人称'),
|
|||
|
|
('ui.hud.shoulder', 'SHOULDER', '越肩视角'),
|
|||
|
|
('ui.hud.telemetry', '{0}\n{1} / {2}\nCARGO {3} / 4\n{4}', '{0}\n{1} / {2}\n货仓 {3} / 4\n{4}'),
|
|||
|
|
('ui.hud.transportReady', 'TRANSPORT READY / BOARD AT PAD', '运输机已到达 / 前往平台登机'),
|
|||
|
|
('ui.hud.transportEta', 'TRANSPORT ETA {0}s', '运输机抵达倒计时 {0} 秒'),
|
|||
|
|
('ui.hud.extractionAvailable', 'EXTRACTION AVAILABLE / ORANGE PAD', '可随时撤离 / 橙色平台'),
|
|||
|
|
('ui.cargo.title', 'FIELD CARGO', '随身货仓'),
|
|||
|
|
('ui.cargo.used', 'POD ALREADY USED / remaining cargo must leave with your mech.', '回收舱已使用 / 剩余货物需要随整机撤离。'),
|
|||
|
|
('ui.cargo.help', 'Select up to two stacks. Close this panel, stand still and hold G for 3 seconds to send the pod.', '最多选择两组货物。关闭面板后原地按住 G 3 秒,发射回收舱。'),
|
|||
|
|
('ui.cargo.stack', '{0} {1} ×{2}', '{0} {1} ×{2}'),
|
|||
|
|
('ui.cargo.selected', '[SELECTED]', '[已选择]'),
|
|||
|
|
('ui.cargo.capacity', 'HOLD {0} / 4 POD {1} / 2', '随身货仓 {0} / 4 回收舱 {1} / 2'),
|
|||
|
|
('ui.return', 'RETURN TO PILOT', '返回驾驶'),
|
|||
|
|
('ui.refit.title', 'FIELD REFIT', '战地改装'),
|
|||
|
|
('ui.refit.help', 'Recovered a replacement part. Compare mass and power before installing.', '已回收到替换部件。安装前请比较载重和功率。'),
|
|||
|
|
('ui.refit.equipped', 'EQUIPPED / {0} {1} M / {2} P', '当前部件 / {0} 载重 {1} / 功率 {2}'),
|
|||
|
|
('ui.refit.recovered', 'RECOVERED / {0} {1} M / {2} P', '回收部件 / {0} 载重 {1} / 功率 {2}'),
|
|||
|
|
('ui.refit.install', 'INSTALL RECOVERED PART', '安装回收部件'),
|
|||
|
|
('ui.refit.keep', 'KEEP CURRENT LOADOUT', '保留当前配装'),
|
|||
|
|
('ui.routes.split', 'COMMIT TO AN ENDPOINT', '选择终局方向'),
|
|||
|
|
('ui.routes.title', 'CHOOSE THE NEXT WARZONE', '选择下一战区'),
|
|||
|
|
('ui.routes.splitHelp', 'Your loadout has had two zones to develop. Choose the mission your mech is ready to tackle.', '已在两个战区积累装备。选择适合当前机甲的终局任务。'),
|
|||
|
|
('ui.routes.help', 'Objectives and resource categories are known. Specific salvage is discovered inside the zone.', '可以预知任务与物资类别,具体战利品需进入战区后搜索。'),
|
|||
|
|
('ui.routes.boss', 'OVERSEER ROUTE / assault relay / weapon salvage', '督军路线 / 突击中继站 / 武器物资'),
|
|||
|
|
('ui.routes.escort', 'ENGINEERING ESCORT / restore supply link / propulsion salvage', '工程护送 / 恢复补给线 / 推进器物资'),
|
|||
|
|
('ui.routes.freight', 'FREIGHT RECLAMATION / recover navigation data / alloy-rich', '货运回收区 / 回收导航数据 / 合金丰富'),
|
|||
|
|
('ui.routes.power', 'POWER SUBSTATION / reactivate relay / cell-rich', '能源变电站 / 重启中继站 / 电芯丰富'),
|
|||
|
|
('ui.routes.stay', 'STAY IN THIS WARZONE', '留在当前战区'),
|
|||
|
|
('ui.pause.title', 'PAUSED', '已暂停'),
|
|||
|
|
('ui.pause.help', 'Sortie progress is saved at checkpoints and every successful recovery.', '出击进度会在检查点及每次成功回收后保存。'),
|
|||
|
|
('ui.pause.resume', 'RESUME', '继续游戏'),
|
|||
|
|
('ui.pause.range', 'RETURN FROM RANGE', '返回机库'),
|
|||
|
|
('ui.pause.quit', 'SAVE & QUIT', '保存并退出'),
|
|||
|
|
('report.ready', 'Choose a chassis and configure your sortie.', '选择底盘并配置出击装备。'),
|
|||
|
|
('report.range', 'Driving range complete. Your sortie inventory is ready in the hangar.', '试验场测试结束。机库出击库存已就绪。'),
|
|||
|
|
('report.destroyed', 'MECH LOST / {0} carried stack(s) lost. Previously shipped cargo remains in the hangar.', '机甲损失 / 丢失 {0} 组随身货物。已送回的货物仍保留在机库。'),
|
|||
|
|
('report.complete', 'MISSION COMPLETE / all carried materials and schematics secured.', '任务完成 / 随身材料与蓝图已全部入库。'),
|
|||
|
|
('report.extracted', 'EARLY EXTRACTION / all carried materials and schematics secured.', '提前撤离 / 随身材料与蓝图已全部入库。'),
|
|||
|
|
('notice.unfinished', 'An unfinished sortie is available. Resume it first.', '还有未完成的出击,请先继续该次出击。'),
|
|||
|
|
('notice.budget', 'Loadout exceeds chassis mass or power budget.', '配装超出底盘的载重或功率上限。'),
|
|||
|
|
('notice.researchFirst', 'Research the selected equipment schematic first, or try it in the driving range.', '请先研究所选装备蓝图,或在驾驶试验场试用。'),
|
|||
|
|
('notice.saveFailed', 'Could not save. Please try again.', '保存失败,请重试。'),
|
|||
|
|
('notice.range', 'DRIVING RANGE / V switches perspective. E operates nearby devices.', '驾驶试验场 / V 切换视角,E 操作附近装置。'),
|
|||
|
|
('notice.enter', 'Search the zone. Complete the objective to open the onward route.', '搜索战区,完成任务后开放下一站路线。'),
|
|||
|
|
('notice.podSecured', 'CARGO SECURED / banked immediately. Sortie continues.', '货物回收成功 / 已立即入库,可继续出击。'),
|
|||
|
|
('notice.cargoUnavailable', 'Cargo selection is no longer available.', '所选货物已不可用,请重新选择。'),
|
|||
|
|
('notice.twoSlots', 'The cargo pod has two slots.', '回收舱最多容纳两组货物。'),
|
|||
|
|
('notice.holdFull', 'Cargo hold full. Send two stacks or extract.', '随身货仓已满,请发射回收舱或整机撤离。'),
|
|||
|
|
('notice.recovered', 'RECOVERED / {0} ×{1}', '已回收 / {0} ×{1}'),
|
|||
|
|
('notice.partBudget', 'That part exceeds the chassis budget.', '该部件会使配装超出底盘预算。'),
|
|||
|
|
('notice.refit', 'FIELD REFIT / {0}', '战地改装完成 / {0}'),
|
|||
|
|
('notice.routeOpen', 'ROUTE OPEN / continue searching, extract, or use the onward gate.', '路线已开放 / 继续搜索、撤离,或前往下一站闸门。'),
|
|||
|
|
('notice.complete', 'MISSION COMPLETE / return to the extraction pad with your cargo.', '任务完成 / 请携带货物返回撤离平台。'),
|
|||
|
|
('notice.objectiveFirst', 'Complete the zone objective to open the route.', '请先完成本战区任务,以开放路线。'),
|
|||
|
|
('notice.rangeComplete', 'Range objective complete. Extract or keep testing your chassis.', '试验场任务完成。可以撤离或继续测试机甲。'),
|
|||
|
|
('notice.extract', 'Use the extraction pad to bring your cargo home.', '使用撤离平台将随身货物带回机库。'),
|
|||
|
|
('notice.researched', 'SCHEMATIC RESEARCHED / next sortie gains a starting upgrade.', '蓝图研究完成 / 下次出击可装配该部件。'),
|
|||
|
|
('notice.researchCost', 'Research needs a recovered schematic, 2 alloy and 1 cell.', '研究需要已回收的蓝图、2 合金和 1 电芯。'),
|
|||
|
|
('notice.transportInbound', 'TRANSPORT INBOUND / you can move and fight while waiting.', '运输机正在途中 / 等待时可以自由移动与作战。'),
|
|||
|
|
('notice.extractionCalled', 'EXTRACTION CALLED / hold for 15 seconds, then return to board.', '已呼叫撤离 / 等待 15 秒后返回平台登机。'),
|
|||
|
|
('notice.transportReady', 'TRANSPORT READY / return to the orange pad and press E to board.', '运输机已抵达 / 返回橙色平台并按 E 登机。'),
|
|||
|
|
('notice.escortLost', 'ENGINEERING CRAWLER LOST / extraction remains available.', '工程履带车损毁 / 仍可前往撤离点撤离。'),
|
|||
|
|
('prompt.search', 'E SEARCH SALVAGE', 'E 搜索物资'),
|
|||
|
|
('prompt.relayOnline', 'RELAY ONLINE', '中继站已上线'),
|
|||
|
|
('prompt.objective', 'E RECOVER NAVIGATION DATA', 'E 回收导航数据'),
|
|||
|
|
('prompt.route', 'E CHOOSE ONWARD ROUTE', 'E 选择下一站路线'),
|
|||
|
|
('prompt.routeLocked', 'ROUTE LOCKED / COMPLETE OBJECTIVE', '路线未开放 / 请先完成任务'),
|
|||
|
|
('prompt.board', 'E BOARD / BANK CARGO', 'E 登机 / 货物入库'),
|
|||
|
|
('prompt.inbound', 'TRANSPORT INBOUND', '运输机正在途中'),
|
|||
|
|
('prompt.call', 'E CALL EXTRACTION / 15s', 'E 呼叫撤离 / 等待 15 秒'),
|
|||
|
|
('world.extraction', 'EXTRACTION', '撤离点'),
|
|||
|
|
('world.relay', 'RELAY / ONWARD ROUTE', '中继站 / 下一站路线'),
|
|||
|
|
('world.overseer', 'OVERSEER', '督军'),
|
|||
|
|
('world.bulwark', 'BULWARK', '重装壁垒'),
|
|||
|
|
('world.skimmer', 'SKIMMER', '掠行者'),
|
|||
|
|
('world.sentinel', 'SENTINEL', '哨兵'),
|
|||
|
|
('world.escort', 'ENGINEERING CRAWLER', '工程履带车'),
|
|||
|
|
('chassis.chassis_0.name', 'Kestrel / Light', '红隼 / 轻型'),
|
|||
|
|
('chassis.chassis_0.description', 'Aerial mobility', '空中机动'),
|
|||
|
|
('chassis.chassis_1.name', 'Warden / Medium', '守卫 / 中型'),
|
|||
|
|
('chassis.chassis_1.description', 'Balanced assault', '均衡突击'),
|
|||
|
|
('chassis.chassis_2.name', 'Bastion / Heavy', '堡垒 / 重型'),
|
|||
|
|
('chassis.chassis_2.description', 'Armored advance', '重装推进'),
|
|||
|
|
('equipment.rapid.name', 'Hail / rapid cannon', '冰雹 / 速射炮'),
|
|||
|
|
('equipment.coil.name', 'Lance / coil rifle', '长矛 / 电磁步枪'),
|
|||
|
|
('equipment.siege.name', 'Maul / heavy cannon', '重锤 / 重型火炮'),
|
|||
|
|
('equipment.guided.name', 'Wisp / guided salvo', '磷火 / 制导齐射'),
|
|||
|
|
('equipment.pulse.name', 'Breaker / pulse burst', '破阵 / 脉冲爆发'),
|
|||
|
|
('equipment.efficient.name', 'Cruise / efficient drive', '巡航 / 高效推进器'),
|
|||
|
|
('equipment.vector.name', 'Vector / overdrive', '矢量 / 超载推进器'),
|
|||
|
|
('equipment.composite_guard.name', 'Composite plating', '复合装甲'),
|
|||
|
|
('equipment.reactive_guard.name', 'Reactive shield', '反应护盾'),
|
|||
|
|
('item.alloy', 'ALLOY', '合金'),
|
|||
|
|
('item.cells', 'CELLS', '电芯'),
|
|||
|
|
('item.blueprint_boost_efficient', 'SCHEMATIC / EFFICIENT DRIVE', '蓝图 / 高效推进器'),
|
|||
|
|
('item.blueprint_coil_capacitor', 'SCHEMATIC / COIL CAPACITOR', '蓝图 / 电磁电容'),
|
|||
|
|
('item.blueprint_reactive_guard', 'SCHEMATIC / REACTIVE SHIELD', '蓝图 / 反应护盾'),
|
|||
|
|
]
|
|||
|
|
|
|||
|
|
|
|||
|
|
def main():
|
|||
|
|
root = Path(__file__).resolve().parents[2]
|
|||
|
|
target = root / 'Assets/Game/Localization/Tables'
|
|||
|
|
target.mkdir(parents=True, exist_ok=True)
|
|||
|
|
assert len({row[0] for row in ROWS}) == len(ROWS), 'Duplicate translation keys'
|
|||
|
|
for index, code in ((1, 'en'), (2, 'zh-Hans')):
|
|||
|
|
entries = [{'key': row[0], 'value': row[index]} for row in ROWS]
|
|||
|
|
(target / f'{code}.json').write_text(json.dumps({'entries': entries}, ensure_ascii=False, indent=2) + '\n', encoding='utf-8')
|
|||
|
|
print(f'Generated {len(ROWS)} keys in two offline tables.')
|
|||
|
|
|
|||
|
|
|
|||
|
|
if __name__ == '__main__':
|
|||
|
|
main()
|