From 5af58c7b18a120ce47f230ede7f116678d97e038 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 28 May 2017 01:49:21 -0400 Subject: refactor translation init for reuse (#296) --- src/StardewModdingAPI/Framework/ModHelper.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/StardewModdingAPI/Framework/ModHelper.cs') 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 /// Manages console commands. /// The content manager which loads content assets. /// Simplifies access to private game code. - /// Provides translations stored in the mod folder. /// An argument is null or empty. /// The path does not exist on disk. - 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()); } /**** -- cgit