[QuickAccent]Added support for Norwegian letters (#23487)

* [QuickAccent]Added support for Norwegian letters

* Add language to Settings
This commit is contained in:
norwayman22 2023-01-30 19:51:19 +01:00 committed by GitHub
parent 92f61d6ef5
commit fb2b150a1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 0 deletions

View File

@ -29,6 +29,7 @@ namespace PowerAccent.Core
MK,
MI,
NL,
NO,
PI,
PL,
PT,
@ -65,6 +66,7 @@ namespace PowerAccent.Core
Language.MK => GetDefaultLetterKeyMK(letter), // Macedonian
Language.MI => GetDefaultLetterKeyMI(letter), // Maori
Language.NL => GetDefaultLetterKeyNL(letter), // Dutch
Language.NO => GetDefaultLetterKeyNO(letter), // Norwegian
Language.PI => GetDefaultLetterKeyPI(letter), // Pinyin
Language.PL => GetDefaultLetterKeyPL(letter), // Polish
Language.PT => GetDefaultLetterKeyPT(letter), // Portuguese
@ -583,5 +585,18 @@ namespace PowerAccent.Core
_ => Array.Empty<string>(),
};
}
// Norwegian
private static string[] GetDefaultLetterKeyNO(LetterKey letter)
{
return letter switch
{
LetterKey.VK_A => new string[] { "å", "æ" },
LetterKey.VK_E => new string[] { "€" },
LetterKey.VK_O => new string[] { "ø" },
LetterKey.VK_S => new string[] { "$" },
_ => Array.Empty<string>(),
};
}
}
}

View File

@ -2752,6 +2752,9 @@ Activate by holding the key for the character you want to add an accent to, then
<data name="QuickAccent_SelectedLanguage_Dutch.Content" xml:space="preserve">
<value>Dutch</value>
</data>
<data name="QuickAccent_SelectedLanguage_Norwegian.Content" xml:space="preserve">
<value>Norwegian</value>
</data>
<data name="QuickAccent_SelectedLanguage_Pinyin.Content" xml:space="preserve">
<value>Pinyin</value>
</data>

View File

@ -41,6 +41,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
"KU",
"MK",
"MI",
"NO",
"PI",
"PL",
"PT",

View File

@ -78,6 +78,7 @@
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Kurdish" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Macedonian" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Maori" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Norwegian" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Pinyin" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Polish" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Portuguese" />