mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
修复翻译导致的循环错误
This commit is contained in:
parent
a117b1d6ca
commit
a298b79680
@ -16,6 +16,7 @@ using System.Threading.Tasks;
|
||||
using System.Timers;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Interop;
|
||||
using VPet_Simulator.Core;
|
||||
using VPet_Simulator.Windows.Interface;
|
||||
@ -58,7 +59,14 @@ namespace VPet_Simulator.Windows
|
||||
|
||||
|
||||
LocalizeCore.StoreTranslation = true;
|
||||
LocalizeCore.TranslateFunc = (str) => Sub.TextDeReplace(str).Translate();
|
||||
LocalizeCore.TranslateFunc = (str) =>
|
||||
{
|
||||
var destr = Sub.TextDeReplace(str);
|
||||
if(destr == str)
|
||||
return str;
|
||||
return destr.Translate();
|
||||
};
|
||||
|
||||
CultureInfo.CurrentCulture = new CultureInfo(CultureInfo.CurrentCulture.Name);
|
||||
CultureInfo.CurrentCulture.NumberFormat = new CultureInfo("en-US").NumberFormat;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user