From fd25c6961db27cc7e06c83be8fdd47a9f8b620f5 Mon Sep 17 00:00:00 2001 From: Kristina Date: Tue, 28 May 2024 20:51:27 +0400 Subject: [PATCH] UBERF-7067: Make chat group labels translations reactive (#5688) Signed-off-by: Kristina Fefelova --- .../src/components/chat/navigator/ChatNavGroup.svelte | 10 +++++----- .../components/chat/navigator/ChatNavSection.svelte | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/chunter-resources/src/components/chat/navigator/ChatNavGroup.svelte b/plugins/chunter-resources/src/components/chat/navigator/ChatNavGroup.svelte index 98226f4f06..d9637031d2 100644 --- a/plugins/chunter-resources/src/components/chat/navigator/ChatNavGroup.svelte +++ b/plugins/chunter-resources/src/components/chat/navigator/ChatNavGroup.svelte @@ -17,7 +17,7 @@ import notification, { DocNotifyContext } from '@hcengineering/notification' import { createQuery, getClient, LiveQuery } from '@hcengineering/presentation' import activity from '@hcengineering/activity' - import { translate } from '@hcengineering/platform' + import { IntlString } from '@hcengineering/platform' import { Action } from '@hcengineering/ui' import { InboxNotificationsClientImpl } from '@hcengineering/notification-resources' @@ -32,7 +32,7 @@ interface Section { id: string _class?: Ref> - label: string + label: IntlString objects: Doc[] } @@ -124,7 +124,7 @@ result.push({ id: model.id, objects: Array.from(objectsByClass.values()).flat(), - label: await translate(model.label ?? chunter.string.Channels, {}) + label: model.label ?? chunter.string.Channels }) return result @@ -153,7 +153,7 @@ id: _class, _class, objects: sectionObjects, - label: await translate(clazz.pluralLabel ?? clazz.label, {}) + label: clazz.pluralLabel ?? clazz.label }) } @@ -164,7 +164,7 @@ id: object._id, _class: object._class, objects: [object], - label: await translate(clazz.pluralLabel ?? clazz.label, {}) + label: clazz.pluralLabel ?? clazz.label }) } diff --git a/plugins/chunter-resources/src/components/chat/navigator/ChatNavSection.svelte b/plugins/chunter-resources/src/components/chat/navigator/ChatNavSection.svelte index d65fb81870..96c75ea88b 100644 --- a/plugins/chunter-resources/src/components/chat/navigator/ChatNavSection.svelte +++ b/plugins/chunter-resources/src/components/chat/navigator/ChatNavSection.svelte @@ -19,7 +19,7 @@ import ui, { Action, AnySvelteComponent, IconSize, ModernButton, NavGroup } from '@hcengineering/ui' import { getDocTitle } from '@hcengineering/view-resources' import contact from '@hcengineering/contact' - import { getResource, translate } from '@hcengineering/platform' + import { getResource, IntlString, translate } from '@hcengineering/platform' import view from '@hcengineering/view' import { personAccountByIdStore, statusByUserStore } from '@hcengineering/contact-resources' @@ -30,7 +30,7 @@ import { navigatorStateStore, toggleSections } from '../utils' export let id: string - export let header: string + export let header: IntlString export let objects: Doc[] export let contexts: DocNotifyContext[] export let actions: Action[] = [] @@ -141,7 +141,7 @@ {#if visibleItems.length > 0 && contexts.length > 0}