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.