[QuickAccent]Add support for Finnish (#29483)

* Add support for Finnish

* Also add FI to GetDefaultLetterKeyALL

* Fix missing space
This commit is contained in:
David Lascelles 2023-11-03 12:13:25 +02:00 committed by GitHub
parent 4060df8c64
commit 47aa28977c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 0 deletions

View File

@ -18,6 +18,7 @@ namespace PowerAccent.Core
GD,
DE,
EST,
FI,
FR,
HR,
HE,
@ -56,6 +57,7 @@ namespace PowerAccent.Core
Language.GD => GetDefaultLetterKeyGD(letter), // Gàidhlig (Scottish Gaelic)
Language.DE => GetDefaultLetterKeyDE(letter), // German
Language.EST => GetDefaultLetterKeyEST(letter), // Estonian
Language.FI => GetDefaultLetterKeyFI(letter), // Finnish
Language.FR => GetDefaultLetterKeyFR(letter), // French
Language.HR => GetDefaultLetterKeyHR(letter), // Croatian
Language.HE => GetDefaultLetterKeyHE(letter), // Hebrew
@ -97,6 +99,7 @@ namespace PowerAccent.Core
.Union(GetDefaultLetterKeyGD(letter))
.Union(GetDefaultLetterKeyDE(letter))
.Union(GetDefaultLetterKeyEST(letter))
.Union(GetDefaultLetterKeyFI(letter))
.Union(GetDefaultLetterKeyFR(letter))
.Union(GetDefaultLetterKeyHR(letter))
.Union(GetDefaultLetterKeyHE(letter))
@ -221,6 +224,18 @@ namespace PowerAccent.Core
};
}
// Finnish
private static string[] GetDefaultLetterKeyFI(LetterKey letter)
{
return letter switch
{
LetterKey.VK_A => new[] { "ä", "å" },
LetterKey.VK_E => new[] { "€" },
LetterKey.VK_O => new[] { "ö" },
_ => Array.Empty<string>(),
};
}
// French
private static string[] GetDefaultLetterKeyFR(LetterKey letter)
{

View File

@ -53,6 +53,7 @@
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Gaidhlig" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Dutch" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Estonian" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Finnish" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_French" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_German" />
<ComboBoxItem x:Uid="QuickAccent_SelectedLanguage_Hebrew" />

View File

@ -3333,6 +3333,9 @@ Activate by holding the key for the character you want to add an accent to, then
<data name="QuickAccent_SelectedLanguage_French.Content" xml:space="preserve">
<value>French</value>
</data>
<data name="QuickAccent_SelectedLanguage_Finnish.Content" xml:space="preserve">
<value>Finnish</value>
</data>
<data name="QuickAccent_SelectedLanguage_Estonian.Content" xml:space="preserve">
<value>Estonian</value>
</data>

View File

@ -32,6 +32,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
"GD",
"NL",
"EST",
"FI",
"FR",
"DE",
"HE",