Skip to content

Commit

Permalink
fix: New version banner text translation (#34217)
Browse files Browse the repository at this point in the history
Co-authored-by: Douglas Fabris <[email protected]>
  • Loading branch information
jeanfbrito and dougfabris authored Dec 19, 2024
1 parent 5c423d7 commit 82e667f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/slow-readers-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Fixes an issue where the update banner wasn't showing the new version number
7 changes: 6 additions & 1 deletion apps/meteor/client/views/banners/hooks/useUserBanners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ export const useUserBanners = () => {
banners.open({
id: firstBanner.id,
title: i18n.exists(firstBanner.title) ? t(firstBanner.title) : firstBanner.title,
text: i18n.exists(firstBanner.text) ? t(firstBanner.text, firstBanner.textArguments) : firstBanner.text,
text: i18n.exists(firstBanner.text)
? t(firstBanner.text, {
postProcess: 'sprintf',
sprintf: firstBanner.textArguments,
})
: firstBanner.text,
modifiers: firstBanner.modifiers,
action() {
if (firstBanner.link) {
Expand Down

0 comments on commit 82e667f

Please sign in to comment.