Skip to content

Commit

Permalink
Update zh-hans-cn to zh-hans
Browse files Browse the repository at this point in the history
Update zh-hans-cn to zh-hans
  • Loading branch information
Gaoyifei1011 committed Aug 13, 2024
1 parent 11622eb commit 5b235ff
Show file tree
Hide file tree
Showing 19 changed files with 17 additions and 11 deletions.
5 changes: 3 additions & 2 deletions GetStoreApp/GetStoreApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<IsAotCompatible>true</IsAotCompatible>
<LangVersion>latest</LangVersion>
<OptimizationPreference>Size</OptimizationPreference>
<Optimize>False</Optimize>
<OutputType>WinExe</OutputType>
<Platforms>x86;x64;ARM64</Platforms>
<PublishProtocol>FileSystem</PublishProtocol>
Expand Down Expand Up @@ -156,10 +157,10 @@
</ItemGroup>

<!-- 在 Debug 调试模式下测试 AOT 发布后的文件 -->
<!--<Target Name="AutoPublish" AfterTargets="AfterBuild" Condition="$(Configuration) == 'Debug'">
<Target Name="AutoPublish" AfterTargets="AfterBuild" Condition="$(Configuration) == 'Debug'">
<MSBuild Projects="$(MSBuildProjectFullPath)" Targets="Publish" />
<Copy SourceFiles="$(NativeOutputPath)$(AssemblyName).exe" DestinationFiles="$(ProjectDir)obj\$(Platform)\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\apphost.exe" />
</Target>-->
</Target>

<!-- 捆绑前对二进制文件进行后处理 -->
<!-- 该任务会在 Debug 以 AOT 发布时触发,故限制在 Release 模式下进行操作 -->
Expand Down
5 changes: 1 addition & 4 deletions GetStoreApp/Services/Controls/Settings/LanguageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ private static DictionaryEntry GetLanguage()
{
SetLanguage(currentLanguage);
FlowDirection = currentCulture.TextInfo.IsRightToLeft ? FlowDirection.RightToLeft : FlowDirection.LeftToRight;
System.IO.File.AppendAllText("D:\\01.txt", currentCulture.TextInfo.IsRightToLeft.ToString() + Environment.NewLine);
return currentLanguage;
}
else
Expand All @@ -102,7 +101,6 @@ private static DictionaryEntry GetLanguage()
{
SetLanguage(currentParentLanguage);
FlowDirection = currentParentCulture.TextInfo.IsRightToLeft ? FlowDirection.RightToLeft : FlowDirection.LeftToRight;
System.IO.File.AppendAllText("D:\\01.txt", currentCulture.TextInfo.IsRightToLeft.ToString() + Environment.NewLine);
return currentParentLanguage;
}

Expand All @@ -111,7 +109,6 @@ private static DictionaryEntry GetLanguage()
{
SetLanguage(DefaultAppLanguage);
FlowDirection = CultureInfo.GetCultureInfo(DefaultAppLanguage.Value.ToString()).TextInfo.IsRightToLeft ? FlowDirection.RightToLeft : FlowDirection.LeftToRight;
System.IO.File.AppendAllText("D:\\01.txt", currentCulture.TextInfo.IsRightToLeft.ToString() + Environment.NewLine);
return DefaultAppLanguage;
}
}
Expand All @@ -120,7 +117,7 @@ private static DictionaryEntry GetLanguage()
{
CultureInfo savedCultureInfo = CultureInfo.GetCultureInfo(language.ToString());
FlowDirection = savedCultureInfo.TextInfo.IsRightToLeft ? FlowDirection.RightToLeft : FlowDirection.LeftToRight;
return LanguageList.Find(item => item.Value.ToString().Contains(language.ToString(), StringComparison.OrdinalIgnoreCase));
return LanguageList.Find(item => language.ToString().Contains(item.Value.ToString(), StringComparison.OrdinalIgnoreCase));
}
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion GetStoreApp/Views/Pages/SettingsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@
Grid.Column="0"
Margin="0,0,12,0"
FontSize="16"
Glyph="&#xE773;" />
Glyph="&#xE721;" />

<StackPanel Grid.Column="1" Orientation="Vertical">
<TextBlock
Expand Down
12 changes: 10 additions & 2 deletions GetStoreApp/Views/Pages/SettingsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
using Windows.System;
using WinRT.Interop;

// 抑制 IDE0060 警告
#pragma warning disable IDE0060
// 抑制 CA1822,IDE0060 警告
#pragma warning disable CA1822,IDE0060

namespace GetStoreApp.Views.Pages
{
Expand Down Expand Up @@ -731,6 +731,14 @@ private void OnAlwaysShowBackdropToggled(object sender, RoutedEventArgs args)
/// </summary>
private void OnOpened(object sender, object args)
{
foreach (LanguageModel languageItem in LanguageCollection)
{
if (languageItem.IsChecked)
{
LanguageListView.ScrollIntoView(languageItem);
break;
}
}
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion GetStoreAppPackage/GetStoreAppPackage.wapproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
<AppxBundleAutoResourcePackageQualifiers>DXFeatureLevel</AppxBundleAutoResourcePackageQualifiers>
<AppxBundlePlatforms>x86|x64|arm64</AppxBundlePlatforms>
<AppxDefaultResourceQualifiers>Language=EN-US;ZH-HANS-CN</AppxDefaultResourceQualifiers>
<AppxDefaultResourceQualifiers>Language=AR;EN-US;ZH-HANS</AppxDefaultResourceQualifiers>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
<AppxPackageSigningTimestampServerUrl>http://timestamp.digicert.com</AppxPackageSigningTimestampServerUrl>
Expand Down
2 changes: 1 addition & 1 deletion GetStoreAppPackage/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<Resources>
<Resource Language="AR" />
<Resource Language="EN-US" />
<Resource Language="ZH-HANS-CN" />
<Resource Language="ZH-HANS" />
</Resources>

<Applications>
Expand Down

0 comments on commit 5b235ff

Please sign in to comment.