Skip to content

Commit

Permalink
fix(unicode): using unicode icu data
Browse files Browse the repository at this point in the history
  • Loading branch information
qwqcode committed Jan 9, 2025
1 parent e6bee3a commit 12417f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion SubRenamer/Helper/I18NHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public static string GetLanguageNameFromOs()
{
string tz = TimeZoneInfo.Local.Id.ToLower();

// FIXME: `CultureInfo.CurrentCulture.Name` always return `null` in AvaloniaUI
var name = CultureInfo.CurrentCulture.Name;
if (string.IsNullOrWhiteSpace(name)) name = Environment.GetEnvironmentVariable("LANG");

Expand Down
3 changes: 2 additions & 1 deletion SubRenamer/SubRenamer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
<TrimMode>link</TrimMode>
<PublishTrimmed>true</PublishTrimmed>
<SelfContained>true</SelfContained>
<InvariantGlobalization>true</InvariantGlobalization>
<!-- ICU database is required to execute NFKC for japanese -->
<InvariantGlobalization>false</InvariantGlobalization>
<StripSymbols>true</StripSymbols>
<NoWarn>IL2057;IL2026;IL2104;IL3053</NoWarn>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
Expand Down
2 changes: 1 addition & 1 deletion SubRenamer/ViewModels/ConflictViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public ConflictViewModel(List<string> options)

private static Dictionary<string, string> GetFriendlyOptionsDictionary(IEnumerable<string> options)
{
// var lang2Info = CultureInfo.GetCultures(CultureTypes.NeutralCultures).ToDictionary(c => c.Name, c => c);
// var lang2Info = CultureInfo.GetCultures(CultureTypes.NeutralCultures).ToDictionary(c => c.NativeName, c => c);

var dict = new Dictionary<string, string>();
foreach (var k in options)
Expand Down

0 comments on commit 12417f0

Please sign in to comment.