diff --git a/assets/bundles/bundle-mdtx.properties b/assets/bundles/bundle-mdtx.properties index 6b266a5556da..f4ccb71a4753 100644 --- a/assets/bundles/bundle-mdtx.properties +++ b/assets/bundles/bundle-mdtx.properties @@ -311,3 +311,338 @@ ability.liquidregen = 液体回血 # 临时中文翻译(无需翻译其他语言) database.patched = 已被内容包修改 rules.logicunitbuild = 允许逻辑控制单位建造 + +# region generated ui.simple keys +ui.simple.accent-build-speed = [accent]建速 +ui.simple.acid-hp = [acid]血量 +ui.simple.add-destroyed-buildings-to-build-queue = 在建造列表加入被摧毁建筑 +ui.simple.add-panel = 添加面板 +ui.simple.add-prefix-t = 前缀添加/t +ui.simple.add-team = 添加队伍 +ui.simple.allowed-range-2-9999 = 允许的范围:2~9999 +ui.simple.arc-ai-configurator = ARC-AI设定器 +ui.simple.arc-image-converter = arc-图片转换器 +ui.simple.arc-message-center = ARC-中央监控室 +ui.simple.arc-ore-statistics = ARC-矿物统计 +ui.simple.are-you-sure-you-want-to-surrender = 受不了,直接投降? +ui.simple.artboard = 画板++ +ui.simple.auto-attack = 自动攻击 +ui.simple.auto-fill = 一键装填 +ui.simple.auto-refresh-variables = 变量自动更新 +ui.simple.automatically-refresh-variables = 自动刷新变量 +ui.simple.automatically-save-as-blueprint = 自动保存为蓝图 +ui.simple.b = 块 +ui.simple.basic = 基础对比 +ui.simple.build-area = 建造区域 +ui.simple.builder-ai = 重建AI +ui.simple.buildings = 建筑: +ui.simple.bullet-rendering = 子弹显示 +ui.simple.canvas = 画板 +ui.simple.carried-item = 携带物品: +ui.simple.chat = 聊天 +ui.simple.chat-history-exceeding-the-limit-will-be-cleared = 超出限制的聊天记录将在载入地图时清除 +ui.simple.cheat = 无限火力 +ui.simple.clear = 清空 +ui.simple.clear-all-core-resources = 清空核心的所有资源 +ui.simple.clone = 克隆 +ui.simple.color = 颜色 +ui.simple.command = 指令 +ui.simple.command-mode = 指挥模式 +ui.simple.construction-suspended = 暂停建造 +ui.simple.copied-this-chat-record = 已导出本条聊天记录 +ui.simple.update-check-failed = 检查更新失败,请稍后再试 +ui.simple.cyan-mark-mode-tap-the-screen-to-place-a-mark = [cyan]标记模式,点击屏幕标记. +ui.simple.cyan-movement-speed = [cyan]移速 +ui.simple.defender-ai = 保护AI +ui.simple.detached-camera = 视角脱离玩家 +ui.simple.display-name = 显示名 +ui.simple.download-and-install-update = 自动下载更新 +ui.simple.drop-payload = 丢下载荷 +ui.simple.editor = 编辑器 +ui.simple.effects-library = 特效大全 +ui.simple.effects-rendering = 特效显示 +ui.simple.enter-the-conveyor-belt = 进入传送带 +ui.simple.event-map-load = 事件~载入地图 +ui.simple.event-wave = 事件~波次 +ui.simple.export = 导出 +ui.simple.export-chat-history = 导出聊天记录 +ui.simple.extract-code-from-schematic = 从蓝图中选择代码 +ui.simple.f = 雾 +ui.simple.failed-to-create-replay = 创建回放出错! +ui.simple.failed-to-read-playback = 读取回放失败! +ui.simple.failed-to-read-replay-header = 无法读取回放头信息 +ui.simple.fill-core-resources = 填满核心的所有资源 +ui.simple.find-blocks = 查找方块 +ui.simple.flash-on-change = 变动闪烁 +ui.simple.flight-mode = 飞行模式 +ui.simple.fog-of-war = 战争迷雾 +ui.simple.force-boost = 强制助推 +ui.simple.force-skip-waves = 强制跳波 +ui.simple.frame-rate-simulation = 帧率模拟 +ui.simple.fx = 效 +ui.simple.game-resumed = 已继续游戏 +ui.simple.generate-quantity = 生成数量: +ui.simple.global-range = 全局检查 +ui.simple.green-click-the-screen-to-return = [green]点击屏幕返回 +ui.simple.green-tap-the-screen-to-capture-coordinates = [green]点击屏幕采集坐标 +ui.simple.h = 箱 +ui.simple.hide-all-buildings = 隐藏全部建筑 +ui.simple.hide-logic-helper = 隐藏逻辑辅助器 +ui.simple.hitbox-overlay = 碰撞箱显示 +ui.simple.hourglass = 沙漏: +ui.simple.hue-mode = 色调函数: +ui.simple.icon = 图标 +ui.simple.index = 序号 +ui.simple.instant = 瞬间完成 +ui.simple.item = 物品 +ui.simple.liquids = 液体 +ui.simple.load-building = 装载建筑 +ui.simple.load-external-replay = 加载外部回放 +ui.simple.load-self = 装载自己 +ui.simple.load-unit = 装载单位 +ui.simple.lock = 锁定 +ui.simple.lock-the-last-marked-point = 锁定上个标记点 +ui.simple.logic-announcement = 逻辑~公告 +ui.simple.logic-art-website = 逻辑画网站 +ui.simple.logic-camera-lock-removed = 已移除逻辑视角锁定 +ui.simple.logic-helper-gold-x = 逻辑辅助器[gold]X[] +ui.simple.logic-notice = 逻辑~通报 +ui.simple.m = 信 +ui.simple.mark-coordinates = 标记~坐标 +ui.simple.mark-map-location = 标记地图位置 +ui.simple.mark-player = 标记~玩家 +ui.simple.max-chat-history-setting = 最大储存聊天记录(过高可能导致卡顿): +ui.simple.message-center = 中央监控室 +ui.simple.message-js-starts-with-script = 消息(@js 开头为脚本) +ui.simple.miner-ai = 矿机AI +ui.simple.miner-ai-ore-filter = minerAI-矿物筛选器 +ui.simple.minimap = 小地图显示 +ui.simple.modified = 修改时间 +ui.simple.more-teams = 更多队伍选择 +ui.simple.name = 名称 +ui.simple.no-command-entered = 未输入指令 +ui.simple.o = 观 +ui.simple.observer-mode = 观察者模式 +ui.simple.off = 关闭 +ui.simple.on = 开启 +ui.simple.open-playback-file = 打开回放文件 +ui.simple.open-release-page = 打开发布页面 +ui.simple.orange-spawned = [orange]生成! +ui.simple.orange-spawns-units-that-fly = [orange]生成的单位会飞起来 +ui.simple.orange-updated-edited-logic = [orange]已更新编辑的逻辑! +ui.simple.orange-warning-image-may-be-too-large-please-try = [orange]警告:图片可能过大,请尝试压缩图片 +ui.simple.poked-notification = [orange]你被戳了一下,请注意查看信息框哦~ +ui.simple.ore-count-surface-wall = 矿物矿(地表/墙矿) +ui.simple.ore-info = 矿物信息 +ui.simple.original-size = 原始大小 +ui.simple.p = 弹 +ui.simple.panels-currently-unavailable = 当前不可用的面板: +ui.simple.path = 路径 +ui.simple.pause-logic-game-execution = 暂停逻辑(游戏)运行 +ui.simple.pause-time = 暂停时间 +ui.simple.paused = 已暂停 +ui.simple.permanent-status = <永久状态> +ui.simple.pick-up-payload = 捡起载荷 +ui.simple.pixel-art = 像素画 +ui.simple.place-replace = 放置/替换 +ui.simple.player = 玩家 +ui.simple.player-build-range = 玩家建造区 +ui.simple.please-don-t-tag-too-often = 请不要频繁标记! +ui.simple.preview-releases-description = 预览版(更新更快,新功能体验,BUG修复) +ui.simple.purple-resistance = [purple]阻力 +ui.simple.radar-scanning = >> 雷达扫描中 << +ui.simple.radar-toggle = 雷达开关 +ui.simple.spawn-range-tooltip = 在目标点附近的这个范围内随机生成 +ui.simple.reading-replay-header = 读取回放头信息中... +ui.simple.recorded = 录制时间 +ui.simple.recording-ended = 录制结束 +ui.simple.recording-error = 录制出错! +ui.simple.red-current-unit-cannot-build = [red]当前单位不可建筑 +ui.simple.red-damage = [red]伤害 +ui.simple.red-hp = [red]血量: +ui.simple.skip-to-wave-warning = [red]这是一个作弊功能[]\n快速跳转到目标波次(不刷兵) +ui.simple.refresh-edited-logic = 更新编辑的逻辑 +ui.simple.release-notes = 发布说明 +ui.simple.remove-logic-lock = 移除逻辑锁定 +ui.simple.repair-ai = 修复AI +ui.simple.replay-manager = 回放管理器 +ui.simple.replay-not-loaded = 未加载回放! +ui.simple.replay-stats = 回放统计 +ui.simple.reset = 重置 +ui.simple.reset-all-links = 重置所有链接 +ui.simple.restore-current-wave = 恢复当前波次 +ui.simple.return-to-original-speed = 恢复原速 +ui.simple.rules = 规则: +ui.simple.s = 扫 +ui.simple.sandbox = 沙盒 +ui.simple.saved-to-clipboard = 已保存至剪贴板 +ui.simple.scaled-size = 缩放后大小 +ui.simple.scan-mode = 扫描模式 +ui.simple.search-replays = 搜索回放 +ui.simple.sec = 秒 +ui.simple.image-import-description = 选择并导入图片,可将其转成画板、像素画或是逻辑画 +ui.simple.select-code = 选择代码 +ui.simple.select-image-white-png = 选择图片[white](png) +ui.simple.selection-range = 选择范围 +ui.simple.self-destruct = 自杀 +ui.simple.server = 服务器 +ui.simple.server-info-build = 服务器信息版 +ui.simple.server-msg = 服务器信息 +ui.simple.set-target = 设置目标 +ui.simple.set-target-wave = 设定查询波次 +ui.simple.share-inventory-status = 分享库存情况 +ui.simple.share-power-status = 分享电力情况 +ui.simple.share-unit-count = 分享单位数量 +ui.simple.share-wave-information = 分享波次信息 +ui.simple.show-all = 全部显示 +ui.simple.show-all-message-blocks = 信息板全显示 +ui.simple.show-building-status-only = 只显示建筑状态 +ui.simple.single-player-map-tools-only = 警告:该页功能主要供单机作图使用 +ui.simple.size = 文件大小 +ui.simple.slow-the-flow-of-time-to-half = 将时间流速放慢到一半 +ui.simple.spawn-location = 生成位置: +ui.simple.spawn-range = 生成范围: +ui.simple.spawn-team = 生成队伍: +ui.simple.speed-up-time-to-2x = 将时间流速加快到两倍 +ui.simple.squared = 平方对比 +ui.simple.stable-releases = 正式版 +ui.simple.staging-area = 暂存区 +ui.simple.surrender-vote = 法国军礼 +ui.simple.sync-a-wave = 同步一波 +ui.simple.teal-armor = [teal]装甲 +ui.simple.team = 队伍: +ui.simple.team-id = 队伍ID: +ui.simple.team-range = 队伍区域 +ui.simple.team-selector = 队伍选择器 +ui.simple.temporary-state = <瞬间状态> +ui.simple.the-currently-selected-area-is-empty-please-use = 当前选定区域为空,请通过F规划区域 +ui.simple.there-are-no-enemies-in-this-wave = 该波次没有敌人 +ui.simple.tiles = 格 +ui.simple.tip-all-schematics-containing-processors = TIP: 所有包含处理器的蓝图 +ui.simple.toggle = 开关 +ui.simple.toggle-your-team-s-cheat = 开关自己队的无限火力 +ui.simple.u = 兵 +ui.simple.ui-icon-library = UI图标大全 +ui.simple.ui-toolkit = ui大全 +ui.simple.unit = 单位: +ui.simple.unit-factory = 单位工厂 +ui.simple.unit-factory-x = 单位工厂-X +ui.simple.unit-rendering = 兵种显示 +ui.simple.unlimited = 无限制 +ui.simple.unlock = 解禁 +ui.simple.unlock-and-allow-all-blocks = 显示并允许建造所有物品 +ui.simple.upload-failed-try-again = 上传失败,再重试一下? +ui.simple.v = 版 +ui.simple.vanilla = 原版 +ui.simple.version = 版本 +ui.simple.view-recording-info = 查看录制信息 +ui.simple.violet-attack-speed = [violet]攻速 +ui.simple.w = 墙 +ui.simple.wall-shadow-rendering = 墙体阴影显示 +ui.simple.wave-info = 波次信息 +ui.simple.wave-settings = 波次设定 +ui.simple.white-s = [white]法 +ui.simple.white-took-units = \n[white]分走了单位: +ui.simple.zoom-icon-label = 缩放:  +ui.simple.save-before-add-instruction-warning = [yellow]添加新指令前,请先保存编辑的指令 +ui.simple.yellow-current-selection-is-empty-select-a-block = [yellow]当前选中物品为空,请在物品栏选中建筑 +ui.simple.yellow-no-permission-to-edit-view-only = [yellow]当前无权编辑,仅供查阅 +ui.simple.yellow-shield = [yellow]护盾: +ui.simple.too-many-buildings-warning = [yellow]建筑过多,避免卡顿,仅保留前1000个规划 +ui.simple.you-are-already-on-the-latest-version = 你已是最新版本,不需要更新! +ui.simple.zoom = 缩放 +ui.simple.toggle-display-mode = 切换显示模式 +ui.simple.wave-list-legend = \uE86D 为单位数量;\uE813 为单位血+盾;\uE810 为计算buff的血+盾;\uE86E 为预估DPS。在游戏中时会考虑地图出怪点数目 +ui.simple.wave-number = 第[accent]{0}[]波 +ui.simple.load-more-waves = 加载更多波次 +ui.simple.carried-item-x = 携带物品[gold]X[]: +ui.simple.red-unit-cannot-carry-items = [red]该单位不可携带物品 +ui.simple.carried-payload-x = 携带载荷[gold]X[]: +ui.simple.red-unit-cannot-carry-payloads = [red]该单位不可携带载荷 +ui.simple.other-teams = [violet]其他队伍 +ui.simple.guide-line = 辅助线: +ui.simple.brush = 笔刷: +ui.simple.orange-convert-failed = [orange]警告:转换失败,请输入正确格式 +ui.simple.jump-to-line = [gold]跳转行号:[] {0} +ui.simple.discard-changes = [orange]丢弃更改 +ui.simple.confirm-discard = 确认丢弃? +ui.simple.weapon-range = [lightgray]武器范围: [stat]{0} []格 +ui.simple.rotation-speed = [lightgray]旋转速度: [stat]{0} []°/s +ui.simple.rotation-range = [lightgray]旋转范围: [stat]{0} []{1} +ui.simple.payload-bar = 装载:{0}/{1} {2} +ui.simple.health = 血量 +ui.simple.damage = 伤害 +ui.simple.attack-speed = 攻速 +ui.simple.movement-speed = 移速 +ui.simple.build-speed = 建速 +ui.simple.resistance = 阻力 +ui.simple.armor = 装甲 +ui.simple.level-format = @级 +ui.simple.possession-allowed = 允许控制单位 +ui.simple.disable-rebuild = 禁用重建 +ui.simple.enable-all-teams-cheat = 所有队伍开启无限火力 +ui.simple.disable-all-teams-cheat = 所有队伍关闭无限火力 +ui.simple.more-team-settings = 更多队伍设置 +ui.simple.custom-background-requires-empty-floor = 自定义背景[lightgray](需要设置空地板) +ui.simple.zoom-factor = 放缩 +ui.simple.position-x = 位置x +ui.simple.position-y = 位置y +ui.simple.position-z = 位置z +ui.simple.force-join = 强制加入 +ui.simple.cancel-binding = 取消绑定 +ui.simple.sector-name = 区块名称 +ui.simple.unmet-prerequisite-tech = \n[red]未满足前置科技 +ui.simple.schematic-archive = 蓝图档案馆 +ui.simple.image-converter = 图片转换器 +ui.simple.tech-tree = 科技树: +ui.simple.advanced-filter = 辅助筛选: +ui.simple.can-build-schematic-tooltip = 可建造(核心有此类资源+地图未禁用) +ui.simple.schematic-contains = 蓝图包含: +ui.simple.schematic-contains-tooltip = 蓝图需包含此建筑 +ui.simple.schematic-filter-mode = [orange]蓝图筛选模式[white]:蓝图必须包含 {0} +ui.simple.share-schematic-to-chat = 聊天分享蓝图 +ui.simple.copy-to-clipboard-with-description = 复制到剪切板(高级版,含介绍) +ui.simple.schematic-from-server = 来自服务器的蓝图 +ui.simple.schematic-from-player = 来自{0}的蓝图 +ui.simple.auto-tag = 自动标签 +ui.simple.copied-logic-code = 已复制逻辑代码 +ui.simple.enter-mark-mode = 进入标记模式 +ui.simple.more = 更多 +ui.simple.enemy-core = 敌人核心:[orange]{0} +ui.simple.current-wave = 波次:[orange]{0} +ui.simple.high-health-units = 高血量单位 +ui.simple.low-health-units = 低血量单位 +ui.simple.offensive-units = 进攻性单位 +ui.simple.support-units = 辅助性单位 +ui.simple.flying-units = 飞行单位 +ui.simple.ground-units = 陆军单位 +ui.simple.naval-units = 海军单位 +ui.simple.rts-select = RTS控制器:选择{0}! +ui.simple.rts-remove = RTS控制器:移除{0}! +ui.simple.copied-nickname = 已复制昵称:{0} +ui.simple.charge-bar = 充能: {0} / {1} +ui.simple.overdrive = 超速: +ui.simple.drill-speed-empty = 挖掘速度:0.00/s +ui.simple.drill-speed = 挖掘速度: +ui.simple.building-damage-multiplier = [lightgray]x建筑伤害 +ui.simple.range-tiles = [lightgray]射程 {0} [lightgray]格 +ui.simple.reload-multiplier = [lightgray]x射速 +ui.simple.percent-falloff = {0}%衰减 +ui.simple.infinite-pierce = 无限 +ui.simple.pierce-label = 穿透[lightgray] +ui.simple.buildings-and-units = 建筑与单位 +ui.simple.building = 建筑 +ui.simple.electric-property = [stat](电性) +ui.simple.homing-detail = [stat]追踪[lightgray]~[]{0}°/s[lightgray]~[]{1}[lightgray]格 +ui.simple.emp-summary = [stat]EMP~{0}[lightgray]格[]~[white]\uE810[]{1}%/[white]\uE86D[]{2}%~[white]\uF899[][green]{3}%[]/[negstat]{4}%[] +ui.simple.emp-damages-power = [stat]对敌方电网建筑造成{0}%子弹伤害 +ui.simple.emp-damages-units = [stat]对敌方单位造成{0}%子弹伤害 +ui.simple.emp-speeds-friendly-power = [stat]对我方耗电建筑超速至{0}% +ui.simple.emp-slows-enemy-power = [stat]对敌方电网建筑减速至{0}% +ui.simple.lightning-damage = 闪电~[stat]{0}[]伤害~ +ui.simple.lightning-length-range = [stat]{0}~{1}[]长度 +ui.simple.lightning-length = [stat]{0}[]长度 +ui.simple.brief-share = ♐简 +ui.simple.detailed-share = ♐详 +ui.simple.apk-install-failed = 安装APK失败 +# endregion generated ui.simple keys diff --git a/assets/bundles/bundle-mdtx_en.properties b/assets/bundles/bundle-mdtx_en.properties index dba6161c4c64..d224d96a8f7c 100644 --- a/assets/bundles/bundle-mdtx_en.properties +++ b/assets/bundles/bundle-mdtx_en.properties @@ -294,4 +294,339 @@ unit.quell-missile.name = Quell Missile unit.scathe-missile.name = Scathe Missile team.neoplastic.name = Neoplastic -# 学术特色翻译(无需翻译其他语言) \ No newline at end of file +# 学术特色翻译(无需翻译其他语言) + +# region generated ui.simple keys +ui.simple.accent-build-speed = [accent]Build Speed +ui.simple.acid-hp = [acid]HP +ui.simple.add-destroyed-buildings-to-build-queue = Add destroyed buildings to build queue +ui.simple.add-panel = Add Panel +ui.simple.add-prefix-t = Add prefix /t +ui.simple.add-team = Add Team +ui.simple.allowed-range-2-9999 = Allowed range: 2~9999 +ui.simple.arc-ai-configurator = ARC-AI Configurator +ui.simple.arc-image-converter = ARC Image Converter +ui.simple.arc-message-center = ARC Message Center +ui.simple.arc-ore-statistics = ARC Ore Statistics +ui.simple.are-you-sure-you-want-to-surrender = Are you sure you want to surrender? +ui.simple.artboard = Artboard++ +ui.simple.auto-attack = Auto Attack +ui.simple.auto-fill = Auto Fill +ui.simple.auto-refresh-variables = Auto-refresh variables +ui.simple.automatically-refresh-variables = Automatically refresh variables +ui.simple.automatically-save-as-blueprint = Automatically save as blueprint +ui.simple.b = B +ui.simple.basic = Basic +ui.simple.build-area = Build area +ui.simple.builder-ai = Builder AI +ui.simple.buildings = Buildings: +ui.simple.bullet-rendering = Bullet Rendering +ui.simple.canvas = Canvas +ui.simple.carried-item = Carried item: +ui.simple.chat = Chat +ui.simple.chat-history-exceeding-the-limit-will-be-cleared = Chat history exceeding the limit will be cleared when loading the map +ui.simple.cheat = Cheat +ui.simple.clear = Clear +ui.simple.clear-all-core-resources = Clear all core resources +ui.simple.clone = Clone +ui.simple.color = Color +ui.simple.command = Command +ui.simple.command-mode = Command Mode +ui.simple.construction-suspended = Construction suspended +ui.simple.copied-this-chat-record = Copied this chat record +ui.simple.update-check-failed = Could not check for updates.\nPlease try again later. +ui.simple.cyan-mark-mode-tap-the-screen-to-place-a-mark = [cyan]Mark mode: tap the screen to place a mark. +ui.simple.cyan-movement-speed = [cyan]Movement speed +ui.simple.defender-ai = Defender AI +ui.simple.detached-camera = Detached camera +ui.simple.display-name = Display name +ui.simple.download-and-install-update = Download and Install Update +ui.simple.drop-payload = Drop Payload +ui.simple.editor = Editor +ui.simple.effects-library = Effects Library +ui.simple.effects-rendering = Effects Rendering +ui.simple.enter-the-conveyor-belt = Enter the conveyor belt +ui.simple.event-map-load = Event~Map Load +ui.simple.event-wave = Event~Wave +ui.simple.export = Export +ui.simple.export-chat-history = Export chat history +ui.simple.extract-code-from-schematic = Extract code from schematic +ui.simple.f = F +ui.simple.failed-to-create-replay = Failed to create replay! +ui.simple.failed-to-read-playback = Failed to read playback! +ui.simple.failed-to-read-replay-header = Failed to read replay header +ui.simple.fill-core-resources = Fill core resources +ui.simple.find-blocks = Find blocks +ui.simple.flash-on-change = Flash on Change +ui.simple.flight-mode = Flight mode +ui.simple.fog-of-war = Fog of War +ui.simple.force-boost = Force Boost +ui.simple.force-skip-waves = Force skip waves +ui.simple.frame-rate-simulation = Frame rate simulation +ui.simple.fx = FX +ui.simple.game-resumed = Game resumed +ui.simple.generate-quantity = Generate quantity: +ui.simple.global-range = Global range +ui.simple.green-click-the-screen-to-return = [green]Click the screen to return +ui.simple.green-tap-the-screen-to-capture-coordinates = [green]Tap the screen to capture coordinates +ui.simple.h = H +ui.simple.hide-all-buildings = Hide all buildings +ui.simple.hide-logic-helper = Hide Logic Helper +ui.simple.hitbox-overlay = Hitbox Overlay +ui.simple.hourglass = Hourglass: +ui.simple.hue-mode = Hue mode: +ui.simple.icon = Icon +ui.simple.index = Index +ui.simple.instant = Instant +ui.simple.item = Item +ui.simple.liquids = Liquids +ui.simple.load-building = Load Building +ui.simple.load-external-replay = Load external replay +ui.simple.load-self = Load self +ui.simple.load-unit = Load Unit +ui.simple.lock = Lock +ui.simple.lock-the-last-marked-point = Lock the last marked point +ui.simple.logic-announcement = Logic~Announcement +ui.simple.logic-art-website = Logic art website +ui.simple.logic-camera-lock-removed = Logic camera lock removed +ui.simple.logic-helper-gold-x = Logic Helper[gold]X[] +ui.simple.logic-notice = Logic~Notice +ui.simple.m = M +ui.simple.mark-coordinates = Mark~Coordinates +ui.simple.mark-map-location = Mark map location +ui.simple.mark-player = Mark~Player +ui.simple.max-chat-history-setting = Maximum storage of chat history (too high may cause lag): +ui.simple.message-center = Message Center +ui.simple.message-js-starts-with-script = Message (@js starts with script) +ui.simple.miner-ai = Miner AI +ui.simple.miner-ai-ore-filter = Miner AI - Ore Filter +ui.simple.minimap = Minimap +ui.simple.modified = Modified +ui.simple.more-teams = More Teams +ui.simple.name = Name +ui.simple.no-command-entered = No command entered +ui.simple.o = O +ui.simple.observer-mode = Observer Mode +ui.simple.off = Off +ui.simple.on = On +ui.simple.open-playback-file = Open playback file +ui.simple.open-release-page = Open Release Page +ui.simple.orange-spawned = [orange]spawned! +ui.simple.orange-spawns-units-that-fly = [orange]spawns units that fly +ui.simple.orange-updated-edited-logic = [orange]Updated edited logic! +ui.simple.orange-warning-image-may-be-too-large-please-try = [orange]Warning: Image may be too large, please try compressing image +ui.simple.poked-notification = [orange]You were poked. Please check the message dialog. +ui.simple.ore-count-surface-wall = Ore Count (surface/wall) +ui.simple.ore-info = Ore Info +ui.simple.original-size = Original size +ui.simple.p = P +ui.simple.panels-currently-unavailable = Panels currently unavailable: +ui.simple.path = Path +ui.simple.pause-logic-game-execution = Pause logic (game) execution +ui.simple.pause-time = Pause time +ui.simple.paused = Paused +ui.simple.permanent-status = +ui.simple.pick-up-payload = Pick up payload +ui.simple.pixel-art = Pixel Art +ui.simple.place-replace = Place/Replace +ui.simple.player = Player +ui.simple.player-build-range = Player build range +ui.simple.please-don-t-tag-too-often = Please don't tag too often! +ui.simple.preview-releases-description = Preview Releases\n(faster updates, new features, bug fixes) +ui.simple.purple-resistance = [purple]Resistance +ui.simple.radar-scanning = >> Radar Scanning << +ui.simple.radar-toggle = Radar Toggle +ui.simple.spawn-range-tooltip = Randomly generated within this range near the target point +ui.simple.reading-replay-header = Reading replay header... +ui.simple.recorded = Recorded +ui.simple.recording-ended = Recording ended +ui.simple.recording-error = Recording error! +ui.simple.red-current-unit-cannot-build = [red]Current unit cannot build +ui.simple.red-damage = [red]Damage +ui.simple.red-hp = [red]HP: +ui.simple.skip-to-wave-warning = [red]This is a cheat feature[]\nJump to the target wave instantly (without spawning enemies) +ui.simple.refresh-edited-logic = Refresh edited logic +ui.simple.release-notes = Release Notes +ui.simple.remove-logic-lock = Remove logic lock +ui.simple.repair-ai = Repair AI +ui.simple.replay-manager = Replay Manager +ui.simple.replay-not-loaded = Replay not loaded! +ui.simple.replay-stats = Replay Stats +ui.simple.reset = Reset +ui.simple.reset-all-links = Reset all links +ui.simple.restore-current-wave = Restore current wave +ui.simple.return-to-original-speed = Return to original speed +ui.simple.rules = Rules: +ui.simple.s = S +ui.simple.sandbox = Sandbox +ui.simple.saved-to-clipboard = Saved to clipboard +ui.simple.scaled-size = Scaled size +ui.simple.scan-mode = Scan Mode +ui.simple.search-replays = Search replays +ui.simple.sec = sec +ui.simple.image-import-description = Select and import pictures, which can be converted into artboards, pixel paintings or logic paintings. +ui.simple.select-code = Select Code +ui.simple.select-image-white-png = Select image[white](png) +ui.simple.selection-range = Selection Range +ui.simple.self-destruct = Self-Destruct +ui.simple.server = Server +ui.simple.server-info-build = Server Info Build +ui.simple.server-msg = Server Msg +ui.simple.set-target = Set target +ui.simple.set-target-wave = Set target wave +ui.simple.share-inventory-status = Share inventory status +ui.simple.share-power-status = Share power status +ui.simple.share-unit-count = Share unit count +ui.simple.share-wave-information = Share wave information +ui.simple.show-all = Show all +ui.simple.show-all-message-blocks = Show all message blocks +ui.simple.show-building-status-only = Show building status only +ui.simple.single-player-map-tools-only = Single-player map tools only. +ui.simple.size = Size +ui.simple.slow-the-flow-of-time-to-half = Slow the flow of time to half +ui.simple.spawn-location = Spawn location: +ui.simple.spawn-range = Spawn range: +ui.simple.spawn-team = Spawn Team: +ui.simple.speed-up-time-to-2x = Speed up time to 2x +ui.simple.squared = Squared +ui.simple.stable-releases = Stable Releases +ui.simple.staging-area = Staging area +ui.simple.surrender-vote = Surrender Vote +ui.simple.sync-a-wave = Sync a wave +ui.simple.teal-armor = [teal]Armor +ui.simple.team = Team: +ui.simple.team-id = Team ID: +ui.simple.team-range = Team range +ui.simple.team-selector = Team selector +ui.simple.temporary-state = +ui.simple.the-currently-selected-area-is-empty-please-use = The currently selected area is empty. Please use F to plan the area. +ui.simple.there-are-no-enemies-in-this-wave = There are no enemies in this wave +ui.simple.tiles = tiles +ui.simple.tip-all-schematics-containing-processors = TIP: All schematics containing processors +ui.simple.toggle = Toggle +ui.simple.toggle-your-team-s-cheat = Toggle your team's Cheat +ui.simple.u = U +ui.simple.ui-icon-library = UI Icon Library +ui.simple.ui-toolkit = UI Toolkit +ui.simple.unit = Unit: +ui.simple.unit-factory = Unit Factory +ui.simple.unit-factory-x = Unit Factory-X +ui.simple.unit-rendering = Unit Rendering +ui.simple.unlimited = Unlimited +ui.simple.unlock = Unlock +ui.simple.unlock-and-allow-all-blocks = Unlock and allow all blocks +ui.simple.upload-failed-try-again = Upload failed, try again? +ui.simple.v = V +ui.simple.vanilla = Vanilla +ui.simple.version = Version +ui.simple.view-recording-info = View recording info +ui.simple.violet-attack-speed = [violet]Attack speed +ui.simple.w = W +ui.simple.wall-shadow-rendering = Wall Shadow Rendering +ui.simple.wave-info = Wave Info +ui.simple.wave-settings = Wave Settings +ui.simple.white-s = [white]S +ui.simple.white-took-units = \n[white] took units: +ui.simple.zoom-icon-label = Zoom:  +ui.simple.save-before-add-instruction-warning = [yellow]Before adding new instructions, please save the edited instructions first. +ui.simple.yellow-current-selection-is-empty-select-a-block = [yellow]Current selection is empty; select a block in the inventory. +ui.simple.yellow-no-permission-to-edit-view-only = [yellow]No permission to edit; view only. +ui.simple.yellow-shield = [yellow]Shield: +ui.simple.too-many-buildings-warning = [yellow]There are too many buildings. To avoid lag, only the first 1000 plans are kept. +ui.simple.you-are-already-on-the-latest-version = You are already on the latest version. +ui.simple.zoom = Zoom +ui.simple.toggle-display-mode = Toggle display mode +ui.simple.wave-list-legend = \uE86D is unit count; \uE813 is unit HP + shield; \uE810 is buffed HP + shield; \uE86E is estimated DPS. In-game, spawn point count is considered. +ui.simple.wave-number = Wave [accent]{0}[] +ui.simple.load-more-waves = Load more waves +ui.simple.carried-item-x = Carried item [gold]X[]: +ui.simple.red-unit-cannot-carry-items = [red]This unit cannot carry items +ui.simple.carried-payload-x = Carried payload [gold]X[]: +ui.simple.red-unit-cannot-carry-payloads = [red]This unit cannot carry payloads +ui.simple.other-teams = [violet]Other Teams +ui.simple.guide-line = Guide line: +ui.simple.brush = Brush: +ui.simple.orange-convert-failed = [orange]Warning: conversion failed. Please enter the correct format. +ui.simple.jump-to-line = [gold]Jump to line:[] {0} +ui.simple.discard-changes = [orange]Discard changes +ui.simple.confirm-discard = Discard changes? +ui.simple.weapon-range = [lightgray]Weapon range: [stat]{0} []tiles +ui.simple.rotation-speed = [lightgray]Rotation speed: [stat]{0} []°/s +ui.simple.rotation-range = [lightgray]Rotation range: [stat]{0} []{1} +ui.simple.payload-bar = Payload: {0}/{1} {2} +ui.simple.health = Health +ui.simple.damage = Damage +ui.simple.attack-speed = Attack Speed +ui.simple.movement-speed = Movement Speed +ui.simple.build-speed = Build Speed +ui.simple.resistance = Resistance +ui.simple.armor = Armor +ui.simple.level-format = @ level +ui.simple.possession-allowed = Allow unit possession +ui.simple.disable-rebuild = Disable rebuilding +ui.simple.enable-all-teams-cheat = Enable cheat for all teams +ui.simple.disable-all-teams-cheat = Disable cheat for all teams +ui.simple.more-team-settings = More team settings +ui.simple.custom-background-requires-empty-floor = Custom background [lightgray](requires an empty floor) +ui.simple.zoom-factor = Zoom +ui.simple.position-x = Position X +ui.simple.position-y = Position Y +ui.simple.position-z = Position Z +ui.simple.force-join = Force Join +ui.simple.cancel-binding = Clear binding +ui.simple.sector-name = Sector Name +ui.simple.unmet-prerequisite-tech = \n[red]Prerequisite tech not met +ui.simple.schematic-archive = Schematic Archive +ui.simple.image-converter = Image Converter +ui.simple.tech-tree = Tech tree: +ui.simple.advanced-filter = Advanced filter: +ui.simple.can-build-schematic-tooltip = Buildable (core has required resources and the map does not ban these blocks) +ui.simple.schematic-contains = Schematic contains: +ui.simple.schematic-contains-tooltip = Schematic must contain this block +ui.simple.schematic-filter-mode = [orange]Schematic filter mode[white]: schematic must contain {0} +ui.simple.share-schematic-to-chat = Share schematic in chat +ui.simple.copy-to-clipboard-with-description = Copy to clipboard (advanced, with description) +ui.simple.schematic-from-server = Schematic from server +ui.simple.schematic-from-player = Schematic from {0} +ui.simple.auto-tag = Auto tag +ui.simple.copied-logic-code = Logic code copied +ui.simple.enter-mark-mode = Enter mark mode +ui.simple.more = More +ui.simple.enemy-core = Enemy cores: [orange]{0} +ui.simple.current-wave = Wave: [orange]{0} +ui.simple.high-health-units = High-health units +ui.simple.low-health-units = Low-health units +ui.simple.offensive-units = Offensive units +ui.simple.support-units = Support units +ui.simple.flying-units = Flying units +ui.simple.ground-units = Ground units +ui.simple.naval-units = Naval units +ui.simple.rts-select = RTS controller: selected {0}! +ui.simple.rts-remove = RTS controller: removed {0}! +ui.simple.copied-nickname = Copied nickname: {0} +ui.simple.charge-bar = Charge: {0} / {1} +ui.simple.overdrive = Boost: +ui.simple.drill-speed-empty = Drill speed: 0.00/s +ui.simple.drill-speed = Drill speed: +ui.simple.building-damage-multiplier = [lightgray]x building damage +ui.simple.range-tiles = [lightgray]Range {0} [lightgray]tiles +ui.simple.reload-multiplier = [lightgray]x reload speed +ui.simple.percent-falloff = {0}% falloff +ui.simple.infinite-pierce = Infinite +ui.simple.pierce-label = pierce[lightgray] +ui.simple.buildings-and-units = buildings and units +ui.simple.building = building +ui.simple.electric-property = [stat](electric) +ui.simple.homing-detail = [stat]Homing[lightgray]~[]{0}°/s[lightgray]~[]{1}[lightgray]tiles +ui.simple.emp-summary = [stat]EMP~{0}[lightgray]tiles[]~[white]\uE810[]{1}%/[white]\uE86D[]{2}%~[white]\uF899[][green]{3}%[]/[negstat]{4}%[] +ui.simple.emp-damages-power = [stat]Deals {0}% bullet damage to enemy power-grid buildings +ui.simple.emp-damages-units = [stat]Deals {0}% bullet damage to enemy units +ui.simple.emp-speeds-friendly-power = [stat]Speeds up friendly powered buildings to {0}% +ui.simple.emp-slows-enemy-power = [stat]Slows enemy power-grid buildings to {0}% +ui.simple.lightning-damage = Lightning~[stat]{0}[] damage~ +ui.simple.lightning-length-range = [stat]{0}~{1}[] length +ui.simple.lightning-length = [stat]{0}[] length +ui.simple.brief-share = ♐Brief +ui.simple.detailed-share = ♐Full +ui.simple.apk-install-failed = APK installation failed +# endregion generated ui.simple keys diff --git a/patches/client/0013-HR-RenderExt-researchViewer.patch b/patches/client/0013-HR-RenderExt-researchViewer.patch index 7ad88a96bc20..81aeb076e191 100644 --- a/patches/client/0013-HR-RenderExt-researchViewer.patch +++ b/patches/client/0013-HR-RenderExt-researchViewer.patch @@ -92,7 +92,7 @@ index 244c04afc7f4d892b1dca301a1ab50344568682a..fbf8dde06bdf66cb336cee8eb3bbe246 b.table(desc -> { desc.left().defaults().left(); - desc.add(selectable ? node.content.localizedName : "[accent]???"); -+ desc.add(selectable ? node.content.localizedName : RenderExt.researchViewer ? node.content.localizedName + "\n[red]未满足前置科技" : "[accent]???"); ++ desc.add(selectable ? node.content.localizedName : RenderExt.researchViewer ? node.content.localizedName + Core.bundle.get("ui.simple.unmet-prerequisite-tech") : "[accent]???"); desc.row(); if(locked(node) || (debugShowRequirements && !net.client())){ diff --git a/patches/client/0018-HC-StatExt.patch b/patches/client/0018-HC-StatExt.patch index cd79cc76d286..5db07c2afb88 100644 --- a/patches/client/0018-HC-StatExt.patch +++ b/patches/client/0018-HC-StatExt.patch @@ -141,7 +141,7 @@ index e47316c1a1b7495f3e8b4672f89f89ba0bc8c82b..ede5dc36c5e133c3f1033c00f678d64c + } if(mineTier >= 1){ -+ stats.add(StatExt.mineLevel, "@级", mineTier); ++ stats.add(StatExt.mineLevel, Core.bundle.get("ui.simple.level-format"), mineTier); stats.addPercent(Stat.mineSpeed, mineSpeed); - stats.add(Stat.mineTier, StatValues.drillables(mineSpeed, 1f, 1, null, b -> + stats.add(Stat.mineTier, StatValues.drillables(mineHardnessScaling ? 50 : 65, mineHardnessScaling ? 1 : 0, mineSpeed, null, b -> @@ -177,14 +177,14 @@ index eedcaa20c7b63b6c41d647cead5febc8b8c2dacb..c527a7c4e0164fcbb22240880692f58b public void addStats(UnitType u, Table t){ + t.row(); -+ t.add("[lightgray]武器范围: [stat]" + String.format("%.1f", bullet.range/8f) + " []格"); ++ t.add(Core.bundle.format("ui.simple.weapon-range", String.format("%.1f", bullet.range / 8f))); + + if (rotate) { + t.row(); -+ t.add("[lightgray]旋转速度: [stat]" + String.format("%.0f", rotateSpeed * 60f) + " []°/s"); ++ t.add(Core.bundle.format("ui.simple.rotation-speed", String.format("%.0f", rotateSpeed * 60f))); + if (rotationLimit < 361f) { + t.row(); -+ t.add("[lightgray]旋转范围: [stat]" + String.format("%.0f", rotationLimit) + " []" + StatUnit.degrees.localized()); ++ t.add(Core.bundle.format("ui.simple.rotation-range", String.format("%.0f", rotationLimit), StatUnit.degrees.localized())); + } + } + @@ -597,12 +597,12 @@ index 58134e5c84363b261f6270c44802fbf471128261..72207f49403881823181169657a797fe if(type.buildingDamageMultiplier != 1){ - sep(bt, Core.bundle.format("bullet.buildingdamage", ammoStat((int)(type.buildingDamageMultiplier * 100 - 100)))); -+ sep(bt, multStat(type.buildingDamageMultiplier) + "[lightgray]x建筑伤害"); ++ sep(bt, multStat(type.buildingDamageMultiplier) + Core.bundle.get("ui.simple.building-damage-multiplier")); } if(type.rangeChange != 0 && !compact){ - sep(bt, Core.bundle.format("bullet.range", ammoStat(type.rangeChange / tilesize))); -+ sep(bt, "[lightgray]射程 " + ammoStat(type.rangeChange / tilesize) + " [lightgray]格"); ++ sep(bt, Core.bundle.format("ui.simple.range-tiles", ammoStat(type.rangeChange / tilesize))); } if(type.shieldDamageMultiplier != 1){ @@ -612,7 +612,7 @@ index 58134e5c84363b261f6270c44802fbf471128261..72207f49403881823181169657a797fe if(!compact && !Mathf.equal(type.reloadMultiplier, 1f)){ - int val = (int)(type.reloadMultiplier * 100 - 100); - sep(bt, Core.bundle.format("bullet.reload", ammoStat(val))); -+ sep(bt, multStat(type.reloadMultiplier) + "[lightgray]x射速"); ++ sep(bt, multStat(type.reloadMultiplier) + Core.bundle.get("ui.simple.reload-multiplier")); } if(type.knockback > 0){ @@ -628,17 +628,17 @@ index 58134e5c84363b261f6270c44802fbf471128261..72207f49403881823181169657a797fe + boolean pierceUnit = type.pierce; + StringBuilder str = new StringBuilder("[stat]"); + if(type instanceof RailBulletType rail){ -+ str.append(Strings.autoFixed(rail.pierceDamageFactor * 100f, 1) + "%衰减"); ++ str.append(Core.bundle.format("ui.simple.percent-falloff", Strings.autoFixed(rail.pierceDamageFactor * 100f, 1))); + }else{ -+ str.append(type.pierceCap == -1 ? "无限" : type.pierceCap + "x"); ++ str.append(type.pierceCap == -1 ? Core.bundle.get("ui.simple.infinite-pierce") : type.pierceCap + "x"); + } -+ str.append("穿透[lightgray]"); ++ str.append(Core.bundle.get("ui.simple.pierce-label")); + if(pierceBuilding && pierceUnit){ -+ str.append("建筑与单位"); ++ str.append(Core.bundle.get("ui.simple.buildings-and-units")); + }else{ -+ str.append(pierceBuilding ? "建筑" : "单位"); ++ str.append(pierceBuilding ? Core.bundle.get("ui.simple.building") : Core.bundle.get("ui.simple.unit")); + } -+ if(laserPierce) str.append("[stat](电性)"); ++ if(laserPierce) str.append(Core.bundle.get("ui.simple.electric-property")); + sep(bt, str.toString()); } @@ -648,7 +648,7 @@ index 58134e5c84363b261f6270c44802fbf471128261..72207f49403881823181169657a797fe if(type.homingPower > 0.01f){ - sep(bt, "@bullet.homing"); -+ sep(bt, "[stat]追踪[lightgray]~[]" + Strings.autoFixed(type.homingPower * 50 * Time.toSeconds, 1) + "°/s[lightgray]~[]" + Strings.fixed(type.homingRange / tilesize, 1) + "[lightgray]格"); ++ sep(bt, Core.bundle.format("ui.simple.homing-detail", Strings.autoFixed(type.homingPower * 50 * Time.toSeconds, 1), Strings.fixed(type.homingRange / tilesize, 1))); } - if(type.lightning > 0){ @@ -672,7 +672,7 @@ index 58134e5c84363b261f6270c44802fbf471128261..72207f49403881823181169657a797fe } + if(type instanceof EmpBulletType eb){ -+ collapse(bt, Strings.format("[stat]EMP~@[lightgray]格[]~[white]\uE810[]@%/[white]\uE86D[]@%~[white]\uF899[][green]@%[]/[negstat]@%[]", ++ collapse(bt, Core.bundle.format("ui.simple.emp-summary", + Strings.autoFixed(eb.radius / tilesize, 0), + Strings.autoFixed(eb.powerDamageScl * 100, 0), + Strings.autoFixed(eb.unitDamageScl * 100, 0), @@ -680,10 +680,10 @@ index 58134e5c84363b261f6270c44802fbf471128261..72207f49403881823181169657a797fe + Strings.autoFixed(eb.powerSclDecrease * 100, 0) + ), ec -> { + ec.defaults().padLeft(5f); -+ sep(ec, Strings.format("[stat]对敌方电网建筑造成@%子弹伤害", Strings.autoFixed(eb.powerDamageScl * 100, 0))); -+ sep(ec, Strings.format("[stat]对敌方单位造成@%子弹伤害", Strings.autoFixed(eb.unitDamageScl * 100, 0))); -+ sep(ec, Strings.format("[stat]对我方耗电建筑超速至@%", Strings.autoFixed(eb.timeIncrease * 100, 0))); -+ sep(ec, Strings.format("[stat]对敌方电网建筑减速至@%", Strings.autoFixed(eb.powerSclDecrease * 100, 0))); ++ sep(ec, Core.bundle.format("ui.simple.emp-damages-power", Strings.autoFixed(eb.powerDamageScl * 100, 0))); ++ sep(ec, Core.bundle.format("ui.simple.emp-damages-units", Strings.autoFixed(eb.unitDamageScl * 100, 0))); ++ sep(ec, Core.bundle.format("ui.simple.emp-speeds-friendly-power", Strings.autoFixed(eb.timeIncrease * 100, 0))); ++ sep(ec, Core.bundle.format("ui.simple.emp-slows-enemy-power", Strings.autoFixed(eb.powerSclDecrease * 100, 0))); + }); + } + @@ -700,11 +700,11 @@ index 58134e5c84363b261f6270c44802fbf471128261..72207f49403881823181169657a797fe + if(shots > 0){ + str += String.format("[stat]%d[]x", shots); + } -+ str += String.format("闪电~[stat]%s[]伤害~", Strings.autoFixed(damage, 1)); ++ str += Core.bundle.format("ui.simple.lightning-damage", Strings.autoFixed(damage, 1)); + if(lengthRand > 0){ -+ str += String.format("[stat]%d~%d[]长度", length, length + lengthRand); ++ str += Core.bundle.format("ui.simple.lightning-length-range", length, length + lengthRand); + }else{ -+ str += String.format("[stat]%d[]长度", length); ++ str += Core.bundle.format("ui.simple.lightning-length", length); + } + sep(table, str); + }; diff --git a/patches/client/0027-H-misc.patch b/patches/client/0027-H-misc.patch index 058c8f5f65a5..761f49ee6511 100644 --- a/patches/client/0027-H-misc.patch +++ b/patches/client/0027-H-misc.patch @@ -348,7 +348,7 @@ index d14fd47e8d0afa17a76b9112eb89cca4badeb2b8..d3dd7592465f420eb7c225b7dc7218ea openDialog(keybind); }).size(bw, bh); } -+ table.button("取消绑定", tstyle, () -> { ++ table.button(Core.bundle.get("ui.simple.cancel-binding"), tstyle, () -> { + keybind.value = new Axis(KeyCode.unset); + keybind.save(); + }).size(bw, bh).pad(2f).padLeft(4f); diff --git a/patches/client/0030-FR-ARC-setBars.patch b/patches/client/0030-FR-ARC-setBars.patch index f06ccf30a529..7778a4adf9ad 100644 --- a/patches/client/0030-FR-ARC-setBars.patch +++ b/patches/client/0030-FR-ARC-setBars.patch @@ -152,7 +152,7 @@ index 3c7b9653a58a5d4e92f9ba050de2f44757d91be2..dc337d182b0679e533c2389640b8edc7 + @Override + public void setBars(){ + super.setBars(); -+ addBar("charge", (MendBuild entity) -> new Bar(() -> ("充能: " + (int)entity.charge + " / " + reload), () -> Pal.items, () -> (entity.charge / reload))); ++ addBar("charge", (MendBuild entity) -> new Bar(() -> Core.bundle.format("ui.simple.charge-bar", (int)entity.charge, reload), () -> Pal.items, () -> (entity.charge / reload))); + } + @Override @@ -168,7 +168,7 @@ index c2a1f10f2fe32c093cb0142a7f1d93dabadb4e2f..31b67b7837d1c1b6c4c3ec00982478b5 super.setBars(); - addBar("boost", (OverdriveBuild entity) -> new Bar(() -> Core.bundle.format("bar.boost", Mathf.round(Math.max((entity.realBoost() * 100 - 100), 0))), () -> Pal.accent, () -> entity.realBoost() / (hasBoost ? speedBoost + speedBoostPhase : speedBoost))); + addBar("boost", (OverdriveBuild entity) -> new Bar(() -> -+ "超速:" + (entity.realBoost() <= 1 ? "[red]\uE815": "+" + (int)((entity.realBoost() - 1) * 100) + "%"), ++ Core.bundle.get("ui.simple.overdrive") + (entity.realBoost() <= 1 ? "[red]\uE815": "+" + (int)((entity.realBoost() - 1) * 100) + "%"), + () -> Pal.accent, () -> entity.realBoost() / (hasBoost ? speedBoost + speedBoostPhase : speedBoost))); } @@ -421,7 +421,7 @@ index a142f890eaf5c8252a04201c8485ecb0e260d3f6..2fdaf89d8bfafa089c5a6de09115ec81 addBar("drillspeed", (BeamDrillBuild e) -> - new Bar(() -> Core.bundle.format("bar.drillspeed", Strings.fixed(e.lastDrillSpeed * 60, 2)), () -> Pal.ammo, () -> e.warmup)); -+ new Bar(() -> (e.lastItem == null ? "挖掘速度:0.00/s" : e.lastItem.emoji() +" "+ Strings.fixed(e.lastDrillSpeed * 60 , 2) + "/s"), () -> Pal.ammo, () -> e.warmup)); ++ new Bar(() -> (e.lastItem == null ? Core.bundle.get("ui.simple.drill-speed-empty") : Core.bundle.get("ui.simple.drill-speed") + e.lastItem.emoji() + " " + Strings.fixed(e.lastDrillSpeed * 60, 2) + "/s"), () -> Pal.ammo, () -> e.warmup)); } @Override @@ -498,7 +498,7 @@ index 9ae3c98364c860ed47d03592f9d660d1af1b753c..e13f83f830269f8485351d2a52c2edff addBar("drillspeed", (WallCrafterBuild e) -> - new Bar(() -> Core.bundle.format("bar.drillspeed", Strings.fixed(e.lastEfficiency * 60 / drillTime, 2)), () -> Pal.ammo, () -> e.warmup)); -+ new Bar(() -> (output == null ? "挖掘速度:" : output.emoji()) +" "+ Strings.fixed(e.lastEfficiency * 60 / drillTime, 2) + "/s", () -> Pal.ammo, () -> e.warmup)); ++ new Bar(() -> (output == null ? Core.bundle.get("ui.simple.drill-speed") : output.emoji()) + " " + Strings.fixed(e.lastEfficiency * 60 / drillTime, 2) + "/s", () -> Pal.ammo, () -> e.warmup)); } @Override diff --git a/patches/client/0035-H-UI-HudFragment.patch b/patches/client/0035-H-UI-HudFragment.patch index dd2605e030b0..e5fced74b6f6 100644 --- a/patches/client/0035-H-UI-HudFragment.patch +++ b/patches/client/0035-H-UI-HudFragment.patch @@ -39,10 +39,10 @@ index d6c8321377b26ee05636c41588fdaa6a0787e97a..44204c8e8383d5854e40654e42d599a8 + .visible(() -> Core.settings.getBool("position") || Core.settings.getBool("mouseposition")) + .touchable(Touchable.disabled).style(Styles.outlineLabel).minWidth(120f); + -+ tt.button("♐", Styles.cleart, MarkerType::toggleMarkHitterUI).size(iconMed).tooltip("进入标记模式"); ++ tt.button("♐", Styles.cleart, MarkerType::toggleMarkHitterUI).size(iconMed).tooltip(Core.bundle.get("ui.simple.enter-mark-mode")); + tt.button("T", Styles.cleart, () -> ui.chatfrag.nextMode()) -+ .checked(b -> ui.chatfrag.mode == ChatFragment.ChatMode.team).size(iconMed).tooltip("前缀添加/t"); -+ tt.button("" + Iconc.zoom, Styles.cleart, MarkerType::lockOnLastMark).size(iconMed).tooltip("锁定上个标记点"); ++ .checked(b -> ui.chatfrag.mode == ChatFragment.ChatMode.team).size(iconMed).tooltip(Core.bundle.get("ui.simple.add-prefix-t")); ++ tt.button("" + Iconc.zoom, Styles.cleart, MarkerType::lockOnLastMark).size(iconMed).tooltip(Core.bundle.get("ui.simple.lock-the-last-marked-point")); + }).name("position"); t.top().right(); }); @@ -60,7 +60,7 @@ index d6c8321377b26ee05636c41588fdaa6a0787e97a..44204c8e8383d5854e40654e42d599a8 info.row(); + if (!android){ -+ info.label(() -> "缩放: " + String.format("%.2f", renderer.getScale())).left().style(Styles.outlineLabel); ++ info.label(() -> VarsX.bundle.zoomScale(String.format("%.2f", renderer.getScale()))).left().style(Styles.outlineLabel); + info.row(); + } + diff --git a/patches/client/0040-FC-LogicExt-worldCreator-allUnlocked.patch b/patches/client/0040-FC-LogicExt-worldCreator-allUnlocked.patch index c7a5c6874d68..e3a0c7dade09 100644 --- a/patches/client/0040-FC-LogicExt-worldCreator-allUnlocked.patch +++ b/patches/client/0040-FC-LogicExt-worldCreator-allUnlocked.patch @@ -54,7 +54,7 @@ index 078026a393a19b36a66577a962f5984310375570..dfc6b9f31bdb9d1f890acc21f4ecca33 }); onResize(this::rebuild); -+ buttons.button("解禁", Styles.togglet, () -> { ++ buttons.button(Core.bundle.get("ui.simple.unlock"), Styles.togglet, () -> { + mindustryX.VarsX.allUnlocked.toggle(); + rebuild(); + }).checked((b) -> mindustryX.VarsX.allUnlocked.get()); diff --git a/patches/client/0041-C-Editor.patch b/patches/client/0041-C-Editor.patch index d596d221cd1a..60d8230b1353 100644 --- a/patches/client/0041-C-Editor.patch +++ b/patches/client/0041-C-Editor.patch @@ -99,7 +99,7 @@ index 49fe8dddaf6a14d47a6a8aec28ea16798f253ee7..0910b33d4b97886c5c6333b0235794e8 if(i++ % 3 == 2) tools.row(); } -+ tools.button("[violet]其他队伍", Styles.flatToggleMenut, () -> UIExt.teamSelect.pickOne(team -> editor.drawTeam = team)) ++ tools.button(Core.bundle.get("ui.simple.other-teams"), Styles.flatToggleMenut, () -> UIExt.teamSelect.pickOne(team -> editor.drawTeam = team)) + .update(b->{ + boolean checked = !Seq.with(Team.baseTeams).contains(editor.drawTeam); + b.setColor(checked ? editor.drawTeam.color : Color.violet); @@ -111,13 +111,13 @@ index 49fe8dddaf6a14d47a6a8aec28ea16798f253ee7..0910b33d4b97886c5c6333b0235794e8 mid.row(); + mid.table(t -> { -+ t.add("辅助线:"); ++ t.add(Core.bundle.get("ui.simple.guide-line")); + t.field(Integer.toString(editor.interval), TextField.TextFieldFilter.digitsOnly, value -> editor.interval = Integer.parseInt(value)) + .valid(Strings::canParsePositiveInt).maxTextLength(4).width(100f); + }).row(); + + var brushField = mid.table().get() -+ .add("笔刷:").getTable() ++ .add(Core.bundle.get("ui.simple.brush")).getTable() + .field(Float.toString(editor.brushSize), value -> editor.brushSize = Float.parseFloat(value)).valid(Strings::canParsePositiveFloat).maxTextLength(4).width(100f).get(); + mid.row(); mid.table(Tex.underline, t -> { diff --git a/patches/client/0046-UI-ARC-logic-Support.patch b/patches/client/0046-UI-ARC-logic-Support.patch index 590aa2634459..7b7f33faab90 100644 --- a/patches/client/0046-UI-ARC-logic-Support.patch +++ b/patches/client/0046-UI-ARC-logic-Support.patch @@ -88,7 +88,7 @@ index 74fb32ff56eec0fcf565cb7cf7aedf1335c978cc..39f29b027fe979cea410e52b2b8cd695 + Seq lsStatement = LAssembler.read(code, privileged); + LStatement stNew = lsStatement.first(); + if(stNew instanceof InvalidStatement){ -+ UIExt.announce("[orange]警告:转换失败,请输入正确格式"); ++ UIExt.announce(Core.bundle.get("ui.simple.orange-convert-failed")); + return; + } + newElem = new StatementElem(stNew); @@ -194,7 +194,7 @@ index 4f172c5f66736634dac190b115827695ab7993f7..ecbe2ed06b45257a1deb16ce7dbab495 + var scroll = (ScrollPane)canvas.parent; + scroll.setScrollY(scroll.getMaxY() - dest.y + scroll.getHeight() * 0.5f); + saveUI(); -+ UIExt.announce("[gold]跳转行号:[] " + destIndex); ++ UIExt.announce(Core.bundle.format("ui.simple.jump-to-line", destIndex)); + + Element header = dest.getChildren().first(); + dest.clearActions(); @@ -254,7 +254,7 @@ index 51c8576d8b41d43e25eb86400d169b9a108e6642..de370177beb5fec5b3b00abbb3dd8e2c }).marginLeft(12f); - + t.row(); -+ t.button("[orange]丢弃更改", Icon.cancel,style, () -> ui.showConfirm("确认丢弃?", () -> { ++ t.button(Core.bundle.get("ui.simple.discard-changes"), Icon.cancel,style, () -> ui.showConfirm(Core.bundle.get("ui.simple.confirm-discard"), () -> { + noSave = true; + dialog.hide(); + hide(); diff --git a/patches/client/0047-UI-forceJoin.patch b/patches/client/0047-UI-forceJoin.patch index f9fabc7fd32c..22a69bd22d41 100644 --- a/patches/client/0047-UI-forceJoin.patch +++ b/patches/client/0047-UI-forceJoin.patch @@ -59,9 +59,9 @@ index 4bc5fa841571cfe3e7948f7a74a9f08c4d2a6cb9..497406bf761dfa63cdbbe554289c00f4 + title.setAlignment(Align.center); + cont.add(Core.bundle.format("server.versions", Version.build, version)).row(); + cont.row(); -+ cont.add("[gold]MDTX[]: 目标版本可能兼容,你可以选择伪装版本强制加入。\n如果出现[red]网络错误[]或其他问题,表示无法兼容。").row(); ++ cont.add("@forceJoin.tips").row(); + cont.pack(); -+ buttons.button("强制加入", () -> { ++ buttons.button(Core.bundle.get("ui.simple.force-join"), () -> { + hide(); + ConnectPacket.clientVersion = version; + connect(ip, port); diff --git a/patches/client/0058-ARC-merged.patch b/patches/client/0058-ARC-merged.patch index e39ec2c1adf0..556c6c265825 100644 --- a/patches/client/0058-ARC-merged.patch +++ b/patches/client/0058-ARC-merged.patch @@ -812,7 +812,7 @@ index ede5dc36c5e133c3f1033c00f678d64c9f8a4cc3..4db27739bf896ee6d9dbf1a8d7549cd1 if(payloadCapacity > 0 && unit instanceof Payloadc payload){ - bars.add(new Bar("stat.payloadcapacity", Pal.items, () -> payload.payloadUsed() / payloadCapacity)); -+ bars.add(new Bar(() -> Strings.format("装载:@/@ @", ++ bars.add(new Bar(() -> Core.bundle.format("ui.simple.payload-bar", + Strings.autoFixed(payload.payloadUsed() / tilesize / tilesize, 4), + Strings.autoFixed(payloadCapacity / tilesize / tilesize, 4), + StatUnit.blocksSquared.localized()), () -> Pal.items, () -> payload.payloadUsed() / payloadCapacity)); @@ -841,10 +841,10 @@ index ede5dc36c5e133c3f1033c00f678d64c9f8a4cc3..4db27739bf896ee6d9dbf1a8d7549cd1 + }); + table.row().table(tt -> { + tt.defaults().pad(0, 8, 0, 8); -+ tt.add("血量"); -+ tt.add("伤害"); -+ tt.add("攻速"); -+ tt.add("移速"); ++ tt.add(Core.bundle.get("ui.simple.health")); ++ tt.add(Core.bundle.get("ui.simple.damage")); ++ tt.add(Core.bundle.get("ui.simple.attack-speed")); ++ tt.add(Core.bundle.get("ui.simple.movement-speed")); + tt.row(); + tt.add(FormatDefault.format(unit.healthMultiplier)); + tt.add(FormatDefault.format(unit.damageMultiplier)); @@ -853,9 +853,9 @@ index ede5dc36c5e133c3f1033c00f678d64c9f8a4cc3..4db27739bf896ee6d9dbf1a8d7549cd1 + }).growX().row(); + table.row().table(tt -> { + tt.defaults().pad(0, 8, 0, 8); -+ tt.add("建速"); -+ tt.add("阻力"); -+ tt.add("装甲"); ++ tt.add(Core.bundle.get("ui.simple.build-speed")); ++ tt.add(Core.bundle.get("ui.simple.resistance")); ++ tt.add(Core.bundle.get("ui.simple.armor")); + tt.row(); + tt.add(FormatDefault.format(unit.buildSpeedMultiplier)); + tt.add(FormatDefault.format(unit.dragMultiplier)); @@ -1010,8 +1010,8 @@ index b1aab84fae26a8c6d1f514b4e058d5262ba82a33..261f809504eed3624ebc850a485ff9ea + t.button(Icon.book, Styles.clearNonei, () -> Core.app.setClipboardText(content.description)).tooltip(content.description); + + if(net.active()){ -+ t.button("♐简", Styles.cleart, () -> ShareFeature.shareContent(content, false)).width(60f); -+ t.button("♐详", Styles.cleart, () -> ShareFeature.shareContent(content, true)).width(60f); ++ t.button(Core.bundle.get("ui.simple.brief-share"), Styles.cleart, () -> ShareFeature.shareContent(content, false)).width(60f); ++ t.button(Core.bundle.get("ui.simple.detailed-share"), Styles.cleart, () -> ShareFeature.shareContent(content, true)).width(60f); + } + }).fillX().padLeft(10); + @@ -1148,8 +1148,8 @@ index 98c85e5372269a1542ff1506da06025b9e08f487..135c8690779426c469a74894db89f795 + check("@rules.coreDestroyClear", b -> rules.coreDestroyClear = b, () -> rules.coreDestroyClear); + check("@rules.unitPayloadUpdate", b -> rules.unitPayloadUpdate = b, () -> rules.unitPayloadUpdate); + check("@rules.showSpawns", b -> rules.showSpawns = b, () -> rules.showSpawns); -+ check("允许控制单位", b -> rules.possessionAllowed = b, () -> rules.possessionAllowed); -+ check("禁用重建", b -> rules.ghostBlocks = !b, () -> !rules.ghostBlocks); ++ check(Core.bundle.get("ui.simple.possession-allowed"), b -> rules.possessionAllowed = b, () -> rules.possessionAllowed); ++ check(Core.bundle.get("ui.simple.disable-rebuild"), b -> rules.ghostBlocks = !b, () -> !rules.ghostBlocks); + + check("@rules.limitarea", b -> rules.limitMapArea = b, () -> rules.limitMapArea); + numberi("x", x -> state.rules.limitX = x, () -> state.rules.limitX, () -> state.rules.limitMapArea, 0, 10000); @@ -1179,13 +1179,13 @@ index 98c85e5372269a1542ff1506da06025b9e08f487..135c8690779426c469a74894db89f795 if(showRuleEditRule){ check("@rules.allowedit", b -> rules.allowEditRules = b, () -> rules.allowEditRules); } -+ current.button("所有队伍开启无限火力", () -> { ++ current.button(Core.bundle.get("ui.simple.enable-all-teams-cheat"), () -> { + for(Team team : Team.all){ + team.rules().cheat = true; + } + setup(); + }).width(256f).height(32f).row(); -+ current.button("所有队伍关闭无限火力", () -> { ++ current.button(Core.bundle.get("ui.simple.disable-all-teams-cheat"), () -> { + for(Team team : Team.all){ + team.rules().cheat = false; + } @@ -1196,7 +1196,7 @@ index 98c85e5372269a1542ff1506da06025b9e08f487..135c8690779426c469a74894db89f795 team("@rules.enemyteam", t -> rules.waveTeam = t, () -> rules.waveTeam); - for(Team team : Team.baseTeams){ -+ current.button("更多队伍设置", Styles.flatBordert, () -> UIExt.teamSelect.select(team -> teams.contains(team), team -> { ++ current.button(Core.bundle.get("ui.simple.more-team-settings"), Styles.flatBordert, () -> UIExt.teamSelect.select(team -> teams.contains(team), team -> { + if(teams.contains(team)) teams.remove(team); + else teams.add(team); + setup(); @@ -1223,7 +1223,7 @@ index 98c85e5372269a1542ff1506da06025b9e08f487..135c8690779426c469a74894db89f795 }, () -> shown[0]).left().growX().row(); } -+ check("自定义背景[lightgray](需要设置空地板)", t -> { ++ check(Core.bundle.get("ui.simple.custom-background-requires-empty-floor"), t -> { + rules.planetBackground = t ? new PlanetParams(){{planet = Planets.sun;zoom=1f;camPos = new Vec3(1.2388899f, 1.6047299f, 2.4758825f);}} : null; + setup(); + }, () -> rules.planetBackground != null); @@ -1242,10 +1242,10 @@ index 98c85e5372269a1542ff1506da06025b9e08f487..135c8690779426c469a74894db89f795 + } + } + }).left().fill(false).expand(false, false).row(); -+ number("放缩", f -> rules.planetBackground.zoom = f, () -> rules.planetBackground.zoom, 0.0001f, 999); -+ number("位置x", f -> rules.planetBackground.camPos.x = f, () -> rules.planetBackground.camPos.x); -+ number("位置y", f -> rules.planetBackground.camPos.y = f, () -> rules.planetBackground.camPos.y); -+ number("位置z", f -> rules.planetBackground.camPos.z = f, () -> rules.planetBackground.camPos.z); ++ number(Core.bundle.get("ui.simple.zoom-factor"), f -> rules.planetBackground.zoom = f, () -> rules.planetBackground.zoom, 0.0001f, 999); ++ number(Core.bundle.get("ui.simple.position-x"), f -> rules.planetBackground.camPos.x = f, () -> rules.planetBackground.camPos.x); ++ number(Core.bundle.get("ui.simple.position-y"), f -> rules.planetBackground.camPos.y = f, () -> rules.planetBackground.camPos.y); ++ number(Core.bundle.get("ui.simple.position-z"), f -> rules.planetBackground.camPos.z = f, () -> rules.planetBackground.camPos.z); + } + + @@ -1256,7 +1256,7 @@ index 98c85e5372269a1542ff1506da06025b9e08f487..135c8690779426c469a74894db89f795 cons.get(team); }).pad(1f).checked(b -> prov.get() == team).size(60f).tooltip(team.coloredName()).with(i -> i.getStyle().imageUpColor = team.color); } -+ t.button(Icon.add, Styles.squareTogglei, 38f, () -> UIExt.teamSelect.pickOne(cons, prov.get())).pad(1f).checked(b -> !Seq.with(Team.baseTeams).contains(prov.get())).size(60f).tooltip("更多队伍选择"); ++ t.button(Icon.add, Styles.squareTogglei, 38f, () -> UIExt.teamSelect.pickOne(cons, prov.get())).pad(1f).checked(b -> !Seq.with(Team.baseTeams).contains(prov.get())).size(60f).tooltip(Core.bundle.get("ui.simple.more-teams")); }).padTop(0).row(); } @@ -1354,14 +1354,14 @@ index 3f671f948eb3be11d7ebe461c78f9cadbd302996..4630bb8d182e0b71a1e2490f7de8e0f3 if(Core.graphics.isPortrait()){ buttons.add(sectorTop).colspan(2).fillX().row(); addBack(); -+ buttons.button("区块名称", Icon.bookOpen, () -> alwaysShowName = !alwaysShowName).size(100f, 54f).pad(2).bottom(); ++ buttons.button(Core.bundle.get("ui.simple.sector-name"), Icon.bookOpen, () -> alwaysShowName = !alwaysShowName).size(100f, 54f).pad(2).bottom(); addTech(); }else{ addBack(); buttons.add().growX(); buttons.add(sectorTop).minWidth(230f); buttons.add().growX(); -+ buttons.button("区块名称", Icon.bookOpen, () -> alwaysShowName = !alwaysShowName).size(100f, 54f).pad(2).bottom(); ++ buttons.button(Core.bundle.get("ui.simple.sector-name"), Icon.bookOpen, () -> alwaysShowName = !alwaysShowName).size(100f, 54f).pad(2).bottom(); addTech(); } } @@ -1454,8 +1454,8 @@ index fef8e21d771ccfd81cbc65a0bc62642ebf721952..f855efcd27a47e8ac5a0ac3dffc8a3c8 addCloseButton(); buttons.button("@schematic.import", Icon.download, this::showImport); + if (mobile) buttons.row(); -+ buttons.button("蓝图档案馆", Icon.link, () -> UIExt.openURI("https://docs.qq.com/sheet/DVHNoS3lIcm1NbFFS")); -+ buttons.button("图片转换器" + Blocks.canvas.emoji() + Blocks.logicDisplay.emoji() + Blocks.sorter.emoji(), Icon.image, PicToMindustry::show); ++ buttons.button(Core.bundle.get("ui.simple.schematic-archive"), Icon.link, () -> UIExt.openURI("https://docs.qq.com/sheet/DVHNoS3lIcm1NbFFS")); ++ buttons.button(Core.bundle.get("ui.simple.image-converter") + Blocks.canvas.emoji() + Blocks.logicDisplay.emoji() + Blocks.sorter.emoji(), Icon.image, PicToMindustry::show); makeButtonOverlay(); shown(this::setup); onResize(this::setup); @@ -1465,7 +1465,7 @@ index fef8e21d771ccfd81cbc65a0bc62642ebf721952..f855efcd27a47e8ac5a0ac3dffc8a3c8 + cont.row().table(in -> { + in.left(); -+ in.add("科技树:").padRight(4); ++ in.add(Core.bundle.get("ui.simple.tech-tree")).padRight(4); + for(var tag : content.planets().select(it -> it.alwaysUnlocked)){ + in.button(tag.localizedName, Styles.togglet, () -> { + if(selectedPlanet == tag) selectedPlanet = null; @@ -1474,17 +1474,17 @@ index fef8e21d771ccfd81cbc65a0bc62642ebf721952..f855efcd27a47e8ac5a0ac3dffc8a3c8 + }).checked((t) -> selectedPlanet == tag).get().getLabel().setWrap(false); + } + -+ in.add("辅助筛选:").padLeft(20f).padRight(4); ++ in.add(Core.bundle.get("ui.simple.advanced-filter")).padLeft(20f).padRight(4); + in.button(Items.copper.emoji(), Styles.togglet, () -> { + Core.settings.put("arcSchematicCanBuild", !Core.settings.getBool("arcSchematicCanBuild")); + rebuildPane.run(); -+ }).size(tagh).pad(2).tooltip("可建造(核心有此类资源+地图未禁用)").checked(t -> Core.settings.getBool("arcSchematicCanBuild")); -+ in.add("蓝图包含:").padLeft(20f).padRight(4); ++ }).size(tagh).pad(2).tooltip(Core.bundle.get("ui.simple.can-build-schematic-tooltip")).checked(t -> Core.settings.getBool("arcSchematicCanBuild")); ++ in.add(Core.bundle.get("ui.simple.schematic-contains")).padLeft(20f).padRight(4); + in.button(control.input.block == null ? "[red]\uE815" : control.input.block.emoji(), Styles.togglet, () -> { + if(control.input.block == null) return; + mindustryX.VarsX.autoSelectSchematic.toggle(); + rebuildPane.run(); -+ }).size(tagh).pad(2).tooltip("蓝图需包含此建筑").checked(t -> control.input.block != null && mindustryX.VarsX.autoSelectSchematic.get()); ++ }).size(tagh).pad(2).tooltip(Core.bundle.get("ui.simple.schematic-contains-tooltip")).checked(t -> control.input.block != null && mindustryX.VarsX.autoSelectSchematic.get()); + }).height(tagh).fillX(); + cont.row(); @@ -1507,7 +1507,7 @@ index fef8e21d771ccfd81cbc65a0bc62642ebf721952..f855efcd27a47e8ac5a0ac3dffc8a3c8 }).grow().scrollX(false); + + if(mindustryX.VarsX.autoSelectSchematic.get() && control.input.block!=null){ -+ String text = "[orange]蓝图筛选模式[white]:蓝图必须包含 "+control.input.block.emoji(); ++ String text = Core.bundle.format("ui.simple.schematic-filter-mode", control.input.block.emoji()); + UIExt.announce(text, 5f); + } } @@ -1518,11 +1518,11 @@ index fef8e21d771ccfd81cbc65a0bc62642ebf721952..f855efcd27a47e8ac5a0ac3dffc8a3c8 dialog.hide(); platform.export(s.name(), schematicExtension, file -> Schematics.write(s, file)); + }).marginLeft(12f).row(); -+ t.button("聊天分享蓝图", Icon.chat, style, () -> { ++ t.button(Core.bundle.get("ui.simple.share-schematic-to-chat"), Icon.chat, style, () -> { + dialog.hide(); + ShareFeature.shareSchematic(s); + }).marginLeft(12f).row(); -+ t.button("复制到剪切板(高级版,含介绍)", Icon.star, style, () -> { ++ t.button(Core.bundle.get("ui.simple.copy-to-clipboard-with-description"), Icon.star, style, () -> { + dialog.hide(); + ShareFeature.shareSchematicClipboard(s); }).marginLeft(12f); @@ -1536,7 +1536,7 @@ index fef8e21d771ccfd81cbc65a0bc62642ebf721952..f855efcd27a47e8ac5a0ac3dffc8a3c8 + try{ + Schematic s = Schematics.readBase64(base64); + s.removeSteamID(); -+ s.tags.put("name", sender == null ? "来自服务器的蓝图" : "来自" + sender.plainName() + "的蓝图"); ++ s.tags.put("name", sender == null ? Core.bundle.get("ui.simple.schematic-from-server") : Core.bundle.format("ui.simple.schematic-from-player", sender.plainName())); + fromShare = true; + SchematicsDialog.this.showInfo(s); + }catch(Throwable e){ @@ -1562,7 +1562,7 @@ index fef8e21d771ccfd81cbc65a0bc62642ebf721952..f855efcd27a47e8ac5a0ac3dffc8a3c8 + p.row(); + p.table(t -> { + t.left().defaults().fillX().height(tagh).pad(2); -+ t.button("自动标签", Icon.add, () -> arcAutoTags(rebuild[0])).wrapLabel(false).get().getLabelCell().padLeft(5); ++ t.button(Core.bundle.get("ui.simple.auto-tag"), Icon.add, () -> arcAutoTags(rebuild[0])).wrapLabel(false).get().getLabelCell().padLeft(5); + }); }; @@ -1865,7 +1865,7 @@ index 44204c8e8383d5854e40654e42d599a8cebdef15..b6d80499a3e58b9e30b20958302e1358 button.update(() -> button.setChecked(player.team() == team)); } - -+ teams.button("更多", () -> UIExt.teamSelect.pickOne(team -> Call.setPlayerTeamEditor(player, team), player.team())).center().row(); ++ teams.button(Core.bundle.get("ui.simple.more"), () -> UIExt.teamSelect.pickOne(team -> Call.setPlayerTeamEditor(player, team), player.team())).center().row(); teams.button(Icon.downOpen, Styles.emptyi, () -> Core.settings.put("editor-blocks-shown", !Core.settings.getBool("editor-blocks-shown"))) .size(45f).update(m -> m.getStyle().imageUp = (Core.settings.getBool("editor-blocks-shown") ? Icon.upOpen : Icon.downOpen)); }).top().left().row(); @@ -1951,7 +1951,7 @@ index 44204c8e8383d5854e40654e42d599a8cebdef15..b6d80499a3e58b9e30b20958302e1358 + if(!state.rules.waves){ + if(state.rules.attackMode){ + int sum = Math.max(state.teams.present.sum(t -> t.team != player.team() ? t.cores.size : 0), 1); -+ return "敌人核心:[orange]" + sum; ++ return Core.bundle.format("ui.simple.enemy-core", sum); + } + + if(state.isCampaign()){ @@ -1963,7 +1963,7 @@ index 44204c8e8383d5854e40654e42d599a8cebdef15..b6d80499a3e58b9e30b20958302e1358 + if(state.wave <= state.rules.winWave){ + return "[orange]" + state.wave + "[white]/[yellow]" + state.rules.winWave; + }else{ -+ return "波次:[orange]" + state.wave; ++ return Core.bundle.format("ui.simple.current-wave", state.wave); + } + }, + () -> Color.valueOf("ccffcc"), @@ -2267,16 +2267,16 @@ index 0e70bc703f77e282296a226b39ed73236fd5d694..9ad989b1f5ad672a411122bceeb54b9e + float wound = (float) Core.settings.getInt("rtsWoundUnit") / 100f; + if (units.contains(unit -> unit.health >= unit.maxHealth * wound) && units.contains(unit -> unit.health < unit.maxHealth * wound)){ + sp.table(spp->{ -+ arcSelectUnits(spp,"[green]\uE813","高血量单位", unit -> unit.health >= unit.maxHealth * wound); -+ arcSelectUnits(spp,"[red]\uE80F","低血量单位", unit -> unit.health < unit.maxHealth * wound); ++ arcSelectUnits(spp,"[green]\uE813", Core.bundle.get("ui.simple.high-health-units"), unit -> unit.health >= unit.maxHealth * wound); ++ arcSelectUnits(spp,"[red]\uE80F", Core.bundle.get("ui.simple.low-health-units"), unit -> unit.health < unit.maxHealth * wound); + }); + } + + int assistCount = units.count(unit -> unit.type.commands.contains(UnitCommand.assistCommand)); + if(assistCount > 0 && assistCount != units.size){ + sp.table(spp -> { -+ arcSelectUnits(spp, "\uE86E", "进攻性单位", unit -> !unit.type.commands.contains(UnitCommand.assistCommand)); -+ arcSelectUnits(spp, "\uE86B", "辅助性单位", unit -> unit.type.commands.contains(UnitCommand.assistCommand)); ++ arcSelectUnits(spp, "\uE86E", Core.bundle.get("ui.simple.offensive-units"), unit -> !unit.type.commands.contains(UnitCommand.assistCommand)); ++ arcSelectUnits(spp, "\uE86B", Core.bundle.get("ui.simple.support-units"), unit -> unit.type.commands.contains(UnitCommand.assistCommand)); + }); + } + @@ -2285,9 +2285,9 @@ index 0e70bc703f77e282296a226b39ed73236fd5d694..9ad989b1f5ad672a411122bceeb54b9e + hasNaval = units.contains(unit -> unit.type.naval); + if((hasFlyer ? 1 : 0) + (hasLand ? 1 : 0) + (hasNaval ? 1 : 0) >= 2){ + sp.table(spp -> { -+ if(hasFlyer) arcSelectUnits(spp, UnitTypes.flare.emoji(), "飞行单位", Unitc::isFlying); -+ if(hasLand) arcSelectUnits(spp, UnitTypes.crawler.emoji(), "陆军单位", unit -> !unit.isFlying() && !unit.type.naval); -+ if(hasNaval) arcSelectUnits(spp, UnitTypes.retusa.emoji(), "海军单位", unit -> unit.type.naval); ++ if(hasFlyer) arcSelectUnits(spp, UnitTypes.flare.emoji(), Core.bundle.get("ui.simple.flying-units"), Unitc::isFlying); ++ if(hasLand) arcSelectUnits(spp, UnitTypes.crawler.emoji(), Core.bundle.get("ui.simple.ground-units"), unit -> !unit.isFlying() && !unit.type.naval); ++ if(hasNaval) arcSelectUnits(spp, UnitTypes.retusa.emoji(), Core.bundle.get("ui.simple.naval-units"), unit -> unit.type.naval); + }); } }).fillX().padTop(4f).left(); @@ -2400,13 +2400,13 @@ index 0e70bc703f77e282296a226b39ed73236fd5d694..9ad989b1f5ad672a411122bceeb54b9e + b.clicked(KeyCode.mouseLeft, () -> { + control.input.selectedUnits = control.input.selectedUnits.select(cons); + Events.fire(Trigger.unitCommandChange); -+ UIExt.announce("RTS控制器:选择" + info + "!"); ++ UIExt.announce(Core.bundle.format("ui.simple.rts-select", info)); + }); + //right click -> remove + b.clicked(KeyCode.mouseRight, () -> { + control.input.selectedUnits.removeAll(cons); + Events.fire(Trigger.unitCommandChange); -+ UIExt.announce("RTS控制器:移除" + info + "!"); ++ UIExt.announce(Core.bundle.format("ui.simple.rts-remove", info)); + }); + + b.addListener(listener); @@ -2493,7 +2493,7 @@ index 58d82ae32d4a37b4e2bea1559c854b775048350f..b0e3d09b0a8bea3bd0b32e958a05c5bc + button.button(Icon.copySmall, ustyle, () -> { + Core.app.setClipboardText(user.name); -+ UIExt.announce("已复制昵称:" + user.name); ++ UIExt.announce(Core.bundle.format("ui.simple.copied-nickname", user.name)); + }).size(iconMed); + button.button(Icon.linkSmall, ustyle, () -> ShareFeature.at(user.name)).size(iconMed); + diff --git a/patches/client/0060-FC-extend-WaveInfoDialog.patch b/patches/client/0060-FC-extend-WaveInfoDialog.patch index 772b5c6d222b..93928612ee61 100644 --- a/patches/client/0060-FC-extend-WaveInfoDialog.patch +++ b/patches/client/0060-FC-extend-WaveInfoDialog.patch @@ -54,7 +54,7 @@ index 55e675caa05e8b7fb43b92bc2460e19daae7840e..f4467612284dc20feb6447a4953dff25 dialog.show(); }).size(250f, 64f); -+ buttons.button("切换显示模式", () -> { ++ buttons.button(Core.bundle.get("ui.simple.toggle-display-mode"), () -> { + wavesListMode = !wavesListMode; + wavesListCell.setElement(wavesListMode ? wavesListPane : graph); + }).width(200f); @@ -87,14 +87,14 @@ index 55e675caa05e8b7fb43b92bc2460e19daae7840e..f4467612284dc20feb6447a4953dff25 + + wavesList.clearChildren(); + wavesList.margin(0).defaults().pad(5).growX(); -+ wavesList.table(Tex.button, t -> t.add("\uE86D 为单位数量;\uE813 为单位血+盾;\uE810 为计算buff的血+盾;\uE86E 为预估DPS。在游戏中时会考虑地图出怪点数目").color(Pal.accent)).scrollX(false).growX().row(); ++ wavesList.table(Tex.button, t -> t.add(Core.bundle.get("ui.simple.wave-list-legend")).color(Pal.accent)).scrollX(false).growX().row(); + float firstWaveTime = state.rules.initialWaveSpacing <= 0 ? (2 * state.rules.waveSpacing) : state.rules.initialWaveSpacing; + int winWave = this.winWave; + for(int waveI = 0; waveI < winWave; waveI++){ + WaveInfo wave = ArcWaveSpawner.getOrInit(waveI); + wavesList.table(Tex.button, t -> { + t.table(tt -> { -+ tt.add("第[accent]" + (wave.wave + 1) + "[]波").row(); ++ tt.add(Core.bundle.format("ui.simple.wave-number", wave.wave + 1)).row(); + int thisTime = (int)(wave.wave * state.rules.waveSpacing + firstWaveTime); + tt.add(FormatDefault.duration(thisTime / 60f, false)).row(); + tt.label(() -> { @@ -105,14 +105,14 @@ index 55e675caa05e8b7fb43b92bc2460e19daae7840e..f4467612284dc20feb6447a4953dff25 + }).width(120f).left(); + if(wave.amount == 0){ + t.add(); -+ t.add("该波次没有敌人"); ++ t.add(Core.bundle.get("ui.simple.there-are-no-enemies-in-this-wave")); + }else{ + t.add(wave.proTable(true, -1, group -> true)); + t.pane(wave.unitTable(-1, group -> true, mobile ? 8 : 15)).scrollX(true).scrollY(false).growX(); + } + }).growX().row(); + } -+ wavesList.button("加载更多波次", () -> { ++ wavesList.button(Core.bundle.get("ui.simple.load-more-waves"), () -> { + this.winWave *= 2; + buildWavesList(); + }).disabled(winWave == maxWaves).fillX().height(32f); @@ -169,11 +169,11 @@ index 55e675caa05e8b7fb43b92bc2460e19daae7840e..f4467612284dc20feb6447a4953dff25 + + t.table(a -> { + a.defaults().pad(2); -+ a.add("携带物品[gold]X[]: "); ++ a.add(Core.bundle.get("ui.simple.carried-item-x")); + + a.button((group.items != null ? new TextureRegionDrawable(group.items.item.uiIcon) : Icon.noneSmall), Styles.emptyi, iconSmall, () -> { + if(group.type.itemCapacity <= 0){ -+ UIExt.announce("[red]该单位不可携带物品"); ++ UIExt.announce(Core.bundle.get("ui.simple.red-unit-cannot-carry-items")); + return; + } + var dialog = new ContentSelectDialog(); @@ -204,7 +204,7 @@ index 55e675caa05e8b7fb43b92bc2460e19daae7840e..f4467612284dc20feb6447a4953dff25 + + t.table(a -> { + a.defaults().pad(2); -+ a.add("携带载荷[gold]X[]: "); ++ a.add(Core.bundle.get("ui.simple.carried-payload-x")); + + if(group.payloads != null) + for(var it : group.payloads){ @@ -214,7 +214,7 @@ index 55e675caa05e8b7fb43b92bc2460e19daae7840e..f4467612284dc20feb6447a4953dff25 + a.add().growX(); + a.button(Icon.addSmall, Styles.emptyi, iconSmall, () -> showUnits((type) -> { + if(group.type.payloadCapacity <= 0){ -+ UIExt.announce("[red]该单位不可携带载荷"); ++ UIExt.announce(Core.bundle.get("ui.simple.red-unit-cannot-carry-payloads")); + return; + } + if(group.payloads == null) group.payloads = Seq.with(); diff --git a/patches/client/0064-FC-paste-logicCode-from-schematic.patch b/patches/client/0064-FC-paste-logicCode-from-schematic.patch index ed1437670297..d920d9177a9d 100644 --- a/patches/client/0064-FC-paste-logicCode-from-schematic.patch +++ b/patches/client/0064-FC-paste-logicCode-from-schematic.patch @@ -40,7 +40,7 @@ index f855efcd27a47e8ac5a0ac3dffc8a3c8a8413619..aecd5fa9c1d0d9f564421c2acd57c0ed + if(codeString.isEmpty()) return; + t.button(logicBlock.emoji(), Styles.cleart, () -> { + Core.app.setClipboardText(codeString); -+ UIExt.announce("已复制逻辑代码"); ++ UIExt.announce(Core.bundle.get("ui.simple.copied-logic-code")); + }).tooltip(Strings.truncate(codeString, 500, "\n...")).size(40f); + if(t.getChildren().size % 15 == 0) t.row(); + } diff --git a/patches/client/0066-FC-android-APK.patch b/patches/client/0066-FC-android-APK.patch index 0f495212a75f..67477223e16d 100644 --- a/patches/client/0066-FC-android-APK.patch +++ b/patches/client/0066-FC-android-APK.patch @@ -179,7 +179,7 @@ index 0000000000000000000000000000000000000000..44ae3d51de403bd575d069024c76c3b7 + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + activity.startActivity(intent); + }catch(Exception e){ -+ Vars.ui.showException("安装APK失败", e); ++ Vars.ui.showException(Core.bundle.get("ui.simple.apk-install-failed"), e); + } + } +} diff --git a/src/mindustryX/VarsX.kt b/src/mindustryX/VarsX.kt index 730a0ca42816..0f50bb07bb50 100644 --- a/src/mindustryX/VarsX.kt +++ b/src/mindustryX/VarsX.kt @@ -105,7 +105,7 @@ object VarsX { @JvmField val maxSchematicSize = SliderPref("maxSchematicSize", Vars.maxSchematicSize, 64, 257) { - if (it == 257) return@SliderPref i("无限制") + if (it == 257) return@SliderPref i("ui.simple.unlimited") "${it}x${it}" } diff --git a/src/mindustryX/bundles/UiTextBundle.kt b/src/mindustryX/bundles/UiTextBundle.kt index 002eb8254aca..797a50fbdc85 100644 --- a/src/mindustryX/bundles/UiTextBundle.kt +++ b/src/mindustryX/bundles/UiTextBundle.kt @@ -7,7 +7,6 @@ interface UiTextBundle { //region 特殊的函数 object Zh : UiTextBundle - fun simple(key: String): String = key val labelsResFile: String get() = "labels" //region 后续为正常翻译项 diff --git a/src/mindustryX/bundles/UiTextBundleEn.kt b/src/mindustryX/bundles/UiTextBundleEn.kt index 5fe9a86339d6..74e70e22dabd 100644 --- a/src/mindustryX/bundles/UiTextBundleEn.kt +++ b/src/mindustryX/bundles/UiTextBundleEn.kt @@ -125,267 +125,5 @@ internal object UiTextBundleEn : UiTextBundle { else -> value.toString() } - override fun simple(key: String): String = zhToEn[key] ?: key override val labelsResFile: String get() = "labels_en" - - private val zhToEn = hashMapOf( - "\n[white]分走了单位:" to "\n[white] took units:", - "<永久状态>" to "", - "<瞬间状态>" to "", - ">> 雷达扫描中 <<" to ">> Radar Scanning <<", - "ARC-AI设定器" to "ARC-AI Configurator", - "ARC-中央监控室" to "ARC Message Center", - "ARC-矿物统计" to "ARC Ore Statistics", - "Kotlin语言标准库" to "Kotlin language standard library", - "TIP: 所有包含处理器的蓝图" to "TIP: All schematics containing processors", - "UI图标大全" to "UI Icon Library", - "[accent]建速" to "[accent]Build Speed", - "[acid]血量" to "[acid]HP", - "[cyan]标记模式,点击屏幕标记." to "[cyan]Mark mode: tap the screen to place a mark.", - "[cyan]移速" to "[cyan]Movement speed", - "[green]点击屏幕返回" to "[green]Click the screen to return", - "[green]点击屏幕采集坐标" to "[green]Tap the screen to capture coordinates", - "[orange]你被戳了一下,请注意查看信息框哦~" to "[orange]You were poked. Please check the message dialog.", - "[orange]已更新编辑的逻辑!" to "[orange]Updated edited logic!", - "[orange]生成的单位会飞起来" to "[orange]spawns units that fly", - "[orange]生成!" to "[orange]spawned!", - "[orange]警告:图片可能过大,请尝试压缩图片" to "[orange]Warning: Image may be too large, please try compressing image", - "[purple]阻力" to "[purple]Resistance", - "[red]伤害" to "[red]Damage", - "[red]当前单位不可建筑" to "[red]Current unit cannot build", - "[red]血量:" to "[red]HP:", - "[red]这是一个作弊功能[]\n快速跳转到目标波次(不刷兵)" to "[red]This is a cheat feature[]\nJump to the target wave instantly (without spawning enemies)", - "[teal]装甲" to "[teal]Armor", - "[violet]攻速" to "[violet]Attack speed", - "[white]法" to "[white]S", - "[yellow]建筑过多,避免卡顿,仅保留前1000个规划" to "[yellow]There are too many buildings to avoid lag and only keep the first 1000 plans.", - "[yellow]当前无权编辑,仅供查阅" to "[yellow]No permission to edit; view only.", - "[yellow]当前选中物品为空,请在物品栏选中建筑" to "[yellow]Current selection is empty; select a block in the inventory.", - "[yellow]护盾:" to "[yellow]Shield:", - "[yellow]添加新指令前,请先保存编辑的指令" to "[yellow]Before adding new instructions, please save the edited instructions first.", - "arc-图片转换器" to "ARC Image Converter", - "minerAI-矿物筛选器" to "Miner AI - Ore Filter", - "ui大全" to "UI Toolkit", - "一键装填" to "Auto Fill", - "上传失败,再重试一下?" to "Upload failed, try again?", - "丢下载荷" to "Drop Payload", - "中央监控室" to "Message Center", - "事件~波次" to "Event~Wave", - "事件~载入地图" to "Event~Map Load", - "从蓝图中选择代码" to "Extract code from schematic", - "你已是最新版本,不需要更新!" to "You are already on the latest version.", - "保护AI" to "Defender AI", - "信" to "M", - "信息板全显示" to "Show all message blocks", - "修复AI" to "Repair AI", - "像素画" to "Pixel Art", - "允许的范围:2~9999" to "Allowed range: 2~9999", - "克隆" to "Clone", - "全局检查" to "Global range", - "全部显示" to "Show all", - "关闭" to "Off", - "兵" to "U", - "兵种显示" to "Unit Rendering", - "分享单位数量" to "Share unit count", - "分享库存情况" to "Share inventory status", - "分享波次信息" to "Share wave information", - "分享电力情况" to "Share power status", - "分享者:" to "Shared by:", - "创世神" to "God Mode", - "创建回放出错!" to "Failed to create replay!", - "前缀添加/t" to "Add prefix /t", - "加载回放文件" to "Load replay file", - "单位工厂" to "Unit Factory", - "单位工厂-X" to "Unit Factory-X", - "单位:" to "Unit:", - "原始大小" to "Original size", - "原版" to "Vanilla", - "发布说明" to "Release Notes", - "受不了,直接投降?" to "Are you sure you want to surrender?", - "变动闪烁" to "Flash on Change", - "变量变动闪烁" to "Flash on variable change", - "变量自动更新" to "Auto-refresh variables", - "只显示建筑状态" to "Show building status only", - "同步一波" to "Sync a wave", - "名称" to "Name", - "回放统计" to "Replay Stats", - "回放文件不存在" to "Replay file not found", - "回放管理器" to "Replay Manager", - "加载外部回放" to "Load external replay", - "搜索回放" to "Search replays", - "没有可管理的回放文件" to "No replay files available", - "没有匹配的回放文件" to "No matching replay files", - "读取回放头信息中..." to "Reading replay header...", - "无法读取回放头信息" to "Failed to read replay header", - "修改时间" to "Modified", - "文件大小" to "Size", - "录制时间" to "Recorded", - "玩家" to "Player", - "服务器" to "Server", - "版本" to "Version", - "确认删除回放文件?" to "Delete replay file?", - "删除回放文件失败" to "Failed to delete replay file", - "图标" to "Icon", - "在建造列表加入被摧毁建筑" to "Add destroyed buildings to build queue", - "在目标点附近的这个范围内随机生成" to "Randomly generated within this range near the target point", - "地形蓝图" to "Terrain Blueprint", - "块" to "B", - "基础对比" to "Basic", - "填满核心的所有资源" to "Fill core resources", - "墙" to "W", - "墙体阴影显示" to "Wall Shadow Rendering", - "子弹显示" to "Bullet Rendering", - "导出" to "Export", - "导出聊天记录" to "Export chat history", - "将时间流速加快到两倍" to "Speed up time to 2x", - "将时间流速放慢到一半" to "Slow the flow of time to half", - "小地图显示" to "Minimap", - "已保存至剪贴板" to "Saved to clipboard", - "已导出本条聊天记录" to "Copied this chat record", - "已暂停" to "Paused", - "已移除逻辑视角锁定" to "Logic camera lock removed", - "已继续游戏" to "Game resumed", - "帧率模拟" to "Frame rate simulation", - "平方对比" to "Squared", - "序号" to "Index", - "建筑显示" to "Block Rendering", - "建筑:" to "Buildings:", - "建造区域" to "Build area", - "开关" to "Toggle", - "开关自己队的无限火力" to "Toggle your team's Cheat", - "开启" to "On", - "弹" to "P", - "强制助推" to "Force Boost", - "强制跳波" to "Force skip waves", - "当前不可用的面板:" to "Panels currently unavailable:", - "当前选定区域为空,请通过F规划区域" to "The currently selected area is empty. Please use F to plan the area.", - "录制出错!" to "Recording error!", - "录制结束" to "Recording ended", - "恢复原速" to "Return to original speed", - "恢复当前波次" to "Restore current wave", - "战争迷雾" to "Fog of War", - "打开发布页面" to "Open Release Page", - "打开回放文件" to "Open playback file", - "扫" to "S", - "扫描模式" to "Scan Mode", - "指令" to "Command", - "指挥模式" to "Command Mode", - "捡起载荷" to "Pick up payload", - "携带物品:" to "Carried item:", - "放置/替换" to "Place/Replace", - "效" to "FX", - "无限制" to "Unlimited", - "无限火力" to "Cheat", - "显示名" to "Display name", - "显示并允许建造所有物品" to "Unlock and allow all blocks", - "暂停建造" to "Construction suspended", - "暂停时间" to "Pause time", - "暂停逻辑(游戏)运行" to "Pause logic (game) execution", - "暂存区" to "Staging area", - "更多队伍选择" to "More Teams", - "更新编辑的逻辑" to "Refresh edited logic", - "最大储存聊天记录(过高可能导致卡顿):" to "Maximum storage of chat history (too high may cause lag):", - "服务器信息" to "Server Msg", - "服务器信息版" to "Server Info Build", - "未加载回放!" to "Replay not loaded!", - "未输入指令" to "No command entered", - "查找方块" to "Find blocks", - "查看录制信息" to "View recording info", - "标记~坐标" to "Mark~Coordinates", - "标记~玩家" to "Mark~Player", - "标记地图位置" to "Mark map location", - "格" to "tiles", - "检查更新失败,请稍后再试" to "Could not check for updates.\nPlease try again later.", - "正式版" to "Stable Releases", - "沙漏:" to "Hourglass:", - "沙盒" to "Sandbox", - "法国军礼" to "Surrender Vote", - "波次信息" to "Wave Info", - "波次设定" to "Wave Settings", - "消息(@js 开头为脚本)" to "Message (@js starts with script)", - "液体" to "Liquids", - "添加队伍" to "Add Team", - "添加面板" to "Add Panel", - "清空" to "Clear", - "清空核心的所有资源" to "Clear all core resources", - "版" to "V", - "物品" to "Item", - "特效大全" to "Effects Library", - "特效显示" to "Effects Rendering", - "玩家建造区" to "Player build range", - "生成位置:" to "Spawn location:", - "生成数量:" to "Generate quantity:", - "生成范围:" to "Spawn range:", - "生成队伍:" to "Spawn Team:", - "电力:" to "Power:", - "画板" to "Canvas", - "画板++" to "Artboard++", - "瞬间完成" to "Instant", - "矿机AI" to "Miner AI", - "矿物信息" to "Ore Info", - "矿物矿(地表/墙矿)" to "Ore Count (surface/wall)", - "碰撞箱显示" to "Hitbox Overlay", - "秒" to "sec", - "移除逻辑锁定" to "Remove logic lock", - "箱" to "H", - "编辑器" to "Editor", - "缩放" to "Zoom", - "缩放: " to "Zoom: ", - "缩放后大小" to "Scaled size", - "聊天" to "Chat", - "自动下载更新" to "Download and Install Update", - "自动保存为蓝图" to "Automatically save as blueprint", - "自动刷新变量" to "Automatically refresh variables", - "自动攻击" to "Auto Attack", - "自动更新" to "Check for Updates", - "自杀" to "Self-Destruct", - "色调函数:" to "Hue mode:", - "蓝图代码过长,请点击链接查看" to "The blueprint code is too long, please click the link to view it", - "蓝图代码链接:" to "Blueprint code link:", - "蓝图代码:\n" to "Blueprint code: \n", - "蓝图名:" to "Blueprint name:", - "蓝图造价:" to "Blueprint cost:", - "装载单位" to "Load Unit", - "装载建筑" to "Load Building", - "装载自己" to "Load self", - "观" to "O", - "观察者模式" to "Observer Mode", - "规则:" to "Rules:", - "视角脱离玩家" to "Detached camera", - "解禁" to "Unlock", - "警告:该页功能主要供单机作图使用" to "Single-player map tools only.", - "设定查询波次" to "Set target wave", - "设置目标" to "Set target", - "该波次没有敌人" to "There are no enemies in this wave", - "请不要频繁标记!" to "Please don't tag too often!", - "读取回放失败!" to "Failed to read playback!", - "超出限制的聊天记录将在载入地图时清除" to "Chat history exceeding the limit will be cleared when loading the map", - "路径" to "Path", - "进入传送带" to "Enter the conveyor belt", - "选择代码" to "Select Code", - "选择图片[white](png)" to "Select image[white](png)", - "选择并导入图片,可将其转成画板、像素画或是逻辑画" to "Select and import pictures, which can be converted into artboards, pixel paintings or logic paintings.", - "选择范围" to "Selection Range", - "逻辑~公告" to "Logic~Announcement", - "逻辑~通报" to "Logic~Notice", - "逻辑画网站" to "Logic art website", - "逻辑辅助器[gold]X[]" to "Logic Helper[gold]X[]", - "重建AI" to "Builder AI", - "重置" to "Reset", - "重置所有链接" to "Reset all links", - "锁定" to "Lock", - "锁定上个标记点" to "Lock the last marked point", - "队伍ID:" to "Team ID:", - "队伍区域" to "Team range", - "队伍选择器" to "Team selector", - "队伍:" to "Team:", - "隐藏全部建筑" to "Hide all buildings", - "隐藏逻辑辅助器" to "Hide Logic Helper", - "集合" to "Rally", - "雷达开关" to "Radar Toggle", - "雾" to "F", - "预览版(更新更快,新功能体验,BUG修复)" to "Preview Releases\n(faster updates, new features, bug fixes)", - "颜色" to "Color", - "飞行模式" to "Flight mode", - ) } diff --git a/src/mindustryX/features/ArcRadar.java b/src/mindustryX/features/ArcRadar.java index 36180247818f..fdda41d104aa 100644 --- a/src/mindustryX/features/ArcRadar.java +++ b/src/mindustryX/features/ArcRadar.java @@ -85,7 +85,7 @@ public static void draw(){ if(working && t == null){ t = new Table(Styles.black3); t.touchable = Touchable.disabled; - t.margin(8f).add(i(">> 雷达扫描中 <<")).color(Pal.accent).style(Styles.outlineLabel); + t.margin(8f).add(i("ui.simple.radar-scanning")).color(Pal.accent).style(Styles.outlineLabel); t.pack(); t.visible(() -> working); t.update(() -> t.setPosition(Core.graphics.getWidth() / 2f, Core.graphics.getHeight() * 0.1f, Align.center)); diff --git a/src/mindustryX/features/ArcWaveSpawner.java b/src/mindustryX/features/ArcWaveSpawner.java index 70cbe2b9b34e..cfd9e924a7d9 100644 --- a/src/mindustryX/features/ArcWaveSpawner.java +++ b/src/mindustryX/features/ArcWaveSpawner.java @@ -99,7 +99,7 @@ public Table proTable(boolean doesRow, int spawn, Boolf filter){ dps += group.dpsT; } - if(amount == 0) return new Table(t -> t.add(i("该波次没有敌人"))); + if(amount == 0) return new Table(t -> t.add(i("ui.simple.there-are-no-enemies-in-this-wave"))); Table t = new Table(); t.add("\uE86D").width(50f); t.add("[accent]" + amount).growX().padRight(50f); diff --git a/src/mindustryX/features/AutoUpdate.kt b/src/mindustryX/features/AutoUpdate.kt index 02ca465cd3a9..b6d69682e7e5 100644 --- a/src/mindustryX/features/AutoUpdate.kt +++ b/src/mindustryX/features/AutoUpdate.kt @@ -122,7 +122,7 @@ object AutoUpdate { @JvmOverloads fun showDialog(version: Release? = latest) { checkUpdate() - val dialog = BaseDialog(i("自动更新")) + val dialog = BaseDialog(i("settingV2.AutoUpdate.category")) dialog.getCell(dialog.cont).setElement(ScrollPane(dialog.cont)) dialog.cont.table().growY().get().apply { fun buildVersionList(versions: List) { @@ -139,10 +139,10 @@ object AutoUpdate { p.add(it.description).labelAlign(Align.left) }.row() } - }.tooltip(i("发布说明")).padRight(16f) + }.tooltip(i("ui.simple.release-notes")).padRight(16f) button(Icon.link, Styles.clearNonei, Vars.iconSmall) { UIExt.openURI(it.url) - }.tooltip(i("打开发布页面")).padRight(4f).row() + }.tooltip(i("ui.simple.open-release-page")).padRight(4f).row() } } row() @@ -154,21 +154,21 @@ object AutoUpdate { add(VarsX.bundle.newVersion(it.version)).row() } if (versions.isEmpty()) { - add(i("检查更新失败,请稍后再试")).row() + add(i("ui.simple.update-check-failed")).row() return@apply } image().fillX().height(2f).row() - add(i("正式版")).row() + add(i("ui.simple.stable-releases")).row() buildVersionList(versions.filter { it.isRelease }) image().fillX().height(2f).row() - add(i("预览版(更新更快,新功能体验,BUG修复)")).row() + add(i("ui.simple.preview-releases-description")).row() buildVersionList(versions.filter { !it.isRelease }) image().fillX().height(2f).row() if (version == null) { - add(i("你已是最新版本,不需要更新!")) + add(i("ui.simple.you-are-already-on-the-latest-version")) return@apply } @@ -182,7 +182,7 @@ object AutoUpdate { } row() - button(i("自动下载更新")) { + button(i("ui.simple.download-and-install-update")) { if (asset == null) return@button startDownload(asset.copy(url = url)) { file -> if (VarsX.isLoader) { diff --git a/src/mindustryX/features/LogicExt.java b/src/mindustryX/features/LogicExt.java index 3f7db7aff78a..be1c976c2bf3 100644 --- a/src/mindustryX/features/LogicExt.java +++ b/src/mindustryX/features/LogicExt.java @@ -28,7 +28,7 @@ public class LogicExt{ public static final CheckPref terrainSchematic0 = new CheckPref("terrainSchematic"); public static final CheckPref reliableSync = new CheckPref("debug.reliableSync"); public static final SliderPref limitUpdate = new SliderPref("debug.limitUpdate", 0, 0, 100, 1, (it) -> { - if(it == 0) return i("关闭"); + if(it == 0) return i("ui.simple.off"); return VarsX.bundle.tiles(it); }); public static final CheckPref rotateCanvas = new CheckPref("block.rotateCanvas"); diff --git a/src/mindustryX/features/MarkerType.java b/src/mindustryX/features/MarkerType.java index a3d0713baa3a..e03b9f6fd4ca 100644 --- a/src/mindustryX/features/MarkerType.java +++ b/src/mindustryX/features/MarkerType.java @@ -43,7 +43,7 @@ public class MarkerType{ fillParent = true; touchable = Touchable.enabled; background(((TextureRegionDrawable)Tex.whiteui).tint(0, 0, 0, 0.1f)); - center().add(i("[cyan]标记模式,点击屏幕标记."), Styles.outlineLabel); + center().add(i("ui.simple.cyan-mark-mode-tap-the-screen-to-place-a-mark"), Styles.outlineLabel); tapped(() -> { MarkerType.showPanUI(); Core.app.post(this::remove); @@ -214,7 +214,7 @@ public MarkElement at(Position pos){ public void markWithMessage(Vec2 pos){ if(last != null && last.time < heatTime){ - Vars.ui.announce(i("请不要频繁标记!")); + Vars.ui.announce(i("ui.simple.please-don-t-tag-too-often")); return; } last = at(pos); @@ -223,7 +223,7 @@ public void markWithMessage(Vec2 pos){ public static void newMarkFromChat(String text, Vec2 pos){ MarkerType type = mark; - if(text.contains(i("集合"))){ + if(text.contains(i("marker.Gather.name"))){ type = gatherMark; } for(MarkerType it : allTypes){ diff --git a/src/mindustryX/features/PicToMindustry.java b/src/mindustryX/features/PicToMindustry.java index 47c3052847df..ef652e1f7e7b 100644 --- a/src/mindustryX/features/PicToMindustry.java +++ b/src/mindustryX/features/PicToMindustry.java @@ -27,7 +27,7 @@ public class PicToMindustry{ static final int[] palette; static final int canvasSize; static final float[] scaleList = {0.02f, 0.05f, 0.1f, 0.15f, 0.2f, 0.25f, 0.3f, 0.4f, 0.5f, 0.65f, 0.8f, 1f, 1.25f, 1.5f, 2f, 3f, 5f}; - static final String[] disFunList = {i("基础对比"), i("平方对比"), "LAB"}; + static final String[] disFunList = {i("ui.simple.basic"), i("ui.simple.squared"), "LAB"}; static{ CanvasBlock canva = (CanvasBlock)Blocks.canvas; @@ -43,10 +43,10 @@ public class PicToMindustry{ public static void show(){ - Dialog pt = new BaseDialog(i("arc-图片转换器")); + Dialog pt = new BaseDialog(i("ui.simple.arc-image-converter")); pt.cont.table(t -> { - t.add(i("选择并导入图片,可将其转成画板、像素画或是逻辑画")).padBottom(20f).row(); - t.button(i("选择图片[white](png)"), () -> Vars.platform.showFileChooser(true, "png", file -> { + t.add(i("ui.simple.image-import-description")).padBottom(20f).row(); + t.button(i("ui.simple.select-image-white-png"), () -> Vars.platform.showFileChooser(true, "png", file -> { if(oriImage != null){ oriImage.dispose(); oriImage = null; @@ -56,16 +56,16 @@ public static void show(){ byte[] bytes = file.readBytes(); oriImage = new Pixmap(bytes); if(oriImage.width > 500 || oriImage.height > 500) - UIExt.announce(i("[orange]警告:图片可能过大,请尝试压缩图片"), (float)5); + UIExt.announce(i("ui.simple.orange-warning-image-may-be-too-large-please-try"), (float)5); }catch(Throwable e){ UIExt.announce(VarsX.bundle.failedReadImage(e)); } rebuilt(); })).size(240, 50).padBottom(20f).row(); - t.check(i("自动保存为蓝图"), Core.settings.getBool("autoSavePTM"), ta -> Core.settings.put("autoSavePTM", ta)); + t.check(i("ui.simple.automatically-save-as-blueprint"), Core.settings.getBool("autoSavePTM"), ta -> Core.settings.put("autoSavePTM", ta)); }).padBottom(20f).row(); pt.cont.table(t -> { - t.add(i("缩放: \uE815 ")); + t.add(i("ui.simple.zoom-icon-label")); Label zoom = t.add(String.valueOf(scale)).padRight(20f).get(); t.slider(0, scaleList.length - 1, 1, 11, s -> { scale = scaleList[(int)s]; @@ -74,7 +74,7 @@ public static void show(){ }).width(200f); }).padBottom(20f).visible(() -> oriImage != null).row(); pt.cont.table(t -> { - t.add(i("色调函数:")); + t.add(i("ui.simple.hue-mode")); Label zoom = t.add(disFunList[0]).padRight(20f).get(); t.slider(0, disFunList.length - 1, 1, 0, s -> { colorDisFun = (int)s; @@ -83,7 +83,7 @@ public static void show(){ }).padBottom(20f).visible(() -> oriImage != null).row(); pt.cont.add(tTable); pt.cont.row(); - pt.cont.button(VarsX.bundle.labelWithEmoji(i("逻辑画网站"), Blocks.logicDisplay.emoji()), () -> UIExt.openURI("https://buibiu.github.io/imageToMLogicPage/#/")).width(200f); + pt.cont.button(VarsX.bundle.labelWithEmoji(i("ui.simple.logic-art-website"), Blocks.logicDisplay.emoji()), () -> UIExt.openURI("https://buibiu.github.io/imageToMLogicPage/#/")).width(200f); pt.addCloseButton(); pt.show(); } @@ -100,24 +100,24 @@ private static void rebuilt(){ if(oriImage == null) return; int scaledW = (int)(oriImage.getWidth() * scale), scaledH = (int)(oriImage.getHeight() * scale); tTable.table(t -> { - t.add(i("路径")).color(Pal.accent).padRight(25f).padBottom(10f); + t.add(i("ui.simple.path")).color(Pal.accent).padRight(25f).padBottom(10f); t.button("\uE874", () -> Core.app.setClipboardText(originFile.absolutePath())); t.add(originFile.absolutePath()).padBottom(10f).row(); - t.add(i("名称")).color(Pal.accent).padRight(25f).padBottom(10f); + t.add(i("ui.simple.name")).color(Pal.accent).padRight(25f).padBottom(10f); t.button("\uE874", () -> Core.app.setClipboardText(originFile.name())); t.add(originFile.name()).padBottom(10f).row(); - t.add(i("原始大小")).color(Pal.accent).padRight(25f); + t.add(i("ui.simple.original-size")).color(Pal.accent).padRight(25f); t.add(formatNumber(oriImage.width) + "\uE815" + formatNumber(oriImage.height)).row(); - t.add(i("缩放后大小")).color(Pal.accent).padRight(25f); + t.add(i("ui.simple.scaled-size")).color(Pal.accent).padRight(25f); t.add(formatNumber(scaledW) + "\uE815" + formatNumber(scaledH)); }).padBottom(20f).row(); tTable.table(t -> { t.table(tt -> { int w = Mathf.ceil(scaledW * 1f / canvasSize), h = Mathf.ceil(scaledH * 1f / canvasSize); - tt.button(VarsX.bundle.labelWithEmoji(i("画板"), Blocks.canvas.emoji()), Styles.cleart, () -> { + tt.button(VarsX.bundle.labelWithEmoji(i("ui.simple.canvas"), Blocks.canvas.emoji()), Styles.cleart, () -> { Pixmap image = Pixmaps.scale(oriImage, w * canvasSize, h * canvasSize, false); image.replace((pixel) -> ArraysKt.minByOrThrow(palette, (it) -> diff_rbg(it, pixel))); Schematic schem = canvasGenerator(image, w, h); @@ -129,7 +129,7 @@ private static void rebuilt(){ t.row(); t.table(tt -> { int w = Mathf.ceil(scaledW * 1f / canvasSize), h = Mathf.ceil(scaledH * 1f / canvasSize); - tt.button(VarsX.bundle.labelWithEmoji(i("画板++"), Blocks.canvas.emoji()), Styles.cleart, () -> { + tt.button(VarsX.bundle.labelWithEmoji(i("ui.simple.artboard"), Blocks.canvas.emoji()), Styles.cleart, () -> { Pixmap image = Pixmaps.scale(oriImage, w * canvasSize, h * canvasSize, false); mapPalettePlus(image); Schematic schem = canvasGenerator(image, w, h); @@ -139,7 +139,7 @@ private static void rebuilt(){ tt.add(VarsX.bundle.sizeWithDimensions(String.valueOf(w), String.valueOf(h))); }).row(); t.table(tt -> { - tt.button(VarsX.bundle.labelWithEmoji(i("像素画"), Blocks.sorter.emoji()), Styles.cleart, () -> { + tt.button(VarsX.bundle.labelWithEmoji(i("ui.simple.pixel-art"), Blocks.sorter.emoji()), Styles.cleart, () -> { Pixmap image = Pixmaps.scale(oriImage, scale); Schematic schem = sorterGenerator(image); image.dispose(); diff --git a/src/mindustryX/features/RenderExt.java b/src/mindustryX/features/RenderExt.java index af15b336be4d..67875eb1e273 100644 --- a/src/mindustryX/features/RenderExt.java +++ b/src/mindustryX/features/RenderExt.java @@ -73,7 +73,7 @@ public class RenderExt{ public static final SliderPref overdriveZoneTransparency0 = new SliderPref("block.overdriveZoneTransparency", 0, 0, 100, 2, VarsX.bundle::percentOrOff); public static final SliderPref mendZoneTransparency0 = new SliderPref("block.mendZoneTransparency", 0, 0, 100, 2, VarsX.bundle::percentOrOff); public static final SliderPref healthBarMinHealth = new SliderPref("block.healthBarMinHealth", 0, 0, 4000, 50, VarsX.bundle::hpOrAll); - public static final ChoosePref blockRenderLevel0 = new ChoosePref("block.renderLevel", CollectionsKt.listOf(i("隐藏全部建筑"), i("只显示建筑状态"), i("全部显示")), 2); + public static final ChoosePref blockRenderLevel0 = new ChoosePref("block.renderLevel", CollectionsKt.listOf(i("ui.simple.hide-all-buildings"), i("ui.simple.show-building-status-only"), i("ui.simple.show-all")), 2); public static final SettingsV2.CheckPref showOtherTeamState = new CheckPref("block.showOtherTeamState"); public static final SettingsV2.CheckPref logicDisplayNoBorder0 = new CheckPref("block.logicDisplayNoBorder"); @@ -339,7 +339,7 @@ public static void onRtsRemoveUnit(Player player, Unit unit){ count.increment(u.type); } StringBuilder builder = new StringBuilder(); - builder.append("[gold][MDTX][]").append(player.name).append(i("\n[white]分走了单位:")).append(" "); + builder.append("[gold][MDTX][]").append(player.name).append(i("ui.simple.white-took-units")).append(" "); for(UnitType type : count.keys()){ builder.append(type.emoji()).append("x").append(count.get(type)).append(" "); } diff --git a/src/mindustryX/features/ReplayController.java b/src/mindustryX/features/ReplayController.java index a8a926be44f5..26548938391d 100644 --- a/src/mindustryX/features/ReplayController.java +++ b/src/mindustryX/features/ReplayController.java @@ -47,14 +47,14 @@ public static void init(){ Events.on(ClientServerConnectEvent.class, (e) -> stopPlay()); { Table buttons = Vars.ui.join.buttons; - buttons.button(i("回放管理器"), Icon.file, ReplayController::showManagerDialog); + buttons.button(i("ui.simple.replay-manager"), Icon.file, ReplayController::showManagerDialog); } { var pausedDialog = Vars.ui.paused; pausedDialog.shown(() -> { if(!replaying) return; pausedDialog.cont.row() - .button(i("查看录制信息"), Icon.fileImage, ReplayController::showInfo).name("ReplayInfo") + .button(i("ui.simple.view-recording-info"), Icon.fileImage, ReplayController::showInfo).name("ReplayInfo") .size(0, 60).colspan(pausedDialog.cont.getColumns()).fill(); }); } @@ -69,7 +69,7 @@ public static void onConnect(String ip){ try{ writer = new ReplayData.Writer(file.write(false, 8192)); }catch(Exception e){ - Log.err(i("创建回放出错!"), e); + Log.err(i("ui.simple.failed-to-create-replay"), e); return; } boolean anonymous = Core.settings.getBool("anonymous", false); @@ -84,7 +84,7 @@ public static void onClientPacket(Packet p){ if(p instanceof Disconnect){ writer.close(); writer = null; - Log.info(i("录制结束")); + Log.info(i("ui.simple.recording-ended")); return; } try{ @@ -92,7 +92,7 @@ public static void onClientPacket(Packet p){ }catch(Exception e){ net.disconnect(); Log.err(e); - Core.app.post(() -> ui.showException(i("录制出错!"), e)); + Core.app.post(() -> ui.showException(i("ui.simple.recording-error"), e)); } } @@ -105,7 +105,7 @@ public static void startPlay(Fi input){ }catch(Exception e){ Core.app.post(() -> { ReplayController.showManagerDialog(); - ui.showException(i("读取回放失败!"), e); + ui.showException(i("ui.simple.failed-to-read-playback"), e); }); return; } @@ -174,9 +174,9 @@ private static void showManagerDialog(){ public static void showInfo(){ - BaseDialog dialog = new BaseDialog(i("回放统计")); + BaseDialog dialog = new BaseDialog(i("ui.simple.replay-stats")); if(reader == null){ - dialog.cont.add(i("未加载回放!")); + dialog.cont.add(i("ui.simple.replay-not-loaded")); return; } var replay = reader.getMeta(); diff --git a/src/mindustryX/features/ShareFeature.kt b/src/mindustryX/features/ShareFeature.kt index 3544f649bd39..61b4b4b9a758 100644 --- a/src/mindustryX/features/ShareFeature.kt +++ b/src/mindustryX/features/ShareFeature.kt @@ -62,7 +62,7 @@ object ShareFeature { } req.error { Core.app.post { - Vars.ui.showException(i("上传失败,再重试一下?"), it) + Vars.ui.showException(i("ui.simple.upload-failed-try-again"), it) Core.app.post { callback(null) } } } @@ -96,7 +96,7 @@ object ShareFeature { link = link, code = Vars.schematics.writeBase64(schem) ) Core.app.setClipboardText(Strings.stripColors(msg)) - UIExt.announce(i("已保存至剪贴板")) + UIExt.announce(i("ui.simple.saved-to-clipboard")) } } @@ -225,16 +225,16 @@ object ShareFeature { checked = Tex.underlineOver //Over是黄色的 } button("T", underlineToggleT) { Vars.ui.chatfrag.nextMode() } - .checked { _ -> Vars.ui.chatfrag.mode == ChatFragment.ChatMode.team }.tooltip(i("前缀添加/t")) + .checked { _ -> Vars.ui.chatfrag.mode == ChatFragment.ChatMode.team }.tooltip(i("ui.simple.add-prefix-t")) button(Icon.zoomSmall, Styles.clearNonei) { MarkerType.lockOnLastMark() } - .tooltip(i("锁定上个标记点")) + .tooltip(i("ui.simple.lock-the-last-marked-point")) add("♐>").padRight(18f) - button(Icon.mapSmall, Styles.clearNonei, Vars.iconMed) { MarkerType.toggleMarkHitterUI() }.tooltip(i("标记地图位置")) - button(Icon.wavesSmall, Styles.clearNonei, Vars.iconMed) { shareWaveInfo(Vars.state.wave) }.tooltip(i("分享波次信息")) - button(Icon.powerSmall, Styles.clearNonei, Vars.iconMed) { shareTeamPower() }.tooltip(i("分享电力情况")) - button(TextureRegionDrawable(Items.copper.uiIcon), Styles.clearNonei, Vars.iconSmall) { openShareItemDialog() }.tooltip(i("分享库存情况")) - button(Icon.unitsSmall, Styles.clearNonei, Vars.iconMed) { openShareUnitDialog() }.tooltip(i("分享单位数量")) + button(Icon.mapSmall, Styles.clearNonei, Vars.iconMed) { MarkerType.toggleMarkHitterUI() }.tooltip(i("ui.simple.mark-map-location")) + button(Icon.wavesSmall, Styles.clearNonei, Vars.iconMed) { shareWaveInfo(Vars.state.wave) }.tooltip(i("ui.simple.share-wave-information")) + button(Icon.powerSmall, Styles.clearNonei, Vars.iconMed) { shareTeamPower() }.tooltip(i("ui.simple.share-power-status")) + button(TextureRegionDrawable(Items.copper.uiIcon), Styles.clearNonei, Vars.iconSmall) { openShareItemDialog() }.tooltip(i("ui.simple.share-inventory-status")) + button(Icon.unitsSmall, Styles.clearNonei, Vars.iconMed) { openShareUnitDialog() }.tooltip(i("ui.simple.share-unit-count")) } private fun resolveAt(message: String, sender: Player?): Boolean { @@ -245,7 +245,7 @@ object ShareFeature { message = message.substringAfter("").substringAfter(tag('@')) if (message.contains(Vars.player.name)) { if (sender != null) Vars.ui.announce(VarsX.bundle.atNoticeFrom(sender.name), 10f) - else Vars.ui.announce(i("[orange]你被戳了一下,请注意查看信息框哦~"), 10f) + else Vars.ui.announce(i("ui.simple.poked-notification"), 10f) } return true diff --git a/src/mindustryX/features/TimeControl.java b/src/mindustryX/features/TimeControl.java index ebe1bd0c8ef8..1a145df24df7 100644 --- a/src/mindustryX/features/TimeControl.java +++ b/src/mindustryX/features/TimeControl.java @@ -66,11 +66,11 @@ public static float getGameSpeed(){ public static void draw(Table table){ table.label(() -> "x" + Strings.autoFixed(getGameSpeed(), 2)).width(18f * 3); - table.button("/2", Styles.cleart, () -> setGameSpeed(gameSpeed * 0.5f)).tooltip(i("将时间流速放慢到一半")).size(40f, 30f); - table.button("×2", Styles.cleart, () -> setGameSpeed(gameSpeed * 2f)).tooltip(i("将时间流速加快到两倍")).size(40f, 30f); - table.button("[red]S", Styles.cleart, () -> setGameSpeed(0f)).tooltip(i("暂停时间")).size(30f, 30f); - table.button("[green]N", Styles.cleart, () -> setGameSpeed(1f)).tooltip(i("恢复原速")).size(30f, 30f); - table.button("[white]F", Styles.cleart, TimeControl::setFpsLock).tooltip(i("帧率模拟")).size(30f, 30f); + table.button("/2", Styles.cleart, () -> setGameSpeed(gameSpeed * 0.5f)).tooltip(i("ui.simple.slow-the-flow-of-time-to-half")).size(40f, 30f); + table.button("×2", Styles.cleart, () -> setGameSpeed(gameSpeed * 2f)).tooltip(i("ui.simple.speed-up-time-to-2x")).size(40f, 30f); + table.button("[red]S", Styles.cleart, () -> setGameSpeed(0f)).tooltip(i("ui.simple.pause-time")).size(30f, 30f); + table.button("[green]N", Styles.cleart, () -> setGameSpeed(1f)).tooltip(i("ui.simple.return-to-original-speed")).size(30f, 30f); + table.button("[white]F", Styles.cleart, TimeControl::setFpsLock).tooltip(i("ui.simple.frame-rate-simulation")).size(30f, 30f); table.field(Integer.toString(targetFps), s -> { int num = Integer.parseInt(s); @@ -83,6 +83,6 @@ public static void draw(Table table){ if(!Strings.canParsePositiveInt(s)) return false; int num = Integer.parseInt(s); return 2 <= num && num < 10000; - }).tooltip(i("允许的范围:2~9999")).size(80f, 30f); + }).tooltip(i("ui.simple.allowed-range-2-9999")).size(80f, 30f); } } diff --git a/src/mindustryX/features/UIExt.java b/src/mindustryX/features/UIExt.java index e1692767420e..d4c04de666e7 100644 --- a/src/mindustryX/features/UIExt.java +++ b/src/mindustryX/features/UIExt.java @@ -39,11 +39,11 @@ public static void init(){ } /** - * 用于简单文本的国际化替换 - * 仅可用于UI构建,简单文本不应该包含变量 + * 用于简单文本的国际化替换。 + * 仅可用于UI构建,简单文本不应该包含变量。 */ - public static String i(String zh){ - return VarsX.bundle.simple(zh); + public static String i(String key){ + return Core.bundle.get(key, key); } public static void announce(String text){ diff --git a/src/mindustryX/features/ui/ArcMessageDialog.java b/src/mindustryX/features/ui/ArcMessageDialog.java index 80f814f5b673..7f3719ddca9e 100644 --- a/src/mindustryX/features/ui/ArcMessageDialog.java +++ b/src/mindustryX/features/ui/ArcMessageDialog.java @@ -31,7 +31,7 @@ public class ArcMessageDialog extends BaseDialog{ private static final GridTable chooseTable = new GridTable(); public ArcMessageDialog(){ - super(i("ARC-中央监控室")); + super(i("ui.simple.arc-message-center")); if(Core.settings.getInt("maxMsgRecorded") == 0) Core.settings.put("maxMsgRecorded", 500); maxMsgRecorded = Core.settings.getInt("maxMsgRecorded"); @@ -49,19 +49,19 @@ public ArcMessageDialog(){ msgTable.defaults().minWidth(600).growX().padBottom(15f); cont.table(t -> { - t.add(i("最大储存聊天记录(过高可能导致卡顿):")); + t.add(i("ui.simple.max-chat-history-setting")); t.field(maxMsgRecorded + "", text -> { int record = Math.min(Math.max(Integer.parseInt(text), 1), 9999); maxMsgRecorded = record; Core.settings.put("maxMsgRecorded", record); }).valid(Strings::canParsePositiveInt).width(200f).get(); t.row(); - t.add(i("超出限制的聊天记录将在载入地图时清除")).color(Color.lightGray).colspan(2); + t.add(i("ui.simple.chat-history-exceeding-the-limit-will-be-cleared")).color(Color.lightGray).colspan(2); }).row(); addCloseButton(); - buttons.button(i("清空"), Icon.trash, msgTable::clearChildren); - buttons.button(i("导出"), Icon.upload, this::exportMsg).name(i("导出聊天记录")); + buttons.button(i("ui.simple.clear"), Icon.trash, msgTable::clearChildren); + buttons.button(i("ui.simple.export"), Icon.upload, this::exportMsg).name(i("ui.simple.export-chat-history")); Events.on(EventType.WorldLoadEvent.class, e -> { addMsg(new Msg(Type.eventWorldLoad, VarsX.bundle.loadMap(state.map.name()))); @@ -107,7 +107,7 @@ public void addMsg(Msg msg){ tt.button(Icon.copy, Styles.logici, () -> { Core.app.setClipboardText(msg.message); - ui.announce(i("已导出本条聊天记录")); + ui.announce(i("ui.simple.copied-this-chat-record")); }).size(24f).padRight(6); tt.button(Icon.cancel, Styles.logici, t::remove).size(24f); @@ -166,19 +166,19 @@ public void add(){ } public enum Type{ - chat(i("聊天"), Color.gray), - serverMsg(i("服务器信息"), Color.valueOf("#cefdce")), + chat(i("ui.simple.chat"), Color.gray), + serverMsg(i("ui.simple.server-msg"), Color.valueOf("#cefdce")), - markLoc(i("标记~坐标"), Color.valueOf("#7FFFD4")), - markPlayer(i("标记~玩家"), Color.valueOf("#7FFFD4")), + markLoc(i("ui.simple.mark-coordinates"), Color.valueOf("#7FFFD4")), + markPlayer(i("ui.simple.mark-player"), Color.valueOf("#7FFFD4")), - console(i("指令"), Color.gold), + console(i("ui.simple.command"), Color.gold), - logicNotify(i("逻辑~通报"), Color.valueOf("#ffccff")), - logicAnnounce(i("逻辑~公告"), Color.valueOf("#ffccff")), + logicNotify(i("ui.simple.logic-notice"), Color.valueOf("#ffccff")), + logicAnnounce(i("ui.simple.logic-announcement"), Color.valueOf("#ffccff")), - eventWorldLoad(i("事件~载入地图"), Color.valueOf("#ff9999")), - eventWave(i("事件~波次"), Color.valueOf("#ffcc99")); + eventWorldLoad(i("ui.simple.event-map-load"), Color.valueOf("#ff9999")), + eventWave(i("ui.simple.event-wave"), Color.valueOf("#ffcc99")); public final String name; public final Color color; diff --git a/src/mindustryX/features/ui/LogicSupport.java b/src/mindustryX/features/ui/LogicSupport.java index 4bc9ade28254..e61827269c96 100644 --- a/src/mindustryX/features/ui/LogicSupport.java +++ b/src/mindustryX/features/ui/LogicSupport.java @@ -54,8 +54,8 @@ public static void init(){ Table main = new Table(Styles.grayPanel); main.margin(4f); - main.add(i("逻辑辅助器[gold]X[]")).style(Styles.outlineLabel).pad(8f).padBottom(12f).row(); - main.fill(tt -> tt.top().right().button(Icon.cancel, Styles.clearNonei, iconMed, visible::toggle).tooltip(i("隐藏逻辑辅助器"))); + main.add(i("ui.simple.logic-helper-gold-x")).style(Styles.outlineLabel).pad(8f).padBottom(12f).row(); + main.fill(tt -> tt.top().right().button(Icon.cancel, Styles.clearNonei, iconMed, visible::toggle).tooltip(i("ui.simple.hide-logic-helper"))); main.table(LogicSupport::buildConfigTable).fillX().row(); main.pane(Styles.noBarPane, varsTable).growY().fillX().scrollX(false).width(400f).padTop(8f); @@ -93,27 +93,27 @@ private static void buildConfigTable(Table table){ table.button(Icon.downloadSmall, Styles.cleari, () -> { if(refreshExecutor != null){ refreshExecutor.run(); - UIExt.announce(i("[orange]已更新编辑的逻辑!")); + UIExt.announce(i("ui.simple.orange-updated-edited-logic")); } - }).tooltip(i("更新编辑的逻辑")).disabled(b -> refreshExecutor == null); + }).tooltip(i("ui.simple.refresh-edited-logic")).disabled(b -> refreshExecutor == null); table.button(Icon.eyeSmall, Styles.clearTogglei, () -> { changeSplash.toggle(); - String state = changeSplash.get() ? i("开启") : i("关闭"); - String text = VarsX.bundle.toggleState(i("变动闪烁"), state); + String state = changeSplash.get() ? i("ui.simple.on") : i("ui.simple.off"); + String text = VarsX.bundle.toggleState(i("ui.simple.flash-on-change"), state); UIExt.announce(text); - }).checked((b) -> changeSplash.get()).tooltip(i("变量变动闪烁")); + }).checked((b) -> changeSplash.get()).tooltip(i("settingV2.logicSupport.changeSplash.name")); table.button(Icon.refreshSmall, Styles.clearTogglei, () -> { autoRefresh = !autoRefresh; - String state = autoRefresh ? i("开启") : i("关闭"); - String text = VarsX.bundle.toggleState(i("变量自动更新"), state); + String state = autoRefresh ? i("ui.simple.on") : i("ui.simple.off"); + String text = VarsX.bundle.toggleState(i("ui.simple.auto-refresh-variables"), state); UIExt.announce(text); - }).checked((b) -> autoRefresh).tooltip(i("自动刷新变量")); + }).checked((b) -> autoRefresh).tooltip(i("ui.simple.automatically-refresh-variables")); table.button(Icon.pause, Styles.clearTogglei, () -> { if(state.isPaused()) state.set(State.playing); else state.set(State.paused); - String text = state.isPaused() ? i("已暂停") : i("已继续游戏"); + String text = state.isPaused() ? i("ui.simple.paused") : i("ui.simple.game-resumed"); UIExt.announce(text); - }).checked((b) -> state.isPaused()).tooltip(i("暂停逻辑(游戏)运行")); + }).checked((b) -> state.isPaused()).tooltip(i("ui.simple.pause-logic-game-execution")); table.defaults().reset(); var slider = new Slider(1, 60, 1, false); @@ -259,7 +259,7 @@ public static void buildLogicTools(Table table, LogicBuild build){ t.defaults().size(40); t.button(Icon.pencil, Styles.cleari, () -> { if(!block.accessible()) - UIExt.announce(i("[yellow]当前无权编辑,仅供查阅")); + UIExt.announce(i("ui.simple.yellow-no-permission-to-edit-view-only")); build.showEditDialog(); }); t.button(Icon.info, Styles.cleari, () -> { @@ -270,8 +270,8 @@ public static void buildLogicTools(Table table, LogicBuild build){ t.button(Icon.trash, Styles.cleari, () -> { build.links.clear(); build.updateCode(build.code, true, null); - }).disabled(b -> net.client()).tooltip(i("重置所有链接")); - t.button(Icon.paste, Styles.cleari, () -> showLogicCodePickDialog(block, build)).tooltip(i("从蓝图中选择代码")); + }).disabled(b -> net.client()).tooltip(i("ui.simple.reset-all-links")); + t.button(Icon.paste, Styles.cleari, () -> showLogicCodePickDialog(block, build)).tooltip(i("ui.simple.extract-code-from-schematic")); }); table.row().pane(Styles.noBarPane, vars).pad(4).maxHeight(400f).touchable(Touchable.disabled).get().setScrollingDisabledX(true); if(showVars) buildLogicVarTable(vars, build.executor); @@ -279,10 +279,10 @@ public static void buildLogicTools(Table table, LogicBuild build){ private static void showLogicCodePickDialog(LogicBlock block, LogicBuild build){ var all = schematics.all().select(it -> it.tiles.contains(s -> s.block instanceof LogicBlock)); - new BaseDialog(i("选择代码")){{ + new BaseDialog(i("ui.simple.select-code")){{ addCloseButton(); closeOnBack(); - cont.add(i("TIP: 所有包含处理器的蓝图")).row(); + cont.add(i("ui.simple.tip-all-schematics-containing-processors")).row(); cont.pane(tt -> { for(var schem : all){ tt.button(schem.name(), () -> { diff --git a/src/mindustryX/features/ui/OverlayUI.kt b/src/mindustryX/features/ui/OverlayUI.kt index ece8a1c24b49..e4e36c0fe2d3 100644 --- a/src/mindustryX/features/ui/OverlayUI.kt +++ b/src/mindustryX/features/ui/OverlayUI.kt @@ -84,10 +84,10 @@ object OverlayUI { } button(Icon.eyeSmall, myToggleI, Vars.iconSmall) { set(value.copy(enabled = !value.enabled)) - }.tooltip(i("开关")).padRight(4f).checked { value.enabled } + }.tooltip(i("ui.simple.toggle")).padRight(4f).checked { value.enabled } button(Icon.lockSmall, myToggleI, Vars.iconSmall) { set(value.copy(pinned = !value.pinned)) - }.tooltip(i("锁定")).padRight(4f).checked { value.pinned } + }.tooltip(i("ui.simple.lock")).padRight(4f).checked { value.pinned } button(Icon.resizeSmall, myToggleI, Vars.iconSmall) { UIExtKt.showFloatSettingsPanel { label { VarsX.bundle.zoomScale(Strings.fixed(value.scale, 1)) }.center().row() @@ -99,7 +99,7 @@ object OverlayUI { }.disabled { Mathf.equal(value.scale, 1f) }.padTop(4f) row() } - }.tooltip(i("缩放")).padRight(4f).checked { !Mathf.equal(value.scale, 1f) } + }.tooltip(i("ui.simple.zoom")).padRight(4f).checked { !Mathf.equal(value.scale, 1f) } addTools() row() @@ -476,7 +476,7 @@ object OverlayUI { t.defaults().size(Vars.iconLarge).width(Vars.iconLarge * 1.5f).pad(4f) t.button(Icon.add) { UIExtKt.showFloatSettingsPanel { - add(i("添加面板")).color(Color.gold).align(Align.center).row() + add(i("ui.simple.add-panel")).color(Color.gold).align(Align.center).row() pane(Styles.smallPane, Table().apply { defaults().minWidth(120f).fillX().pad(4f) val notAvailable = mutableListOf() @@ -492,7 +492,7 @@ object OverlayUI { }).row() } if (notAvailable.isNotEmpty()) { - add(i("当前不可用的面板:")).align(Align.center).row() + add(i("ui.simple.panels-currently-unavailable")).align(Align.center).row() notAvailable.forEach { add(TextButton(it.data.title).apply { label.setWrap(false) diff --git a/src/mindustryX/features/ui/ReplayManagerDialog.java b/src/mindustryX/features/ui/ReplayManagerDialog.java index 3e89873cb2ff..65a0d09de6f1 100644 --- a/src/mindustryX/features/ui/ReplayManagerDialog.java +++ b/src/mindustryX/features/ui/ReplayManagerDialog.java @@ -28,7 +28,7 @@ public class ReplayManagerDialog extends BaseDialog{ private String search; public ReplayManagerDialog(){ - super(i("回放管理器")); + super(i("ui.simple.replay-manager")); cont.table(searchRow -> { searchRow.image(Icon.zoom).size(iconMed).padRight(6f); @@ -36,14 +36,14 @@ public ReplayManagerDialog(){ String value = text.trim().toLowerCase(Locale.ROOT); search = value.isEmpty() ? null : value; }).maxTextLength(80).growX().get(); - searchField.setMessageText(i("搜索回放")); + searchField.setMessageText(i("ui.simple.search-replays")); }).growX().row(); cont.pane(Styles.noBarPane, list).scrollX(false).pad(8f).grow().row(); addCloseButton(); - buttons.button(i("加载外部回放"), Icon.upload, () -> { + buttons.button(i("ui.simple.load-external-replay"), Icon.upload, () -> { FileChooser.setLastDirectory(saveDirectory); - platform.showFileChooser(true, i("打开回放文件"), ReplayController.extension, file -> Core.app.post(() -> { + platform.showFileChooser(true, i("ui.simple.open-playback-file"), ReplayController.extension, file -> Core.app.post(() -> { hide(); ReplayController.startPlay(file); })); @@ -139,18 +139,18 @@ private void rebuild(){ buildActionButtons(title); }).growX().row(); - addInfoPair(this, i("修改时间"), FormatDefault.datetime(new Date(file.lastModified()))); - addInfoPair(this, i("文件大小"), FormatDefault.fileSize(file.length())); + addInfoPair(this, i("ui.simple.modified"), FormatDefault.datetime(new Date(file.lastModified()))); + addInfoPair(this, i("ui.simple.size"), FormatDefault.fileSize(file.length())); if(meta == null){ - add(i("读取回放头信息中...")).color(Color.lightGray).growX().wrap(); + add(i("ui.simple.reading-replay-header")).color(Color.lightGray).growX().wrap(); }else if(meta == unreadableMeta){ - add(i("无法读取回放头信息")).color(Color.lightGray).growX().wrap(); + add(i("ui.simple.failed-to-read-replay-header")).color(Color.lightGray).growX().wrap(); }else{ - addInfoPair(this, i("录制时间"), FormatDefault.datetime(meta.getTime())); - addInfoPair(this, i("玩家"), meta.getRecordPlayer()); - addInfoPair(this, i("服务器"), meta.getServerIp()); - addInfoPair(this, i("版本"), String.valueOf(meta.getVersion())); + addInfoPair(this, i("ui.simple.recorded"), FormatDefault.datetime(meta.getTime())); + addInfoPair(this, i("ui.simple.player"), meta.getRecordPlayer()); + addInfoPair(this, i("ui.simple.server"), meta.getServerIp()); + addInfoPair(this, i("ui.simple.version"), String.valueOf(meta.getVersion())); } } diff --git a/src/mindustryX/features/ui/TeamSelectDialog.java b/src/mindustryX/features/ui/TeamSelectDialog.java index f83b47ad9f3d..39954ec4e5d1 100644 --- a/src/mindustryX/features/ui/TeamSelectDialog.java +++ b/src/mindustryX/features/ui/TeamSelectDialog.java @@ -16,7 +16,7 @@ public class TeamSelectDialog extends BaseDialog{ private Cons cons; public TeamSelectDialog(){ - super(i("队伍选择器")); + super(i("ui.simple.team-selector")); cont.pane(td -> { for(Team team : Team.all){ if(team.id % 10 == 6){ diff --git a/src/mindustryX/features/ui/TeamsStatDisplay.kt b/src/mindustryX/features/ui/TeamsStatDisplay.kt index 6654c7175170..1410ecbc5cf4 100644 --- a/src/mindustryX/features/ui/TeamsStatDisplay.kt +++ b/src/mindustryX/features/ui/TeamsStatDisplay.kt @@ -75,7 +75,7 @@ class TeamsStatDisplay : Table() { } private fun openAddTeamDialog(onSelected: (Teams.TeamData) -> Unit) { - BaseDialog(i("添加队伍")).apply { + BaseDialog(i("ui.simple.add-team")).apply { Vars.state.teams.active.forEach { team -> cont.add(Button().apply { add(Table().apply { diff --git a/src/mindustryX/features/ui/UnitFactoryDialog.java b/src/mindustryX/features/ui/UnitFactoryDialog.java index f8a7aeae0882..c1544abde973 100644 --- a/src/mindustryX/features/ui/UnitFactoryDialog.java +++ b/src/mindustryX/features/ui/UnitFactoryDialog.java @@ -52,7 +52,7 @@ public class UnitFactoryDialog extends BaseDialog{ private Table selection, infoTable, posTable, countTable, itemTable, propertiesTable, teamTable, effectTable, payloadTable; public UnitFactoryDialog(){ - super(i("单位工厂")); + super(i("ui.simple.unit-factory")); getCell(cont).setElement(new ScrollPane(cont)); closeOnBack(); addCloseButton(); @@ -80,11 +80,11 @@ private void setup(){ setupPosTable(); rebuildTables(); - buttons.button(i("重置"), Icon.refresh, () -> { + buttons.button(i("ui.simple.reset"), Icon.refresh, () -> { resetUnit(spawnUnit); rebuildTables(); }); - buttons.button(i("[orange]生成!"), Icon.modeAttack, this::spawn); + buttons.button(i("ui.simple.orange-spawned"), Icon.modeAttack, this::spawn); rebuild(); @@ -140,9 +140,9 @@ private void rebuild(){ settings.add(posTable).padTop(0f).row(); settings.add(countTable).row(); settings.table(randDstTable -> { - randDstTable.add(i("生成范围:")); - randDstTable.field(Strings.autoFixed(unitRandDst, 3), text -> unitRandDst = Float.parseFloat(text)).valid(Strings::canParsePositiveFloat).tooltip(i("在目标点附近的这个范围内随机生成")).maxTextLength(6).padLeft(4f); - randDstTable.add(i("格")).expandX().left(); + randDstTable.add(i("ui.simple.spawn-range")); + randDstTable.field(Strings.autoFixed(unitRandDst, 3), text -> unitRandDst = Float.parseFloat(text)).valid(Strings::canParsePositiveFloat).tooltip(i("ui.simple.spawn-range-tooltip")).maxTextLength(6).padLeft(4f); + randDstTable.add(i("ui.simple.tiles")).expandX().left(); }).row(); settings.add(itemTable).row(); settings.add(propertiesTable).row(); @@ -245,7 +245,7 @@ private void rebuildSelectTable(UnitStack stack, Table table){ } private void setupPosTable(){ - posTable.add(i("生成位置:")); + posTable.add(i("ui.simple.spawn-location")); posTable.label(() -> { int tileX = World.toTile(spawnUnit.x); @@ -270,7 +270,7 @@ private void setupPosTable(){ return true; }); - UIExt.announce(i("[green]点击屏幕采集坐标"), 2f); + UIExt.announce(i("ui.simple.green-tap-the-screen-to-capture-coordinates"), 2f); }); posTable.button(Icon.eyeSmall, Styles.clearNonei, () -> { @@ -289,14 +289,14 @@ private void setupPosTable(){ return true; }); - UIExt.announce(i("[green]点击屏幕返回"), 2f); + UIExt.announce(i("ui.simple.green-click-the-screen-to-return"), 2f); }).padLeft(4); posTable.button(new TextureRegionDrawable(UnitTypes.gamma.uiIcon), Styles.clearNonei, 24, () -> spawnUnit.set(player)).padLeft(4); } private void setupCountTable(){ - countTable.add(i("生成数量:")); + countTable.add(i("ui.simple.generate-quantity")); countTable.field("", text -> unitCount = Math.min(maxCount, Strings.parseInt(text))) .update(it -> it.setText("" + unitCount)).left().expandX().width(80).valid(Strings::canParseInt); @@ -344,18 +344,18 @@ private void rebuildPropertiesTable(Unit unit, Table propertiesTable){ propertiesTable.clearChildren(); propertiesTable.defaults().expandX().left(); - propertiesTable.table(t -> t.check(i("飞行模式"), unit.elevation > 0, a -> unit.elevation = a ? 1 : 0).padBottom(5f).padRight(10f).tooltip(i("[orange]生成的单位会飞起来"), true) + propertiesTable.table(t -> t.check(i("ui.simple.flight-mode"), unit.elevation > 0, a -> unit.elevation = a ? 1 : 0).padBottom(5f).padRight(10f).tooltip(i("ui.simple.orange-spawns-units-that-fly"), true) .checked(b -> unit.elevation > 0)); propertiesTable.row(); propertiesTable.table(healthTable -> { - healthTable.add(i("[red]血量:")); + healthTable.add(i("ui.simple.red-hp")); healthTable.field(Strings.autoFixed(unit.health, 1), text -> unit.health = Float.parseFloat(text)).valid(Strings::canParsePositiveFloat).padLeft(4f); }); propertiesTable.table(shieldTable -> { - shieldTable.add(i("[yellow]护盾:")); + shieldTable.add(i("ui.simple.yellow-shield")); shieldTable.field(Strings.autoFixed(unit.shield, 1), text -> unit.shield = Float.parseFloat(text)).valid(Strings::canParsePositiveFloat).padLeft(4f); }); } @@ -366,7 +366,7 @@ private void rebuildItemTable(Unit unit, Table itemTable){ int itemCapacity = unit.itemCapacity(); if(itemCapacity == 0) return; - itemTable.add(i("携带物品:")); + itemTable.add(i("ui.simple.carried-item")); itemTable.button(b -> b.image(() -> unit.hasItem() ? unit.item().uiIcon : Icon.noneSmall.getRegion()).size(48f).scaling(Scaling.fit).padLeft(8f), Styles.clearNonei, () -> ContentSelectDialog.once(content.items(), unit.item(), item -> unit.stack.item = item)).size(48f).padLeft(8f); itemTable.field("" + unit.stack.amount, text -> unit.stack.amount = Mathf.clamp(Strings.parseInt(text), 0, itemCapacity)) @@ -381,7 +381,7 @@ private void rebuildItemTable(Unit unit, Table itemTable){ private void rebuildTeamTable(Unit unit, Table teamTable){ teamTable.clearChildren(); - teamTable.add(i("生成队伍:")); + teamTable.add(i("ui.simple.spawn-team")); teamTable.label(() -> { Team team = unit.team; return "[#" + team.color + "]" + team.localized(); @@ -397,7 +397,7 @@ private void rebuildTeamTable(Unit unit, Table teamTable){ teamTable.button(b -> b.image().grow().color(team.color), Styles.clearNonei, () -> changeTeam.get(team)).size(36).pad(8); } - teamTable.add(i("队伍ID:")).padLeft(4); + teamTable.add(i("ui.simple.team-id")).padLeft(4); teamTable.field("" + unit.team.id, text -> { int id = Mathf.clamp(Strings.parseInt(text), 0, Team.all.length - 1); changeTeam.get(Team.all[id]); @@ -429,29 +429,29 @@ private void rebuildEffectsTable(Unit unit, Table effectTable){ effectInfo.clearChildren(); effectInfo.defaults().pad(4f); - effectInfo.add(i("[red]伤害")); + effectInfo.add(i("ui.simple.red-damage")); effectInfo.add(FormatDefault.format(status[0])).expandX().right(); - effectInfo.add(i("[acid]血量")).padLeft(12f); + effectInfo.add(i("ui.simple.acid-hp")).padLeft(12f); effectInfo.add(FormatDefault.format(status[1])).expandX().right(); effectInfo.row(); - effectInfo.add(i("[cyan]移速")); + effectInfo.add(i("ui.simple.cyan-movement-speed")); effectInfo.add(FormatDefault.format(status[2])).expandX().right(); - effectInfo.add(i("[violet]攻速")).padLeft(12f); + effectInfo.add(i("ui.simple.violet-attack-speed")).padLeft(12f); effectInfo.add(FormatDefault.format(status[3])).expandX().right(); effectInfo.row(); - effectInfo.add(i("[accent]建速")); + effectInfo.add(i("ui.simple.accent-build-speed")); effectInfo.add(FormatDefault.format(status[4])).expandX().right(); - effectInfo.add(i("[purple]阻力")).padLeft(12f); + effectInfo.add(i("ui.simple.purple-resistance")).padLeft(12f); effectInfo.add(FormatDefault.format(status[5])).expandX().right(); effectInfo.row(); if(status[6] >= 0){ - effectInfo.add(i("[teal]装甲")); + effectInfo.add(i("ui.simple.teal-armor")); effectInfo.add(FormatDefault.format(status[6])).expandX().right(); } }; @@ -524,9 +524,9 @@ private void rebuildEffectSettingTable(Seq unitStatus, Table table, t.add(effect.localizedName).ellipsis(true).width(64f).padLeft(6); if(entry.effect.permanent){ - t.add(i("<永久状态>")).expandX(); + t.add(i("ui.simple.permanent-status")).expandX(); }else if(entry.effect.reactive){ - t.add(i("<瞬间状态>")).expandX(); + t.add(i("ui.simple.temporary-state")).expandX(); }else{ t.table(bottom -> { bottom.field("", text -> entry.time = Strings.parseFloat(text) * 60f) @@ -538,7 +538,7 @@ private void rebuildEffectSettingTable(Seq unitStatus, Table table, }) .width(100f); - bottom.add(i("秒")); + bottom.add(i("ui.simple.sec")); bottom.button(b -> b.add(new FLabel("{rainbow}∞")), Styles.clearNonei, () -> entry.time = Float.POSITIVE_INFINITY) .size(32f).padLeft(8).expandX().right(); }).padTop(8f).expandX().left(); @@ -564,34 +564,34 @@ private void rebuildEffectSettingTable(Seq unitStatus, Table table, if(effect.dynamic) table.add(new Card(Pal.darkestGray, Card.grayOuterDark, t -> { t.defaults().pad(4f).padLeft(8f).left(); - t.add(i("[red]伤害")).style(Styles.outlineLabel); + t.add(i("ui.simple.red-damage")).style(Styles.outlineLabel); t.field("" + entry.damageMultiplier, text -> entry.damageMultiplier = Strings.parseFloat(text)).valid(Strings::canParsePositiveFloat).width(88f); t.add().expandX(); - t.add(i("[acid]血量")).style(Styles.outlineLabel); + t.add(i("ui.simple.acid-hp")).style(Styles.outlineLabel); t.field("" + entry.healthMultiplier, text -> entry.healthMultiplier = Strings.parseFloat(text)).valid(Strings::canParsePositiveFloat).width(88f); t.add().expandX().row(); - t.add(i("[cyan]移速")).style(Styles.outlineLabel); + t.add(i("ui.simple.cyan-movement-speed")).style(Styles.outlineLabel); t.field("" + entry.speedMultiplier, text -> entry.speedMultiplier = Strings.parseFloat(text)).valid(Strings::canParsePositiveFloat).width(88f); t.add().expandX(); - t.add(i("[violet]攻速")).style(Styles.outlineLabel); + t.add(i("ui.simple.violet-attack-speed")).style(Styles.outlineLabel); t.field("" + entry.reloadMultiplier, text -> entry.reloadMultiplier = Strings.parseFloat(text)).valid(Strings::canParsePositiveFloat).width(88f); t.add().expandX().row(); - t.add(i("[accent]建速")).style(Styles.outlineLabel); + t.add(i("ui.simple.accent-build-speed")).style(Styles.outlineLabel); t.field("" + entry.buildSpeedMultiplier, text -> entry.buildSpeedMultiplier = Strings.parseFloat(text)).valid(Strings::canParsePositiveFloat).width(88f); t.add().expandX(); - t.add(i("[purple]阻力")).style(Styles.outlineLabel); + t.add(i("ui.simple.purple-resistance")).style(Styles.outlineLabel); t.field("" + entry.dragMultiplier, text -> entry.dragMultiplier = Strings.parseFloat(text)).valid(Strings::canParsePositiveFloat).width(88f); t.add().expandX().row(); - t.add(i("[teal]装甲")).style(Styles.outlineLabel); + t.add(i("ui.simple.teal-armor")).style(Styles.outlineLabel); t.field("" + entry.armorOverride, text -> entry.armorOverride = Strings.parseFloat(text)).valid(Strings::canParseFloat).width(88f); for(Element child : t.getChildren()){ @@ -630,7 +630,7 @@ private void rebuildPayloadTable(Unit unit, Table payloadTable){ table.table(Styles.grayPanel, buttons -> { buttons.defaults().height(48f).pad(4f).growX(); - buttons.button(i("装载建筑"), new TextureRegionDrawable(Blocks.siliconSmelter.uiIcon), Styles.flatt, 32, + buttons.button(i("ui.simple.load-building"), new TextureRegionDrawable(Blocks.siliconSmelter.uiIcon), Styles.flatt, 32, () -> ContentSelectDialog.once(content.blocks().select(block -> !block.isFloor() && block.buildVisibility != BuildVisibility.hidden), null, block -> { @@ -639,14 +639,14 @@ private void rebuildPayloadTable(Unit unit, Table payloadTable){ rebuildPayloadSettingTable(payloads, settingTable); })).row(); - buttons.button(i("装载单位"), new TextureRegionDrawable(UnitTypes.alpha.uiIcon), Styles.flatt, 32f, + buttons.button(i("ui.simple.load-unit"), new TextureRegionDrawable(UnitTypes.alpha.uiIcon), Styles.flatt, 32f, () -> ContentSelectDialog.once(content.units(), null, unitType -> { UnitPayload payload = new UnitPayload(unitType.create(payloadUnit.team)); payloads.add(payload); rebuildPayloadSettingTable(payloads, settingTable); })).row(); - buttons.button(i("装载自己"), Icon.add, Styles.flatt, () -> { + buttons.button(i("ui.simple.load-self"), Icon.add, Styles.flatt, () -> { payloads.add(new UnitPayload(cloneUnit(payloadUnit))); rebuildPayloadSettingTable(payloads, settingTable); }).row(); @@ -703,7 +703,7 @@ private void rebuildPayloadSettingTable(Seq payloads, Table table){ } private void simpleFactory(Unit unit){ - BaseDialog dialog = new BaseDialog(i("单位工厂")); + BaseDialog dialog = new BaseDialog(i("ui.simple.unit-factory")); Table main = new Table(); @@ -733,7 +733,7 @@ private void simpleFactory(Unit unit){ }).padTop(8f).growY(); dialog.addCloseButton(); - dialog.buttons.button(i("重置"), Icon.refresh, () -> { + dialog.buttons.button(i("ui.simple.reset"), Icon.refresh, () -> { resetUnit(unit); rebuildTables(); }); @@ -811,7 +811,7 @@ public UnitStack(@Nullable LoadedMod mod){ } public String name(){ - return mod == null ? Core.bundle.get("vanilla", i("原版")) : mod.meta.displayName; + return mod == null ? Core.bundle.get("vanilla", i("ui.simple.vanilla")) : mod.meta.displayName; } public TextureRegion icon(){ diff --git a/src/mindustryX/features/ui/WaveInfoDisplay.java b/src/mindustryX/features/ui/WaveInfoDisplay.java index 47a64a441ec4..8396d9ca4131 100644 --- a/src/mindustryX/features/ui/WaveInfoDisplay.java +++ b/src/mindustryX/features/ui/WaveInfoDisplay.java @@ -36,7 +36,7 @@ public WaveInfoDisplay(){ buttons.defaults().size(32); buttons.add().growX(); - buttons.button(Icon.waves, Styles.clearNonei, iconMed, waveInfoDialog::show).tooltip(i("波次信息")); + buttons.button(Icon.waves, Styles.clearNonei, iconMed, waveInfoDialog::show).tooltip(i("ui.simple.wave-info")); buttons.button("<", Styles.cleart, () -> shiftWaveOffset(-1)); var i = buttons.button("", Styles.cleart, this::setWaveOffsetDialog).minHeight(48).maxWidth(160f).get(); @@ -44,18 +44,18 @@ public WaveInfoDisplay(){ i.getLabel().setText(() -> "" + (state.wave + waveOffset)); buttons.button(">", Styles.cleart, () -> shiftWaveOffset(1)); - buttons.button("R", Styles.cleart, () -> setWaveOffset(0)).tooltip(i("恢复当前波次")); - buttons.button("J", Styles.cleart, () -> ui.showConfirm(i("[red]这是一个作弊功能[]\n快速跳转到目标波次(不刷兵)"), () -> { + buttons.button("R", Styles.cleart, () -> setWaveOffset(0)).tooltip(i("ui.simple.restore-current-wave")); + buttons.button("J", Styles.cleart, () -> ui.showConfirm(i("ui.simple.skip-to-wave-warning"), () -> { state.wave += waveOffset; setWaveOffset(0); - })).tooltip(i("强制跳波")).disabled((b) -> net.client()); + })).tooltip(i("ui.simple.force-skip-waves")).disabled((b) -> net.client()); buttons.add().growX(); buttons.add("♐>"); - buttons.button(Icon.wavesSmall, Styles.clearNonei, iconMed, () -> ShareFeature.shareWaveInfo(state.wave + waveOffset)).tooltip(i("分享波次信息")); - buttons.button(Icon.powerSmall, Styles.clearNonei, iconMed, ShareFeature::shareTeamPower).tooltip(i("分享电力情况")); - buttons.button(new TextureRegionDrawable(Items.copper.uiIcon), Styles.clearNonei, iconSmall, ShareFeature::openShareItemDialog).tooltip(i("分享库存情况")); - buttons.button(Icon.unitsSmall, Styles.clearNonei, iconMed, ShareFeature::openShareUnitDialog).tooltip(i("分享单位数量")); + buttons.button(Icon.wavesSmall, Styles.clearNonei, iconMed, () -> ShareFeature.shareWaveInfo(state.wave + waveOffset)).tooltip(i("ui.simple.share-wave-information")); + buttons.button(Icon.powerSmall, Styles.clearNonei, iconMed, ShareFeature::shareTeamPower).tooltip(i("ui.simple.share-power-status")); + buttons.button(new TextureRegionDrawable(Items.copper.uiIcon), Styles.clearNonei, iconSmall, ShareFeature::openShareItemDialog).tooltip(i("ui.simple.share-inventory-status")); + buttons.button(Icon.unitsSmall, Styles.clearNonei, iconMed, ShareFeature::openShareUnitDialog).tooltip(i("ui.simple.share-unit-count")); }).fillX().row(); waveInfo = new Table().left().top(); @@ -86,8 +86,8 @@ public float getMinHeight(){ } private void setWaveOffsetDialog(){ - Dialog lsSet = new BaseDialog(i("波次设定")); - lsSet.cont.add(i("设定查询波次")).padRight(5f).left(); + Dialog lsSet = new BaseDialog(i("ui.simple.wave-settings")); + lsSet.cont.add(i("ui.simple.set-target-wave")).padRight(5f).left(); TextField field = lsSet.cont.field(state.wave + waveOffset + "", text -> waveOffset = Integer.parseInt(text) - state.wave).size(320f, 54f).valid(Strings::canParsePositiveInt).maxTextLength(100).get(); lsSet.cont.row(); lsSet.cont.slider(1, ArcWaveSpawner.calWinWaveClamped(), 1, res -> { diff --git a/src/mindustryX/features/ui/toolTable/AdvanceBuildTool.java b/src/mindustryX/features/ui/toolTable/AdvanceBuildTool.java index 516c1df2e6f3..ce491e158520 100644 --- a/src/mindustryX/features/ui/toolTable/AdvanceBuildTool.java +++ b/src/mindustryX/features/ui/toolTable/AdvanceBuildTool.java @@ -50,7 +50,7 @@ public AdvanceBuildTool(){ Lines.stroke(Math.min(Math.abs(width), Math.abs(height)) / tilesize / 10f); Lines.rect(selection.x * tilesize - tilesize / 2f, selection.y * tilesize - tilesize / 2f, selection.width * tilesize + tilesize, selection.height * tilesize + tilesize); Draw.color(); - FuncX.drawText(selection.getCenter(Tmp.v1).scl(tilesize), i("建造区域"), Scl.scl(1.25f), Color.white); + FuncX.drawText(selection.getCenter(Tmp.v1).scl(tilesize), i("ui.simple.build-area"), Scl.scl(1.25f), Color.white); } if(placement == BuildRange.find && find != null){ Draw.z(Layer.blockBuilding + 1f); @@ -75,20 +75,20 @@ protected void rebuild(){ } }); add().height(40); - button("", Styles.clearTogglet, () -> placement = BuildRange.global).checked((b) -> placement == BuildRange.global).tooltip(i("全局检查")).size(30f); + button("", Styles.clearTogglet, () -> placement = BuildRange.global).checked((b) -> placement == BuildRange.global).tooltip(i("ui.simple.global-range")).size(30f); button("\uE818", Styles.clearTogglet, () -> { selection = control.input.lastSelection; if(selection.area() < 10f){ - UIExt.announce(i("当前选定区域为空,请通过F规划区域")); + UIExt.announce(i("ui.simple.the-currently-selected-area-is-empty-please-use")); return; } placement = BuildRange.zone; - }).checked((b) -> placement == BuildRange.zone).tooltip(i("选择范围")).size(30f); + }).checked((b) -> placement == BuildRange.zone).tooltip(i("ui.simple.selection-range")).size(30f); button(Blocks.coreShard.emoji(), Styles.clearTogglet, () -> { placement = BuildRange.team; rebuild(); - }).checked((b) -> placement == BuildRange.team).tooltip(i("队伍区域")).size(30f); - button(UnitTypes.gamma.emoji(), Styles.clearTogglet, () -> placement = BuildRange.player).checked((b) -> placement == BuildRange.player).tooltip(i("玩家建造区")).size(30f); + }).checked((b) -> placement == BuildRange.team).tooltip(i("ui.simple.team-range")).size(30f); + button(UnitTypes.gamma.emoji(), Styles.clearTogglet, () -> placement = BuildRange.player).checked((b) -> placement == BuildRange.player).tooltip(i("ui.simple.player-build-range")).size(30f); var findButton = add(new TextButton("", Styles.clearTogglet)).update((b) -> { buildingSeq.clear(); @@ -101,7 +101,7 @@ protected void rebuild(){ } b.setText(find.emoji() + " " + buildingSeq.size); b.setChecked(placement == BuildRange.find); - }).height(30f).tooltip(i("查找方块")).wrapLabel(false).get(); + }).height(30f).tooltip(i("ui.simple.find-blocks")).wrapLabel(false).get(); findButton.clicked(() -> { if(findButton.childrenPressed()) return; if(placement != BuildRange.find){ @@ -118,14 +118,14 @@ protected void rebuild(){ findButton.getLabelCell().padLeft(2f); findButton.button(Icon.settingsSmall, Styles.clearTogglei, iconSmall, () -> { if(target == null){ - UIExt.announce(i("[yellow]当前选中物品为空,请在物品栏选中建筑")); + UIExt.announce(i("ui.simple.yellow-current-selection-is-empty-select-a-block")); return; } find = target; searchIndex = 0; placement = BuildRange.find; rebuild(); - }).tooltip(i("设置目标")).padRight(2f); + }).tooltip(i("ui.simple.set-target")).padRight(2f); add().width(16); button("P", Styles.cleart, () -> { @@ -147,9 +147,9 @@ protected void rebuild(){ var plans = player.unit().plans(); if(plans.size > 1000){ while(plans.size > 1000) plans.removeLast(); - UIExt.announce(i("[yellow]建筑过多,避免卡顿,仅保留前1000个规划")); + UIExt.announce(i("ui.simple.too-many-buildings-warning")); } - }).tooltip(i("放置/替换")).size(30f); + }).tooltip(i("ui.simple.place-replace")).size(30f); } public static void showWorldProcessorInfo(){ diff --git a/src/mindustryX/features/ui/toolTable/AdvanceToolTable.kt b/src/mindustryX/features/ui/toolTable/AdvanceToolTable.kt index 3dd0092ae0f8..c2ce4e74172d 100644 --- a/src/mindustryX/features/ui/toolTable/AdvanceToolTable.kt +++ b/src/mindustryX/features/ui/toolTable/AdvanceToolTable.kt @@ -36,19 +36,19 @@ class AdvanceToolTable : Table() { init { background = Styles.black6 - row().add(i("警告:该页功能主要供单机作图使用")).color(Color.yellow).colspan(2) + row().add(i("ui.simple.single-player-map-tools-only")).color(Color.yellow).colspan(2) - row().add(i("单位:")) + row().add(i("ui.simple.unit")) with(table().growX().get()) { defaults().size(Vars.iconMed).pad(4f) button(Items.copper.emoji() + "+", Styles.cleart) { val core = Vars.player.core() ?: return@button for (item in Vars.content.items()) core.items[item] = core.storageCapacity - }.tooltip(i("填满核心的所有资源")) + }.tooltip(i("ui.simple.fill-core-resources")) button(Items.copper.emoji() + "[red]-", Styles.cleart) { val core = Vars.player.core() ?: return@button core.items.clear() - }.tooltip(i("清空核心的所有资源")) + }.tooltip(i("ui.simple.clear-all-core-resources")) button(UnitTypes.gamma.emoji() + "+", Styles.cleart) { if (Vars.player.dead()) return@button val data = copyIO { Payload.write(UnitPayload(Vars.player.unit()), it) } @@ -56,12 +56,12 @@ class AdvanceToolTable : Table() { cloneUnit.resetController() cloneUnit.set(Vars.player.x + Mathf.range(8f), Vars.player.y + Mathf.range(8f)) cloneUnit.add() - }.tooltip(i("克隆")) - button(UnitTypes.gamma.emoji() + "[red]×", Styles.cleart) { if (!Vars.player.dead()) Vars.player.unit().kill() }.tooltip(i("自杀")) - button(Icon.waves, Styles.clearNonei) { factoryDialog.show() }.tooltip(i("单位工厂-X")) + }.tooltip(i("ui.simple.clone")) + button(UnitTypes.gamma.emoji() + "[red]×", Styles.cleart) { if (!Vars.player.dead()) Vars.player.unit().kill() }.tooltip(i("ui.simple.self-destruct")) + button(Icon.waves, Styles.clearNonei) { factoryDialog.show() }.tooltip(i("ui.simple.unit-factory-x")) } - row().add(i("队伍:")) + row().add(i("ui.simple.team")) with(table().growX().get()) { defaults().size(Vars.iconMed).maxWidth(120f).pad(4f).padRight(8f) for (team in Team.baseTeams) { @@ -72,23 +72,23 @@ class AdvanceToolTable : Table() { } button("+", Styles.flatToggleMenut) { UIExt.teamSelect.pickOne({ team: Team? -> Vars.player.team(team) }, Vars.player.team()) } .checked { !Seq.with(*Team.baseTeams).contains(Vars.player.team()) } - .tooltip(i("更多队伍选择")) + .tooltip(i("ui.simple.more-teams")) } - row().add(i("建筑:")) + row().add(i("ui.simple.buildings")) with(table().growX().get()) { defaults().pad(4f).padRight(8f) - button(i("创世神"), Styles.flatToggleMenut) { LogicExt.worldCreator0.toggle() } + button(i("settingV2.worldCreator.name"), Styles.flatToggleMenut) { LogicExt.worldCreator0.toggle() } .checked { LogicExt.worldCreator }.wrapLabel(false) - button(i("解禁"), Styles.flatToggleMenut) { + button(i("ui.simple.unlock"), Styles.flatToggleMenut) { VarsX.allUnlocked.toggle() - }.checked { VarsX.allUnlocked.value }.tooltip(i("显示并允许建造所有物品")).wrapLabel(false) - button(i("地形蓝图"), Styles.flatToggleMenut) { LogicExt.terrainSchematic0.toggle() } + }.checked { VarsX.allUnlocked.value }.tooltip(i("ui.simple.unlock-and-allow-all-blocks")).wrapLabel(false) + button(i("settingV2.terrainSchematic.name"), Styles.flatToggleMenut) { LogicExt.terrainSchematic0.toggle() } .checked { LogicExt.terrainSchematic }.wrapLabel(false) - button(i("瞬间完成"), Styles.cleart) { + button(i("ui.simple.instant"), Styles.cleart) { Vars.player.unit()?.apply { if (!canBuild()) { - UIExt.announce(i("[red]当前单位不可建筑")) + UIExt.announce(i("ui.simple.red-current-unit-cannot-build")) return@apply } val bak = updateBuilding @@ -99,22 +99,22 @@ class AdvanceToolTable : Table() { }.wrapLabel(false).disabled { Vars.net.client() } } - row().add(i("规则:")) + row().add(i("ui.simple.rules")) with(table().growX().get()) { defaults().pad(4f) button(Iconc.map.toString(), Styles.cleart) { mapInfoDialog.show() }.width(Vars.iconMed) - button(i("无限火力"), Styles.flatToggleMenut) { Vars.player.team().rules().cheat = !Vars.player.team().rules().cheat } - .checked { Vars.player.team().rules().cheat }.tooltip(i("开关自己队的无限火力")).wrapLabel(false) - button(i("编辑器"), Styles.flatToggleMenut) { Vars.state.rules.editor = !Vars.state.rules.editor } + button(i("ui.simple.cheat"), Styles.flatToggleMenut) { Vars.player.team().rules().cheat = !Vars.player.team().rules().cheat } + .checked { Vars.player.team().rules().cheat }.tooltip(i("ui.simple.toggle-your-team-s-cheat")).wrapLabel(false) + button(i("ui.simple.editor"), Styles.flatToggleMenut) { Vars.state.rules.editor = !Vars.state.rules.editor } .checked { Vars.state.rules.editor }.wrapLabel(false) - button(i("沙盒"), Styles.flatToggleMenut) { Vars.state.rules.infiniteResources = !Vars.state.rules.infiniteResources } + button(i("ui.simple.sandbox"), Styles.flatToggleMenut) { Vars.state.rules.infiniteResources = !Vars.state.rules.infiniteResources } .checked { Vars.state.rules.infiniteResources }.wrapLabel(false) button(Iconc.edit.toString(), Styles.cleart) { rulesDialog.show(Vars.state.rules) { Vars.state.rules } }.width(Vars.iconMed) } - row().add(i("沙漏:")) + row().add(i("ui.simple.hourglass")) table(TimeControl::draw) } diff --git a/src/mindustryX/features/ui/toolTable/AuxiliaryTools.java b/src/mindustryX/features/ui/toolTable/AuxiliaryTools.java index 80ed48ca3e20..24d72588f93f 100644 --- a/src/mindustryX/features/ui/toolTable/AuxiliaryTools.java +++ b/src/mindustryX/features/ui/toolTable/AuxiliaryTools.java @@ -41,10 +41,10 @@ public AuxiliaryTools(){ protected void rebuild(){ defaults().size(40); - aiButton(new ArcMinerAI(), UnitTypes.mono.region, i("矿机AI")); - aiButton(new BuilderAI(), UnitTypes.poly.region, i("重建AI")); - aiButton(new RepairAI(), UnitTypes.mega.region, i("修复AI")); - aiButton(new DefenderAI(), UnitTypes.oct.region, i("保护AI")); + aiButton(new ArcMinerAI(), UnitTypes.mono.region, i("ui.simple.miner-ai")); + aiButton(new BuilderAI(), UnitTypes.poly.region, i("ui.simple.builder-ai")); + aiButton(new RepairAI(), UnitTypes.mega.region, i("ui.simple.repair-ai")); + aiButton(new DefenderAI(), UnitTypes.oct.region, i("ui.simple.defender-ai")); button(Icon.settingsSmall, Styles.clearNonei, iconMed, this::showAiSettingDialog); row(); @@ -57,20 +57,20 @@ protected void rebuild(){ if(++count >= 255) break; } } - }).tooltip(i("在建造列表加入被摧毁建筑")); - var t = button(new TextureRegionDrawable(Items.copper.uiIcon), Styles.clearNoneTogglei, () -> AutoFill.enable ^= true).tooltip(i("一键装填")).checked((b) -> AutoFill.enable).get(); + }).tooltip(i("ui.simple.add-destroyed-buildings-to-build-queue")); + var t = button(new TextureRegionDrawable(Items.copper.uiIcon), Styles.clearNoneTogglei, () -> AutoFill.enable ^= true).tooltip(i("ui.simple.auto-fill")).checked((b) -> AutoFill.enable).get(); SettingsV2.bindQuickSettings(t, AutoFill.INSTANCE.getSettings()); - toggleButton(Icon.modeAttack, "autotarget", i("自动攻击")); - toggleButton(new TextureRegionDrawable(UnitTypes.vela.uiIcon), "forceBoost", i("强制助推")); - toggleButton(Icon.eyeSmall, "detach-camera", i("视角脱离玩家")); + toggleButton(Icon.modeAttack, "autotarget", i("ui.simple.auto-attack")); + toggleButton(new TextureRegionDrawable(UnitTypes.vela.uiIcon), "forceBoost", i("ui.simple.force-boost")); + toggleButton(Icon.eyeSmall, "detach-camera", i("ui.simple.detached-camera")); if(!mobile) return; row(); - toggleButton(Icon.unitsSmall, i("指挥模式"), () -> control.input.commandMode = !control.input.commandMode).checked(b -> control.input.commandMode); - toggleButton(Icon.pause, i("暂停建造"), () -> control.input.isBuilding = !control.input.isBuilding).checked(b -> control.input.isBuilding); - scriptButton(Icon.up, i("捡起载荷"), () -> control.input.tryPickupPayload()); - scriptButton(Icon.down, i("丢下载荷"), () -> control.input.tryDropPayload()); - scriptButton(new TextureRegionDrawable(Blocks.payloadConveyor.uiIcon), i("进入传送带"), () -> { + toggleButton(Icon.unitsSmall, i("ui.simple.command-mode"), () -> control.input.commandMode = !control.input.commandMode).checked(b -> control.input.commandMode); + toggleButton(Icon.pause, i("ui.simple.construction-suspended"), () -> control.input.isBuilding = !control.input.isBuilding).checked(b -> control.input.isBuilding); + scriptButton(Icon.up, i("ui.simple.pick-up-payload"), () -> control.input.tryPickupPayload()); + scriptButton(Icon.down, i("ui.simple.drop-payload"), () -> control.input.tryDropPayload()); + scriptButton(new TextureRegionDrawable(Blocks.payloadConveyor.uiIcon), i("ui.simple.enter-the-conveyor-belt"), () -> { Building build = player.buildOn(); if(build == null || player.dead()) return; Call.unitBuildingControlSelect(player.unit(), build); @@ -87,7 +87,7 @@ protected void toggleButton(Drawable icon, String settingName, String descriptio boolean setting = Core.settings.getBool(settingName); Core.settings.put(settingName, !setting); - String state = setting ? i("关闭") : i("开启"); + String state = setting ? i("ui.simple.off") : i("ui.simple.on"); UIExt.announce(VarsX.bundle.toggleState(description, state)); }).tooltip(description, true).checked(b -> Core.settings.getBool(settingName)); } @@ -103,10 +103,10 @@ protected void scriptButton(Drawable icon, String description, Runnable runnable private void showAiSettingDialog(){ int cols = (int)Math.max(Core.graphics.getWidth() / Scl.scl(480), 1); - BaseDialog dialog = new BaseDialog(i("ARC-AI设定器")); + BaseDialog dialog = new BaseDialog(i("ui.simple.arc-ai-configurator")); dialog.cont.table(t -> { - t.add(i("minerAI-矿物筛选器")).color(Pal.accent).pad(cols / 2f).center().row(); + t.add(i("ui.simple.miner-ai-ore-filter")).color(Pal.accent).pad(cols / 2f).center().row(); t.image().color(Pal.accent).fillX().row(); t.table(list -> { int i = 0; diff --git a/src/mindustryX/features/ui/toolTable/NewToolTable.kt b/src/mindustryX/features/ui/toolTable/NewToolTable.kt index bc698eb8af4f..edb751b81e82 100644 --- a/src/mindustryX/features/ui/toolTable/NewToolTable.kt +++ b/src/mindustryX/features/ui/toolTable/NewToolTable.kt @@ -36,41 +36,41 @@ object NewToolTable : Table() { add(gridTable).growX().row() gridTable.defaults().size(Vars.iconLarge) - button(i("信"), i("中央监控室")) { UIExt.arcMessageDialog.show() } - button("S", i("同步一波")) { Call.sendChatMessage("/sync") } - button(i("观"), i("观察者模式")) { Call.sendChatMessage("/ob") } - button(i("版"), i("服务器信息版")) { Call.sendChatMessage("/broad") } - toggle(i("雾"), i("战争迷雾"), { Vars.state.rules.fog }) { + button(i("ui.simple.m"), i("ui.simple.message-center")) { UIExt.arcMessageDialog.show() } + button("S", i("ui.simple.sync-a-wave")) { Call.sendChatMessage("/sync") } + button(i("ui.simple.o"), i("ui.simple.observer-mode")) { Call.sendChatMessage("/ob") } + button(i("ui.simple.v"), i("ui.simple.server-info-build")) { Call.sendChatMessage("/broad") } + toggle(i("ui.simple.f"), i("ui.simple.fog-of-war"), { Vars.state.rules.fog }) { Vars.state.rules.fog = Vars.state.rules.fog xor true }.disabled { Vars.state.rules.pvp && Vars.player.team().id != 255 } - button(i("[white]法"), i("法国军礼")) { - Vars.ui.showConfirm(i("受不了,直接投降?")) { Call.sendChatMessage("/vote gameover") } + button(i("ui.simple.white-s"), i("ui.simple.surrender-vote")) { + Vars.ui.showConfirm(i("ui.simple.are-you-sure-you-want-to-surrender")) { Call.sendChatMessage("/vote gameover") } } - toggle(i("扫"), i("扫描模式"), { RenderExt.transportScan.value }) { RenderExt.transportScan.toggle() } + toggle(i("ui.simple.s"), i("ui.simple.scan-mode"), { RenderExt.transportScan.value }) { RenderExt.transportScan.toggle() } - toggle(i("块"), i("建筑显示"), { RenderExt.blockRenderLevel > 0 }) { RenderExt.blockRenderLevel0.cycle() } - toggle(i("兵"), i("兵种显示"), { !RenderExt.unitHide.value }) { RenderExt.unitHide.toggle() } - toggle(i("弹"), i("子弹显示"), { !RenderExt.noBulletShow.value }) { RenderExt.noBulletShow.toggle() } - toggle(i("效"), i("特效显示"), { Vars.renderer.enableEffects }) { Settings.toggle("effects") } - toggle(i("墙"), i("墙体阴影显示"), { Vars.enableDarkness }) { Vars.enableDarkness = !Vars.enableDarkness } - toggle("${Iconc.map}", i("小地图显示"), { Core.settings.getBool("minimap") }) { Settings.toggle("minimap") } - toggle(i("箱"), i("碰撞箱显示"), { RenderExt.unitHitbox.value }) { RenderExt.unitHitbox.toggle() } + toggle(i("ui.simple.b"), i("category.arcCDisplayBlock.name"), { RenderExt.blockRenderLevel > 0 }) { RenderExt.blockRenderLevel0.cycle() } + toggle(i("ui.simple.u"), i("ui.simple.unit-rendering"), { !RenderExt.unitHide.value }) { RenderExt.unitHide.toggle() } + toggle(i("ui.simple.p"), i("ui.simple.bullet-rendering"), { !RenderExt.noBulletShow.value }) { RenderExt.noBulletShow.toggle() } + toggle(i("ui.simple.fx"), i("ui.simple.effects-rendering"), { Vars.renderer.enableEffects }) { Settings.toggle("effects") } + toggle(i("ui.simple.w"), i("ui.simple.wall-shadow-rendering"), { Vars.enableDarkness }) { Vars.enableDarkness = !Vars.enableDarkness } + toggle("${Iconc.map}", i("ui.simple.minimap"), { Core.settings.getBool("minimap") }) { Settings.toggle("minimap") } + toggle(i("ui.simple.h"), i("ui.simple.hitbox-overlay"), { RenderExt.unitHitbox.value }) { RenderExt.unitHitbox.toggle() } - button("${Iconc.blockRadar}", i("雷达开关")) { ArcRadar.mobileRadar = !ArcRadar.mobileRadar }.get().also { + button("${Iconc.blockRadar}", i("ui.simple.radar-toggle")) { ArcRadar.mobileRadar = !ArcRadar.mobileRadar }.get().also { SettingsV2.bindQuickSettings(it, ArcRadar.settings) } - toggle("${Iconc.blockWorldProcessor}", i("移除逻辑锁定"), { Core.settings.getBool("removeLogicLock") }) { + toggle("${Iconc.blockWorldProcessor}", i("ui.simple.remove-logic-lock"), { Core.settings.getBool("removeLogicLock") }) { Settings.toggle("removeLogicLock") if (Core.settings.getBool("removeLogicLock")) { Vars.control.input.logicCutscene = false - Vars.ui.announce(i("已移除逻辑视角锁定")) + Vars.ui.announce(i("ui.simple.logic-camera-lock-removed")) } } - toggle(Blocks.worldMessage.emoji(), i("信息板全显示"), { RenderExt.displayAllMessage }) { Settings.toggle("displayallmessage") } - button("${Iconc.itemCopper}", i("矿物信息")) { floorStatisticDialog() } + toggle(Blocks.worldMessage.emoji(), i("ui.simple.show-all-message-blocks"), { RenderExt.displayAllMessage }) { Settings.toggle("displayallmessage") } + button("${Iconc.itemCopper}", i("ui.simple.ore-info")) { floorStatisticDialog() } - button("${Iconc.fill}", i("特效大全")) { EffectsDialog.withAllEffects().show() } - button("${Iconc.star}", i("ui大全")) { uiTableDialog().show() } + button("${Iconc.fill}", i("ui.simple.effects-library")) { EffectsDialog.withAllEffects().show() } + button("${Iconc.star}", i("ui.simple.ui-toolkit")) { uiTableDialog().show() } add(GridTable()).update { t: Table -> @@ -115,7 +115,7 @@ object NewToolTable : Table() { data class Button(val icon: Drawable, val tooltip: String, val action: () -> Unit) data class CustomButton(val name: String, val content: String) { - constructor() : this("?", i("未输入指令")) + constructor() : this("?", i("ui.simple.no-command-entered")) fun run() { if (content.startsWith("@js ")) { @@ -169,7 +169,7 @@ object NewToolTable : Table() { update { if (changed()) clearChildren() if (hasChildren()) return@update - add(i("序号")); add(i("显示名")); add(i("消息(@js 开头为脚本)")); row() + add(i("ui.simple.index")); add(i("ui.simple.display-name")); add(i("ui.simple.message-js-starts-with-script")); row() value.forEachIndexed { i, d -> var tmp = d add(i.toString()).padRight(4f) @@ -186,7 +186,7 @@ object NewToolTable : Table() { button("@add", Icon.addSmall) { set(value + CustomButton()) }.colspan(columns).fillX().row() - add(i("[yellow]添加新指令前,请先保存编辑的指令")).colspan(columns).center().padTop(-4f).row() + add(i("ui.simple.save-before-add-instruction-warning")).colspan(columns).center().padTop(-4f).row() } }) { shown }.growX() table.row() @@ -195,12 +195,12 @@ object NewToolTable : Table() { private fun floorStatisticDialog() { - val dialog = BaseDialog(i("ARC-矿物统计")) + val dialog = BaseDialog(i("ui.simple.arc-ore-statistics")) val table = dialog.cont table.clear() table.table { c: Table -> - c.add(i("矿物矿(地表/墙矿)")).color(Pal.accent).center().fillX().row() + c.add(i("ui.simple.ore-count-surface-wall")).color(Pal.accent).center().fillX().row() c.image().color(Pal.accent).fillX().row() c.table { list: Table -> var i = 0 @@ -214,7 +214,7 @@ object NewToolTable : Table() { } }.row() - c.add(i("液体")).color(Pal.accent).center().fillX().row() + c.add(i("ui.simple.liquids")).color(Pal.accent).center().fillX().row() c.image().color(Pal.accent).fillX().row() c.table { list: Table -> var i = 0 @@ -237,7 +237,7 @@ object NewToolTable : Table() { } - private fun uiTableDialog() = BaseDialog(i("UI图标大全")).apply { + private fun uiTableDialog() = BaseDialog(i("ui.simple.ui-icon-library")).apply { cont.defaults().maxWidth(800f) var query = "" val sField = TextField() @@ -247,7 +247,7 @@ object NewToolTable : Table() { field(query) { query = it }.pad(8f).grow().colspan(2).update { if (!it.hasKeyboard()) it.text = query } button(Icon.cancelSmall, Styles.cleari) { query = "" }.padLeft(16f).size(32f) row() - add(i("暂存区")).color(Pal.lightishGray).padRight(16f) + add(i("ui.simple.staging-area")).color(Pal.lightishGray).padRight(16f) add(sField).growX().get() button(Icon.copySmall, Styles.cleari) { Core.app.clipboardText = sField.text @@ -257,7 +257,7 @@ object NewToolTable : Table() { cont.row() Table().apply { defaults().minWidth(1f) - add(i("颜色")).color(Pal.accent).center().row() + add(i("ui.simple.color")).color(Pal.accent).center().row() image().color(Pal.accent).fillX().row() GridTable().apply { defaults().height(32f).width(80f).pad(4f) @@ -271,7 +271,7 @@ object NewToolTable : Table() { } }.also { add(it).growX().row() } - add(i("物品")).color(Pal.accent).center().row() + add(i("ui.simple.item")).color(Pal.accent).center().row() image().color(Pal.accent).fillX().row() GridTable().apply { defaults().size(Vars.iconLarge) @@ -288,7 +288,7 @@ object NewToolTable : Table() { } }.also { add(it).growX().row() } - add(i("图标")).color(Pal.accent).center().row() + add(i("ui.simple.icon")).color(Pal.accent).center().row() image().color(Pal.accent).fillX().row() GridTable().apply { defaults().size(Vars.iconLarge)