auto update EAC from github + simplifications

This commit is contained in:
Gurge44 committed 2025-12-20 10:56:11 +01:00
1 parent 7b33e6d9e6
commit c0518c5a24
19 files changed
+89 -56

No files matched your search

+2 -2
View File
@@ -161,11 +161,11 @@ public static class Translator
public static string GetString(string str, SupportedLangs langId)
{
var res = $"<INVALID:{str}>";
var res = $"*{str}";
try
{
if (TranslateMaps.TryGetValue(str, out Dictionary<int, string> dic) && (!dic.TryGetValue((int)langId, out res) || string.IsNullOrEmpty(res) || (langId is not SupportedLangs.SChinese and not SupportedLangs.TChinese && Regex.IsMatch(res, @"[\u4e00-\u9fa5]") && res == GetString(str, SupportedLangs.SChinese))))
if (TranslateMaps.TryGetValue(str, out Dictionary<int, string> dic) && (!dic.TryGetValue((int)langId, out res) || string.IsNullOrWhiteSpace(res) || (langId is not SupportedLangs.SChinese and not SupportedLangs.TChinese && Regex.IsMatch(res, @"[\u4e00-\u9fa5]") && res == GetString(str, SupportedLangs.SChinese))))
res = langId == SupportedLangs.English ? $"*{str}" : GetString(str, SupportedLangs.English);
if (!TranslateMaps.ContainsKey(str) && Enum.GetValues<StringNames>().FindFirst(x => x.ToString() == str, out StringNames stringNames))