mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-11-19 17:05:20 +08:00
refactor: centralize localization keys and remove runtime Chinese literals
This commit is contained in:
1 parent
34c99701ca
commit
036243fd4a
32 files changed
+873
-403
No files matched your search
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UXAssist.Common;
|
||||
@@ -14,10 +14,7 @@ internal static class AutoConstructUI
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
I18N.Add("Enable auto-construct", "Enable auto-construct", "启用自动建造");
|
||||
I18N.Add("Disable auto-construct", "Disable auto-construct", "禁用自动建造");
|
||||
I18N.Add("Buildings to construct: {0}", "Buildings to construct: {0}", "待建造数量: {0}");
|
||||
}
|
||||
}
|
||||
|
||||
public static void Start()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UXAssist.Common;
|
||||
using UXAssist.UI;
|
||||
|
||||
@@ -10,9 +10,7 @@ internal static class AutoCruiseUI
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
I18N.Add("Enable auto-cruise", "Enable auto-cruise", "启用自动巡航");
|
||||
I18N.Add("Disable auto-cruise", "Disable auto-cruise", "禁用自动巡航");
|
||||
}
|
||||
}
|
||||
|
||||
public static void Start()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using CommonAPI.Systems;
|
||||
using UXAssist.Common;
|
||||
@@ -24,9 +24,7 @@ internal static class MenuButtonUI
|
||||
name = "OpenUXAssistConfigWindow",
|
||||
canOverride = true
|
||||
});
|
||||
I18N.Add("KEYOpenUXAssistConfigWindow", "[UXA] Open UXAssist Config Window", "[UXA] 打开UX助手设置面板");
|
||||
I18N.Add("UXAssist Config", "UXAssist Config", "UX助手设置");
|
||||
I18N.OnInitialized += RecreateConfigWindow;
|
||||
I18N.OnInitialized += RecreateConfigWindow;
|
||||
}
|
||||
|
||||
public static void Start()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
@@ -31,12 +31,7 @@ internal static class MilkyWayUI
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
I18N.Add("No recent milkyway upload results", "No recent milkyway upload results", "没有最近的银河系发电数据上传结果");
|
||||
I18N.Add("Success", "Success", "成功");
|
||||
I18N.Add("Failure: ", "Failure: ", "失败: ");
|
||||
I18N.Add("Show top players", "Show top players", "显示玩家排行榜");
|
||||
I18N.Add("Hide top players", "Hide top players", "隐藏玩家排行榜");
|
||||
}
|
||||
}
|
||||
|
||||
public static void Start()
|
||||
{
|
||||
@@ -118,7 +113,7 @@ internal static class MilkyWayUI
|
||||
{
|
||||
if (_clusterUploadResultsCount == 0)
|
||||
{
|
||||
UIMessageBox.Show("UXAssist".Translate(), "No recent milkyway upload results".Translate(), "确定".Translate(), UIMessageBox.INFO, null);
|
||||
UIMessageBox.Show("UXAssist".Translate(), "No recent milkyway upload results".Translate(), I18NKeys.Ok.Translate(), UIMessageBox.INFO, null);
|
||||
return;
|
||||
}
|
||||
StringBuilder sb = new();
|
||||
@@ -129,7 +124,7 @@ internal static class MilkyWayUI
|
||||
var res = _clusterUploadResults[(i + _clusterUploadResultsHead) % ClusterUploadResultKeepCount];
|
||||
sb.AppendLine($"{res.UploadTime.ToString("yyyy-MM-dd HH:mm:ss")} - {((res.Result is 0 or 20) ? "Success".Translate() : ("Failure: ".Translate() + res.Result.ToString()))} - {res.RequestTime:F2}s");
|
||||
}
|
||||
UIMessageBox.Show("UXAssist".Translate(), sb.ToString(), "确定".Translate(), UIMessageBox.INFO, null);
|
||||
UIMessageBox.Show("UXAssist".Translate(), sb.ToString(), I18NKeys.Ok.Translate(), UIMessageBox.INFO, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
@@ -60,15 +60,7 @@ internal static class StarmapFilterUI
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
I18N.Add("High yield", "High yield", "高产");
|
||||
I18N.Add("Perfect", "Perfect", "完美");
|
||||
I18N.Add("Union results", "Union results", "结果取并集");
|
||||
I18N.Add("All 6 Basic Ores", "All 6 Basic Ores", "六种基础矿物齐全");
|
||||
I18N.Add("Show original name", "Show original name", "显示原始名称");
|
||||
I18N.Add("Show distance", "Show distance", "显示距离");
|
||||
I18N.Add("Show planet count", "Show planet count", "显示行星数");
|
||||
I18N.Add("Show all information", "Show all information", "显示全部信息");
|
||||
}
|
||||
}
|
||||
|
||||
public static void Start()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user