mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 19:27:56 +01:00
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:
@@ -141,7 +141,6 @@ public partial class SettingsViewModel : INotifyPropertyChanged
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int AutoGoBackIntervalIndex
|
||||
{
|
||||
get
|
||||
|
||||
@@ -22,6 +22,7 @@ public static class FuzzyStringMatcher
|
||||
private static bool IsSimplifiedChinese()
|
||||
{
|
||||
var culture = CultureInfo.CurrentUICulture;
|
||||
|
||||
// Detect Simplified Chinese: zh-CN, zh-Hans, zh-Hans-*
|
||||
return culture.Name.StartsWith("zh-CN", StringComparison.OrdinalIgnoreCase)
|
||||
|| culture.Name.StartsWith("zh-Hans", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
Reference in New Issue
Block a user