fix localization

This commit is contained in:
DismissedLight
2023-02-13 13:51:15 +08:00
parent a32481980b
commit 9c4d4cda1e
4 changed files with 9 additions and 5 deletions

View File

@@ -6,7 +6,7 @@ namespace Snap.Hutao.Core.Annotation;
/// <summary>
/// 本地化键
/// </summary>
[AttributeUsage(AttributeTargets.Enum)]
[AttributeUsage(AttributeTargets.Field)]
internal class LocalizationKeyAttribute : Attribute
{
/// <summary>

View File

@@ -1843,7 +1843,7 @@ namespace Snap.Hutao.Resource.Localization {
}
/// <summary>
/// 查找类似 选择任何服务器 的本地化字符串。
/// 查找类似 尚未选择任何服务器 的本地化字符串。
/// </summary>
internal static string ViewModelLaunchGameSchemeNotSelected {
get {

View File

@@ -712,7 +712,7 @@
<value>游戏路径不正确,前往设置更改游戏路径</value>
</data>
<data name="ViewModelLaunchGameSchemeNotSelected" xml:space="preserve">
<value>选择任何服务器</value>
<value>尚未选择任何服务器</value>
</data>
<data name="ViewModelLaunchGameSwitchGameAccountFail" xml:space="preserve">
<value>切换账号失败</value>

View File

@@ -5,6 +5,7 @@ using CommunityToolkit.Mvvm.Input;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.UI.Windowing;
using Snap.Hutao.Control.Extension;
using Snap.Hutao.Core.Database;
using Snap.Hutao.Core.ExceptionService;
@@ -20,6 +21,7 @@ using Snap.Hutao.View.Dialog;
using Snap.Hutao.Web.Hoyolab.Takumi.Binding;
using System.Collections.ObjectModel;
using System.IO;
using Windows.Graphics;
namespace Snap.Hutao.ViewModel;
@@ -256,10 +258,12 @@ internal class LaunchGameViewModel : Abstraction.ViewModel
isBorderless = settings.SingleOrAdd(SettingEntry.LaunchIsBorderless, FalseString).GetBoolean();
OnPropertyChanged(nameof(IsBorderless));
screenWidth = settings.SingleOrAdd(SettingEntry.LaunchScreenWidth, "1920").GetInt32();
RectInt32 primaryRect = DisplayArea.Primary.OuterBounds;
screenWidth = settings.SingleOrAdd(SettingEntry.LaunchScreenWidth, $"{primaryRect.Width}").GetInt32();
OnPropertyChanged(nameof(ScreenWidth));
screenHeight = settings.SingleOrAdd(SettingEntry.LaunchScreenHeight, "1080").GetInt32();
screenHeight = settings.SingleOrAdd(SettingEntry.LaunchScreenHeight, $"{primaryRect.Height}").GetInt32();
OnPropertyChanged(nameof(ScreenHeight));
unlockFps = settings.SingleOrAdd(SettingEntry.LaunchUnlockFps, FalseString).GetBoolean();