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

Add ability to override letters/numbers in resource to fix Canadian Zed #33

Open
wants to merge 1 commit into
base: dotnet5
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
3 changes: 3 additions & 0 deletions BabySmash.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
<None Update="Resources\Strings\en-EN.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Resources\Strings\en-CA.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Sounds\babylaugh.wav" />
Expand Down
2 changes: 1 addition & 1 deletion Controller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public void PlaySound(FigureTemplate template)
{
if (template.Letter != null && template.Letter.Length == 1 && Char.IsLetterOrDigit(template.Letter[0]))
{
SpeakString(template.Letter);
SpeakString(GetLocalizedString(template.Letter));
}
else
{
Expand Down
23 changes: 23 additions & 0 deletions Resources/Strings/en-CA.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"Circle": "Circle",
"Oval": "Oval",
"Rectangle": "Rectangle",
"Hexagon": "Hexagon",
"Trapezoid": "Trapezoid",
"Star": "Star",
"Square": "Square",
"Triangle": "Triangle",
"Heart": "Heart",

"Red": "Red",
"Blue": "Blue",
"Yellow": "Yellow",
"Green": "Green",
"Purple": "Purple",
"Pink": "Pink",
"Orange": "Orange",
"Tan": "Tan",
"Gray": "Gray",

"Z": "Zed"
}