summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Framework/ModHelper.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-05-28 01:49:21 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-05-28 01:49:21 -0400
commit5af58c7b18a120ce47f230ede7f116678d97e038 (patch)
tree0639add41b5e6b9e234d8e2c17884fd0153c76b9 /src/StardewModdingAPI/Framework/ModHelper.cs
parent12ffd9c334906e2256a1c32976b6a07f75027f25 (diff)
downloadSMAPI-5af58c7b18a120ce47f230ede7f116678d97e038.tar.gz
SMAPI-5af58c7b18a120ce47f230ede7f116678d97e038.tar.bz2
SMAPI-5af58c7b18a120ce47f230ede7f116678d97e038.zip
refactor translation init for reuse (#296)
Diffstat (limited to 'src/StardewModdingAPI/Framework/ModHelper.cs')
-rw-r--r--src/StardewModdingAPI/Framework/ModHelper.cs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/StardewModdingAPI/Framework/ModHelper.cs b/src/StardewModdingAPI/Framework/ModHelper.cs
index 8c578dbe..947b1ae8 100644
--- a/src/StardewModdingAPI/Framework/ModHelper.cs
+++ b/src/StardewModdingAPI/Framework/ModHelper.cs
@@ -47,10 +47,9 @@ namespace StardewModdingAPI.Framework
/// <param name="commandManager">Manages console commands.</param>
/// <param name="contentManager">The content manager which loads content assets.</param>
/// <param name="reflection">Simplifies access to private game code.</param>
- /// <param name="translations">Provides translations stored in the mod folder.</param>
/// <exception cref="ArgumentNullException">An argument is null or empty.</exception>
/// <exception cref="InvalidOperationException">The <paramref name="modDirectory"/> path does not exist on disk.</exception>
- public ModHelper(string displayName, string modDirectory, JsonHelper jsonHelper, IModRegistry modRegistry, CommandManager commandManager, SContentManager contentManager, IReflectionHelper reflection, ITranslationHelper translations)
+ public ModHelper(string displayName, string modDirectory, JsonHelper jsonHelper, IModRegistry modRegistry, CommandManager commandManager, SContentManager contentManager, IReflectionHelper reflection)
{
// validate
if (string.IsNullOrWhiteSpace(modDirectory))
@@ -69,7 +68,7 @@ namespace StardewModdingAPI.Framework
this.ModRegistry = modRegistry;
this.ConsoleCommands = new CommandHelper(displayName, commandManager);
this.Reflection = reflection;
- this.Translation = translations;
+ this.Translation = new TranslationHelper(displayName, contentManager.GetLocale(), contentManager.GetCurrentLanguage());
}
/****