Skip to content
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
38 changes: 38 additions & 0 deletions src/modules/poweraccent/PowerAccent.Core/Languages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
GD,
DE,
EL,
GRC,

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

GRC is not a recognized word
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

ISO 639-3 defines GRC as the name for greek polytonic among others

EST,
EPO,
FI,
Expand Down Expand Up @@ -86,6 +87,7 @@
Language.GD => GetDefaultLetterKeyGD(letter), // Gàidhlig (Scottish Gaelic)
Language.DE => GetDefaultLetterKeyDE(letter), // German
Language.EL => GetDefaultLetterKeyEL(letter), // Greek
Language.GRC => GetDefaultLetterKeyGRC(letter), // Greek Polytonic

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

GRC is not a recognized word

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

GRC is not a recognized word
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

ISO 639-3 defines GRC as the name for greek polytonic among others

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

ISO 639-3 defines GRC as the name for greek polytonic among others

Language.EST => GetDefaultLetterKeyEST(letter), // Estonian
Language.EPO => GetDefaultLetterKeyEPO(letter), // Esperanto
Language.FI => GetDefaultLetterKeyFI(letter), // Finnish
Expand Down Expand Up @@ -143,6 +145,7 @@
.Union(GetDefaultLetterKeyGD(letter))
.Union(GetDefaultLetterKeyDE(letter))
.Union(GetDefaultLetterKeyEL(letter))
.Union(GetDefaultLetterKeyGRC(letter))

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

GRC is not a recognized word
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

ISO 639-3 defines GRC as the name for greek polytonic among others

.Union(GetDefaultLetterKeyEST(letter))
.Union(GetDefaultLetterKeyEPO(letter))
.Union(GetDefaultLetterKeyFI(letter))
Expand Down Expand Up @@ -710,6 +713,41 @@
};
}

// Greek Polytonic
private static string[] GetDefaultLetterKeyGRC(LetterKey letter)

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

GRC is not a recognized word
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

ISO 639-3 defines GRC as the name for greek polytonic among others

{
return letter switch
{
LetterKey.VK_A => new string[] { "α", "ἀ", "ἁ", "ὰ", "ά", "ᾶ", "ᾱ", "ᾰ", "ἂ", "ἃ", "ἄ", "ἅ", "ἆ", "ἇ", "ᾳ", "ᾀ", "ᾁ", "ᾴ", "ᾲ", "ᾷ", "ᾄ", "ᾅ", "ᾂ", "ᾃ", "ᾆ", "ᾇ" },
LetterKey.VK_B => new string[] { "β" },
LetterKey.VK_C => new string[] { "χ" },
LetterKey.VK_D => new string[] { "δ" },
LetterKey.VK_E => new string[] { "ε", "ἐ", "ἑ", "ὲ", "έ", "ἒ", "ἓ", "ἔ", "ἕ" },
LetterKey.VK_F => new string[] { "φ", "ϝ" },
LetterKey.VK_G => new string[] { "γ" },
LetterKey.VK_H => new string[] { "η", "ἠ", "ἡ", "ὴ", "ή", "ῆ", "ἢ", "ἣ", "ἤ", "ἥ", "ἦ", "ἧ", "ῃ", "ᾐ", "ᾑ", "ῄ", "ῂ", "ῇ", "ᾔ", "ᾕ", "ᾒ", "ᾓ", "ᾖ", "ᾗ" },
LetterKey.VK_I => new string[] { "ι", "ἰ", "ἱ", "ὶ", "ί", "ῖ", "ῑ", "ῐ", "ἲ", "ἳ", "ἴ", "ἵ", "ἶ", "ἷ", "ϊ", "ΐ", "ῒ", "ῗ" },
LetterKey.VK_K => new string[] { "κ" },
LetterKey.VK_L => new string[] { "λ" },
LetterKey.VK_M => new string[] { "μ" },
LetterKey.VK_N => new string[] { "ν" },
LetterKey.VK_O => new string[] { "ο", "ὀ", "ὁ", "ὸ", "ό", "ὂ", "ὃ", "ὄ", "ὅ" },
LetterKey.VK_P => new string[] { "π", "φ", "ψ" },
LetterKey.VK_Q => new string[] { "ϟ" },
LetterKey.VK_R => new string[] { "ρ", "ῤ", "ῥ" },
LetterKey.VK_S => new string[] { "σ", "ς", "ϛ", "ϲ", "ϡ" },
LetterKey.VK_T => new string[] { "τ", "θ", "ϑ" },
LetterKey.VK_U => new string[] { "υ", "ὐ", "ὑ", "ὺ", "ύ", "ῦ", "ῡ", "ῠ", "ὒ", "ὓ", "ὔ", "ὕ", "ὖ", "ὗ", "ϋ", "ΰ", "ῢ", "ῧ" },
LetterKey.VK_W => new string[] { "ω", "ὠ", "ὡ", "ὼ", "ώ", "ῶ", "ὢ", "ὣ", "ὤ", "ὥ", "ὦ", "ὧ", "ῳ", "ᾠ", "ᾡ", "ῴ", "ῲ", "ῷ", "ᾤ", "ᾥ", "ᾢ", "ᾣ", "ᾦ", "ᾧ" },
LetterKey.VK_X => new string[] { "ξ" },
LetterKey.VK_Y => new string[] { "υ", "ὐ", "ὑ", "ὺ", "ύ", "ῦ", "ῡ", "ῠ", "ὒ", "ὓ", "ὔ", "ὕ", "ὖ", "ὗ", "ϋ", "ΰ", "ῢ", "ῧ" },
LetterKey.VK_Z => new string[] { "ζ" },
LetterKey.VK_COMMA => new[] { "“", "”", "‘", "’", ";", "`", "´" },
LetterKey.VK_PERIOD => new string[] { "·" },
_ => Array.Empty<string>(),
};
}

// Hebrew
private static string[] GetDefaultLetterKeyHE(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 @@ -3565,6 +3565,9 @@ Activate by holding the key for the character you want to add an accent to, then
<data name="QuickAccent_SelectedLanguage_Greek" xml:space="preserve">
<value>Greek</value>
</data>
<data name="QuickAccent_SelectedLanguage_Greek_Polytonic" xml:space="preserve">
<value>Greek Polytonic</value>
</data>
<data name="QuickAccent_SelectedLanguage_Hebrew" xml:space="preserve">
<value>Hebrew</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public partial class PowerAccentViewModel : Observable
new PowerAccentLanguageModel("GD", "QuickAccent_SelectedLanguage_Gaidhlig", LanguageGroup),
new PowerAccentLanguageModel("NL", "QuickAccent_SelectedLanguage_Dutch", LanguageGroup),
new PowerAccentLanguageModel("EL", "QuickAccent_SelectedLanguage_Greek", LanguageGroup),
new PowerAccentLanguageModel("GRC", "QuickAccent_SelectedLanguage_Greek_Polytonic", LanguageGroup),
new PowerAccentLanguageModel("EST", "QuickAccent_SelectedLanguage_Estonian", LanguageGroup),
new PowerAccentLanguageModel("EPO", "QuickAccent_SelectedLanguage_Esperanto", LanguageGroup),
new PowerAccentLanguageModel("FI", "QuickAccent_SelectedLanguage_Finnish", LanguageGroup),
Expand Down
Loading