Refactor SettingsViewModel and enhance Chinese detection

Removed the `AutoGoBackIntervalIndex` property from the
`SettingsViewModel` class as part of a refactor or feature
removal.

Enhanced the `IsSimplifiedChinese` method in the
`FuzzyStringMatcher` class to improve detection of Simplified
Chinese by adding checks for culture names starting with
"zh-CN", "zh-Hans", or "zh-Hans-*".
This commit is contained in:
Yu Leng
2025-12-08 08:37:24 +08:00
parent 9db2ebee68
commit 9ec0372f52
2 changed files with 1 additions and 1 deletions

View File

@@ -141,7 +141,6 @@ public partial class SettingsViewModel : INotifyPropertyChanged
} }
} }
public int AutoGoBackIntervalIndex public int AutoGoBackIntervalIndex
{ {
get get

View File

@@ -22,6 +22,7 @@ public static class FuzzyStringMatcher
private static bool IsSimplifiedChinese() private static bool IsSimplifiedChinese()
{ {
var culture = CultureInfo.CurrentUICulture; var culture = CultureInfo.CurrentUICulture;
// Detect Simplified Chinese: zh-CN, zh-Hans, zh-Hans-* // Detect Simplified Chinese: zh-CN, zh-Hans, zh-Hans-*
return culture.Name.StartsWith("zh-CN", StringComparison.OrdinalIgnoreCase) return culture.Name.StartsWith("zh-CN", StringComparison.OrdinalIgnoreCase)
|| culture.Name.StartsWith("zh-Hans", StringComparison.OrdinalIgnoreCase); || culture.Name.StartsWith("zh-Hans", StringComparison.OrdinalIgnoreCase);