1
0
Fork 0

fix(shared): Correctly instantiate plugin-i18n in export handler

The translation method was passed incorrectly, causing exported patterns
to be untranslated.

Closes #5426
This commit is contained in:
joostdecock 2023-11-07 20:46:32 +01:00
parent 0d359ace84
commit ff9d292b25

View file

@ -35,7 +35,7 @@ const themedPattern = (Design, settings, overwrite, format, t) => {
// add the theme and translation to the pattern
pattern.use(themePlugin, { stripped: format !== 'svg', skipGrid: ['pages'] })
pattern.use(pluginI18n, { t })
pattern.use(pluginI18n, (key) => t(key))
return pattern
}