From 3e4188dac3bdb314e68ba084258ee70b96a01dfe Mon Sep 17 00:00:00 2001 From: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com> Date: Wed, 23 Feb 2022 22:10:11 +0600 Subject: [PATCH] i18n russian (#1049) Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com> --- models/attachment/src/index.ts | 24 +++---- models/attachment/src/plugin.ts | 9 ++- models/chunter/src/index.ts | 11 ++- models/chunter/src/plugin.ts | 7 +- models/contact/src/index.ts | 26 +++---- models/contact/src/plugin.ts | 11 ++- models/core/src/component.ts | 8 ++- models/core/src/core.ts | 14 ++-- models/core/src/index.ts | 8 +-- models/core/src/security.ts | 9 ++- models/gmail/src/index.ts | 41 ++++++----- models/gmail/src/plugin.ts | 9 ++- models/inventory/src/index.ts | 9 ++- models/lead/src/creation.ts | 4 +- models/lead/src/index.ts | 32 ++++----- models/lead/src/plugin.ts | 6 +- models/notification/src/index.ts | 2 +- models/recruit/src/creation.ts | 4 +- models/recruit/src/index.ts | 48 ++++++------- models/recruit/src/plugin.ts | 8 ++- models/task/src/creation.ts | 4 +- models/task/src/index.ts | 23 +++--- models/task/src/plugin.ts | 4 +- models/telegram/src/index.ts | 17 +++-- models/telegram/src/plugin.ts | 8 ++- models/templates/src/index.ts | 5 +- models/templates/src/plugin.ts | 6 +- models/view/src/index.ts | 6 +- models/view/src/plugin.ts | 8 ++- models/workbench/src/index.ts | 2 +- models/workbench/src/plugin.ts | 3 +- packages/core/lang/en.json | 15 ++++ packages/core/lang/ru.json | 15 ++++ packages/core/src/component.ts | 11 ++- packages/core/src/index.ts | 25 ++++--- packages/platform/src/i18n.ts | 12 ++-- packages/platform/src/index.ts | 6 +- packages/platform/src/lang/ru.json | 12 ++++ packages/platform/src/platform.ts | 5 ++ packages/presentation/lang/ru.json | 13 ++++ packages/text-editor/lang/en.json | 4 +- packages/text-editor/lang/ru.json | 8 +++ .../src/components/StyledTextBox.svelte | 6 +- packages/text-editor/src/plugin.ts | 4 +- packages/theme/package.json | 3 +- packages/theme/src/Theme.svelte | 6 +- packages/ui/lang/en.json | 5 +- packages/ui/lang/ru.json | 18 +++++ .../ui/src/components/DropdownLabels.svelte | 6 +- .../components/internal/LangSelector.svelte | 6 +- packages/ui/src/plugin.ts | 5 +- plugins/activity-assets/lang/en.json | 8 ++- plugins/activity-assets/lang/ru.json | 14 ++++ .../src/components/Activity.svelte | 6 +- .../src/components/TxView.svelte | 16 +++-- plugins/activity-resources/src/plugin.ts | 7 +- plugins/activity/src/index.ts | 4 +- plugins/attachment-assets/lang/en.json | 9 ++- plugins/attachment-assets/lang/ru.json | 16 +++++ .../src/components/Attachments.svelte | 7 +- plugins/chunter-assets/lang/en.json | 9 ++- plugins/chunter-assets/lang/ru.json | 25 +++++++ .../activity/TxBacklinkReference.svelte | 22 +++++- plugins/chunter-resources/src/plugin.ts | 3 +- plugins/contact-assets/lang/en.json | 14 +++- plugins/contact-assets/lang/ru.json | 49 +++++++++++++ .../src/components/ChannelsPopup.svelte | 4 +- .../src/components/ChannelsView.svelte | 2 +- .../src/components/CreatePerson.svelte | 1 + .../src/components/EditOrganization.svelte | 4 +- .../src/components/EditPerson.svelte | 4 +- .../src/components/SocialEditor.svelte | 4 +- plugins/contact-resources/src/plugin.ts | 4 +- plugins/gmail-assets/lang/en.json | 8 ++- plugins/gmail-assets/lang/ru.json | 32 +++++++++ plugins/inventory-assets/lang/ru.json | 23 ++++++ plugins/lead-assets/lang/en.json | 7 +- plugins/lead-assets/lang/ru.json | 24 +++++++ .../src/components/CreateLead.svelte | 2 +- .../src/components/EditLead.svelte | 2 +- plugins/lead-resources/src/plugin.ts | 3 +- plugins/login-assets/lang/ru.json | 30 ++++++++ plugins/notification-assets/lang/ru.json | 11 +++ plugins/recruit-assets/lang/en.json | 25 +++++-- plugins/recruit-assets/lang/ru.json | 58 +++++++++++++++ .../src/components/ApplicationItem.svelte | 6 +- .../components/ApplicationPresenter.svelte | 4 +- .../src/components/Applications.svelte | 2 +- .../src/components/AvatarEditor.svelte | 9 ++- .../src/components/CreateCandidate.svelte | 10 +-- .../src/components/CreateVacancy.svelte | 2 +- .../src/components/EditVacancy.svelte | 2 +- .../src/components/YesNo.svelte | 7 +- plugins/recruit-resources/src/plugin.ts | 13 +++- plugins/setting-assets/lang/en.json | 1 - plugins/setting-assets/lang/ru.json | 27 +++++++ .../src/components/Password.svelte | 5 +- .../src/components/statuses/Folders.svelte | 4 +- .../src/components/statuses/Templates.svelte | 8 +-- plugins/setting/src/index.ts | 1 - plugins/tags-assets/lang/en.json | 2 - plugins/tags-assets/lang/ru.json | 34 +++++++++ .../src/components/TagsView.svelte | 2 +- plugins/tags-resources/src/plugin.ts | 1 - plugins/task-assets/lang/en.json | 5 +- plugins/task-assets/lang/ru.json | 70 +++++++++++++++++++ .../src/components/TaskItem.svelte | 6 +- .../src/components/TaskPresenter.svelte | 4 +- .../kanban/KanbanTemplateSelector.svelte | 4 +- .../src/components/state/EditStatuses.svelte | 4 +- plugins/task-resources/src/plugin.ts | 3 +- plugins/task/src/index.ts | 8 ++- plugins/telegram-assets/lang/en.json | 8 ++- plugins/telegram-assets/lang/ru.json | 25 +++++++ plugins/templates-assets/lang/en.json | 4 +- plugins/templates-assets/lang/ru.json | 16 +++++ plugins/view-assets/lang/en.json | 4 +- plugins/view-assets/lang/ru.json | 15 ++++ plugins/workbench-assets/lang/en.json | 7 +- plugins/workbench-assets/lang/ru.json | 14 ++++ .../src/components/SpaceHeader.svelte | 11 ++- .../components/navigator/SpacePanel.svelte | 6 +- .../src/components/navigator/SpacesNav.svelte | 4 +- plugins/workbench-resources/src/plugin.ts | 6 +- tests/sanity-ws/tx.json | 2 +- 125 files changed, 1055 insertions(+), 329 deletions(-) create mode 100644 packages/core/lang/en.json create mode 100644 packages/core/lang/ru.json create mode 100644 packages/platform/src/lang/ru.json create mode 100644 packages/presentation/lang/ru.json create mode 100644 packages/text-editor/lang/ru.json create mode 100644 packages/ui/lang/ru.json create mode 100644 plugins/activity-assets/lang/ru.json create mode 100644 plugins/attachment-assets/lang/ru.json create mode 100644 plugins/chunter-assets/lang/ru.json create mode 100644 plugins/contact-assets/lang/ru.json create mode 100644 plugins/gmail-assets/lang/ru.json create mode 100644 plugins/inventory-assets/lang/ru.json create mode 100644 plugins/lead-assets/lang/ru.json create mode 100644 plugins/login-assets/lang/ru.json create mode 100644 plugins/notification-assets/lang/ru.json create mode 100644 plugins/recruit-assets/lang/ru.json create mode 100644 plugins/setting-assets/lang/ru.json create mode 100644 plugins/tags-assets/lang/ru.json create mode 100644 plugins/task-assets/lang/ru.json create mode 100644 plugins/telegram-assets/lang/ru.json create mode 100644 plugins/templates-assets/lang/ru.json create mode 100644 plugins/view-assets/lang/ru.json create mode 100644 plugins/workbench-assets/lang/ru.json diff --git a/models/attachment/src/index.ts b/models/attachment/src/index.ts index 6bfc153afc..f121e3ca1a 100644 --- a/models/attachment/src/index.ts +++ b/models/attachment/src/index.ts @@ -13,13 +13,11 @@ // limitations under the License. // -import type { IntlString } from '@anticrm/platform' -import { Builder, Model, Prop, UX, TypeString, TypeTimestamp, Index } from '@anticrm/model' -import { Domain, IndexKind } from '@anticrm/core' -import core, { TAttachedDoc } from '@anticrm/model-core' -import type { Attachment, Photo } from '@anticrm/attachment' import activity from '@anticrm/activity' - +import type { Attachment, Photo } from '@anticrm/attachment' +import { Domain, IndexKind } from '@anticrm/core' +import { Builder, Index, Model, Prop, TypeString, TypeTimestamp, UX } from '@anticrm/model' +import core, { TAttachedDoc } from '@anticrm/model-core' import view from '@anticrm/model-view' import attachment from './plugin' @@ -28,28 +26,28 @@ export { attachmentOperation } from './migration' export const DOMAIN_ATTACHMENT = 'attachment' as Domain @Model(attachment.class.Attachment, core.class.AttachedDoc, DOMAIN_ATTACHMENT) -@UX('File' as IntlString) +@UX(attachment.string.File) export class TAttachment extends TAttachedDoc implements Attachment { - @Prop(TypeString(), 'Name' as IntlString) + @Prop(TypeString(), attachment.string.Name) @Index(IndexKind.FullText) name!: string - @Prop(TypeString(), 'File' as IntlString) + @Prop(TypeString(), attachment.string.File) file!: string - @Prop(TypeString(), 'Size' as IntlString) + @Prop(TypeString(), attachment.string.Size) size!: number - @Prop(TypeString(), 'Type' as IntlString) + @Prop(TypeString(), attachment.string.Type) @Index(IndexKind.FullText) type!: string - @Prop(TypeTimestamp(), 'Date' as IntlString) + @Prop(TypeTimestamp(), attachment.string.Date) lastModified!: number } @Model(attachment.class.Photo, attachment.class.Attachment) -@UX('Photo' as IntlString) +@UX(attachment.string.Photo) export class TPhoto extends TAttachment implements Photo {} export function createModel (builder: Builder): void { diff --git a/models/attachment/src/plugin.ts b/models/attachment/src/plugin.ts index cf8a325ca0..78df1a6b7f 100644 --- a/models/attachment/src/plugin.ts +++ b/models/attachment/src/plugin.ts @@ -27,7 +27,14 @@ export default mergeIds(attachmentId, attachment, { AttachmentPresenter: '' as AnyComponent }, string: { - AddAttachment: '' as IntlString + AddAttachment: '' as IntlString, + Files: '' as IntlString, + File: '' as IntlString, + Name: '' as IntlString, + Size: '' as IntlString, + Type: '' as IntlString, + Photo: '' as IntlString, + Date: '' as IntlString }, ids: { TxAttachmentCreate: '' as Ref diff --git a/models/chunter/src/index.ts b/models/chunter/src/index.ts index 4e536a4a2a..88db467d51 100644 --- a/models/chunter/src/index.ts +++ b/models/chunter/src/index.ts @@ -21,7 +21,6 @@ import { Builder, Index, Model, Prop, TypeMarkup, UX } from '@anticrm/model' import core, { TAttachedDoc, TDoc, TSpace } from '@anticrm/model-core' import view from '@anticrm/model-view' import workbench from '@anticrm/model-workbench' -import type { IntlString } from '@anticrm/platform' import { ObjectDDParticipant } from '@anticrm/view' import chunter from './plugin' @@ -34,21 +33,21 @@ export class TChannel extends TSpace implements Channel {} @Model(chunter.class.Message, core.class.Doc, DOMAIN_CHUNTER) export class TMessage extends TDoc implements Message { - @Prop(TypeMarkup(), 'Content' as IntlString) + @Prop(TypeMarkup(), chunter.string.Content) @Index(IndexKind.FullText) content!: string } @Model(chunter.class.Comment, core.class.AttachedDoc, DOMAIN_COMMENT) -@UX('Comment' as IntlString) +@UX(chunter.string.Comment) export class TComment extends TAttachedDoc implements Comment { - @Prop(TypeMarkup(), 'Message' as IntlString) + @Prop(TypeMarkup(), chunter.string.Message) @Index(IndexKind.FullText) message!: string } @Model(chunter.class.Backlink, chunter.class.Comment) -@UX('Reference' as IntlString, chunter.icon.Chunter) +@UX(chunter.string.Reference, chunter.icon.Chunter) export class TBacklink extends TComment implements Backlink { backlinkId!: Ref backlinkClass!: Ref> @@ -67,7 +66,7 @@ export function createModel (builder: Builder): void { }) builder.createDoc(view.class.ViewletDescriptor, core.space.Model, { - label: 'Chat' as IntlString, + label: chunter.string.Chat, icon: view.icon.Table, component: chunter.component.ChannelView }, chunter.viewlet.Chat) diff --git a/models/chunter/src/plugin.ts b/models/chunter/src/plugin.ts index af02b28c25..2ef38bf7c9 100644 --- a/models/chunter/src/plugin.ts +++ b/models/chunter/src/plugin.ts @@ -31,7 +31,12 @@ export default mergeIds(chunterId, chunter, { string: { ApplicationLabelChunter: '' as IntlString, LeftComment: '' as IntlString, - MentionedIn: '' as IntlString + MentionedIn: '' as IntlString, + Content: '' as IntlString, + Comment: '' as IntlString, + Message: '' as IntlString, + Reference: '' as IntlString, + Chat: '' as IntlString }, viewlet: { Chat: '' as Ref diff --git a/models/contact/src/index.ts b/models/contact/src/index.ts index 16f81e1eec..e4000afcdd 100644 --- a/models/contact/src/index.ts +++ b/models/contact/src/index.ts @@ -44,7 +44,7 @@ export class TChannelProvider extends TDoc implements ChannelProvider { @Model(contact.class.Contact, core.class.Doc, DOMAIN_CONTACT) @UX(contact.string.Contact, contact.icon.Person, undefined, 'name') export class TContact extends TDoc implements Contact { - @Prop(TypeString(), 'Name' as IntlString) + @Prop(TypeString(), contact.string.Name) @Index(IndexKind.FullText) name!: string @@ -146,9 +146,9 @@ export function createModel (builder: Builder): void { config: [ '', 'city', - { presenter: attachment.component.AttachmentsPresenter, label: 'Files', sortingKey: 'attachments' }, + { presenter: attachment.component.AttachmentsPresenter, label: attachment.string.Files, sortingKey: 'attachments' }, 'modifiedOn', - { presenter: view.component.RolePresenter, label: 'Role' }, + { presenter: view.component.RolePresenter, label: view.string.Role }, '$lookup.channels' ] }) @@ -173,9 +173,9 @@ export function createModel (builder: Builder): void { contact.class.ChannelProvider, core.space.Model, { - label: 'Phone' as IntlString, + label: contact.string.Phone, icon: contact.icon.Phone, - placeholder: '+1 555 333 7777' as IntlString + placeholder: contact.string.PhonePlaceholder }, contact.channelProvider.Phone ) @@ -184,9 +184,9 @@ export function createModel (builder: Builder): void { contact.class.ChannelProvider, core.space.Model, { - label: 'LinkedIn' as IntlString, + label: contact.string.LinkedIn, icon: contact.icon.LinkedIn, - placeholder: 'https://linkedin.com/in/jappleseed' as IntlString + placeholder: contact.string.LinkedInPlaceholder }, contact.channelProvider.LinkedIn ) @@ -195,9 +195,9 @@ export function createModel (builder: Builder): void { contact.class.ChannelProvider, core.space.Model, { - label: 'Twitter' as IntlString, + label: contact.string.Twitter, icon: contact.icon.Twitter, - placeholder: '@appleseed' as IntlString + placeholder: contact.string.AtPlaceHolder }, contact.channelProvider.Twitter ) @@ -206,9 +206,9 @@ export function createModel (builder: Builder): void { contact.class.ChannelProvider, core.space.Model, { - label: 'GitHub' as IntlString, + label: contact.string.GitHub, icon: contact.icon.GitHub, - placeholder: '@appleseed' as IntlString + placeholder: contact.string.AtPlaceHolder }, contact.channelProvider.GitHub ) @@ -217,9 +217,9 @@ export function createModel (builder: Builder): void { contact.class.ChannelProvider, core.space.Model, { - label: 'Facebook' as IntlString, + label: contact.string.Facebook, icon: contact.icon.Facebook, - placeholder: 'https://fb.com/jappleseed' as IntlString + placeholder: contact.string.FacebookPlaceholder }, contact.channelProvider.Facebook ) diff --git a/models/contact/src/plugin.ts b/models/contact/src/plugin.ts index 85f57ccace..21ab4a373a 100644 --- a/models/contact/src/plugin.ts +++ b/models/contact/src/plugin.ts @@ -48,7 +48,16 @@ export default mergeIds(contactId, contact, { Person: '' as IntlString, Organization: '' as IntlString, Employee: '' as IntlString, - Value: '' as IntlString + Value: '' as IntlString, + Phone: '' as IntlString, + PhonePlaceholder: '' as IntlString, + LinkedIn: '' as IntlString, + LinkedInPlaceholder: '' as IntlString, + AtPlaceHolder: '' as IntlString, + FacebookPlaceholder: '' as IntlString, + Twitter: '' as IntlString, + GitHub: '' as IntlString, + Facebook: '' as IntlString }, completion: { PersonQuery: '' as Resource, diff --git a/models/core/src/component.ts b/models/core/src/component.ts index 3cfa5b7a3d..b83cffc614 100644 --- a/models/core/src/component.ts +++ b/models/core/src/component.ts @@ -15,10 +15,16 @@ import type { Class, Ref, Type } from '@anticrm/core' import core, { coreId } from '@anticrm/core' -import { mergeIds } from '@anticrm/platform' +import { IntlString, mergeIds } from '@anticrm/platform' export default mergeIds(coreId, core, { class: { Type: '' as Ref>> + }, + string: { + Name: '' as IntlString, + Description: '' as IntlString, + Private: '' as IntlString, + Archived: '' as IntlString } }) diff --git a/models/core/src/core.ts b/models/core/src/core.ts index a08c6a50ab..5b66ce0b2e 100644 --- a/models/core/src/core.ts +++ b/models/core/src/core.ts @@ -31,35 +31,35 @@ import core from './component' // C O R E @Model(core.class.Obj, core.class.Obj) export class TObj implements Obj { - @Prop(TypeRef(core.class.Class), 'Class' as IntlString) + @Prop(TypeRef(core.class.Class), core.string.Class) @Index(IndexKind.Indexed) _class!: Ref> } @Model(core.class.Doc, core.class.Obj) export class TDoc extends TObj implements Doc { - @Prop(TypeRef(core.class.Doc), 'Id' as IntlString) + @Prop(TypeRef(core.class.Doc), core.string.Id) // @Index(IndexKind.Indexed) // - automatically indexed by default. _id!: Ref - @Prop(TypeRef(core.class.Space), 'Space' as IntlString) + @Prop(TypeRef(core.class.Space), core.string.Space) @Index(IndexKind.Indexed) space!: Ref - @Prop(TypeTimestamp(), 'Modified' as IntlString) + @Prop(TypeTimestamp(), core.string.Modified) modifiedOn!: Timestamp - @Prop(TypeRef(core.class.Account), 'Modified By' as IntlString) + @Prop(TypeRef(core.class.Account), core.string.ModifiedBy) modifiedBy!: Ref } @Model(core.class.AttachedDoc, core.class.Doc) export class TAttachedDoc extends TDoc implements AttachedDoc { - @Prop(TypeRef(core.class.Doc), 'Attached to' as IntlString) + @Prop(TypeRef(core.class.Doc), core.string.AttachedTo) @Index(IndexKind.Indexed) attachedTo!: Ref - @Prop(TypeRef(core.class.Class), 'Attached to class' as IntlString) + @Prop(TypeRef(core.class.Class), core.string.AttachedToClass) @Index(IndexKind.Indexed) attachedToClass!: Ref> diff --git a/models/core/src/index.ts b/models/core/src/index.ts index 56e08aef8f..d5861549e2 100644 --- a/models/core/src/index.ts +++ b/models/core/src/index.ts @@ -28,12 +28,8 @@ import { TRefTo, TType, TTypeBoolean, - TTypeDate, - TTypeString, - TTypeMarkup, - TTypeTimestamp, - TVersion, - TTypeNumber + TTypeDate, TTypeMarkup, TTypeNumber, TTypeString, TTypeTimestamp, + TVersion } from './core' import { TAccount, TSpace } from './security' import { diff --git a/models/core/src/security.ts b/models/core/src/security.ts index 733f08e8ca..32b10b6141 100644 --- a/models/core/src/security.ts +++ b/models/core/src/security.ts @@ -15,7 +15,6 @@ import { Account, Arr, DOMAIN_MODEL, IndexKind, Ref, Space } from '@anticrm/core' import { Index, Model, Prop, TypeBoolean, TypeString } from '@anticrm/model' -import type { IntlString } from '@anticrm/platform' import core from './component' import { TDoc } from './core' @@ -23,18 +22,18 @@ import { TDoc } from './core' @Model(core.class.Space, core.class.Doc, DOMAIN_MODEL) export class TSpace extends TDoc implements Space { - @Prop(TypeString(), 'Name' as IntlString) + @Prop(TypeString(), core.string.Name) @Index(IndexKind.FullText) name!: string - @Prop(TypeString(), 'Description' as IntlString) + @Prop(TypeString(), core.string.Description) @Index(IndexKind.FullText) description!: string - @Prop(TypeBoolean(), 'Private' as IntlString) + @Prop(TypeBoolean(), core.string.Private) private!: boolean - @Prop(TypeBoolean(), 'Archived' as IntlString) + @Prop(TypeBoolean(), core.string.Archived) archived!: boolean members!: Arr> diff --git a/models/gmail/src/index.ts b/models/gmail/src/index.ts index e148ceaa6c..5c8e6393b1 100644 --- a/models/gmail/src/index.ts +++ b/models/gmail/src/index.ts @@ -14,20 +14,19 @@ // limitations under the License. // -import type { IntlString } from '@anticrm/platform' -import { Builder, Model, TypeString, Prop, ArrOf, TypeBoolean, Index } from '@anticrm/model' -import core, { TAttachedDoc } from '@anticrm/model-core' -import contact from '@anticrm/model-contact' -import gmail from './plugin' -import type { Message, SharedMessage, SharedMessages } from '@anticrm/gmail' -import { Domain, IndexKind, Type } from '@anticrm/core' -import setting from '@anticrm/setting' import activity from '@anticrm/activity' +import { Domain, IndexKind, Type } from '@anticrm/core' +import type { Message, SharedMessage, SharedMessages } from '@anticrm/gmail' +import { ArrOf, Builder, Index, Model, Prop, TypeBoolean, TypeString } from '@anticrm/model' +import contact from '@anticrm/model-contact' +import core, { TAttachedDoc } from '@anticrm/model-core' +import setting from '@anticrm/setting' +import gmail from './plugin' export const DOMAIN_GMAIL = 'gmail' as Domain function TypeSharedMessage (): Type { - return { _class: gmail.class.SharedMessage, label: 'Shared message' as IntlString } + return { _class: gmail.class.SharedMessage, label: gmail.string.SharedMessage } } @Model(gmail.class.Message, core.class.AttachedDoc, DOMAIN_GMAIL) @@ -35,44 +34,44 @@ export class TMessage extends TAttachedDoc implements Message { @Prop(TypeString(), gmail.string.MessageID) messageId!: string - @Prop(TypeString(), 'ReplyTo' as IntlString) + @Prop(TypeString(), gmail.string.ReplyTo) @Index(IndexKind.FullText) replyTo?: string - @Prop(TypeString(), 'From' as IntlString) + @Prop(TypeString(), gmail.string.From) @Index(IndexKind.FullText) from!: string - @Prop(TypeString(), 'To' as IntlString) + @Prop(TypeString(), gmail.string.To) @Index(IndexKind.FullText) to!: string - @Prop(TypeString(), 'Contact' as IntlString) + @Prop(TypeString(), contact.string.Contact) @Index(IndexKind.FullText) contact!: string - @Prop(TypeString(), 'Subject' as IntlString) + @Prop(TypeString(), gmail.string.Subject) @Index(IndexKind.FullText) subject!: string - @Prop(TypeString(), 'Message' as IntlString) + @Prop(TypeString(), gmail.string.Message) @Index(IndexKind.FullText) content!: string - @Prop(TypeString(), 'Message' as IntlString) + @Prop(TypeString(), gmail.string.Message) @Index(IndexKind.FullText) textContent!: string - @Prop(ArrOf(TypeString()), 'Copy' as IntlString) + @Prop(ArrOf(TypeString()), gmail.string.Copy) copy?: string[] - @Prop(TypeBoolean(), 'Incoming' as IntlString) + @Prop(TypeBoolean(), gmail.string.Incoming) incoming!: boolean } @Model(gmail.class.SharedMessages, core.class.AttachedDoc, DOMAIN_GMAIL) export class TSharedMessages extends TAttachedDoc implements SharedMessages { - @Prop(ArrOf(TypeSharedMessage()), 'Messages' as IntlString) + @Prop(ArrOf(TypeSharedMessage()), gmail.string.Messages) messages!: SharedMessage[] } @@ -83,9 +82,9 @@ export function createModel (builder: Builder): void { contact.class.ChannelProvider, core.space.Model, { - label: 'Email' as IntlString, + label: gmail.string.Email, icon: contact.icon.Email, - placeholder: 'john.appleseed@apple.com' as IntlString, + placeholder: gmail.string.EmailPlaceholder, presenter: gmail.component.Main, integrationType: gmail.integrationType.Gmail }, diff --git a/models/gmail/src/plugin.ts b/models/gmail/src/plugin.ts index a3e70e197b..b0f3969a0c 100644 --- a/models/gmail/src/plugin.ts +++ b/models/gmail/src/plugin.ts @@ -26,7 +26,14 @@ export default mergeIds(gmailId, gmail, { MessageID: '' as IntlString, IntegrationLabel: '' as IntlString, IntegrationDescription: '' as IntlString, - SharedMessages: '' as IntlString + SharedMessages: '' as IntlString, + SharedMessage: '' as IntlString, + ReplyTo: '' as IntlString, + Message: '' as IntlString, + Messages: '' as IntlString, + Incoming: '' as IntlString, + Email: '' as IntlString, + EmailPlaceholder: '' as IntlString }, ids: { TxSharedCreate: '' as Ref diff --git a/models/inventory/src/index.ts b/models/inventory/src/index.ts index 0e26830b74..1771a0dcd6 100644 --- a/models/inventory/src/index.ts +++ b/models/inventory/src/index.ts @@ -20,7 +20,6 @@ import { Builder, Collection, Index, Model, Prop, TypeRef, TypeString, UX } from import attachment from '@anticrm/model-attachment' import core, { TAttachedDoc } from '@anticrm/model-core' import workbench from '@anticrm/model-workbench' -import type { IntlString } from '@anticrm/platform' import type { } from '@anticrm/view' import view from '@anticrm/view' import inventory from './plugin' @@ -29,7 +28,7 @@ export const DOMAIN_INVENTORY = 'inventory' as Domain @Model(inventory.class.Category, core.class.AttachedDoc, DOMAIN_INVENTORY) @UX(inventory.string.Category, inventory.icon.Categories, undefined, 'name') export class TCategory extends TAttachedDoc implements Category { - @Prop(TypeString(), 'Name' as IntlString) + @Prop(TypeString(), core.string.Name) @Index(IndexKind.FullText) name!: string } @@ -41,7 +40,7 @@ export class TProduct extends TAttachedDoc implements Product { @Prop(TypeRef(inventory.class.Category), inventory.string.Category) declare attachedTo: Ref - @Prop(TypeString(), 'Name' as IntlString) + @Prop(TypeString(), core.string.Name) @Index(IndexKind.FullText) name!: string @@ -51,7 +50,7 @@ export class TProduct extends TAttachedDoc implements Product { @Prop(Collection(inventory.class.Variant), inventory.string.Variants) variants?: number - @Prop(Collection(attachment.class.Attachment), 'Attachments' as IntlString) + @Prop(Collection(attachment.class.Attachment), attachment.string.Attachments) attachments?: number } @@ -62,7 +61,7 @@ export class TVariant extends TAttachedDoc implements Variant { @Prop(TypeRef(inventory.class.Product), inventory.string.Product) declare attachedTo: Ref - @Prop(TypeString(), 'Name' as IntlString) + @Prop(TypeString(), core.string.Name) @Index(IndexKind.FullText) name!: string diff --git a/models/lead/src/creation.ts b/models/lead/src/creation.ts index 78dc499c5e..5b9aa99db6 100644 --- a/models/lead/src/creation.ts +++ b/models/lead/src/creation.ts @@ -13,7 +13,7 @@ // limitations under the License. // -import core, { TxOperations } from '@anticrm/core' +import core, { Doc, Space, TxOperations } from '@anticrm/core' import type { Client, Ref } from '@anticrm/core' import task, { createKanban } from '@anticrm/task' import type { KanbanTemplate } from '@anticrm/task' @@ -54,7 +54,7 @@ const defaultKanban = { const createDefaultKanbanTemplate = async (client: TxOperations): Promise> => await createKanbanTemplate(client, { kanbanId: lead.template.DefaultFunnel, - space: lead.space.FunnelTemplates, + space: lead.space.FunnelTemplates as Ref as Ref, title: 'Default funnel', states: defaultKanban.states, doneStates: defaultKanban.doneStates diff --git a/models/lead/src/index.ts b/models/lead/src/index.ts index ab1bcb40c9..fef472114e 100644 --- a/models/lead/src/index.ts +++ b/models/lead/src/index.ts @@ -26,8 +26,7 @@ import core from '@anticrm/model-core' import task, { TSpaceWithStates, TTask } from '@anticrm/model-task' import view from '@anticrm/model-view' import workbench from '@anticrm/model-workbench' -import type { IntlString } from '@anticrm/platform' -import type {} from '@anticrm/view' +import type { } from '@anticrm/view' import lead from './plugin' @Model(lead.class.Funnel, task.class.SpaceWithStates) @@ -35,32 +34,32 @@ import lead from './plugin' export class TFunnel extends TSpaceWithStates implements Funnel {} @Model(lead.class.Lead, task.class.Task) -@UX('Lead' as IntlString, lead.icon.Lead, undefined, 'title') +@UX(lead.string.Lead, lead.icon.Lead, undefined, 'title') export class TLead extends TTask implements Lead { @Prop(TypeRef(contact.class.Contact), lead.string.Customer) declare attachedTo: Ref - @Prop(TypeString(), 'Title' as IntlString) + @Prop(TypeString(), lead.string.Title) @Index(IndexKind.FullText) title!: string - @Prop(Collection(chunter.class.Comment), 'Comments' as IntlString) + @Prop(Collection(chunter.class.Comment), chunter.string.Comments) comments?: number - @Prop(Collection(attachment.class.Attachment), 'Attachments' as IntlString) + @Prop(Collection(attachment.class.Attachment), attachment.string.Attachments) attachments?: number - @Prop(TypeRef(contact.class.Employee), 'Assignee' as IntlString) + @Prop(TypeRef(contact.class.Employee), lead.string.Assignee) declare assignee: Ref | null } @Mixin(lead.mixin.Customer, contact.class.Contact) -@UX('Customer' as IntlString, lead.icon.LeadApplication) +@UX(lead.string.Customer, lead.icon.LeadApplication) export class TCustomer extends TPerson implements Customer { - @Prop(Collection(lead.class.Lead), 'Leads' as IntlString) + @Prop(Collection(lead.class.Lead), lead.string.Leads) leads?: number - @Prop(TypeString(), 'Description' as IntlString) + @Prop(TypeString(), core.string.Description) @Index(IndexKind.FullText) description!: string } @@ -134,7 +133,7 @@ export function createModel (builder: Builder): void { const leadLookup: Lookup = { - attachedTo: [contact.class.Contact, { _id: { channels: lead.mixin.Customer } }], + attachedTo: [lead.mixin.Customer, { _id: { channels: contact.class.Channel } }], state: task.class.State } @@ -149,8 +148,8 @@ export function createModel (builder: Builder): void { '', '$lookup.attachedTo', '$lookup.state', - { presenter: attachment.component.AttachmentsPresenter, label: 'Files', sortingKey: 'attachments' }, - { presenter: chunter.component.CommentsPresenter, label: 'Comments', sortingKey: 'comments' }, + { presenter: attachment.component.AttachmentsPresenter, label: attachment.string.Files, sortingKey: 'attachments' }, + { presenter: chunter.component.CommentsPresenter, label: chunter.string.Comments, sortingKey: 'comments' }, 'modifiedOn', '$lookup.attachedTo.$lookup.channels' ] @@ -188,11 +187,8 @@ export function createModel (builder: Builder): void { task.class.KanbanTemplateSpace, core.space.Model, { - name: 'Funnels', - description: 'Manage funnel statuses', - members: [], - private: false, - archived: false, + name: lead.string.Funnels, + description: lead.string.ManageFunnelStatuses, icon: lead.component.TemplatesIcon }, lead.space.FunnelTemplates diff --git a/models/lead/src/plugin.ts b/models/lead/src/plugin.ts index 463806a516..7e55778fa3 100644 --- a/models/lead/src/plugin.ts +++ b/models/lead/src/plugin.ts @@ -26,7 +26,11 @@ export default mergeIds(leadId, lead, { string: { Funnel: '' as IntlString, Funnels: '' as IntlString, - LeadApplication: '' as IntlString + LeadApplication: '' as IntlString, + Lead: '' as IntlString, + Title: '' as IntlString, + Assignee: '' as IntlString, + ManageFunnelStatuses: '' as IntlString }, component: { CreateFunnel: '' as AnyComponent, diff --git a/models/notification/src/index.ts b/models/notification/src/index.ts index 00cc131059..433c6ad154 100644 --- a/models/notification/src/index.ts +++ b/models/notification/src/index.ts @@ -29,7 +29,7 @@ export class TLastView extends TAttachedDoc implements LastView { @Prop(TypeTimestamp(), notification.string.LastView) lastView!: Timestamp - @Prop(TypeRef(core.class.Account), 'Modified By' as IntlString) + @Prop(TypeRef(core.class.Account), core.string.ModifiedBy) user!: Ref } diff --git a/models/recruit/src/creation.ts b/models/recruit/src/creation.ts index 9d71ae9d47..1c2497a962 100644 --- a/models/recruit/src/creation.ts +++ b/models/recruit/src/creation.ts @@ -13,7 +13,7 @@ // limitations under the License. // -import core, { Ref, TxOperations } from '@anticrm/core' +import core, { Doc, Ref, Space, TxOperations } from '@anticrm/core' import type { Client } from '@anticrm/core' import { createKanbanTemplate } from '@anticrm/model-task' @@ -54,7 +54,7 @@ const defaultKanban = { export const createDefaultKanbanTemplate = async (client: TxOperations): Promise> => await createKanbanTemplate(client, { kanbanId: recruit.template.DefaultVacancy, - space: recruit.space.VacancyTemplates, + space: recruit.space.VacancyTemplates as Ref as Ref, title: 'Default vacancy', states: defaultKanban.states, doneStates: defaultKanban.doneStates diff --git a/models/recruit/src/index.ts b/models/recruit/src/index.ts index d68f67d0d9..0d2ee0ceac 100644 --- a/models/recruit/src/index.ts +++ b/models/recruit/src/index.ts @@ -38,28 +38,27 @@ import tags from '@anticrm/model-tags' import task, { TSpaceWithStates, TTask } from '@anticrm/model-task' import view from '@anticrm/model-view' import workbench from '@anticrm/model-workbench' -import type { IntlString } from '@anticrm/platform' import { Applicant, Candidate, Candidates, Vacancy } from '@anticrm/recruit' import recruit from './plugin' @Model(recruit.class.Vacancy, task.class.SpaceWithStates) @UX(recruit.string.Vacancy, recruit.icon.Vacancy) export class TVacancy extends TSpaceWithStates implements Vacancy { - @Prop(TypeMarkup(), 'Full description' as IntlString) + @Prop(TypeMarkup(), recruit.string.FullDescription) @Index(IndexKind.FullText) fullDescription?: string - @Prop(Collection(attachment.class.Attachment), 'Attachments' as IntlString) + @Prop(Collection(attachment.class.Attachment), attachment.string.Attachments) attachments?: number - @Prop(TypeDate(), 'Due date' as IntlString, recruit.icon.Calendar) + @Prop(TypeDate(), recruit.string.Due, recruit.icon.Calendar) dueTo?: Timestamp - @Prop(TypeString(), 'Location' as IntlString, recruit.icon.Location) + @Prop(TypeString(), recruit.string.Location, recruit.icon.Location) @Index(IndexKind.FullText) location?: string - @Prop(TypeString(), 'Company' as IntlString, contact.icon.Company) + @Prop(TypeString(), recruit.string.Company, contact.icon.Company) @Index(IndexKind.FullText) company?: string } @@ -69,22 +68,22 @@ export class TVacancy extends TSpaceWithStates implements Vacancy { export class TCandidates extends TSpace implements Candidates {} @Mixin(recruit.mixin.Candidate, contact.class.Person) -@UX('Candidate' as IntlString, recruit.icon.RecruitApplication) +@UX(recruit.string.Candidate, recruit.icon.RecruitApplication) export class TCandidate extends TPerson implements Candidate { - @Prop(TypeString(), 'Title' as IntlString) + @Prop(TypeString(), recruit.string.Title) @Index(IndexKind.FullText) title?: string - @Prop(Collection(recruit.class.Applicant), 'Applications' as IntlString) + @Prop(Collection(recruit.class.Applicant), recruit.string.Applications) applications?: number - @Prop(TypeBoolean(), 'Onsite' as IntlString) + @Prop(TypeBoolean(), recruit.string.Onsite) onsite?: boolean - @Prop(TypeBoolean(), 'Remote' as IntlString) + @Prop(TypeBoolean(), recruit.string.Remote) remote?: boolean - @Prop(TypeString(), 'Source' as IntlString) + @Prop(TypeString(), recruit.string.Source) @Index(IndexKind.FullText) source?: string @@ -93,7 +92,7 @@ export class TCandidate extends TPerson implements Candidate { } @Model(recruit.class.Applicant, task.class.Task) -@UX(recruit.string.Application, recruit.icon.Application, 'APP' as IntlString, 'number') +@UX(recruit.string.Application, recruit.icon.Application, recruit.string.ApplicationShort, 'number') export class TApplicant extends TTask implements Applicant { // We need to declare, to provide property with label @Prop(TypeRef(recruit.mixin.Candidate), recruit.string.Candidate) @@ -201,9 +200,9 @@ export function createModel (builder: Builder): void { '', 'title', 'city', - { presenter: recruit.component.ApplicationsPresenter, label: 'Apps', sortingKey: 'applications' }, - { presenter: attachment.component.AttachmentsPresenter, label: 'Files', sortingKey: 'attachments' }, - { presenter: chunter.component.CommentsPresenter, label: 'Comments', sortingKey: 'comments' }, + { presenter: recruit.component.ApplicationsPresenter, label: recruit.string.ApplicationsShort, sortingKey: 'applications' }, + { presenter: attachment.component.AttachmentsPresenter, label: attachment.string.Files, sortingKey: 'attachments' }, + { presenter: chunter.component.CommentsPresenter, label: chunter.string.Comments, sortingKey: 'comments' }, { // key: '$lookup.skills', // Required, since presenter require list of tag references or '' and TagsPopupPresenter presenter: tags.component.TagsPresenter, // tags.component.TagsPresenter, @@ -239,8 +238,8 @@ export function createModel (builder: Builder): void { '$lookup.assignee', '$lookup.state', '$lookup.doneState', - { presenter: attachment.component.AttachmentsPresenter, label: 'Files', sortingKey: 'attachments' }, - { presenter: chunter.component.CommentsPresenter, label: 'Comments', sortingKey: 'comments' }, + { presenter: attachment.component.AttachmentsPresenter, label: attachment.string.Files, sortingKey: 'attachments' }, + { presenter: chunter.component.CommentsPresenter, label: chunter.string.Comments, sortingKey: 'comments' }, 'modifiedOn', '$lookup.attachedTo.$lookup.channels' ] @@ -274,8 +273,8 @@ export function createModel (builder: Builder): void { '$lookup.assignee', '$lookup.state', '$lookup.doneState', - { presenter: attachment.component.AttachmentsPresenter, label: 'Files', sortingKey: 'attachments' }, - { presenter: chunter.component.CommentsPresenter, label: 'Comments', sortingKey: 'comments' }, + { presenter: attachment.component.AttachmentsPresenter, label: attachment.string.Files, sortingKey: 'attachments' }, + { presenter: chunter.component.CommentsPresenter, label: chunter.string.Comments, sortingKey: 'comments' }, 'modifiedOn', '$lookup.attachedTo.$lookup.channels' ] @@ -305,7 +304,7 @@ export function createModel (builder: Builder): void { view.class.Action, core.space.Model, { - label: 'Create application' as IntlString, + label: recruit.string.CreateApplication, icon: recruit.icon.Create, action: recruit.actionImpl.CreateApplication }, @@ -326,11 +325,8 @@ export function createModel (builder: Builder): void { task.class.KanbanTemplateSpace, core.space.Model, { - name: 'Vacancies', - description: 'Manage vacancy statuses', - members: [], - private: false, - archived: false, + name: recruit.string.Vacancies, + description: recruit.string.ManageVacancyStatuses, icon: recruit.component.TemplatesIcon }, recruit.space.VacancyTemplates diff --git a/models/recruit/src/plugin.ts b/models/recruit/src/plugin.ts index dad4f801f1..69f7f60adb 100644 --- a/models/recruit/src/plugin.ts +++ b/models/recruit/src/plugin.ts @@ -31,12 +31,18 @@ export default mergeIds(recruitId, recruit, { CreateApplication: '' as Resource<(object: Doc) => Promise> }, string: { + ApplicationShort: '' as IntlString, + ApplicationsShort: '' as IntlString, RecruitApplication: '' as IntlString, Vacancies: '' as IntlString, CandidatePools: '' as IntlString, SearchApplication: '' as IntlString, Application: '' as IntlString, - AssignedRecruiter: '' as IntlString + AssignedRecruiter: '' as IntlString, + FullDescription: '' as IntlString, + Due: '' as IntlString, + Source: '' as IntlString, + ManageVacancyStatuses: '' as IntlString }, validator: { ApplicantValidator: '' as Resource<(doc: T, client: Client) => Promise> diff --git a/models/task/src/creation.ts b/models/task/src/creation.ts index 32c8b26ece..bd7e1a9c8b 100644 --- a/models/task/src/creation.ts +++ b/models/task/src/creation.ts @@ -13,7 +13,7 @@ // limitations under the License. // -import core, { TxOperations } from '@anticrm/core' +import core, { Doc, TxOperations } from '@anticrm/core' import type { Client, Ref, Space } from '@anticrm/core' import { createKanban, genRanks } from '@anticrm/task' import type { DoneStateTemplate, KanbanTemplate, StateTemplate } from '@anticrm/task' @@ -110,7 +110,7 @@ export async function createKanbanTemplate (client: TxOperations, data: KanbanTe const createDefaultKanbanTemplate = async (client: TxOperations): Promise> => await createKanbanTemplate(client, { kanbanId: task.template.DefaultProject, - space: task.space.ProjectTemplates, + space: task.space.ProjectTemplates as Ref as Ref, title: 'Default project', states: defaultKanban.states, doneStates: defaultKanban.doneStates diff --git a/models/task/src/index.ts b/models/task/src/index.ts index 4e86739642..d597875638 100644 --- a/models/task/src/index.ts +++ b/models/task/src/index.ts @@ -35,7 +35,7 @@ import core, { TAttachedDoc, TClass, TDoc, TSpace } from '@anticrm/model-core' import presentation from '@anticrm/model-presentation' import view from '@anticrm/model-view' import workbench from '@anticrm/model-workbench' -import type { IntlString } from '@anticrm/platform' +import { IntlString } from '@anticrm/platform' import type { DoneState, DoneStateTemplate, Issue, Kanban, KanbanCard, KanbanTemplate, KanbanTemplateSpace, LostState, LostStateTemplate, Project, Sequence, State, StateTemplate, Task, @@ -125,7 +125,7 @@ export class TSpaceWithStates extends TSpace {} export class TProject extends TSpaceWithStates implements Project {} @Model(task.class.Issue, task.class.Task, DOMAIN_TASK) -@UX('Task' as IntlString, task.icon.Task, 'Task' as IntlString, 'number') +@UX(task.string.Task, task.icon.Task, task.string.Task, 'number') export class TIssue extends TTask implements Issue { // We need to declare, to provide property with label @Prop(TypeRef(core.class.Doc), task.string.TaskParent) @@ -142,7 +142,7 @@ export class TIssue extends TTask implements Issue { @Prop(Collection(chunter.class.Comment), task.string.TaskComments) comments!: number - @Prop(Collection(attachment.class.Attachment), task.string.TaskAttachments) + @Prop(Collection(attachment.class.Attachment), attachment.string.Attachments) attachments!: number @Prop(TypeString(), task.string.TaskLabels) @@ -165,8 +165,10 @@ export class TKanban extends TDoc implements Kanban { attachedTo!: Ref } -@Model(task.class.KanbanTemplateSpace, core.class.Space, DOMAIN_MODEL) -export class TKanbanTemplateSpace extends TSpace implements KanbanTemplateSpace { +@Model(task.class.KanbanTemplateSpace, core.class.Doc, DOMAIN_MODEL) +export class TKanbanTemplateSpace extends TDoc implements KanbanTemplateSpace { + name!: IntlString + description!: IntlString icon!: AnyComponent } @@ -293,8 +295,8 @@ export function createModel (builder: Builder): void { '', 'name', '$lookup.assignee', - { presenter: attachment.component.AttachmentsPresenter, label: 'Files', sortingKey: 'attachments' }, - { presenter: chunter.component.CommentsPresenter, label: 'Comments', sortingKey: 'comments' }, + { presenter: attachment.component.AttachmentsPresenter, label: attachment.string.Files, sortingKey: 'attachments' }, + { presenter: chunter.component.CommentsPresenter, label: chunter.string.Comments, sortingKey: 'comments' }, 'modifiedOn' ] }) @@ -344,11 +346,8 @@ export function createModel (builder: Builder): void { task.class.KanbanTemplateSpace, core.space.Model, { - name: 'Projects', - description: 'Manage project statuses', - members: [], - private: false, - archived: false, + name: task.string.Projects, + description: task.string.ManageProjectStatues, icon: task.component.TemplatesIcon }, task.space.ProjectTemplates diff --git a/models/task/src/plugin.ts b/models/task/src/plugin.ts index 96178cdfc5..1bc4f6c220 100644 --- a/models/task/src/plugin.ts +++ b/models/task/src/plugin.ts @@ -70,7 +70,6 @@ export default mergeIds(taskId, task, { TaskParent: '' as IntlString, IssueName: '' as IntlString, TaskComments: '' as IntlString, - TaskAttachments: '' as IntlString, TaskLabels: '' as IntlString, StateTemplateTitle: '' as IntlString, StateTemplateColor: '' as IntlString, @@ -84,7 +83,8 @@ export default mergeIds(taskId, task, { Kanban: '' as IntlString, ApplicationLabelTask: '' as IntlString, Projects: '' as IntlString, - SearchTask: '' as IntlString + SearchTask: '' as IntlString, + ManageProjectStatues: '' as IntlString }, space: { TasksPublic: '' as Ref diff --git a/models/telegram/src/index.ts b/models/telegram/src/index.ts index a154abda17..15fd040e70 100644 --- a/models/telegram/src/index.ts +++ b/models/telegram/src/index.ts @@ -14,7 +14,6 @@ // limitations under the License. // -import type { IntlString } from '@anticrm/platform' import { Builder, Model, TypeString, TypeBoolean, Prop, ArrOf, Index } from '@anticrm/model' import core, { TAttachedDoc } from '@anticrm/model-core' import contact from '@anticrm/model-contact' @@ -27,22 +26,22 @@ import activity from '@anticrm/activity' export const DOMAIN_TELEGRAM = 'telegram' as Domain function TypeSharedMessage (): Type { - return { _class: telegram.class.SharedMessage, label: 'Shared message' as IntlString } + return { _class: telegram.class.SharedMessage, label: telegram.string.SharedMessage } } @Model(telegram.class.Message, core.class.AttachedDoc, DOMAIN_TELEGRAM) export class TTelegramMessage extends TAttachedDoc implements TelegramMessage { - @Prop(TypeString(), 'Content' as IntlString) + @Prop(TypeString(), telegram.string.Content) @Index(IndexKind.FullText) content!: string - @Prop(TypeBoolean(), 'Incoming' as IntlString) + @Prop(TypeBoolean(), telegram.string.Incoming) incoming!: boolean } @Model(telegram.class.SharedMessages, core.class.AttachedDoc, DOMAIN_TELEGRAM) export class TSharedTelegramMessages extends TAttachedDoc implements SharedTelegramMessages { - @Prop(ArrOf(TypeSharedMessage()), 'Messages' as IntlString) + @Prop(ArrOf(TypeSharedMessage()), telegram.string.Messages) messages!: SharedTelegramMessage[] } @@ -53,9 +52,9 @@ export function createModel (builder: Builder): void { contact.class.ChannelProvider, core.space.Model, { - label: 'Telegram' as IntlString, + label: telegram.string.Telegram, icon: contact.icon.Telegram, - placeholder: '@appleseed' as IntlString, + placeholder: contact.string.AtPlaceHolder, presenter: telegram.component.Chat, integrationType: telegram.integrationType.Telegram }, @@ -66,8 +65,8 @@ export function createModel (builder: Builder): void { setting.class.IntegrationType, core.space.Model, { - label: 'Telegram' as IntlString, - description: 'Use telegram integration' as IntlString, + label: telegram.string.Telegram, + description: telegram.string.TelegramIntegrationDesc, icon: telegram.component.IconTelegram, createComponent: telegram.component.Connect, onDisconnect: telegram.handler.DisconnectHandler diff --git a/models/telegram/src/plugin.ts b/models/telegram/src/plugin.ts index 49f89f91c4..e459c3efac 100644 --- a/models/telegram/src/plugin.ts +++ b/models/telegram/src/plugin.ts @@ -23,7 +23,13 @@ import type { TxViewlet } from '@anticrm/activity' export default mergeIds(telegramId, telegram, { string: { - SharedMessages: '' as IntlString + SharedMessages: '' as IntlString, + SharedMessage: '' as IntlString, + Content: '' as IntlString, + Incoming: '' as IntlString, + Messages: '' as IntlString, + Telegram: '' as IntlString, + TelegramIntegrationDesc: '' as IntlString }, ids: { TxSharedCreate: '' as Ref diff --git a/models/templates/src/index.ts b/models/templates/src/index.ts index 30a84925ba..841750aa95 100644 --- a/models/templates/src/index.ts +++ b/models/templates/src/index.ts @@ -18,7 +18,6 @@ import { Domain, IndexKind } from '@anticrm/core' import { Builder, Index, Model, Prop, TypeString } from '@anticrm/model' import core, { TDoc } from '@anticrm/model-core' import textEditor from '@anticrm/model-text-editor' -import { IntlString } from '@anticrm/platform' import setting from '@anticrm/setting' import type { MessageTemplate } from '@anticrm/templates' import templates from './plugin' @@ -27,11 +26,11 @@ export const DOMAIN_TEMPLATES = 'templates' as Domain @Model(templates.class.MessageTemplate, core.class.Doc, DOMAIN_TEMPLATES) export class TMessageTemplate extends TDoc implements MessageTemplate { - @Prop(TypeString(), 'Title' as IntlString) + @Prop(TypeString(), templates.string.Title) @Index(IndexKind.FullText) title!: string; - @Prop(TypeString(), 'Message' as IntlString) + @Prop(TypeString(), templates.string.Message) @Index(IndexKind.FullText) message!: string; } diff --git a/models/templates/src/plugin.ts b/models/templates/src/plugin.ts index 55a8ac4c0c..020802e058 100644 --- a/models/templates/src/plugin.ts +++ b/models/templates/src/plugin.ts @@ -15,7 +15,7 @@ // import { Ref } from '@anticrm/core' -import { mergeIds, Resource } from '@anticrm/platform' +import { IntlString, mergeIds, Resource } from '@anticrm/platform' import { SettingsCategory } from '@anticrm/setting' import { templatesId } from '@anticrm/templates' import templates from '@anticrm/templates-resources/src/plugin' @@ -35,5 +35,9 @@ export default mergeIds(templatesId, templates, { }, action: { ShowTemplates: '' as Resource + }, + string: { + Title: '' as IntlString, + Message: '' as IntlString } }) diff --git a/models/view/src/index.ts b/models/view/src/index.ts index 47c5a81f5a..d3959e2398 100644 --- a/models/view/src/index.ts +++ b/models/view/src/index.ts @@ -171,7 +171,7 @@ export function createModel (builder: Builder): void { view.class.ViewletDescriptor, core.space.Model, { - label: 'Table' as IntlString, + label: view.string.Table, icon: view.icon.Table, component: view.component.TableView }, @@ -182,7 +182,7 @@ export function createModel (builder: Builder): void { view.class.Action, core.space.Model, { - label: 'Delete' as IntlString, + label: view.string.Delete, icon: view.icon.Delete, action: view.actionImpl.Delete }, @@ -198,7 +198,7 @@ export function createModel (builder: Builder): void { view.class.Action, core.space.Model, { - label: 'Move' as IntlString, + label: view.string.Move, icon: view.icon.Move, action: view.actionImpl.Move }, diff --git a/models/view/src/plugin.ts b/models/view/src/plugin.ts index a0cd7944c9..97e275fbfd 100644 --- a/models/view/src/plugin.ts +++ b/models/view/src/plugin.ts @@ -13,7 +13,7 @@ // limitations under the License. // -import { mergeIds } from '@anticrm/platform' +import { IntlString, mergeIds } from '@anticrm/platform' import type { Ref, Doc } from '@anticrm/core' import type { Resource } from '@anticrm/platform' import type { AnyComponent } from '@anticrm/ui' @@ -41,5 +41,11 @@ export default mergeIds(viewId, view, { DatePresenter: '' as AnyComponent, TableView: '' as AnyComponent, RolePresenter: '' as AnyComponent + }, + string: { + Table: '' as IntlString, + Delete: '' as IntlString, + Move: '' as IntlString, + Role: '' as IntlString } }) diff --git a/models/workbench/src/index.ts b/models/workbench/src/index.ts index fabb7b9add..15ecc901cd 100644 --- a/models/workbench/src/index.ts +++ b/models/workbench/src/index.ts @@ -23,7 +23,7 @@ import core, { TDoc, TClass } from '@anticrm/model-core' import workbench from './plugin' @Model(workbench.class.Application, core.class.Doc, DOMAIN_MODEL) -@UX('Application' as IntlString) +@UX(workbench.string.Application) export class TApplication extends TDoc implements Application { label!: IntlString icon!: Asset diff --git a/models/workbench/src/plugin.ts b/models/workbench/src/plugin.ts index 7c5edc49da..1b0f990b7b 100644 --- a/models/workbench/src/plugin.ts +++ b/models/workbench/src/plugin.ts @@ -24,7 +24,8 @@ export default mergeIds(workbenchId, workbench, { Archive: '' as AnyComponent }, string: { - Archive: '' as IntlString + Archive: '' as IntlString, + Application: '' as IntlString }, function: { HasArchiveSpaces: '' as Resource<(spaces: Space[]) => boolean> diff --git a/packages/core/lang/en.json b/packages/core/lang/en.json new file mode 100644 index 0000000000..d3899cf1d1 --- /dev/null +++ b/packages/core/lang/en.json @@ -0,0 +1,15 @@ +{ + "string": { + "Id": "Id", + "Space": "Space", + "Modified": "Modified", + "ModifiedBy": "Modified by", + "Class": "Class", + "AttachedTo": "Attached to", + "AttachedToClass": "Attached to class", + "Name": "Name", + "Description": "Description", + "Private": "Private", + "Archived": "Archived" + } +} diff --git a/packages/core/lang/ru.json b/packages/core/lang/ru.json new file mode 100644 index 0000000000..3157196808 --- /dev/null +++ b/packages/core/lang/ru.json @@ -0,0 +1,15 @@ +{ + "string": { + "Id": "Id", + "Space": "Пространство", + "Modified": "Изменено", + "ModifiedBy": "Изменен", + "Class": "Класс", + "AttachedTo": "Прикреплен к", + "AttachedToClass": "Прикреплен к классу", + "Name": "Название", + "Description": "Описание", + "Private": "Личный", + "Archived": "Архивный" + } +} \ No newline at end of file diff --git a/packages/core/src/component.ts b/packages/core/src/component.ts index f7c0237cb9..47e55ad554 100644 --- a/packages/core/src/component.ts +++ b/packages/core/src/component.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -import type { Plugin, StatusCode } from '@anticrm/platform' +import type { IntlString, Plugin, StatusCode } from '@anticrm/platform' import { plugin } from '@anticrm/platform' import { Mixin, Version } from '.' import type { Account, ArrOf, AnyAttribute, AttachedDoc, Class, Doc, Interface, Obj, PropertyType, Ref, Space, Timestamp, Type, Collection, RefTo } from './classes' @@ -69,5 +69,14 @@ export default plugin(coreId, { }, version: { Model: '' as Ref + }, + string: { + Id: '' as IntlString, + Space: '' as IntlString, + Modified: '' as IntlString, + ModifiedBy: '' as IntlString, + Class: '' as IntlString, + AttachedTo: '' as IntlString, + AttachedToClass: '' as IntlString } }) diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 61a4c9f2af..e96157306a 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -11,19 +11,26 @@ // // See the License for the specific language governing permissions and // limitations under the License. + +import { addStringsLoader } from '@anticrm/platform' +import { coreId } from './component' + // export * from './classes' -export * from './tx' -export * from './storage' -export * from './operations' -export * from './utils' -export * from './hierarchy' -export * from './memdb' export * from './client' -export * from './operator' +export { coreId, default } from './component' +export * from './hierarchy' +export * from './measurements' +export * from './memdb' export * from './objvalue' +export * from './operations' +export * from './operator' export * from './query' export * from './server' -export * from './measurements' +export * from './storage' +export * from './tx' +export * from './utils' -export { default, coreId } from './component' +addStringsLoader(coreId, async (lang: string) => { + return await import(`../lang/${lang}.json`) +}) diff --git a/packages/platform/src/i18n.ts b/packages/platform/src/i18n.ts index b415fbbb88..a4d6ee73d5 100644 --- a/packages/platform/src/i18n.ts +++ b/packages/platform/src/i18n.ts @@ -21,6 +21,7 @@ import { setPlatformStatus } from './event' import { IntlMessageFormat } from 'intl-messageformat' import platform from './platform' +import { getMetadata } from './metadata' /** * @public @@ -29,8 +30,6 @@ export type Loader = (locale: string) => Promise> -const locale = 'en' - const loaders = new Map() const translations = new Map() const cache = new Map() @@ -44,7 +43,7 @@ export function addStringsLoader (plugin: Plugin, loader: Loader): void { loaders.set(plugin, loader) } -async function loadTranslationsForComponent (plugin: Plugin): Promise { +async function loadTranslationsForComponent (plugin: Plugin, locale: string): Promise { const loader = loaders.get(plugin) if (loader === undefined) { const status = new Status(Severity.ERROR, platform.status.NoLoaderForStrings, { plugin }) @@ -60,12 +59,12 @@ async function loadTranslationsForComponent (plugin: Plugin): Promise { +async function getTranslation (message: IntlString, locale: string): Promise { try { const id = _parseId(message) let messages = translations.get(id.component) if (messages === undefined) { - messages = await loadTranslationsForComponent(id.component) + messages = await loadTranslationsForComponent(id.component, locale) translations.set(id.component, messages) } if (messages instanceof Status) { @@ -90,6 +89,7 @@ async function getTranslation (message: IntlString): Promise> (message: IntlString

, params: P): Promise { + const locale = getMetadata(platform.metadata.locale) ?? 'en' const compiled = cache.get(message) if (compiled !== undefined) { if (compiled instanceof Status) { @@ -97,7 +97,7 @@ export async function translate

> (message: IntlStr } return compiled.format(params) } else { - const translation = await getTranslation(message) + const translation = await getTranslation(message, locale) if (translation instanceof Status) { cache.set(message, translation) return message diff --git a/packages/platform/src/index.ts b/packages/platform/src/index.ts index 8dc426870f..09dde212be 100644 --- a/packages/platform/src/index.ts +++ b/packages/platform/src/index.ts @@ -27,11 +27,7 @@ export * from './metadata' export * from './rpc' addStringsLoader(platformId, async (lang: string) => { - switch (lang) { - case 'en': - return (await import('./lang/en.json')) - } - throw new Error('unsupported language') + return await import(`./lang/${lang}.json`) }) /** diff --git a/packages/platform/src/lang/ru.json b/packages/platform/src/lang/ru.json new file mode 100644 index 0000000000..6e8a612432 --- /dev/null +++ b/packages/platform/src/lang/ru.json @@ -0,0 +1,12 @@ +{ + "status": { + "LoadingPlugin": "Загрузка плагина ''{plugin}''...", + "UnknownError": "Неизвестная ошибка: {message}", + "InvalidId": "Некорректный Id: {id}", + "BadRequest": "Некорректный запрос", + "Forbidden": "Запрещено", + "Unauthorized": "Неавторизован", + "UnknownMethod": "Неизвестный метод: {method}", + "InternalServerError": "Внутренняя ошибка сервеа" + } +} diff --git a/packages/platform/src/platform.ts b/packages/platform/src/platform.ts index 7806f243e9..48618609c9 100644 --- a/packages/platform/src/platform.ts +++ b/packages/platform/src/platform.ts @@ -14,6 +14,8 @@ // limitations under the License. */ +import { Metadata } from '.' + /** * Id in format 'plugin.resource-kind.id' * @@ -140,5 +142,8 @@ export default plugin(platformId, { Unauthorized: '' as StatusCode, UnknownMethod: '' as StatusCode<{ method: string }>, InternalServerError: '' as StatusCode + }, + metadata: { + locale: '' as Metadata } }) diff --git a/packages/presentation/lang/ru.json b/packages/presentation/lang/ru.json new file mode 100644 index 0000000000..b423c01344 --- /dev/null +++ b/packages/presentation/lang/ru.json @@ -0,0 +1,13 @@ +{ + "string": { + "Create": "Создать", + "Cancel": "Отменить", + "Ok": "Ок", + "Save": "Сохранить", + "Download": "Загрузить", + "Delete": "Удалить", + "NotSelected": "Не выделено", + "Deselect": "Снять выделение", + "AddSocialLinks": "Добавить контактную информацию" + } +} diff --git a/packages/text-editor/lang/en.json b/packages/text-editor/lang/en.json index 55fc89cf84..8aaf55a761 100644 --- a/packages/text-editor/lang/en.json +++ b/packages/text-editor/lang/en.json @@ -3,8 +3,6 @@ "Suggested": "SUGGESTED", "NoItems": "No items", "EditorPlaceholder": "Start typing...", - "Edit": "Edit", - "Cancel": "Cancel", - "Save": "Save" + "Edit": "Edit" } } diff --git a/packages/text-editor/lang/ru.json b/packages/text-editor/lang/ru.json new file mode 100644 index 0000000000..4b2b4eb60f --- /dev/null +++ b/packages/text-editor/lang/ru.json @@ -0,0 +1,8 @@ +{ + "string": { + "Suggested": "РЕКОМЕНДУЕМЫЕ", + "NoItems": "Нет содержимого", + "EditorPlaceholder": "Начните печатать...", + "Edit": "Редактировать" + } +} diff --git a/packages/text-editor/src/components/StyledTextBox.svelte b/packages/text-editor/src/components/StyledTextBox.svelte index 6b3d49f9c8..bd451b66b4 100644 --- a/packages/text-editor/src/components/StyledTextBox.svelte +++ b/packages/text-editor/src/components/StyledTextBox.svelte @@ -1,6 +1,6 @@ diff --git a/packages/ui/lang/en.json b/packages/ui/lang/en.json index e86f43a54c..6eea16d4d2 100644 --- a/packages/ui/lang/en.json +++ b/packages/ui/lang/en.json @@ -10,6 +10,9 @@ "Search": "Search", "SearchDots": "Search...", "Suggested": "Suggested", - "TimeTooltip": "{value}" + "TimeTooltip": "{value}", + "None": "None", + "English": "English", + "Russian": "Russian" } } diff --git a/packages/ui/lang/ru.json b/packages/ui/lang/ru.json new file mode 100644 index 0000000000..3735f55c64 --- /dev/null +++ b/packages/ui/lang/ru.json @@ -0,0 +1,18 @@ +{ + "string": { + "EditBoxPlaceholder": "Введите текст здесь", + "Cancel": "Отменить", + "Minutes": "{minutes, plural, =0 {меньше минуты назад} =1 {минуту назад} other {# минут назад}}", + "Hours": "{hours, plural, =0 {меньше часа назад} =1 {час назад} other {# часов назад}}", + "Days": "{days, plural, =0 {сегода} =1 {вчера} other {# дней назад}}", + "ShowMore": "Показать больше", + "ShowLess": "Показать меньше", + "Search": "Поиск", + "SearchDots": "Поиск...", + "Suggested": "Предложено", + "TimeTooltip": "{value}", + "None": "Нет", + "English": "Английский", + "Russian": "Русский" + } +} diff --git a/packages/ui/src/components/DropdownLabels.svelte b/packages/ui/src/components/DropdownLabels.svelte index 7848c28349..4c2b8d1115 100644 --- a/packages/ui/src/components/DropdownLabels.svelte +++ b/packages/ui/src/components/DropdownLabels.svelte @@ -23,7 +23,8 @@ import type { DropdownTextItem } from '../types' import { showPopup } from '..' -import { createEventDispatcher } from 'svelte' + import { createEventDispatcher } from 'svelte' + import ui from '../plugin' export let title: IntlString export let caption: IntlString | undefined = undefined @@ -41,10 +42,9 @@ import { createEventDispatcher } from 'svelte' $: if (selected === undefined && items[0] !== undefined) { selected = items[0].id } - - const none = 'None' as IntlString const dispatch = createEventDispatcher() + const none = ui.string.None

import { getContext } from 'svelte' - import type { IntlString } from '@anticrm/platform' import { showPopup } from '../..' import LangPopup from './LangPopup.svelte' + import ui from '../../plugin' import Flags from './icons/Flags.svelte' const { currentLanguage, setLanguage } = getContext('lang') const langs - = [{ id: 'en', label: 'English' as IntlString }, - { id: 'ru', label: 'Russian' as IntlString }] + = [{ id: 'en', label: ui.string.English }, + { id: 'ru', label: ui.string.Russian }] $: selected = langs.find(item => item.id === currentLanguage) let trigger: HTMLElement diff --git a/packages/ui/src/plugin.ts b/packages/ui/src/plugin.ts index 1db02c4d8d..75a60cfde3 100644 --- a/packages/ui/src/plugin.ts +++ b/packages/ui/src/plugin.ts @@ -34,6 +34,9 @@ export default plugin(uiId, { Search: '' as IntlString, SearchDots: '' as IntlString, Suggested: '' as IntlString, - TimeTooltip: '' as IntlString + TimeTooltip: '' as IntlString, + None: '' as IntlString, + English: '' as IntlString, + Russian: '' as IntlString } }) diff --git a/plugins/activity-assets/lang/en.json b/plugins/activity-assets/lang/en.json index 9ed719b362..31b39ba492 100644 --- a/plugins/activity-assets/lang/en.json +++ b/plugins/activity-assets/lang/en.json @@ -2,9 +2,13 @@ "string": { "Delete": "Delete", "Edit": "Edit", - "Options": "Options", "Edited": "edited", "DocCreated": "created {_class}", - "DocDeleted": "deleted {_class}" + "DocDeleted": "deleted {_class}", + "Activity": "Activity", + "Changed": "changed", + "To": "to", + "Unset": "unset", + "NoEmployee": "No employee" } } \ No newline at end of file diff --git a/plugins/activity-assets/lang/ru.json b/plugins/activity-assets/lang/ru.json new file mode 100644 index 0000000000..de5135bc14 --- /dev/null +++ b/plugins/activity-assets/lang/ru.json @@ -0,0 +1,14 @@ +{ + "string": { + "Delete": "Удалить", + "Edit": "Редактировать", + "Edited": "отредактировал(а)", + "DocCreated": "создал(а) {_class}", + "DocDeleted": "удалил(а) {_class}", + "Activity": "Активность", + "Changed": "изменил(а)", + "To": "на", + "Unset": "сбросил", + "NoEmployee": "Не сотрудник" + } +} \ No newline at end of file diff --git a/plugins/activity-resources/src/components/Activity.svelte b/plugins/activity-resources/src/components/Activity.svelte index d02c6b0359..58227a2210 100644 --- a/plugins/activity-resources/src/components/Activity.svelte +++ b/plugins/activity-resources/src/components/Activity.svelte @@ -18,7 +18,7 @@ import chunter from '@anticrm/chunter' import { Doc, SortingOrder } from '@anticrm/core' import { createQuery, getClient } from '@anticrm/presentation' - import { Component, Grid, IconActivity, Scroller } from '@anticrm/ui' + import { Component, Grid, IconActivity, Label, Scroller } from '@anticrm/ui' import { ActivityKey, activityKey, DisplayTx, newActivity } from '../activity' import TxView from './TxView.svelte' @@ -54,7 +54,7 @@
- Activity +
{/if} @@ -86,7 +86,7 @@
- Activity +
diff --git a/plugins/activity-resources/src/components/TxView.svelte b/plugins/activity-resources/src/components/TxView.svelte index a36afbaa5f..94da954b4e 100644 --- a/plugins/activity-resources/src/components/TxView.svelte +++ b/plugins/activity-resources/src/components/TxView.svelte @@ -15,7 +15,7 @@ -->
- Attachments + {#if loading} {:else} @@ -117,9 +115,6 @@
inputFile.click()}>
diff --git a/plugins/chunter-assets/lang/en.json b/plugins/chunter-assets/lang/en.json index a03f4ab0d6..4adc89b6d0 100644 --- a/plugins/chunter-assets/lang/en.json +++ b/plugins/chunter-assets/lang/en.json @@ -2,7 +2,6 @@ "string": { "ApplicationLabelChunter": "Chat", "LeftComment": "left a comment", - "AddAttachment": "uploaded an attachment", "Channels": "Channels", "CreateChannel": "New Channel", "ChannelName": "Name", @@ -15,6 +14,12 @@ "EditCancel": "Cancel", "Comments" : "Comments", "MentionedIn": "mentioned this ", - "ContactInfo": "Contact Info" + "ContactInfo": "Contact Info", + "Content": "Content", + "Comment": "Comment", + "Message": "Message", + "Reference": "Reference", + "Chat": "Chat", + "In": "In" } } \ No newline at end of file diff --git a/plugins/chunter-assets/lang/ru.json b/plugins/chunter-assets/lang/ru.json new file mode 100644 index 0000000000..87c81ea3c6 --- /dev/null +++ b/plugins/chunter-assets/lang/ru.json @@ -0,0 +1,25 @@ +{ + "string": { + "ApplicationLabelChunter": "Чат", + "LeftComment": "оставил(а) комментарий", + "Channels": "Каналы", + "CreateChannel": "Создать канал", + "ChannelName": "Название", + "ChannelNamePlaceholder": "Канал", + "ChannelDescription": "Описание", + "MakePrivate": "Сделать личным", + "MakePrivateDescription": "Только пользователи могут видеть это", + "Channel": "Канал ", + "EditUpdate": "Сохранить...", + "EditCancel": "Отменить", + "Comments" : "Комментарии", + "MentionedIn": "упомянул(а) ", + "ContactInfo": "Контактная информация", + "Content": "Содержимое", + "Comment": "Комментарий", + "Message": "Сообщение", + "Reference": "Ссылка", + "Chat": "Чат", + "In": "в" + } +} \ No newline at end of file diff --git a/plugins/chunter-resources/src/components/activity/TxBacklinkReference.svelte b/plugins/chunter-resources/src/components/activity/TxBacklinkReference.svelte index 5e2d00b57f..0e50fdbd68 100644 --- a/plugins/chunter-resources/src/components/activity/TxBacklinkReference.svelte +++ b/plugins/chunter-resources/src/components/activity/TxBacklinkReference.svelte @@ -16,8 +16,10 @@ import type { Backlink } from '@anticrm/chunter' import type { Doc } from '@anticrm/core' import { createQuery, getClient } from '@anticrm/presentation' + import { Label } from '@anticrm/ui' import { AttributeModel } from '@anticrm/view' import { getObjectPresenter } from '@anticrm/view-resources' + import chunter from '../../plugin' // export let tx: TxCreateDoc export let value: Backlink @@ -25,15 +27,26 @@ const client = getClient() let presenter: AttributeModel | undefined + let targetPresenter: AttributeModel | undefined const docQuery = createQuery() + const targetQuery = createQuery() let doc: Doc | undefined + let target: Doc | undefined $: docQuery.query(value.backlinkClass, { _id: value.backlinkId }, (r) => { doc = r.shift() }) - $: className = client.getHierarchy().getClass(value.attachedToClass).label.toLocaleLowerCase() + $: targetQuery.query(value.attachedToClass, { _id: value.attachedTo }, (r) => { + target = r.shift() + }) + + $: if (target !== undefined) { + getObjectPresenter(client, target._class, { key: '' }).then((p) => { + targetPresenter = p + }) + } $: if (doc !== undefined) { getObjectPresenter(client, doc._class, { key: '' }).then((p) => { @@ -43,7 +56,12 @@ {#if presenter} - {className} in + {#if targetPresenter} +
+ +
+ {/if} +  
diff --git a/plugins/chunter-resources/src/plugin.ts b/plugins/chunter-resources/src/plugin.ts index 762cdec4df..f04de49c63 100644 --- a/plugins/chunter-resources/src/plugin.ts +++ b/plugins/chunter-resources/src/plugin.ts @@ -31,6 +31,7 @@ export default mergeIds(chunterId, chunter, { ChannelNamePlaceholder: '' as IntlString, ChannelDescription: '' as IntlString, MakePrivate: '' as IntlString, - MakePrivateDescription: '' as IntlString + MakePrivateDescription: '' as IntlString, + In: '' as IntlString } }) diff --git a/plugins/contact-assets/lang/en.json b/plugins/contact-assets/lang/en.json index 32ce06d1a5..6cc6c2dea8 100644 --- a/plugins/contact-assets/lang/en.json +++ b/plugins/contact-assets/lang/en.json @@ -32,6 +32,18 @@ "Person": "Person", "Organization": "Organization", "Employee": "Employee", - "Value": "Value" + "Value": "Value", + "FullDescription": "Full description", + "Phone": "Phone", + "LinkedIn": "LinkedIn", + "GitHub": "GitHub", + "Twitter": "Twitter", + "PhonePlaceholder": "+1 555 333 7777", + "LinkedInPlaceholder": "https://linkedin.com/in/jappleseed", + "AtPlaceHolder": "@appleseed", + "FacebookPlaceholder": "https://fb.com/jappleseed", + "Facebook": "Facebook", + "SocialLinks": "Socail links", + "ViewActivity": "View activity" } } \ No newline at end of file diff --git a/plugins/contact-assets/lang/ru.json b/plugins/contact-assets/lang/ru.json new file mode 100644 index 0000000000..25cdcd4e7b --- /dev/null +++ b/plugins/contact-assets/lang/ru.json @@ -0,0 +1,49 @@ +{ + "string": { + "Apply": "Применить", + "Contacts": "Контакты", + "Persons": "Люди", + "Organizations": "Организации", + "CreatePerson": "Создать персону", + "CreatePersons": "Создать папку для людей", + "CreateOrganization": "Создать организацию", + "OrganizationNamePlaceholder": "Apple", + "OrganizationsNamePlaceholder": "Организации", + "PersonFirstNamePlaceholder": "John", + "PersonLastNamePlaceholder": "Appleseed", + "PersonLocationPlaceholder": "Местоположение", + "PersonsNamePlaceholder": "Папка", + "CreateOrganizations": "Создать папку для организаций", + "Name": "Имя", + "SelectFolder": "Выбрать папку", + "OrganizationsFolder": "Папка с организациями", + "PersonsFolder": "Папка с людьми", + "MakePrivate": "Сделать личным", + "MakePrivateDescription": "Только пользователи могут видеть это", + "Create": "Контакт", + "SearchEmployee": "Поиск сотрудника...", + "SearchPerson": "Поиск персоны...", + "SearchOrganization": "Поиск организации...", + "ContactInfo": "Контактная информация", + "Contact": "Контакт", + "Location": "Местоположение", + "Channel": "Канал", + "ChannelProvider": "Провайдер канала", + "Person": "Персона", + "Organization": "Организация", + "Employee": "Сотрудник", + "Value": "Значение", + "FullDescription": "Полное описание", + "Phone": "Телефон", + "LinkedIn": "LinkedIn", + "GitHub": "GitHub", + "Twitter": "Twitter", + "PhonePlaceholder": "+1 555 333 7777", + "LinkedInPlaceholder": "https://linkedin.com/in/jappleseed", + "AtPlaceHolder": "@appleseed", + "FacebookPlaceholder": "https://fb.com/jappleseed", + "Facebook": "Facebook", + "SocialLinks": "Контактная информация", + "ViewActivity": "Посмотреть активность" + } +} \ No newline at end of file diff --git a/plugins/contact-resources/src/components/ChannelsPopup.svelte b/plugins/contact-resources/src/components/ChannelsPopup.svelte index 2be96edf7b..6a4557b30d 100644 --- a/plugins/contact-resources/src/components/ChannelsPopup.svelte +++ b/plugins/contact-resources/src/components/ChannelsPopup.svelte @@ -16,7 +16,7 @@
- {shortLabel}-{value.number} + {#if shortLabel}
diff --git a/plugins/task-resources/src/components/kanban/KanbanTemplateSelector.svelte b/plugins/task-resources/src/components/kanban/KanbanTemplateSelector.svelte index 794c78190e..acb15c1d3f 100644 --- a/plugins/task-resources/src/components/kanban/KanbanTemplateSelector.svelte +++ b/plugins/task-resources/src/components/kanban/KanbanTemplateSelector.svelte @@ -13,7 +13,7 @@ // limitations under the License. -->