-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Groups languages into two groups - Sort them by localized language name - Remove unneeded looping when no languages selected
- Loading branch information
1 parent
714ce45
commit 896a856
Showing
8 changed files
with
215 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/settings-ui/Settings.UI.Library/PowerAccentLanguageGroupModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) Microsoft Corporation | ||
// The Microsoft Corporation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Collections.Generic; | ||
|
||
namespace Microsoft.PowerToys.Settings.UI.Library | ||
{ | ||
public class PowerAccentLanguageGroupModel : List<PowerAccentLanguageModel> | ||
{ | ||
public PowerAccentLanguageGroupModel(List<PowerAccentLanguageModel> languages, string group) | ||
: base(languages) | ||
{ | ||
this.Group = group; | ||
} | ||
|
||
public string Group { get; init; } | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/settings-ui/Settings.UI.Library/PowerAccentLanguageModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright (c) Microsoft Corporation | ||
// The Microsoft Corporation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
namespace Microsoft.PowerToys.Settings.UI.Library | ||
{ | ||
public record PowerAccentLanguageModel(string LanguageCode, string LanguageResourceID, string GroupResourceID) | ||
{ | ||
public string Language { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.