Add strings for classes (#4683)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2024-02-16 23:52:13 +06:00 committed by GitHub
parent d4a5007e79
commit 7562a5e5cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 22 additions and 5 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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<IntegrationType>
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

View File

@ -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[]

View File

@ -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)

View File

@ -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

View File

@ -23,6 +23,7 @@
"Pinned": "Pinned",
"Reacted": "Reacted",
"Reactions": "Reactions",
"Reaction": "Reaction",
"Removed": "removed",
"Replies": "Replies",
"RepliesCount": "{replies, plural, =1 {# reply} other {# replies}}",

View File

@ -23,6 +23,7 @@
"Pinned": "Закрепленные",
"Reacted": "Отреагировал(а)",
"Reactions": "Реакции",
"Reaction": "Реакция",
"Removed": "Удалил(а)",
"Replies": "Ответы",
"RepliesCount": "{replies, plural, one {# ответ} few {# ответа} other {# ответов}}",

View File

@ -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,