Skip to content

Commit

Permalink
feat: finnish added
Browse files Browse the repository at this point in the history
  • Loading branch information
eymenefealtun committed Sep 16, 2023
1 parent 0e38b12 commit 21a8204
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 11 deletions.
1 change: 1 addition & 0 deletions TarotType.Main/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<ComboBoxItem Content="Bulgarian" />
<ComboBoxItem Content="Chinese" />
<ComboBoxItem Content="English" />
<ComboBoxItem Content="Finnish" />
<ComboBoxItem Content="French" />
<ComboBoxItem Content="Georgian" />
<ComboBoxItem Content="Greek" />
Expand Down
1 change: 1 addition & 0 deletions TarotType.Main/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ private void SettingsChanged(string themeCode, string languageName)

Preferences.CurrentTheme = themeCode;
Preferences.LanguageName = languageName;
//SourceManager.CurrentLanguage = SourceManager._languageDictionary.FirstOrDefault(x => x.Value.ToString() == Preferences.LanguageName).Key;
SourceManager.CurrentLanguage = SourceManager._languageDictionary.FirstOrDefault(x => x.Value.ToString() == Preferences.LanguageName).Key;
this.Background = (SolidColorBrush)new BrushConverter().ConvertFrom(Preferences.CurrentTheme);

Expand Down
7 changes: 7 additions & 0 deletions TarotType.Main/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions TarotType.Main/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@
<data name="English" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Words\English\English.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="Finnish" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Words\Finnish\Finnish.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="French" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Words\French\French.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
Expand Down
26 changes: 15 additions & 11 deletions TarotType.Main/Utilities/SourceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
using TarotType.Main.Words.Serbian;
using System.Windows.Media;
using TarotType.Main.Utilities.Words.Swedish;
using TarotType.Main.Utilities.Words.Finnish;

namespace TarotType.Main.Utilities
{
Expand All @@ -38,37 +39,40 @@ public SourceManager()
{ new Arabic(), languages.Arabic},
{ new Armenian(), languages.Armenian},
{ new Azerbaijani(), languages.Azerbaijani},
{ new Bulgarian(), languages.Bulgarian},
{ new Chinese(), languages.Chinese},
{ new English(), languages.English},
{ new Finnish(), languages.Finnish},
{ new French(), languages.French},
{ new Georgian(), languages.Georgian},
{ new Greek(), languages.Greek},
{ new Kurdish(), languages.Kurdish},
{ new Persian(), languages.Persian},
{ new Spanish(), languages.Spanish},
{ new Turkish(), languages.Turkish},
{ new Georgian(), languages.Georgian},
{ new Bulgarian(), languages.Bulgarian},
{ new Chinese(), languages.Chinese},
{ new Serbian(), languages.Serbian},
{ new Spanish(), languages.Spanish},
{ new Swedish(), languages.Swedish},
{ new Turkish(), languages.Turkish},

};

public enum languages
{
Arabic,
Armenian,
Azerbaijani,
Bulgarian,
Chinese,
English,
Finnish,
French,
Georgian,
Greek,
Kurdish,
Persian,
Spanish,
Turkish,
Georgian,
Bulgarian,
Chinese,
Serbian,
Swedish
Spanish,
Swedish,
Turkish
}

public enum flowDirections
Expand Down
17 changes: 17 additions & 0 deletions TarotType.Main/Words/Finnish/Finnish.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace TarotType.Main.Utilities.Words.Finnish
{
public class Finnish : Language
{
string _path = @"Words\Finnish\Finnish.txt";
SourceManager.flowDirections _flowDirection = SourceManager.flowDirections.left;
public override SourceManager.flowDirections FlowDirection()
{
return _flowDirection;
}

public override string Path()
{
return _path;
}
}
}
1 change: 1 addition & 0 deletions TarotType.Main/Words/Finnish/Finnish.txt

Large diffs are not rendered by default.

0 comments on commit 21a8204

Please sign in to comment.