regression: `t` using always sprintf (#29396)

pull/29392/head^2
Guilherme Gazzo 3 years ago committed by GitHub
parent 26db142b10
commit c7a619bce2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      apps/meteor/app/utils/lib/i18n.ts

@ -9,9 +9,10 @@ export const addSprinfToI18n = function (t: (typeof i18n)['t']): typeof t & {
(key: string, ...replaces: any): string;
} {
return function (key: string, ...replaces: any): string {
if (isObject(replaces[0])) {
if (replaces[0] === undefined || isObject(replaces[0])) {
return t(key, ...replaces);
}
return t(key, {
postProcess: 'sprintf',
sprintf: replaces,

Loading…
Cancel
Save