From 4de18b516fb12c3f842e72560b4d41aae7b7eff9 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 14 Apr 2022 18:13:27 -0400 Subject: fix nullable annotation (#837) --- src/SMAPI/Framework/ModHelpers/TranslationHelper.cs | 2 +- src/SMAPI/Framework/Translator.cs | 2 +- src/SMAPI/ITranslationHelper.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/SMAPI/Framework/ModHelpers/TranslationHelper.cs b/src/SMAPI/Framework/ModHelpers/TranslationHelper.cs index d00ff279..684837ff 100644 --- a/src/SMAPI/Framework/ModHelpers/TranslationHelper.cs +++ b/src/SMAPI/Framework/ModHelpers/TranslationHelper.cs @@ -50,7 +50,7 @@ namespace StardewModdingAPI.Framework.ModHelpers } /// - public Translation Get(string key, object tokens) + public Translation Get(string key, object? tokens) { return this.Translator.Get(key, tokens); } diff --git a/src/SMAPI/Framework/Translator.cs b/src/SMAPI/Framework/Translator.cs index 794e3cde..b230a727 100644 --- a/src/SMAPI/Framework/Translator.cs +++ b/src/SMAPI/Framework/Translator.cs @@ -72,7 +72,7 @@ namespace StardewModdingAPI.Framework /// Get a translation for the current locale. /// The translation key. /// An object containing token key/value pairs. This can be an anonymous object (like new { value = 42, name = "Cranberries" }), a dictionary, or a class instance. - public Translation Get(string key, object tokens) + public Translation Get(string key, object? tokens) { return this.Get(key).Tokens(tokens); } diff --git a/src/SMAPI/ITranslationHelper.cs b/src/SMAPI/ITranslationHelper.cs index 32199910..8be8d2c1 100644 --- a/src/SMAPI/ITranslationHelper.cs +++ b/src/SMAPI/ITranslationHelper.cs @@ -29,7 +29,7 @@ namespace StardewModdingAPI /// Get a translation for the current locale. /// The translation key. /// An object containing token key/value pairs. This can be an anonymous object (like new { value = 42, name = "Cranberries" }), a dictionary, or a class instance. - Translation Get(string key, object tokens); + Translation Get(string key, object? tokens); /// Get a translation in every locale for which it's defined. /// The translation key. -- cgit