Skip to content

Commit

Permalink
fix(fuselage-ui-kit): Use default translation namespace for -core apps
Browse files Browse the repository at this point in the history
  • Loading branch information
tassoevan committed Apr 1, 2024
1 parent d1fd9da commit 93bfeaf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/early-buttons-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@rocket.chat/fuselage-ui-kit': patch
---

Removed the assumption of translation namespace for core apps

Core apps differ from regular apps by the ID suffix `-core`. Before this change, it'd be assumed that any app might have a translation namespace available, named `app-<app ID>`. This is simple not true for core apps, as they use default namespaces (e.g. `core`) only. The absence of a core app translation namespace would cause UIKit blocks to be suspended ("blink") while a request to server for translations on the expected namespace is going on.
2 changes: 1 addition & 1 deletion packages/fuselage-ui-kit/src/hooks/useAppTranslation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useAppId } from '../contexts/AppIdContext';

export const useAppTranslation = () => {
const appId = useAppId();
const appNs = `app-${appId}`;
const appNs = appId.endsWith(`-core`) ? undefined : `app-${appId}`;

useDebugValue(appNs);

Expand Down

0 comments on commit 93bfeaf

Please sign in to comment.