Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PowerAccent] Add ḱ to PowerAccent for Proto-Indo-European #36408

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/spell-check/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ imageresizerinput
imageresizersettings
imagingdevices
ime
Indo
inetcpl
Infobar
INFOEXAMPLE
Expand Down
13 changes: 13 additions & 0 deletions src/modules/poweraccent/PowerAccent.Core/Languages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public enum Language
NL,
NO,
PI,
PIE,
PL,
PT,
RO,
Expand Down Expand Up @@ -100,6 +101,7 @@ public static string[] GetDefaultLetterKey(LetterKey letter, Language[] langs)
Language.NL => GetDefaultLetterKeyNL(letter), // Dutch
Language.NO => GetDefaultLetterKeyNO(letter), // Norwegian
Language.PI => GetDefaultLetterKeyPI(letter), // Pinyin
Language.PIE => GetDefaultLetterKeyPIE(letter), // Proto-Indo-European
Fixed Show fixed Hide fixed
Language.PL => GetDefaultLetterKeyPL(letter), // Polish
Language.PT => GetDefaultLetterKeyPT(letter), // Portuguese
Language.RO => GetDefaultLetterKeyRO(letter), // Romanian
Expand Down Expand Up @@ -156,6 +158,7 @@ private static string[] GetDefaultLetterKeyALL(LetterKey letter)
.Union(GetDefaultLetterKeyNO(letter))
.Union(GetDefaultLetterKeyPI(letter))
.Union(GetDefaultLetterKeyPL(letter))
.Union(GetDefaultLetterKeyPIE(letter))
.Union(GetDefaultLetterKeyPT(letter))
.Union(GetDefaultLetterKeyRO(letter))
.Union(GetDefaultLetterKeySK(letter))
Expand Down Expand Up @@ -463,6 +466,16 @@ private static string[] GetDefaultLetterKeyPI(LetterKey letter)
};
}

// Proto-Indo-European
Fixed Show fixed Hide fixed
private static string[] GetDefaultLetterKeyPIE(LetterKey letter)
{
return letter switch
{
LetterKey.VK_K => new[] { "ḱ" },

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to add more?
I don't know where are others come from, while from this wiki:
https://en.wikipedia.org/wiki/Proto-Indo-European_language#CITEREFFortson2010
Looks like (I don't know how to systematically extract) there is more than just this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the commit history of PowerAccent, my understanding is that it's more like an "on-demand" approach rather than “pull in everything”. For example, #33550.
This change targets to the bug fix of #35471 with clear requirements so I'd recommend we control the blast radius here. Please let me know your thoughts :)

Actually, I'm using this PR to walk myself through the contributing process to see if there's any potential issues for our team.

_ => Array.Empty<string>(),
};
}

// Turkish
private static string[] GetDefaultLetterKeyTK(LetterKey letter)
{
Expand Down
3 changes: 3 additions & 0 deletions src/settings-ui/Settings.UI/Strings/en-us/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Fixed Show fixed Hide fixed
<value>Proto Indo European</value>
Fixed Show fixed Hide fixed
</data>
<data name="QuickAccent_SelectedLanguage_Polish" xml:space="preserve">
<value>Polish</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public class PowerAccentViewModel : Observable
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),
Fixed Show fixed Hide fixed
new PowerAccentLanguageModel("PL", "QuickAccent_SelectedLanguage_Polish", LanguageGroup),
new PowerAccentLanguageModel("PT", "QuickAccent_SelectedLanguage_Portuguese", LanguageGroup),
new PowerAccentLanguageModel("RO", "QuickAccent_SelectedLanguage_Romanian", LanguageGroup),
Expand Down
Loading