fix nullable annotation (#837)

This commit is contained in:
Jesse Plamondon-Willard 2022-04-14 18:13:27 -04:00
parent 66272cbe46
commit 4de18b516f
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
3 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ namespace StardewModdingAPI.Framework.ModHelpers
} }
/// <inheritdoc /> /// <inheritdoc />
public Translation Get(string key, object tokens) public Translation Get(string key, object? tokens)
{ {
return this.Translator.Get(key, tokens); return this.Translator.Get(key, tokens);
} }

View File

@ -72,7 +72,7 @@ namespace StardewModdingAPI.Framework
/// <summary>Get a translation for the current locale.</summary> /// <summary>Get a translation for the current locale.</summary>
/// <param name="key">The translation key.</param> /// <param name="key">The translation key.</param>
/// <param name="tokens">An object containing token key/value pairs. This can be an anonymous object (like <c>new { value = 42, name = "Cranberries" }</c>), a dictionary, or a class instance.</param> /// <param name="tokens">An object containing token key/value pairs. This can be an anonymous object (like <c>new { value = 42, name = "Cranberries" }</c>), a dictionary, or a class instance.</param>
public Translation Get(string key, object tokens) public Translation Get(string key, object? tokens)
{ {
return this.Get(key).Tokens(tokens); return this.Get(key).Tokens(tokens);
} }

View File

@ -29,7 +29,7 @@ namespace StardewModdingAPI
/// <summary>Get a translation for the current locale.</summary> /// <summary>Get a translation for the current locale.</summary>
/// <param name="key">The translation key.</param> /// <param name="key">The translation key.</param>
/// <param name="tokens">An object containing token key/value pairs. This can be an anonymous object (like <c>new { value = 42, name = "Cranberries" }</c>), a dictionary, or a class instance.</param> /// <param name="tokens">An object containing token key/value pairs. This can be an anonymous object (like <c>new { value = 42, name = "Cranberries" }</c>), a dictionary, or a class instance.</param>
Translation Get(string key, object tokens); Translation Get(string key, object? tokens);
/// <summary>Get a translation in every locale for which it's defined.</summary> /// <summary>Get a translation in every locale for which it's defined.</summary>
/// <param name="key">The translation key.</param> /// <param name="key">The translation key.</param>