diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-28 10:51:58 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-28 10:51:58 -0400 |
commit | 2958381b54d1f46ae97ae196d3d046fee9264a0e (patch) | |
tree | 087129ea216d597830d9855fd7d4b497c7a43cd2 /src/StardewModdingAPI/Framework | |
parent | 2109229660f1d8bce001c25fc6e83c0450ffc8c1 (diff) | |
download | SMAPI-2958381b54d1f46ae97ae196d3d046fee9264a0e.tar.gz SMAPI-2958381b54d1f46ae97ae196d3d046fee9264a0e.tar.bz2 SMAPI-2958381b54d1f46ae97ae196d3d046fee9264a0e.zip |
shorten translation method name, remove helper method (#296)
Diffstat (limited to 'src/StardewModdingAPI/Framework')
-rw-r--r-- | src/StardewModdingAPI/Framework/ModHelper.cs | 10 | ||||
-rw-r--r-- | src/StardewModdingAPI/Framework/TranslationHelper.cs | 6 |
2 files changed, 1 insertions, 15 deletions
diff --git a/src/StardewModdingAPI/Framework/ModHelper.cs b/src/StardewModdingAPI/Framework/ModHelper.cs index 947b1ae8..5a8ce459 100644 --- a/src/StardewModdingAPI/Framework/ModHelper.cs +++ b/src/StardewModdingAPI/Framework/ModHelper.cs @@ -120,16 +120,6 @@ namespace StardewModdingAPI.Framework /**** - ** Translation - ****/ - /// <summary>Get a translation for the current locale. This is a convenience shortcut for <see cref="IModHelper.Translation"/>.</summary> - /// <param name="key">The translation key.</param> - public Translation Translate(string key) - { - return this.Translation.Translate(key); - } - - /**** ** Disposal ****/ /// <summary>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</summary> diff --git a/src/StardewModdingAPI/Framework/TranslationHelper.cs b/src/StardewModdingAPI/Framework/TranslationHelper.cs index ebcd69b1..e4a178e2 100644 --- a/src/StardewModdingAPI/Framework/TranslationHelper.cs +++ b/src/StardewModdingAPI/Framework/TranslationHelper.cs @@ -29,10 +29,6 @@ namespace StardewModdingAPI.Framework /// <summary>The game's current language code.</summary> public LocalizedContentManager.LanguageCode LocaleEnum { get; private set; } - /// <summary>Get a translation for the current locale. This is a convenience shortcut for <see cref="ITranslationHelper.Translate"/>.</summary> - /// <param name="key">The translation key.</param> - public Translation this[string key] => this.Translate(key); - /********* ** Public methods @@ -58,7 +54,7 @@ namespace StardewModdingAPI.Framework /// <summary>Get a translation for the current locale.</summary> /// <param name="key">The translation key.</param> - public Translation Translate(string key) + public Translation Get(string key) { this.ForLocale.TryGetValue(key, out string text); return new Translation(this.ModName, this.Locale, key, text); |