Fix instances of double translation and guard translation calls using typescript (#11443)

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
Michael Telatynski
2023-08-22 16:32:05 +01:00
committed by GitHub
co-authored by Richard van der Hoff
parent d13b6e1b41
commit ac70f7ac9b
157 changed files with 554 additions and 780 deletions
+4 -2
View File
@@ -15,6 +15,8 @@
limitations under the License.
*/
import { TranslationKey } from "../languageHandler";
export type Effect<TOptions extends { [key: string]: any }> = {
/**
* one or more emojis that will trigger this effect
@@ -29,9 +31,9 @@ export type Effect<TOptions extends { [key: string]: any }> = {
*/
command: string;
/**
* a function that returns the translated description of the effect
* a function that returns the translatable description of the effect
*/
description: () => string;
description: () => TranslationKey;
/**
* a function that returns the translated fallback message. this message will be shown if the user did not provide a custom message
*/