Skip to content

Commit

Permalink
localize enum descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
azeier committed Sep 21, 2016
1 parent bc9bf9c commit 7013af2
Show file tree
Hide file tree
Showing 23 changed files with 493 additions and 109 deletions.
3 changes: 3 additions & 0 deletions Hearthstone Deck Tracker/Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Threading.Tasks;
Expand All @@ -23,6 +24,7 @@
using MahApps.Metro.Controls.Dialogs;
using Hearthstone_Deck_Tracker.Utility.Themes;
using Hearthstone_Deck_Tracker.Utility.Updating;
using WPFLocalizeExtension.Engine;

#endregion

Expand Down Expand Up @@ -55,6 +57,7 @@ public static class Core

public static async void Initialize()
{
LocalizeDictionary.Instance.Culture = CultureInfo.GetCultureInfo("en-US");
_startUpTime = DateTime.UtcNow;
Log.Info($"HDT: {Helper.GetCurrentVersion()}, Operating System: {Helper.GetWindowsVersion()}, .NET Framework: {Helper.GetInstalledDotNetVersion()}");
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
Expand Down
14 changes: 4 additions & 10 deletions Hearthstone Deck Tracker/Enums/ArenaImportingBehaviour.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
#region

using System.ComponentModel;

#endregion

namespace Hearthstone_Deck_Tracker.Enums
{
public enum ArenaImportingBehaviour
{
[Description("Auto import&save")]
[LocDescription("Enum_ArenaImportingBehaviour_AutoImportSave")]
AutoImportSave,

[Description("Auto ask to import")]
[LocDescription("Enum_ArenaImportingBehaviour_AutoAsk")]
AutoAsk,

[Description("Manual")]
[LocDescription("Enum_ArenaImportingBehaviour_Manual")]
Manual
}
}
}
18 changes: 6 additions & 12 deletions Hearthstone Deck Tracker/Enums/ArenaRewardPacks.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
#region

using System.ComponentModel;

#endregion

namespace Hearthstone_Deck_Tracker.Enums
{
public enum ArenaRewardPacks
{
[Description("None")]
[LocDescription("Enum_ArenaRewardPacks_None")]
None,

[Description("Classic")]
[LocDescription("Enum_ArenaRewardPacks_Classic")]
Classic,

[Description("Goblins vs Gnomes")]
[LocDescription("Enum_ArenaRewardPacks_GoblinsVsGnomes")]
GoblinsVsGnomes,

[Description("The Grand Tournament")]
[LocDescription("Enum_ArenaRewardPacks_TheGrandTournament")]
TheGrandTournament,

[Description("Whispers of the Old Gods")]
[LocDescription("Enum_ArenaRewardPacks_WhispersOfTheOldGods")]
WhispersOfTheOldGods
}
}
}
8 changes: 3 additions & 5 deletions Hearthstone Deck Tracker/Enums/ClassColorScheme.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
using System.ComponentModel;

namespace Hearthstone_Deck_Tracker.Enums
{
public enum ClassColorScheme
{
[Description("Classic")]
[LocDescription("Enum_ClassColorScheme_Classic")]
Classic,
[Description("Alternative")]
[LocDescription("Enum_ClassColorScheme_Alternative")]
HearthStats
}
}
}
10 changes: 4 additions & 6 deletions Hearthstone Deck Tracker/Enums/DeckLayout.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
using System.ComponentModel;

namespace Hearthstone_Deck_Tracker.Enums
{
public enum DeckLayout
{
[Description("Default")]
[LocDescription("Enum_DeckLayout_Layout1")]
Layout1,
[Description("Alternative")]
[LocDescription("Enum_DeckLayout_Layout2")]
Layout2,
[Description("Legacy")]
[LocDescription("Enum_DeckLayout_Legacy")]
Legacy
}
}
}
8 changes: 6 additions & 2 deletions Hearthstone Deck Tracker/Enums/DeckType.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
namespace Hearthstone_Deck_Tracker.Enums
namespace Hearthstone_Deck_Tracker.Enums
{
public enum DeckType
{
[LocDescription("Enum_DeckType_All")]
All,
[LocDescription("Enum_DeckType_Arena")]
Arena,
[LocDescription("Enum_DeckType_Standard")]
Standard,
[LocDescription("Enum_DeckType_Wild")]
Wild,

//obsolete - to avoid breaking things when loading this from config
Constructed = Wild
}
}
}
7 changes: 5 additions & 2 deletions Hearthstone Deck Tracker/Enums/DisplayMode.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
namespace Hearthstone_Deck_Tracker.Enums
namespace Hearthstone_Deck_Tracker.Enums
{
public enum DisplayMode
{
[LocDescription("Enum_DisplayMode_Always")]
Always,
[LocDescription("Enum_DisplayMode_Auto")]
Auto,
[LocDescription("Enum_DisplayMode_Never")]
Never
}
}
}
18 changes: 6 additions & 12 deletions Hearthstone Deck Tracker/Enums/DisplayedStats.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
#region

using System.ComponentModel;

#endregion

namespace Hearthstone_Deck_Tracker.Enums
{
public enum DisplayedStats
{
[Description("All")]
[LocDescription("Enum_DisplayedStats_All")]
All,

[Description("Selected")]
[LocDescription("Enum_DisplayedStats_Selected")]
Selected,

[Description("Latest")]
[LocDescription("Enum_DisplayedStats_Latest")]
Latest,

[Description("Selected Major")]
[LocDescription("Enum_DisplayedStats_SelectedMajor")]
SelectedMajor,

[Description("Latest Major")]
[LocDescription("Enum_DisplayedStats_LatestMajor")]
LatestMajor
}
}
}
5 changes: 4 additions & 1 deletion Hearthstone Deck Tracker/Enums/Format.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ namespace Hearthstone_Deck_Tracker.Enums
{
public enum Format
{
[LocDescription("Enum_Format_All")]
All,
[LocDescription("Enum_Format_Standard")]
Standard,
[LocDescription("Enum_Format_Wild")]
Wild
}
}
}
11 changes: 10 additions & 1 deletion Hearthstone Deck Tracker/Enums/GameMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,23 @@ namespace Hearthstone_Deck_Tracker.Enums
{
public enum GameMode
{
[LocDescription("Enum_GameMode_All")]
All, //for filtering @ deck stats
[LocDescription("Enum_GameMode_Ranked")]
Ranked,
[LocDescription("Enum_GameMode_Casual")]
Casual,
[LocDescription("Enum_GameMode_Arena")]
Arena,
[LocDescription("Enum_GameMode_Brawl")]
Brawl,
[LocDescription("Enum_GameMode_Friendly")]
Friendly,
[LocDescription("Enum_GameMode_Practice")]
Practice,
[LocDescription("Enum_GameMode_Spectator")]
Spectator,
[LocDescription("Enum_GameMode_None")]
None
}
}
}
10 changes: 9 additions & 1 deletion Hearthstone Deck Tracker/Enums/GameResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,25 @@ namespace Hearthstone_Deck_Tracker.Enums
{
public enum GameResult
{
[LocDescription("Enum_GameResult_None")]
None,
[LocDescription("Enum_GameResult_Win")]
Win,
[LocDescription("Enum_GameResult_Loss")]
Loss,
[LocDescription("Enum_GameResult_Draw")]
Draw
}

public enum GameResultAll
{
[LocDescription("Enum_GameResult_All")]
All,
[LocDescription("Enum_GameResult_Win")]
Win,
[LocDescription("Enum_GameResult_Loss")]
Loss,
[LocDescription("Enum_GameResult_Draw")]
Draw
}
}
}
25 changes: 23 additions & 2 deletions Hearthstone Deck Tracker/Enums/HeroClass.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
namespace Hearthstone_Deck_Tracker.Enums
namespace Hearthstone_Deck_Tracker.Enums
{
public enum HeroClass
{
[LocDescription("Enum_HeroClass_Druid")]
Druid,
[LocDescription("Enum_HeroClass_Hunter")]
Hunter,
[LocDescription("Enum_HeroClass_Mage")]
Mage,
[LocDescription("Enum_HeroClass_Paladin")]
Paladin,
[LocDescription("Enum_HeroClass_Priest")]
Priest,
[LocDescription("Enum_HeroClass_Rogue")]
Rogue,
[LocDescription("Enum_HeroClass_Shaman")]
Shaman,
[LocDescription("Enum_HeroClass_Warlock")]
Warlock,
[LocDescription("Enum_HeroClass_Warrior")]
Warrior
}

public enum HeroClassAll
{
[LocDescription("Enum_HeroClass_All")]
All,
Druid,
Hunter,
Expand All @@ -25,20 +35,31 @@ public enum HeroClassAll
Shaman,
Warlock,
Warrior,
[LocDescription("Enum_HeroClass_Archived")]
Archived
}

public enum HeroClassStatsFilter
{
[LocDescription("Enum_HeroClass_All")]
All,
[LocDescription("Enum_HeroClass_Druid")]
Druid,
[LocDescription("Enum_HeroClass_Hunter")]
Hunter,
[LocDescription("Enum_HeroClass_Mage")]
Mage,
[LocDescription("Enum_HeroClass_Paladin")]
Paladin,
[LocDescription("Enum_HeroClass_Priest")]
Priest,
[LocDescription("Enum_HeroClass_Rogue")]
Rogue,
[LocDescription("Enum_HeroClass_Shaman")]
Shaman,
[LocDescription("Enum_HeroClass_Warlock")]
Warlock,
[LocDescription("Enum_HeroClass_Warrior")]
Warrior
}
}
}
7 changes: 5 additions & 2 deletions Hearthstone Deck Tracker/Enums/IconStyle.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
namespace Hearthstone_Deck_Tracker.Enums
namespace Hearthstone_Deck_Tracker.Enums
{
public enum IconStyle
{
[LocDescription("Enum_IconStyle_Round")]
Round,
[LocDescription("Enum_IconStyle_Square")]
Square,
[LocDescription("Enum_IconStyle_HearthStats")]
HearthStats
}
}
}
7 changes: 1 addition & 6 deletions Hearthstone Deck Tracker/Enums/LastPlayedDateFormat.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;

namespace Hearthstone_Deck_Tracker.Enums
{
Expand Down
8 changes: 3 additions & 5 deletions Hearthstone Deck Tracker/Enums/MetroTheme.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
using System.ComponentModel;

namespace Hearthstone_Deck_Tracker.Enums
{
public enum MetroTheme
{
[Description("Light")]
[LocDescription("Enum_MetroTheme_BaseLight")]
BaseLight,
[Description("Dark")]
[LocDescription("Enum_MetroTheme_BaseDark")]
BaseDark
}
}
}
Loading

0 comments on commit 7013af2

Please sign in to comment.