From 7562a5e5cf78208d72a7717e8c9474233bcfb55d Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Fri, 16 Feb 2024 23:52:13 +0600 Subject: [PATCH] Add strings for classes (#4683) Signed-off-by: Denis Bykhov --- models/activity/src/index.ts | 4 +++- models/chunter/src/index.ts | 2 ++ models/gmail/src/index.ts | 4 +++- models/hr/src/index.ts | 1 + models/setting/src/index.ts | 4 +++- models/telegram/src/index.ts | 5 ++++- models/templates/src/index.ts | 1 + models/view/src/index.ts | 3 ++- plugins/activity-assets/lang/en.json | 1 + plugins/activity-assets/lang/ru.json | 1 + plugins/activity/src/index.ts | 1 + 11 files changed, 22 insertions(+), 5 deletions(-) diff --git a/models/activity/src/index.ts b/models/activity/src/index.ts index 7e1296b4f9..a99855115f 100644 --- a/models/activity/src/index.ts +++ b/models/activity/src/index.ts @@ -59,7 +59,8 @@ import { TypeBoolean, TypeIntlString, ArrOf, - TypeTimestamp + TypeTimestamp, + UX } from '@hcengineering/model' import { TAttachedDoc, TClass, TDoc } from '@hcengineering/model-core' import type { Asset, IntlString, Resource } from '@hcengineering/platform' @@ -211,6 +212,7 @@ export class TActivityMessagesFilter extends TDoc implements ActivityMessagesFil } @Model(activity.class.Reaction, core.class.AttachedDoc, DOMAIN_ACTIVITY) +@UX(activity.string.Reactions) export class TReaction extends TAttachedDoc implements Reaction { @Prop(TypeRef(activity.class.ActivityMessage), core.string.AttachedTo) @Index(IndexKind.Indexed) diff --git a/models/chunter/src/index.ts b/models/chunter/src/index.ts index cdb4a3d5c7..c3c4085758 100644 --- a/models/chunter/src/index.ts +++ b/models/chunter/src/index.ts @@ -165,6 +165,7 @@ export class TDirectMessageInput extends TClass implements DirectMessageInput { } @Model(chunter.class.ChatMessage, activity.class.ActivityMessage) +@UX(chunter.string.Message) export class TChatMessage extends TActivityMessage implements ChatMessage { @Prop(TypeMarkup(), chunter.string.Message) @Index(IndexKind.FullText) @@ -180,6 +181,7 @@ export class TChatMessage extends TActivityMessage implements ChatMessage { } @Model(chunter.class.ThreadMessage, chunter.class.ChatMessage) +@UX(chunter.string.ThreadMessage) export class TThreadMessage extends TChatMessage implements ThreadMessage { @Prop(TypeRef(activity.class.ActivityMessage), core.string.AttachedTo) @Index(IndexKind.Indexed) diff --git a/models/gmail/src/index.ts b/models/gmail/src/index.ts index b8c650beb3..0fe1358ecb 100644 --- a/models/gmail/src/index.ts +++ b/models/gmail/src/index.ts @@ -26,7 +26,8 @@ import { Prop, TypeBoolean, TypeString, - TypeTimestamp + TypeTimestamp, + UX } from '@hcengineering/model' import attachment from '@hcengineering/model-attachment' import contact from '@hcengineering/model-contact' @@ -92,6 +93,7 @@ export class TMessage extends TAttachedDoc implements Message { } @Model(gmail.class.NewMessage, core.class.Doc, DOMAIN_GMAIL) +@UX(gmail.string.NewMessage) export class TNewMessage extends TDoc implements NewMessage { @Prop(TypeString(), gmail.string.ReplyTo) @Index(IndexKind.FullText) diff --git a/models/hr/src/index.ts b/models/hr/src/index.ts index ddd4ce7a4f..a0068f7a9d 100644 --- a/models/hr/src/index.ts +++ b/models/hr/src/index.ts @@ -176,6 +176,7 @@ export class TRequest extends TAttachedDoc implements Request { } @Model(hr.class.PublicHoliday, core.class.Doc, DOMAIN_HR) +@UX(hr.string.PublicHoliday) export class TPublicHoliday extends TDoc implements PublicHoliday { title!: string description!: string diff --git a/models/setting/src/index.ts b/models/setting/src/index.ts index 2e0506c488..25a624a0a4 100644 --- a/models/setting/src/index.ts +++ b/models/setting/src/index.ts @@ -16,7 +16,7 @@ import activity from '@hcengineering/activity' import contact from '@hcengineering/contact' import { DOMAIN_MODEL, type Account, type Domain, type Ref } from '@hcengineering/core' -import { Mixin, Model, type Builder } from '@hcengineering/model' +import { Mixin, Model, type Builder, UX } from '@hcengineering/model' import core, { TClass, TConfiguration, TDoc } from '@hcengineering/model-core' import view, { createAction } from '@hcengineering/model-view' import notification from '@hcengineering/notification' @@ -44,6 +44,7 @@ export { default } from './plugin' export const DOMAIN_SETTING = 'setting' as Domain @Model(setting.class.Integration, core.class.Doc, DOMAIN_SETTING) +@UX(setting.string.Integrations) export class TIntegration extends TDoc implements Integration { type!: Ref disabled!: boolean @@ -90,6 +91,7 @@ export class TEditable extends TClass implements Editable { export class TUserMixin extends TClass implements UserMixin {} @Model(setting.class.InviteSettings, core.class.Configuration, DOMAIN_SETTING) +@UX(setting.string.InviteSettings) export class TInviteSettings extends TConfiguration implements InviteSettings { expirationTime!: number emailMask!: string diff --git a/models/telegram/src/index.ts b/models/telegram/src/index.ts index 2325d029e0..291c0613ff 100644 --- a/models/telegram/src/index.ts +++ b/models/telegram/src/index.ts @@ -26,7 +26,8 @@ import { Prop, TypeBoolean, TypeString, - TypeTimestamp + TypeTimestamp, + UX } from '@hcengineering/model' import attachment from '@hcengineering/model-attachment' import contact from '@hcengineering/model-contact' @@ -73,6 +74,7 @@ export class TTelegramMessage extends TAttachedDoc implements TelegramMessage { } @Model(telegram.class.NewMessage, core.class.AttachedDoc, DOMAIN_TELEGRAM) +@UX(telegram.string.NewMessage) export class TNewTelegramMessage extends TAttachedDoc implements NewTelegramMessage { @Prop(TypeString(), telegram.string.Content) @Index(IndexKind.FullText) @@ -86,6 +88,7 @@ export class TNewTelegramMessage extends TAttachedDoc implements NewTelegramMess } @Model(telegram.class.SharedMessages, core.class.AttachedDoc, DOMAIN_TELEGRAM) +@UX(telegram.string.SharedMessages) export class TSharedTelegramMessages extends TAttachedDoc implements SharedTelegramMessages { @Prop(ArrOf(TypeSharedMessage()), telegram.string.Messages) messages!: SharedTelegramMessage[] diff --git a/models/templates/src/index.ts b/models/templates/src/index.ts index 1be6884db7..4a1d96c87b 100644 --- a/models/templates/src/index.ts +++ b/models/templates/src/index.ts @@ -37,6 +37,7 @@ export { templatesOperation } from './migration' export const DOMAIN_TEMPLATES = 'templates' as Domain @Model(templates.class.MessageTemplate, core.class.Doc, DOMAIN_TEMPLATES) +@UX(templates.string.Template) export class TMessageTemplate extends TDoc implements MessageTemplate { @Prop(TypeString(), templates.string.Title) @Index(IndexKind.FullText) diff --git a/models/view/src/index.ts b/models/view/src/index.ts index f1e73d5d71..ec3faacd93 100644 --- a/models/view/src/index.ts +++ b/models/view/src/index.ts @@ -25,7 +25,7 @@ import { type Ref, type Space } from '@hcengineering/core' -import { type Builder, Mixin, Model } from '@hcengineering/model' +import { type Builder, Mixin, Model, UX } from '@hcengineering/model' import core, { TClass, TDoc } from '@hcengineering/model-core' import preference, { TPreference } from '@hcengineering/model-preference' import presentation from '@hcengineering/model-presentation' @@ -131,6 +131,7 @@ export function classPresenter ( } @Model(view.class.FilteredView, core.class.Doc, DOMAIN_VIEW) +@UX(view.string.FilteredViews) export class TFilteredView extends TDoc implements FilteredView { name!: string location!: Location diff --git a/plugins/activity-assets/lang/en.json b/plugins/activity-assets/lang/en.json index 99914be73e..9ae5b17841 100644 --- a/plugins/activity-assets/lang/en.json +++ b/plugins/activity-assets/lang/en.json @@ -23,6 +23,7 @@ "Pinned": "Pinned", "Reacted": "Reacted", "Reactions": "Reactions", + "Reaction": "Reaction", "Removed": "removed", "Replies": "Replies", "RepliesCount": "{replies, plural, =1 {# reply} other {# replies}}", diff --git a/plugins/activity-assets/lang/ru.json b/plugins/activity-assets/lang/ru.json index 33609e7d04..27eacbb63a 100644 --- a/plugins/activity-assets/lang/ru.json +++ b/plugins/activity-assets/lang/ru.json @@ -23,6 +23,7 @@ "Pinned": "Закрепленные", "Reacted": "Отреагировал(а)", "Reactions": "Реакции", + "Reaction": "Реакция", "Removed": "Удалил(а)", "Replies": "Ответы", "RepliesCount": "{replies, plural, one {# ответ} few {# ответа} other {# ответов}}", diff --git a/plugins/activity/src/index.ts b/plugins/activity/src/index.ts index 90bf578709..2ef1ad8772 100644 --- a/plugins/activity/src/index.ts +++ b/plugins/activity/src/index.ts @@ -331,6 +331,7 @@ export default plugin(activityId, { Update: '' as IntlString, For: '' as IntlString, AllActivity: '' as IntlString, + Reaction: '' as IntlString, Reactions: '' as IntlString, LastReply: '' as IntlString, RepliesCount: '' as IntlString,