Merge branch 'develop' into feature/Steam愿望单

This commit is contained in:
2026-07-31 22:44:07 +08:00
9 changed files with 272 additions and 83 deletions
+16 -1
View File
@@ -8,6 +8,9 @@ namespace AibisDream.Kit
public string Cn { get; set; }
public string En { get; set; }
public string Ja { get; set; }
public string Ru { get; set; }
public string Es { get; set; }
public string PtBr { get; set; }
public string NameColor { get; set; }
public string HeadPicPath { get; set; }
public string VoicePath { get; set; }
@@ -26,6 +29,9 @@ namespace AibisDream.Kit
vo.cn = Cn;
vo.en = En;
vo.ja = Ja;
vo.ru = Ru;
vo.es = Es;
vo.ptBr = PtBr;
vo.nameColor = NameColor;
vo.headPicPath = HeadPicPath;
vo.voicePath = VoicePath;
@@ -43,6 +49,9 @@ namespace AibisDream.Kit
public string cn;
public string en;
public string ja;
public string ru;
public string es;
public string ptBr;
public string nameColor;
public string headPicPath;
public string voicePath;
@@ -79,6 +88,12 @@ namespace AibisDream.Kit
case LocaleKind.Ja:
if (!string.IsNullOrWhiteSpace(ja)) return ja;
return string.IsNullOrWhiteSpace(cn) ? key : cn;
case LocaleKind.Ru:
return string.IsNullOrWhiteSpace(ru) ? key : ru;
case LocaleKind.Es:
return string.IsNullOrWhiteSpace(es) ? key : es;
case LocaleKind.PtBr:
return string.IsNullOrWhiteSpace(ptBr) ? key : ptBr;
case LocaleKind.Cn:
default:
return string.IsNullOrWhiteSpace(cn) ? key : cn;
@@ -105,4 +120,4 @@ namespace AibisDream.Kit
Player,
MainActor
}
}
}
@@ -18,7 +18,10 @@ namespace AibisDream.Framework
{
Cn,
En,
Ja
Ja,
Ru,
Es,
PtBr
}
public static class LocalizationKit
@@ -34,8 +37,11 @@ namespace AibisDream.Framework
public static LocaleKind GetLocaleKind(string localeCode)
{
if (string.IsNullOrEmpty(localeCode)) return LocaleKind.Cn;
if (localeCode.StartsWith("en")) return LocaleKind.En;
if (localeCode.StartsWith("ja")) return LocaleKind.Ja;
if (localeCode.StartsWith("en", StringComparison.OrdinalIgnoreCase)) return LocaleKind.En;
if (localeCode.StartsWith("ja", StringComparison.OrdinalIgnoreCase)) return LocaleKind.Ja;
if (localeCode.StartsWith("ru", StringComparison.OrdinalIgnoreCase)) return LocaleKind.Ru;
if (localeCode.StartsWith("es", StringComparison.OrdinalIgnoreCase)) return LocaleKind.Es;
if (localeCode.StartsWith("pt", StringComparison.OrdinalIgnoreCase)) return LocaleKind.PtBr;
return LocaleKind.Cn;
}
@@ -62,6 +68,9 @@ namespace AibisDream.Framework
SystemLanguage.Chinese or SystemLanguage.ChineseSimplified or SystemLanguage.ChineseTraditional => "zh-Hans",
SystemLanguage.Japanese => "ja-JP",
SystemLanguage.English => "en",
SystemLanguage.Russian => "ru",
SystemLanguage.Spanish => "es",
SystemLanguage.Portuguese => "pt-BR",
_ => "en",
};
@@ -36,6 +36,9 @@ namespace AibisDream.UI
new UIFormOption { prop = "zh-Hans", label = "中文" },
new UIFormOption { prop = "en", label = "English" },
new UIFormOption { prop = "ja-JP", label = "日本語" },
new UIFormOption { prop = "ru", label = "Русский" },
new UIFormOption { prop = "es", label = "Español" },
new UIFormOption { prop = "pt-BR", label = "Português (Brasil)" },
};
private static readonly UIFormOption[] TextSpeedOptions =