diff --git a/dev/docker-compose.yaml b/dev/docker-compose.yaml index 3bad52dcd1..c34e7bce51 100644 --- a/dev/docker-compose.yaml +++ b/dev/docker-compose.yaml @@ -99,6 +99,7 @@ services: - MINIO_ACCESS_KEY=minioadmin - MINIO_SECRET_KEY=minioadmin - TITLE=DevPlatform + - DEFAULT_LANGUAGE=ru restart: unless-stopped # tracker-front: # image: hardcoreeng/tracker-front diff --git a/dev/prod/src/platform.ts b/dev/prod/src/platform.ts index e3e7b32079..dddf20a59b 100644 --- a/dev/prod/src/platform.ts +++ b/dev/prod/src/platform.ts @@ -78,6 +78,7 @@ import presentation, { presentationId } from '@hcengineering/presentation' import { textEditorId } from '@hcengineering/text-editor' import { setMetadata } from '@hcengineering/platform' +import { setDefaultLanguage } from '@hcengineering/theme' interface Config { ACCOUNTS_URL: string @@ -88,6 +89,7 @@ interface Config { TELEGRAM_URL: string GMAIL_URL: string TITLE?: string + DEFAULT_LANGUAGE?: string } const devConfig = process.env.CLIENT_TYPE === 'dev-production' @@ -163,4 +165,5 @@ export async function configurePlatform() { setMetadata(client.metadata.UseProtocolCompression, true) setMetadata(workbench.metadata.PlatformTitle, config.TITLE ?? 'Platform') + setDefaultLanguage(config.DEFAULT_LANGUAGE ?? 'en') } diff --git a/packages/theme/src/index.ts b/packages/theme/src/index.ts index b617a7b443..d9fc5e6476 100644 --- a/packages/theme/src/index.ts +++ b/packages/theme/src/index.ts @@ -18,6 +18,15 @@ import { writable } from 'svelte/store' export { default as Theme } from './Theme.svelte' +/** + * @public + */ +export const setDefaultLanguage = (language: string): void => { + if (localStorage.getItem('lang') === null) { + localStorage.setItem('lang', language) + } +} + /** * @public */ diff --git a/plugins/login-assets/lang/en.json b/plugins/login-assets/lang/en.json index bb2099bbc6..f76a0c9d04 100644 --- a/plugins/login-assets/lang/en.json +++ b/plugins/login-assets/lang/en.json @@ -41,6 +41,7 @@ "NoLimit": "No limit", "AlreadyJoined": "Already joined?", "ConfirmationSent": "A message has been sent to your email containing a link to confirm the your address.", - "ConfirmationSent2": "Please follow the link to complete your sign up." + "ConfirmationSent2": "Please follow the link to complete your sign up.", + "Slogan": "A unique place to manage all of your work\nWelcome to the Platform" } } diff --git a/plugins/login-assets/lang/ru.json b/plugins/login-assets/lang/ru.json index 5faaa47917..3de88d05f6 100644 --- a/plugins/login-assets/lang/ru.json +++ b/plugins/login-assets/lang/ru.json @@ -41,6 +41,7 @@ "NoLimit": "Без предела использований", "AlreadyJoined": "Уже подключены?", "ConfirmationSent": "На Вашу почту отправлено сообщение, c ссылкой для подтверждения email.", - "ConfirmationSent2": "Пожалуйста, перейдите по ссылке для завершения регистрации." + "ConfirmationSent2": "Пожалуйста, перейдите по ссылке для завершения регистрации.", + "Slogan": "Уникальное место для организации всей вашей работы\nДобро пожаловать в Платформу" } } diff --git a/plugins/login-resources/src/components/Intro.svelte b/plugins/login-resources/src/components/Intro.svelte index b7bdb5fe21..51d13a8b9c 100644 --- a/plugins/login-resources/src/components/Intro.svelte +++ b/plugins/login-resources/src/components/Intro.svelte @@ -14,10 +14,21 @@ // limitations under the License. -->
@@ -25,8 +36,11 @@
-

A unique place to manage all of your work

-

Welcome to the Platform

+ {#each slogan.split('\n') as p} +

+ {p} +

+ {/each}
diff --git a/plugins/login-resources/src/plugin.ts b/plugins/login-resources/src/plugin.ts index a2625aec45..4d620fe42f 100644 --- a/plugins/login-resources/src/plugin.ts +++ b/plugins/login-resources/src/plugin.ts @@ -58,6 +58,7 @@ export default mergeIds(loginId, login, { GetLink: '' as IntlString, AlreadyJoined: '' as IntlString, ConfirmationSent: '' as IntlString, - ConfirmationSent2: '' as IntlString + ConfirmationSent2: '' as IntlString, + Slogan: '' as IntlString } }) diff --git a/plugins/workbench-resources/src/components/Logo.svelte b/plugins/workbench-resources/src/components/Logo.svelte index b7d46deb99..2ea93e0cfe 100644 --- a/plugins/workbench-resources/src/components/Logo.svelte +++ b/plugins/workbench-resources/src/components/Logo.svelte @@ -17,7 +17,7 @@ export let workspace: string - +