[QuickAccent]Add Proto-Indo-European (#36408)

* Add ḱ to PowerAccent for Proto-Indo-European

* Fix Spelling Check

* Add more letters to PIE

* Order PIE after PI

---------

Co-authored-by: Hao Liu (from Dev Box) <haoliu3@microsoft.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
This commit is contained in:
Hao Liu 2025-01-06 21:38:59 +08:00 коммит произвёл GitHub
Родитель 90e75a19f0
Коммит 6ca02f0d3c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
4 изменённых файлов: 26 добавлений и 0 удалений

1
.github/actions/spell-check/expect.txt поставляемый
Просмотреть файл

@ -645,6 +645,7 @@ imageresizerinput
imageresizersettings
imagingdevices
ime
Indo
inetcpl
Infobar
INFOEXAMPLE

Просмотреть файл

@ -39,6 +39,7 @@ namespace PowerAccent.Core
NL,
NO,
PI,
PIE,
PL,
PT,
RO,
@ -100,6 +101,7 @@ namespace PowerAccent.Core
Language.NL => GetDefaultLetterKeyNL(letter), // Dutch
Language.NO => GetDefaultLetterKeyNO(letter), // Norwegian
Language.PI => GetDefaultLetterKeyPI(letter), // Pinyin
Language.PIE => GetDefaultLetterKeyPIE(letter), // Proto-Indo-European
Language.PL => GetDefaultLetterKeyPL(letter), // Polish
Language.PT => GetDefaultLetterKeyPT(letter), // Portuguese
Language.RO => GetDefaultLetterKeyRO(letter), // Romanian
@ -155,6 +157,7 @@ namespace PowerAccent.Core
.Union(GetDefaultLetterKeyNL(letter))
.Union(GetDefaultLetterKeyNO(letter))
.Union(GetDefaultLetterKeyPI(letter))
.Union(GetDefaultLetterKeyPIE(letter))
.Union(GetDefaultLetterKeyPL(letter))
.Union(GetDefaultLetterKeyPT(letter))
.Union(GetDefaultLetterKeyRO(letter))
@ -463,6 +466,24 @@ namespace PowerAccent.Core
};
}
// Proto-Indo-European
private static string[] GetDefaultLetterKeyPIE(LetterKey letter)
{
return letter switch
{
LetterKey.VK_A => new[] { "ā" },
LetterKey.VK_E => new[] { "ē" },
LetterKey.VK_O => new[] { "ō" },
LetterKey.VK_K => new[] { "ḱ" },
LetterKey.VK_G => new[] { "ǵ" },
LetterKey.VK_R => new[] { "r̥" },
LetterKey.VK_L => new[] { "l̥" },
LetterKey.VK_M => new[] { "m̥" },
LetterKey.VK_N => new[] { "n̥" },
_ => Array.Empty<string>(),
};
}
// Turkish
private static string[] GetDefaultLetterKeyTK(LetterKey letter)
{

Просмотреть файл

@ -3672,6 +3672,9 @@ Activate by holding the key for the character you want to add an accent to, then
<data name="QuickAccent_SelectedLanguage_Pinyin" xml:space="preserve">
<value>Pinyin</value>
</data>
<data name="QuickAccent_SelectedLanguage_Proto_Indo_European" xml:space="preserve">
<value>Proto Indo European</value>
</data>
<data name="QuickAccent_SelectedLanguage_Polish" xml:space="preserve">
<value>Polish</value>
</data>

Просмотреть файл

@ -55,6 +55,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
new PowerAccentLanguageModel("MI", "QuickAccent_SelectedLanguage_Maori", LanguageGroup),
new PowerAccentLanguageModel("NO", "QuickAccent_SelectedLanguage_Norwegian", LanguageGroup),
new PowerAccentLanguageModel("PI", "QuickAccent_SelectedLanguage_Pinyin", LanguageGroup),
new PowerAccentLanguageModel("PIE", "QuickAccent_SelectedLanguage_Proto_Indo_European", LanguageGroup),
new PowerAccentLanguageModel("PL", "QuickAccent_SelectedLanguage_Polish", LanguageGroup),
new PowerAccentLanguageModel("PT", "QuickAccent_SelectedLanguage_Portuguese", LanguageGroup),
new PowerAccentLanguageModel("RO", "QuickAccent_SelectedLanguage_Romanian", LanguageGroup),