-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: set localization based on game or system language on first init (…
…#43)
- Loading branch information
1 parent
434fdfc
commit d1419d7
Showing
5 changed files
with
125 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
Hearthstone Deck Tracker/Utility/ValueMoments/Actions/SetInitialLanguageAction.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using Hearthstone_Deck_Tracker.Utility.ValueMoments.Actions.Action; | ||
using Hearthstone_Deck_Tracker.Utility.ValueMoments.Enums; | ||
using Newtonsoft.Json; | ||
|
||
namespace Hearthstone_Deck_Tracker.Utility.ValueMoments.Actions | ||
{ | ||
public class SetInitialLanguageAction : VMAction | ||
{ | ||
public SetInitialLanguageAction(string languageSource, string language, string systemLanguage, string gameLanguage) | ||
: base(Franchise.HSConstructed, null, null) | ||
{ | ||
Language = language; | ||
LanguageSource = languageSource; | ||
SystemLanguage = systemLanguage; | ||
GameLanguage = gameLanguage; | ||
} | ||
|
||
[JsonProperty("name")] | ||
public override string Name => "Set Initial Language"; | ||
|
||
[JsonProperty("action_source")] | ||
public override ActionSource Source { get; } | ||
|
||
[JsonProperty("action_type")] | ||
public override string Type => "Set Initial Language"; | ||
|
||
[JsonProperty("language")] | ||
public string Language { get; } | ||
|
||
[JsonProperty("language_source")] | ||
public string LanguageSource { get; } | ||
|
||
[JsonProperty("system_language")] | ||
public string SystemLanguage { get; } | ||
|
||
[JsonProperty("game_language")] | ||
public string GameLanguage { get; } | ||
} | ||
} |