mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
auto update EAC from github + simplifications
This commit is contained in:
1 parent
7b33e6d9e6
commit
c0518c5a24
19 files changed
+89
-56
No files matched your search
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user