Skip to content

Commit

Permalink
fix(i18n): use custom values when translating props
Browse files Browse the repository at this point in the history
  • Loading branch information
m0ksem committed May 24, 2024
1 parent fd9f342 commit 77cf84c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/ui/src/composables/useTranslation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export const useTranslation = () => {
warn(`${key} not found in VuesticUI i18n config`)
return key
}

return (applyI18nTemplate(translated, values) || key)
}

Expand All @@ -58,7 +59,7 @@ export const useTranslation = () => {
if (!key) { return '' }

if (isTranslationKey(key)) {
return t(key.slice(3))
return t(key.slice(3), values)
}

return (applyI18nTemplate(key, values) || key)
Expand Down

0 comments on commit 77cf84c

Please sign in to comment.