Skip to content

Commit

Permalink
fix: Custom translations do not work (#30383)
Browse files Browse the repository at this point in the history
Co-authored-by: Yash Rajpal <58601732+yash-rajpal@users.noreply.github.com>
  • Loading branch information
matheusbsilva137 and yash-rajpal committed Sep 21, 2023
1 parent b46b7ee commit ec60dbe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/cuddly-donkeys-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Fixed custom translations not being displayed
5 changes: 5 additions & 0 deletions apps/meteor/client/providers/TranslationProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ const useI18next = (lng: string): typeof i18next => {

if (prefix) {
result[key.slice(prefix.length + 1)] = value;
continue;
}

if (Array.isArray(namespaces) ? namespaces.includes('core') : namespaces === 'core') {
result[key] = value;
}
}
}
Expand Down

0 comments on commit ec60dbe

Please sign in to comment.