Skip to content

Commit

Permalink
Add Netherlands
Browse files Browse the repository at this point in the history
  • Loading branch information
Damien LEROY committed Oct 5, 2022
1 parent c08e536 commit 0d5da12
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
26 changes: 26 additions & 0 deletions PowerAccent.Core/Languages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public enum Language
IS,
IT,
MI,
NL,
PI,
PL,
RO,
Expand All @@ -35,6 +36,7 @@ public static char[] GetDefaultLetterKey(LetterKey letter, Language lang)
case Language.IS: return GetDefaultLetterKeyIS(letter); // Iceland
case Language.IT: return GetDefaultLetterKeyIT(letter); // Italian
case Language.MI: return GetDefaultLetterKeyMI(letter); // Maori
case Language.NL: return GetDefaultLetterKeyNL(letter); // Netherlands

This comment has been minimized.

Copy link
@Jay-o-Way

Jay-o-Way Oct 5, 2022

Contributor

In my opinion this is not needed. As I said, in Dutch* we don't use much accents and most of them are acessible with the keyboard.
* "Netherlands is the name of the country

This comment has been minimized.

Copy link
@damienleroy

damienleroy Oct 5, 2022

Owner

It is annoying, I didn't get your messages before -_-.
So about you said I will need to check twice. I can remove them in another release if needed.

case Language.PI: return GetDefaultLetterKeyPI(letter); // Pinyin
case Language.PL: return GetDefaultLetterKeyPL(letter); // Polish
case Language.RO: return GetDefaultLetterKeyRO(letter); // Romanian
Expand Down Expand Up @@ -277,6 +279,30 @@ private static char[] GetDefaultLetterKeyMI(LetterKey letter)
return Array.Empty<char>();
}

// Netherlands
private static char[] GetDefaultLetterKeyNL(LetterKey letter)
{
switch (letter)
{
case LetterKey.A:
return new char[] { 'á', 'à', 'ä' };
case LetterKey.C:
return new char[] { 'ç' };
case LetterKey.E:
return new char[] { 'é', 'è', 'ë', 'ê', '€' };
case LetterKey.I:
return new char[] { 'í', 'ï', 'î' };
case LetterKey.N:
return new char[] { 'ñ' };
case LetterKey.O:
return new char[] { 'ó', 'ö', 'ô' };
case LetterKey.U:
return new char[] { 'ú', 'ü', 'û' };
}

return Array.Empty<char>();
}

// Pinyin
private static char[] GetDefaultLetterKeyPI(LetterKey letter)
{
Expand Down
2 changes: 2 additions & 0 deletions PowerAccent.UI/PowerAccent.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<None Remove="Resources\Flags\HU.jpg" />
<None Remove="Resources\Flags\IS.jpg" />
<None Remove="Resources\Flags\IT.jpg" />
<None Remove="Resources\Flags\NL.jpg" />
<None Remove="Resources\Flags\RO.jpg" />
<None Remove="Resources\Flags\SW.jpg" />
<None Remove="Resources\win11desktop.jpg" />
Expand All @@ -37,6 +38,7 @@
<Resource Include="Resources\Flags\HU.jpg" />
<Resource Include="Resources\Flags\IS.jpg" />
<Resource Include="Resources\Flags\IT.jpg" />
<Resource Include="Resources\Flags\NL.jpg" />
<Resource Include="Resources\Flags\RO.jpg" />
<Resource Include="Resources\Flags\SW.jpg" />
<Resource Include="Resources\win11desktop.jpg" />
Expand Down
Binary file added PowerAccent.UI/Resources/Flags/NL.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0d5da12

Please sign in to comment.