diff --git a/.changeset/perfect-onions-develop.md b/.changeset/perfect-onions-develop.md new file mode 100644 index 000000000000..3ca5c3e00bb7 --- /dev/null +++ b/.changeset/perfect-onions-develop.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fix i18n translations using sprintf post processor diff --git a/apps/meteor/app/utils/lib/i18n.ts b/apps/meteor/app/utils/lib/i18n.ts index 13d5c667709d..7fa491d965e8 100644 --- a/apps/meteor/app/utils/lib/i18n.ts +++ b/apps/meteor/app/utils/lib/i18n.ts @@ -7,7 +7,7 @@ export const i18n = i18next.use(sprintf); export const addSprinfToI18n = function (t: (typeof i18n)['t']) { return function (key: string, ...replaces: any): string { - if (replaces[0] === undefined || isObject(replaces[0])) { + if (replaces[0] === undefined || (isObject(replaces[0]) && !Array.isArray(replaces[0]))) { return t(key, ...replaces); }