mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-07 00:09:34 +00:00
UBERF-7067: Make chat group labels translations reactive (#5688)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
parent
4c7c9e2951
commit
fd25c6961d
@ -17,7 +17,7 @@
|
|||||||
import notification, { DocNotifyContext } from '@hcengineering/notification'
|
import notification, { DocNotifyContext } from '@hcengineering/notification'
|
||||||
import { createQuery, getClient, LiveQuery } from '@hcengineering/presentation'
|
import { createQuery, getClient, LiveQuery } from '@hcengineering/presentation'
|
||||||
import activity from '@hcengineering/activity'
|
import activity from '@hcengineering/activity'
|
||||||
import { translate } from '@hcengineering/platform'
|
import { IntlString } from '@hcengineering/platform'
|
||||||
import { Action } from '@hcengineering/ui'
|
import { Action } from '@hcengineering/ui'
|
||||||
import { InboxNotificationsClientImpl } from '@hcengineering/notification-resources'
|
import { InboxNotificationsClientImpl } from '@hcengineering/notification-resources'
|
||||||
|
|
||||||
@ -32,7 +32,7 @@
|
|||||||
interface Section {
|
interface Section {
|
||||||
id: string
|
id: string
|
||||||
_class?: Ref<Class<Doc>>
|
_class?: Ref<Class<Doc>>
|
||||||
label: string
|
label: IntlString
|
||||||
objects: Doc[]
|
objects: Doc[]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,7 +124,7 @@
|
|||||||
result.push({
|
result.push({
|
||||||
id: model.id,
|
id: model.id,
|
||||||
objects: Array.from(objectsByClass.values()).flat(),
|
objects: Array.from(objectsByClass.values()).flat(),
|
||||||
label: await translate(model.label ?? chunter.string.Channels, {})
|
label: model.label ?? chunter.string.Channels
|
||||||
})
|
})
|
||||||
|
|
||||||
return result
|
return result
|
||||||
@ -153,7 +153,7 @@
|
|||||||
id: _class,
|
id: _class,
|
||||||
_class,
|
_class,
|
||||||
objects: sectionObjects,
|
objects: sectionObjects,
|
||||||
label: await translate(clazz.pluralLabel ?? clazz.label, {})
|
label: clazz.pluralLabel ?? clazz.label
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,7 +164,7 @@
|
|||||||
id: object._id,
|
id: object._id,
|
||||||
_class: object._class,
|
_class: object._class,
|
||||||
objects: [object],
|
objects: [object],
|
||||||
label: await translate(clazz.pluralLabel ?? clazz.label, {})
|
label: clazz.pluralLabel ?? clazz.label
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
import ui, { Action, AnySvelteComponent, IconSize, ModernButton, NavGroup } from '@hcengineering/ui'
|
import ui, { Action, AnySvelteComponent, IconSize, ModernButton, NavGroup } from '@hcengineering/ui'
|
||||||
import { getDocTitle } from '@hcengineering/view-resources'
|
import { getDocTitle } from '@hcengineering/view-resources'
|
||||||
import contact from '@hcengineering/contact'
|
import contact from '@hcengineering/contact'
|
||||||
import { getResource, translate } from '@hcengineering/platform'
|
import { getResource, IntlString, translate } from '@hcengineering/platform'
|
||||||
import view from '@hcengineering/view'
|
import view from '@hcengineering/view'
|
||||||
import { personAccountByIdStore, statusByUserStore } from '@hcengineering/contact-resources'
|
import { personAccountByIdStore, statusByUserStore } from '@hcengineering/contact-resources'
|
||||||
|
|
||||||
@ -30,7 +30,7 @@
|
|||||||
import { navigatorStateStore, toggleSections } from '../utils'
|
import { navigatorStateStore, toggleSections } from '../utils'
|
||||||
|
|
||||||
export let id: string
|
export let id: string
|
||||||
export let header: string
|
export let header: IntlString
|
||||||
export let objects: Doc[]
|
export let objects: Doc[]
|
||||||
export let contexts: DocNotifyContext[]
|
export let contexts: DocNotifyContext[]
|
||||||
export let actions: Action[] = []
|
export let actions: Action[] = []
|
||||||
@ -141,7 +141,7 @@
|
|||||||
|
|
||||||
{#if visibleItems.length > 0 && contexts.length > 0}
|
{#if visibleItems.length > 0 && contexts.length > 0}
|
||||||
<NavGroup
|
<NavGroup
|
||||||
title={header}
|
label={header}
|
||||||
categoryName={id}
|
categoryName={id}
|
||||||
{actions}
|
{actions}
|
||||||
isOpen={!isCollapsed}
|
isOpen={!isCollapsed}
|
||||||
|
Loading…
Reference in New Issue
Block a user