diff --git a/webapp/packages/core-app/locales/en.json b/webapp/packages/core-app/locales/en.json deleted file mode 100644 index bfd114143f..0000000000 --- a/webapp/packages/core-app/locales/en.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "en", - "customConnection_connectionType_custom": "Parameters", - "customConnection_connectionType_url": "URL", - "customConnection_options": "Options", - "customConnection_properties": "Driver Properties", - "customConnection_custom_host": "Host", - "customConnection_custom_obligatory": "(obligatory)", - "customConnection_custom_port": "Port", - "customConnection_custom_database": "Database", - "customConnection_custom_server": "Server", - "customConnection_url_JDBC": "JDBC URL", - "customConnection_userName": "User name", - "customConnection_Password": "Password", - "customConnection_test": "Test Connection", - "customConnection_create": "Create", - "data_transfer_dialog_title": "Export data", - "data_transfer_dialog_export": "Export", - "data_transfer_dialog_configuration_title": "Export configuration", - "data_transfer_dialog_preparation": "We prepare your file for export. Please wait...", - "data_transfer_notification_preparation": "We prepare your file for download. Please wait...", - "data_transfer_notification_ready": "File ready to download", - "data_transfer_notification_error": "Preparation failed or canceled", - "data_transfer_notification_download": "Download", - "data_transfer_notification_delete": "Delete", - "data_transfer_exporting_table": "Table:", - "data_transfer_exporting_sql": "SQL:", - "authentication_login_dialog_title": "Authentication", - "authentication_login": "Login", - "authentication_logout": "Logout", - "ui_stepper_back": "Back", - "ui_processing_loading": "Loading...", - "ui_processing_cancel": "Cancel", - "ui_processing_canceling": "Canceling...", - "ui_processing_retry": "Retry", - "ui_processing_ok": "Ok", - "ui_error_message": "Error:", - "ui_errors_details": "Details", - "ui_search": "Search...", - "ui_data_saving_error": "Error when saving changes", - "block_properties_table_name": "Name", - "block_properties_table_value": "Value", - "block_properties_table_add": "Add", - "root_permission_denied": "You has no permission", - "app_root_session_expired_title": "Session expired", - "app_root_session_expired_message": "Session has been expired. Do you want to reload?", - "app_root_session_expired_reload": "Reload", - "app_shared_connectionMenu_newConnection": "New connection", - "app_shared_connectionMenu_connection": "Connection", - "app_shared_connectionMenu_custom": "Custom", - "app_shared_connectionMenu_disconnect": "Disconnect", - "app_shared_toolsMenu_tools": "Tools", - "app_shared_toolsMenu_logViewer": "Log viewer", - "app_shared_settingsMenu_config": "Configuration", - "app_shared_settingsMenu_theme": "Theme", - "app_shared_settingsMenu_lang": "Language", - "app_navigationTree_openNodeTab": "Open", - "app_navigationTree_refreshNode": "Refresh", - "core_eventsLog_dbeaverErrorDetails": "Error details", - "app_shared_inlineEditor_dialog_title": "Edit mode", - "app_shared_inlineEditor_dialog_apply": "Apply", - "app_shared_inlineEditor_dialog_cancel": "Cancel", - "app_log_view_clear_log": "Clear logs", - "app_log_view_entry_type": "Type", - "app_log_view_entry_timestamp": "Timestamp", - "app_log_view_entry_message": "Message", - "app_log_view_entry_details": "Details" -} diff --git a/webapp/packages/core-app/locales/ru.json b/webapp/packages/core-app/locales/ru.json deleted file mode 100644 index 6176418637..0000000000 --- a/webapp/packages/core-app/locales/ru.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "ru", - "customConnection_connectionType_custom": "Параметры", - "customConnection_connectionType_url": "URL", - "customConnection_options": "Подключение", - "customConnection_properties": "Параметры драйвера", - "customConnection_custom_host": "Хост", - "customConnection_custom_obligatory": "(обязательное)", - "customConnection_custom_port": "Порт", - "customConnection_custom_database": "База", - "customConnection_custom_server": "Сервер", - "customConnection_url_JDBC": "JDBC URL", - "customConnection_userName": "Пользователь", - "customConnection_Password": "Пароль", - "customConnection_test": "Проверить", - "customConnection_create": "Создать", - "data_transfer_dialog_title": "Экспорт данных", - "data_transfer_dialog_export": "Экспортировать", - "data_transfer_dialog_configuration_title": "Настройка экспорта", - "data_transfer_dialog_preparation": "Подготавливаем файл к экспорту. Пожалуйста подождите...", - "data_transfer_notification_preparation": "Подготавливаем файл к загрузке. Пожалуйста подождите...", - "data_transfer_notification_ready": "Файл готов к загрузке", - "data_transfer_notification_error": "Подготовка файла к загрузке не удалась или была отменена", - "data_transfer_notification_download": "Загрузить", - "data_transfer_notification_delete": "Удалить", - "data_transfer_exporting_table": "Таблица:", - "data_transfer_exporting_sql": "SQL:", - "authentication_login_dialog_title": "Авторизация", - "authentication_login": "Войти", - "authentication_logout": "Выйти", - "ui_stepper_back": "Назад", - "ui_processing_loading": "Загрузка...", - "ui_processing_cancel": "Отменить", - "ui_processing_canceling": "Отмена...", - "ui_processing_retry": "Повторить", - "ui_processing_ok": "Принять", - "ui_error_message": "Ошибка:", - "ui_errors_details": "Информация", - "ui_search": "Поиск...", - "ui_data_saving_error": "Ошибка при сохранении изменений", - "block_properties_name": "Название", - "block_properties_value": "Значение", - "block_properties_add": "Добавить", - "root_permission_denied": "Отказано в доступе", - "app_root_session_expired_title": "Сесстия истекла", - "app_root_session_expired_message": "Сессия истекла. Хотите перезагрузить страницу?", - "app_root_session_expired_reload": "Перезагрузить", - "app_shared_connectionMenu_newConnection": "Новое подключение", - "app_shared_connectionMenu_connection": "Подключение", - "app_shared_connectionMenu_custom": "Custom", - "app_shared_connectionMenu_disconnect": "Отключить", - "app_shared_toolsMenu_tools": "Инструменты", - "app_shared_toolsMenu_logViewer": "Просмотр лога", - "app_shared_settingsMenu_config": "Настройки", - "app_shared_settingsMenu_theme": "Тема", - "app_shared_settingsMenu_lang": "Язык", - "app_navigationTree_openNodeTab": "Открыть", - "app_navigationTree_refreshNode": "Обновить", - "core_eventsLog_dbeaverErrorDetails": "Детали ошибки", - "app_shared_inlineEditor_dialog_title": "Редактирование", - "app_shared_inlineEditor_dialog_apply": "Применить", - "app_shared_inlineEditor_dialog_cancel": "Отменить", - "app_log_view_clear_log": "Очистить лог", - "app_log_view_entry_type": "Тип", - "app_log_view_entry_timestamp": "Время", - "app_log_view_entry_message": "Сообщение", - "app_log_view_entry_details": "Детали" -} diff --git a/webapp/packages/core-app/src/TopNavBar/SettingsMenu/SettingsMenuService.ts b/webapp/packages/core-app/src/TopNavBar/SettingsMenu/SettingsMenuService.ts index adf6c06f31..5e2b3c4a01 100644 --- a/webapp/packages/core-app/src/TopNavBar/SettingsMenu/SettingsMenuService.ts +++ b/webapp/packages/core-app/src/TopNavBar/SettingsMenu/SettingsMenuService.ts @@ -6,25 +6,35 @@ * you may not use this file except in compliance with the License. */ -import { injectable } from '@cloudbeaver/core-di'; +import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { IComputedMenuItemOptions, StaticMenu } from '@cloudbeaver/core-dialogs'; import { LocalizationService } from '@cloudbeaver/core-localization'; +import { ServerService } from '@cloudbeaver/core-root'; import { ThemeService } from '@cloudbeaver/core-theming'; @injectable() -export class SettingsMenuService { +export class SettingsMenuService extends Bootstrap { static settingsMenuToken = 'settingsMenu'; private menu = new StaticMenu(); private langMenuToken = 'langMenu'; private themeMenuToken = 'themeMenu'; - constructor(private localizationService: LocalizationService, - private themeService: ThemeService) { + constructor( + private localizationService: LocalizationService, + private themeService: ThemeService, + private serverService: ServerService + ) { + super(); + } + register(): void | Promise { this.menu.addRootPanel(SettingsMenuService.settingsMenuToken); + } + + async load(): Promise { this.addThemes(); - this.addLocales(); + await this.addLocales(); } getMenu() { @@ -59,7 +69,13 @@ export class SettingsMenuService { }); } - private addLocales() { + private async addLocales() { + const config = await this.serverService.config.load(); + + if (!config) { + return; + } + this.addMenuItem( SettingsMenuService.settingsMenuToken, { @@ -70,7 +86,7 @@ export class SettingsMenuService { } ); - this.localizationService.getSupportedLanguages().forEach((lang) => { + config.supportedLanguages.forEach((lang) => { this.addMenuItem( this.langMenuToken, { diff --git a/webapp/packages/core-bootstrap/src/AppBootstrap.ts b/webapp/packages/core-bootstrap/src/AppBootstrap.ts index 3fbb6d5730..82173f6e09 100644 --- a/webapp/packages/core-bootstrap/src/AppBootstrap.ts +++ b/webapp/packages/core-bootstrap/src/AppBootstrap.ts @@ -29,10 +29,8 @@ import { ThemeService } from '@cloudbeaver/core-theming'; */ @injectable() export class AppBootstrap { - constructor( private exceptionsCatcherService: ExceptionsCatcherService, - private localizationService: LocalizationService, private themeService: ThemeService, private routerService: RouterService, private appScreenService: AppScreenService, @@ -44,20 +42,22 @@ export class AppBootstrap { private connectionSchemaManagerService: ConnectionSchemaManagerService, ) { } - async init() { + register(): void | Promise { this.exceptionsCatcherService.subscribe(); this.sessionExpireService.subscribe(); this.appScreenService.register(); - await this.localizationService.init(); - await this.themeService.init(); - this.connectionSchemaManagerService.registerCallbacks(); this.navigationTreeContextMenuService.registerMenuItems(); this.connectionDialogService.registerMenuItems(); this.logViewerMenuService.registerMenuItems(); } + async load() { + await this.themeService.init(); + + } + async doAfterPluginsInit() { // todo this should be moved to the NavigationTabs component creation phase but now it leads to bugs await this.navigationTabsService.restoreTabs(); diff --git a/webapp/packages/core-bootstrap/src/bootstrap.ts b/webapp/packages/core-bootstrap/src/bootstrap.ts index a6b0a488b0..fdaba5c72c 100644 --- a/webapp/packages/core-bootstrap/src/bootstrap.ts +++ b/webapp/packages/core-bootstrap/src/bootstrap.ts @@ -12,9 +12,12 @@ export async function bootstrap(plugins: PluginManifest[]) { const appBootstrap = app.getServiceInjector().resolveServiceByClass(AppBootstrap); try { - await appBootstrap.init(); await app.initializeServices(); + await appBootstrap.register(); + await app.loadServices(); + await app.load(); await app.initializePlugins(); + await appBootstrap.load(); await appBootstrap.doAfterPluginsInit(); await app.load(); diff --git a/webapp/packages/core-di/src/App.ts b/webapp/packages/core-di/src/App.ts index 95ced75684..981b2067ec 100644 --- a/webapp/packages/core-di/src/App.ts +++ b/webapp/packages/core-di/src/App.ts @@ -62,7 +62,23 @@ export class App { if (service.prototype instanceof Bootstrap) { const serviceInstance = this.diWrapper.injector.getServiceByClass(service); - await serviceInstance.bootstrap(); + if ('register' in serviceInstance) { + await serviceInstance.register(); + } + } + } + } + } + + async loadServices() { + for (const plugin of this.plugins) { + for (const service of plugin.providers) { + if (service.prototype instanceof Bootstrap) { + const serviceInstance = this.diWrapper.injector.getServiceByClass(service); + + if ('load' in serviceInstance) { + await serviceInstance.load(); + } } } } diff --git a/webapp/packages/core-di/src/Bootstrap.ts b/webapp/packages/core-di/src/Bootstrap.ts index 6f7a37b6c2..0b4af2deaa 100644 --- a/webapp/packages/core-di/src/Bootstrap.ts +++ b/webapp/packages/core-di/src/Bootstrap.ts @@ -10,5 +10,6 @@ import { injectable } from './injectable'; @injectable() export abstract class Bootstrap { - abstract bootstrap(): void | Promise; + abstract register(): void | Promise; + abstract load(): void | Promise; } diff --git a/webapp/packages/core-localization/src/IlocaleProvider.ts b/webapp/packages/core-localization/src/IlocaleProvider.ts new file mode 100644 index 0000000000..610ea4eb28 --- /dev/null +++ b/webapp/packages/core-localization/src/IlocaleProvider.ts @@ -0,0 +1,11 @@ +/* + * cloudbeaver - Cloud Database Manager + * Copyright (C) 2020 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ + +export interface ILocaleProvider { + (locale: string): Promise | string[][]; +} diff --git a/webapp/packages/core-localization/src/LocalizationService.ts b/webapp/packages/core-localization/src/LocalizationService.ts index 877bfa46f3..c76b605897 100644 --- a/webapp/packages/core-localization/src/LocalizationService.ts +++ b/webapp/packages/core-localization/src/LocalizationService.ts @@ -8,13 +8,15 @@ import { action, observable } from 'mobx'; -import { injectable } from '@cloudbeaver/core-di'; +import { Bootstrap, injectable } from '@cloudbeaver/core-di'; import { NotificationService } from '@cloudbeaver/core-events'; import { SessionService, ServerService } from '@cloudbeaver/core-root'; import { GraphQLService, ServerLanguage } from '@cloudbeaver/core-sdk'; import { SettingsService } from '@cloudbeaver/core-settings'; -import { Locale } from './Locale'; +import { ILocaleProvider } from './IlocaleProvider'; +import { defaultENLocale } from './locales/en'; +import { defaultRULocale } from './locales/ru'; import { TLocalizationToken } from './TLocalizationToken'; export type ServerLanguageShort = Pick; @@ -23,77 +25,68 @@ const DEFAULT_LOCALE_NAME = 'en'; const LANG_SETTINGS_KEY = 'langSettings'; @injectable() -export class LocalizationService { - +export class LocalizationService extends Bootstrap { @observable settings = { language: DEFAULT_LOCALE_NAME, }; - @observable.shallow - private supportedLanguages: ServerLanguageShort[] = []; - // observable.shallow - don't treat locales as observables @observable.shallow - private localeMap: Map = new Map(); + private localeMap: Map> = new Map(); - constructor(private notificationService: NotificationService, - private sessionService: SessionService, - private serverService: ServerService, - private graphQLService: GraphQLService, - private settingsService: SettingsService) { + private localeProviders: ILocaleProvider[] = [] + + constructor( + private notificationService: NotificationService, + private sessionService: SessionService, + private serverService: ServerService, + private graphQLService: GraphQLService, + private settingsService: SettingsService + ) { + super(); + } + + addProvider(provider: ILocaleProvider) { + this.localeProviders.push(provider); } readonly translate = (token: TLocalizationToken): string => { - const translation = this.getTranslation(token, this.getCurrentLocale()); + let locale = this.localeMap.get(this.getCurrentLanguage()); + + if (!locale) { + locale = this.localeMap.get(DEFAULT_LOCALE_NAME); + } + + const translation = locale && locale.get(token); + if (typeof translation === 'string') { return translation; } - - const fallbackTranslation = this.getTranslation(token, this.getDefaultLocale()); - if (typeof fallbackTranslation === 'string') { - return fallbackTranslation; - } - // error - no translation return token; } - getSupportedLanguages() { - return this.supportedLanguages; + register(): void | Promise { + this.addProvider(this.coreProvider.bind(this)); } - getCurrentLocale(): Locale | undefined { - return this.localeMap.get(this.settings.language); - } - - getDefaultLocale(): Locale | undefined { - return this.localeMap.get(DEFAULT_LOCALE_NAME); - } - - getCurrentLanguage(): string { - return this.settings.language; - } - - getTranslation(token: string, locale?: Locale): string | undefined { - return locale && locale[token]; - } - - async init() { + async load(): Promise { const session = await this.sessionService.session.load(); - const config = await this.serverService.config.load(); await this.loadLocaleAsync(DEFAULT_LOCALE_NAME); - if (!session || !config) { + if (!session) { return; } - this.supportedLanguages = config.supportedLanguages; - this.settingsService.registerSettings(this.settings, LANG_SETTINGS_KEY); // overwrite default value with settings this.setCurrentLocale(session.locale); // session language wins await this.setLocale(this.getCurrentLanguage()); } + getCurrentLanguage(): string { + return this.settings.language; + } + async changeLocaleAsync(key: string) { if (key === this.settings.language) { return; @@ -105,27 +98,47 @@ export class LocalizationService { } } + private coreProvider(locale: string) { + switch (locale) { + case 'ru': + return defaultRULocale; + default: + return defaultENLocale; + } + } + @action private setCurrentLocale(lang: string) { this.settings.language = lang; } private async setLocale(key: string) { - if (!this.supportedLanguages.some(lang => lang.isoCode === key)) { - this.setCurrentLocale(this.supportedLanguages[0]!.isoCode); + const config = await this.serverService.config.load(); + + if (!config) { + throw new Error('Cant\'t get server settings'); + } + + if (!config.supportedLanguages.some(lang => lang.isoCode === key)) { + this.setCurrentLocale(config!.supportedLanguages[0]!.isoCode); throw new Error(`Language '${key}' is not supported`); } await this.loadLocaleAsync(key); } - private async loadLocaleAsync(key: string): Promise { - if (this.localeMap.has(key)) { + private async loadLocaleAsync(localeKey: string): Promise { + if (this.localeMap.has(localeKey)) { return; } try { - const response = await fetch(`locales/${key}.json`); - const locale = await response.json() as Locale; - this.localeMap.set(key, locale); + const locale = new Map(); + + for (const provider of this.localeProviders) { + for (const [key, value] of await provider(localeKey)) { + locale.set(key, value); + } + } + this.localeMap.set(localeKey, locale); } catch (error) { this.notificationService.logException(error, 'Locale is not found', true); } diff --git a/webapp/packages/core-localization/src/locales/en.ts b/webapp/packages/core-localization/src/locales/en.ts new file mode 100644 index 0000000000..014ef9deba --- /dev/null +++ b/webapp/packages/core-localization/src/locales/en.ts @@ -0,0 +1,68 @@ +export const defaultENLocale = [ + ['name', 'en'], + ['customConnection_connectionType_custom', 'Parameters'], + ['customConnection_connectionType_url', 'URL'], + ['customConnection_options', 'Options'], + ['customConnection_properties', 'Driver Properties'], + ['customConnection_custom_host', 'Host'], + ['customConnection_custom_obligatory', '(obligatory)'], + ['customConnection_custom_port', 'Port'], + ['customConnection_custom_database', 'Database'], + ['customConnection_custom_server', 'Server'], + ['customConnection_url_JDBC', 'JDBC URL'], + ['customConnection_userName', 'User name'], + ['customConnection_Password', 'Password'], + ['customConnection_test', 'Test Connection'], + ['customConnection_create', 'Create'], + ['data_transfer_dialog_title', 'Export data'], + ['data_transfer_dialog_export', 'Export'], + ['data_transfer_dialog_configuration_title', 'Export configuration'], + ['data_transfer_dialog_preparation', 'We prepare your file for export. Please wait...'], + ['data_transfer_notification_preparation', 'We prepare your file for download. Please wait...'], + ['data_transfer_notification_ready', 'File ready to download'], + ['data_transfer_notification_error', 'Preparation failed or canceled'], + ['data_transfer_notification_download', 'Download'], + ['data_transfer_notification_delete', 'Delete'], + ['data_transfer_exporting_table', 'Table:'], + ['data_transfer_exporting_sql', 'SQL:'], + ['authentication_login_dialog_title', 'Authentication'], + ['authentication_login', 'Login'], + ['authentication_logout', 'Logout'], + ['ui_stepper_back', 'Back'], + ['ui_processing_loading', 'Loading...'], + ['ui_processing_cancel', 'Cancel'], + ['ui_processing_canceling', 'Canceling...'], + ['ui_processing_retry', 'Retry'], + ['ui_processing_ok', 'Ok'], + ['ui_error_message', 'Error:'], + ['ui_errors_details', 'Details'], + ['ui_search', 'Search...'], + ['ui_data_saving_error', 'Error when saving changes'], + ['block_properties_table_name', 'Name'], + ['block_properties_table_value', 'Value'], + ['block_properties_table_add', 'Add'], + ['root_permission_denied', 'You has no permission'], + ['app_root_session_expired_title', 'Session expired'], + ['app_root_session_expired_message', 'Session has been expired. Do you want to reload?'], + ['app_root_session_expired_reload', 'Reload'], + ['app_shared_connectionMenu_newConnection', 'New connection'], + ['app_shared_connectionMenu_connection', 'Connection'], + ['app_shared_connectionMenu_custom', 'Custom'], + ['app_shared_connectionMenu_disconnect', 'Disconnect'], + ['app_shared_toolsMenu_tools', 'Tools'], + ['app_shared_toolsMenu_logViewer', 'Log viewer'], + ['app_shared_settingsMenu_config', 'Configuration'], + ['app_shared_settingsMenu_theme', 'Theme'], + ['app_shared_settingsMenu_lang', 'Language'], + ['app_navigationTree_openNodeTab', 'Open'], + ['app_navigationTree_refreshNode', 'Refresh'], + ['core_eventsLog_dbeaverErrorDetails', 'Error details'], + ['app_shared_inlineEditor_dialog_title', 'Edit mode'], + ['app_shared_inlineEditor_dialog_apply', 'Apply'], + ['app_shared_inlineEditor_dialog_cancel', 'Cancel'], + ['app_log_view_clear_log', 'Clear logs'], + ['app_log_view_entry_type', 'Type'], + ['app_log_view_entry_timestamp', 'Timestamp'], + ['app_log_view_entry_message', 'Message'], + ['app_log_view_entry_details', 'Details'], +]; diff --git a/webapp/packages/core-localization/src/locales/ru.ts b/webapp/packages/core-localization/src/locales/ru.ts new file mode 100644 index 0000000000..e9661a4c07 --- /dev/null +++ b/webapp/packages/core-localization/src/locales/ru.ts @@ -0,0 +1,68 @@ +export const defaultRULocale = [ + ['name', 'ru'], + ['customConnection_connectionType_custom', 'Параметры'], + ['customConnection_connectionType_url', 'URL'], + ['customConnection_options', 'Подключение'], + ['customConnection_properties', 'Параметры драйвера'], + ['customConnection_custom_host', 'Хост'], + ['customConnection_custom_obligatory', '(обязательное)'], + ['customConnection_custom_port', 'Порт'], + ['customConnection_custom_database', 'База'], + ['customConnection_custom_server', 'Сервер'], + ['customConnection_url_JDBC', 'JDBC URL'], + ['customConnection_userName', 'Пользователь'], + ['customConnection_Password', 'Пароль'], + ['customConnection_test', 'Проверить'], + ['customConnection_create', 'Создать'], + ['data_transfer_dialog_title', 'Экспорт данных'], + ['data_transfer_dialog_export', 'Экспортировать'], + ['data_transfer_dialog_configuration_title', 'Настройка экспорта'], + ['data_transfer_dialog_preparation', 'Подготавливаем файл к экспорту. Пожалуйста подождите...'], + ['data_transfer_notification_preparation', 'Подготавливаем файл к загрузке. Пожалуйста подождите...'], + ['data_transfer_notification_ready', 'Файл готов к загрузке'], + ['data_transfer_notification_error', 'Подготовка файла к загрузке не удалась или была отменена'], + ['data_transfer_notification_download', 'Загрузить'], + ['data_transfer_notification_delete', 'Удалить'], + ['data_transfer_exporting_table', 'Таблица:'], + ['data_transfer_exporting_sql', 'SQL:'], + ['authentication_login_dialog_title', 'Авторизация'], + ['authentication_login', 'Войти'], + ['authentication_logout', 'Выйти'], + ['ui_stepper_back', 'Назад'], + ['ui_processing_loading', 'Загрузка...'], + ['ui_processing_cancel', 'Отменить'], + ['ui_processing_canceling', 'Отмена...'], + ['ui_processing_retry', 'Повторить'], + ['ui_processing_ok', 'Принять'], + ['ui_error_message', 'Ошибка:'], + ['ui_errors_details', 'Информация'], + ['ui_search', 'Поиск...'], + ['ui_data_saving_error', 'Ошибка при сохранении изменений'], + ['block_properties_name', 'Название'], + ['block_properties_value', 'Значение'], + ['block_properties_add', 'Добавить'], + ['root_permission_denied', 'Отказано в доступе'], + ['app_root_session_expired_title', 'Сесстия истекла'], + ['app_root_session_expired_message', 'Сессия истекла. Хотите перезагрузить страницу?'], + ['app_root_session_expired_reload', 'Перезагрузить'], + ['app_shared_connectionMenu_newConnection', 'Новое подключение'], + ['app_shared_connectionMenu_connection', 'Подключение'], + ['app_shared_connectionMenu_custom', 'Custom'], + ['app_shared_connectionMenu_disconnect', 'Отключить'], + ['app_shared_toolsMenu_tools', 'Инструменты'], + ['app_shared_toolsMenu_logViewer', 'Просмотр лога'], + ['app_shared_settingsMenu_config', 'Настройки'], + ['app_shared_settingsMenu_theme', 'Тема'], + ['app_shared_settingsMenu_lang', 'Язык'], + ['app_navigationTree_openNodeTab', 'Открыть'], + ['app_navigationTree_refreshNode', 'Обновить'], + ['core_eventsLog_dbeaverErrorDetails', 'Детали ошибки'], + ['app_shared_inlineEditor_dialog_title', 'Редактирование'], + ['app_shared_inlineEditor_dialog_apply', 'Применить'], + ['app_shared_inlineEditor_dialog_cancel', 'Отменить'], + ['app_log_view_clear_log', 'Очистить лог'], + ['app_log_view_entry_type', 'Тип'], + ['app_log_view_entry_timestamp', 'Время'], + ['app_log_view_entry_message', 'Сообщение'], + ['app_log_view_entry_details', 'Детали'], +]; diff --git a/webapp/packages/plugin-administration/locales/en.json b/webapp/packages/plugin-administration/locales/en.json deleted file mode 100644 index f28d8def9f..0000000000 --- a/webapp/packages/plugin-administration/locales/en.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "administration_menu_enter": "Administration", - "administration_menu_back": "Back to app" -} diff --git a/webapp/packages/plugin-administration/locales/ru.json b/webapp/packages/plugin-administration/locales/ru.json deleted file mode 100644 index c941ccbb70..0000000000 --- a/webapp/packages/plugin-administration/locales/ru.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "administration_menu_enter": "Администрирование", - "administration_menu_back": "Вернуться в приложение" -} \ No newline at end of file diff --git a/webapp/packages/plugin-administration/src/AdministrationLocaleService.ts b/webapp/packages/plugin-administration/src/AdministrationLocaleService.ts new file mode 100644 index 0000000000..13c960beea --- /dev/null +++ b/webapp/packages/plugin-administration/src/AdministrationLocaleService.ts @@ -0,0 +1,32 @@ +/* + * cloudbeaver - Cloud Database Manager + * Copyright (C) 2020 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ + +import { Bootstrap, injectable } from '@cloudbeaver/core-di'; +import { LocalizationService } from '@cloudbeaver/core-localization'; + +@injectable() +export class AdministrationLocaleService extends Bootstrap { + constructor(private localizationService: LocalizationService) { + super(); + } + + register(): void | Promise { + this.localizationService.addProvider(this.provider.bind(this)); + } + + load(): void | Promise { } + + private async provider(locale: string) { + switch (locale) { + case 'ru': + return (await import('./locales/ru')).default; + default: + return (await import('./locales/en')).default; + } + } +} diff --git a/webapp/packages/plugin-administration/src/AdministrationMenuService.ts b/webapp/packages/plugin-administration/src/AdministrationMenuService.ts index a2630fcffe..47dd76532c 100644 --- a/webapp/packages/plugin-administration/src/AdministrationMenuService.ts +++ b/webapp/packages/plugin-administration/src/AdministrationMenuService.ts @@ -25,7 +25,7 @@ export class AdministrationMenuService extends Bootstrap { super(); } - bootstrap() { + register() { this.settingsMenuService.addMenuItem( SettingsMenuService.settingsMenuToken, { @@ -48,4 +48,6 @@ export class AdministrationMenuService extends Bootstrap { } ); } + + load(): void | Promise { } } diff --git a/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationScreenService.ts b/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationScreenService.ts index 50a2f8721b..d8a1a70d5b 100644 --- a/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationScreenService.ts +++ b/webapp/packages/plugin-administration/src/AdministrationScreen/AdministrationScreenService.ts @@ -72,7 +72,7 @@ export class AdministrationScreenService extends Bootstrap { this.routerService.router.navigate(AdministrationScreenService.itemSubParamRouteName, { item, sub, param }); } - bootstrap() { + register() { this.screenService.create({ name: AdministrationScreenService.screenName, routes: [ @@ -98,6 +98,8 @@ export class AdministrationScreenService extends Bootstrap { }); } + load(): void | Promise { } + private async handleActivate() { if (!this.permissionsService.has(EAdminPermission.admin)) { this.appScreenService.navigateToRoot(); diff --git a/webapp/packages/plugin-administration/src/locales/en.ts b/webapp/packages/plugin-administration/src/locales/en.ts new file mode 100644 index 0000000000..75e26915c3 --- /dev/null +++ b/webapp/packages/plugin-administration/src/locales/en.ts @@ -0,0 +1,4 @@ +export default [ + ['administration_menu_enter', 'Administration'], + ['administration_menu_back', 'Back to app'], +]; diff --git a/webapp/packages/plugin-administration/src/locales/ru.ts b/webapp/packages/plugin-administration/src/locales/ru.ts new file mode 100644 index 0000000000..aec529264e --- /dev/null +++ b/webapp/packages/plugin-administration/src/locales/ru.ts @@ -0,0 +1,4 @@ +export default [ + ['administration_menu_enter', 'Администрирование'], + ['administration_menu_back', 'Вернуться в приложение'], +]; diff --git a/webapp/packages/plugin-administration/src/manifest.ts b/webapp/packages/plugin-administration/src/manifest.ts index 31199c9423..e330e79c45 100644 --- a/webapp/packages/plugin-administration/src/manifest.ts +++ b/webapp/packages/plugin-administration/src/manifest.ts @@ -9,6 +9,7 @@ import { IServiceInjector, PluginManifest } from '@cloudbeaver/core-di'; import { AdministrationItemService } from './AdministrationItem/AdministrationItemService'; +import { AdministrationLocaleService } from './AdministrationLocaleService'; import { AdministrationMenuService } from './AdministrationMenuService'; import { AdministrationScreenService } from './AdministrationScreen/AdministrationScreenService'; import { AdministrationTopAppBarService } from './AdministrationScreen/AdministrationTopAppBar/AdministrationTopAppBarService'; @@ -23,6 +24,7 @@ export const manifest: PluginManifest = { AdministrationScreenService, AdministrationTopAppBarService, AdministrationItemService, + AdministrationLocaleService, ], async initialize(services: IServiceInjector) { diff --git a/webapp/packages/plugin-authentication/locales/en.json b/webapp/packages/plugin-authentication/locales/en.json deleted file mode 100644 index 86f6bebfb4..0000000000 --- a/webapp/packages/plugin-authentication/locales/en.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "authentication_administration_item": "Users", - "authentication_administration_confirm_user_deletion": "Confirm user deletion", - "authentication_create_user_dialog_title": "Create new user", - "authentication_create_user_dialog_create": "Create", - "authentication_user_name": "User name", - "authentication_user_password": "User password", - "authentication_user_password_repeat": "Repeat password", - "authentication_user_role": "User role", - "authentication_user_passwords_not_match": "Passwords don't match", - "authentication_user_user_created": "User was created successfully" -} \ No newline at end of file diff --git a/webapp/packages/plugin-authentication/locales/ru.json b/webapp/packages/plugin-authentication/locales/ru.json deleted file mode 100644 index 60468d55eb..0000000000 --- a/webapp/packages/plugin-authentication/locales/ru.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "authentication_administration_item": "Пользователи", - "authentication_create_user_dialog_title": "Создание нового пользователя", - "authentication_create_user_dialog_create": "Создать", - "authentication_user_name": "Имя", - "authentication_user_password": "Пароль", - "authentication_user_password_repeat": "Повторите пароль", - "authentication_user_role": "Роль", - "authentication_user_passwords_not_match": "Пароли не совпадают", - "authentication_user_user_created": "Пользователь создан успешно" -} \ No newline at end of file diff --git a/webapp/packages/plugin-authentication/src/Administration/AuthAdministrationService.ts b/webapp/packages/plugin-authentication/src/Administration/AuthAdministrationService.ts index bc80bf357e..f8727a6000 100644 --- a/webapp/packages/plugin-authentication/src/Administration/AuthAdministrationService.ts +++ b/webapp/packages/plugin-authentication/src/Administration/AuthAdministrationService.ts @@ -17,6 +17,8 @@ export class AuthAdministrationService extends Bootstrap { super(); } - bootstrap() { + register() { + } + load(): void | Promise { } } diff --git a/webapp/packages/plugin-authentication/src/Administration/Users/UsersAdministrationService.ts b/webapp/packages/plugin-authentication/src/Administration/Users/UsersAdministrationService.ts index b7b24ee34e..4fdff2eb9b 100644 --- a/webapp/packages/plugin-authentication/src/Administration/Users/UsersAdministrationService.ts +++ b/webapp/packages/plugin-authentication/src/Administration/Users/UsersAdministrationService.ts @@ -26,7 +26,7 @@ export class UsersAdministrationService extends Bootstrap { super(); } - bootstrap() { + register() { this.administrationItemService.create({ name: 'users', sub: [ @@ -45,6 +45,8 @@ export class UsersAdministrationService extends Bootstrap { }); } + load(): void | Promise { } + navToRoot() { this.administrationScreenService.navigateToItem('users'); } diff --git a/webapp/packages/plugin-authentication/src/AuthenticationLocaleService.ts b/webapp/packages/plugin-authentication/src/AuthenticationLocaleService.ts new file mode 100644 index 0000000000..e402a87930 --- /dev/null +++ b/webapp/packages/plugin-authentication/src/AuthenticationLocaleService.ts @@ -0,0 +1,32 @@ +/* + * cloudbeaver - Cloud Database Manager + * Copyright (C) 2020 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ + +import { Bootstrap, injectable } from '@cloudbeaver/core-di'; +import { LocalizationService } from '@cloudbeaver/core-localization'; + +@injectable() +export class AuthenticationLocaleService extends Bootstrap { + constructor(private localizationService: LocalizationService) { + super(); + } + + register(): void | Promise { + this.localizationService.addProvider(this.provider.bind(this)); + } + + load(): void | Promise { } + + private async provider(locale: string) { + switch (locale) { + case 'ru': + return (await import('./locales/ru')).default; + default: + return (await import('./locales/en')).default; + } + } +} diff --git a/webapp/packages/plugin-authentication/src/locales/en.ts b/webapp/packages/plugin-authentication/src/locales/en.ts new file mode 100644 index 0000000000..267213219d --- /dev/null +++ b/webapp/packages/plugin-authentication/src/locales/en.ts @@ -0,0 +1,12 @@ +export default [ + ['authentication_administration_item', 'Users'], + ['authentication_administration_confirm_user_deletion', 'Confirm user deletion'], + ['authentication_create_user_dialog_title', 'Create new user'], + ['authentication_create_user_dialog_create', 'Create'], + ['authentication_user_name', 'User name'], + ['authentication_user_password', 'User password'], + ['authentication_user_password_repeat', 'Repeat password'], + ['authentication_user_role', 'User role'], + ['authentication_user_passwords_not_match', "Passwords don't match"], + ['authentication_user_user_created', 'User was created successfully'], +]; diff --git a/webapp/packages/plugin-authentication/src/locales/ru.ts b/webapp/packages/plugin-authentication/src/locales/ru.ts new file mode 100644 index 0000000000..46c635a5f5 --- /dev/null +++ b/webapp/packages/plugin-authentication/src/locales/ru.ts @@ -0,0 +1,11 @@ +export default [ + ['authentication_administration_item', 'Пользователи'], + ['authentication_create_user_dialog_title', 'Создание нового пользователя'], + ['authentication_create_user_dialog_create', 'Создать'], + ['authentication_user_name', 'Имя'], + ['authentication_user_password', 'Пароль'], + ['authentication_user_password_repeat', 'Повторите пароль'], + ['authentication_user_role', 'Роль'], + ['authentication_user_passwords_not_match', 'Пароли не совпадают'], + ['authentication_user_user_created', 'Пользователь создан успешно'], +]; diff --git a/webapp/packages/plugin-authentication/src/manifest.ts b/webapp/packages/plugin-authentication/src/manifest.ts index 8306ec057e..f5c16e575a 100644 --- a/webapp/packages/plugin-authentication/src/manifest.ts +++ b/webapp/packages/plugin-authentication/src/manifest.ts @@ -11,6 +11,7 @@ import { IServiceInjector, PluginManifest } from '@cloudbeaver/core-di'; import { RolesManagerService } from './Administration/RolesManagerService'; import { UsersAdministrationService } from './Administration/Users/UsersAdministrationService'; import { UsersManagerService } from './Administration/UsersManagerService'; +import { AuthenticationLocaleService } from './AuthenticationLocaleService'; import { AuthenticationService } from './AuthenticationService'; import { AuthInfoService } from './AuthInfoService'; import { AuthMenuService } from './AuthMenuService'; @@ -32,6 +33,7 @@ export const manifest: PluginManifest = { UsersAdministrationService, UsersManagerService, RolesManagerService, + AuthenticationLocaleService, ], async initialize(services: IServiceInjector) { diff --git a/webapp/packages/plugin-connection-preconfigured/locales/en.json b/webapp/packages/plugin-connection-preconfigured/locales/en.json deleted file mode 100644 index aeeb85a4d6..0000000000 --- a/webapp/packages/plugin-connection-preconfigured/locales/en.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "basicConnection_connectionDialog_newConnection" : "New connection", - "basicConnection_connectionDialog_title" : "Connect to Database", - "basicConnection_connectionDialog_listTitle" : "Database:", - "basicConnection_connectionDialog_username" : "Database Username:", - "basicConnection_connectionDialog_usernamePlaceholder" : "user", - "basicConnection_connectionDialog_password" : "Database User Password:", - "basicConnection_connectionDialog_passwordPlaceholder" : "password", - "basicConnection_connectionDialog_connecting" : "Connecting...", - "basicConnection_connectionDialog_connect" : "Connect", - "basicConnection_connectionDialog_connecting_message" : "Connecting to database...", - "basicConnection_main_menu_item" : "Preconfigured" -} diff --git a/webapp/packages/plugin-connection-preconfigured/locales/ru.json b/webapp/packages/plugin-connection-preconfigured/locales/ru.json deleted file mode 100644 index 19254e4cf3..0000000000 --- a/webapp/packages/plugin-connection-preconfigured/locales/ru.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "basicConnection_connectionDialog_newConnection" : "Новое подключение", - "basicConnection_connectionDialog_title" : "Подключение к базе данных", - "basicConnection_connectionDialog_listTitle" : "Базы данных:", - "basicConnection_connectionDialog_username" : "Имя пользователя:", - "basicConnection_connectionDialog_usernamePlaceholder" : "user", - "basicConnection_connectionDialog_password" : "Пароль пользователя:", - "basicConnection_connectionDialog_passwordPlaceholder" : "password", - "basicConnection_connectionDialog_connecting" : "Подключение...", - "basicConnection_connectionDialog_connect" : "Подключиться", - "basicConnection_connectionDialog_connecting_message" : "Подключение к базе...", - "basicConnection_main_menu_item" : "Подключиться" -} diff --git a/webapp/packages/plugin-connection-preconfigured/src/LocaleService.ts b/webapp/packages/plugin-connection-preconfigured/src/LocaleService.ts new file mode 100644 index 0000000000..63ab3fb719 --- /dev/null +++ b/webapp/packages/plugin-connection-preconfigured/src/LocaleService.ts @@ -0,0 +1,32 @@ +/* + * cloudbeaver - Cloud Database Manager + * Copyright (C) 2020 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ + +import { Bootstrap, injectable } from '@cloudbeaver/core-di'; +import { LocalizationService } from '@cloudbeaver/core-localization'; + +@injectable() +export class LocaleService extends Bootstrap { + constructor(private localizationService: LocalizationService) { + super(); + } + + register(): void | Promise { + this.localizationService.addProvider(this.provider.bind(this)); + } + + load(): void | Promise { } + + private async provider(locale: string) { + switch (locale) { + case 'ru': + return (await import('./locales/ru')).default; + default: + return (await import('./locales/en')).default; + } + } +} diff --git a/webapp/packages/plugin-connection-preconfigured/src/locales/en.ts b/webapp/packages/plugin-connection-preconfigured/src/locales/en.ts new file mode 100644 index 0000000000..07e9d3cef8 --- /dev/null +++ b/webapp/packages/plugin-connection-preconfigured/src/locales/en.ts @@ -0,0 +1,13 @@ +export default [ + ['basicConnection_connectionDialog_newConnection', 'New connection'], + ['basicConnection_connectionDialog_title', 'Connect to Database'], + ['basicConnection_connectionDialog_listTitle', 'Database:'], + ['basicConnection_connectionDialog_username', 'Database Username:'], + ['basicConnection_connectionDialog_usernamePlaceholder', 'user'], + ['basicConnection_connectionDialog_password', 'Database User Password:'], + ['basicConnection_connectionDialog_passwordPlaceholder', 'password'], + ['basicConnection_connectionDialog_connecting', 'Connecting...'], + ['basicConnection_connectionDialog_connect', 'Connect'], + ['basicConnection_connectionDialog_connecting_message', 'Connecting to database...'], + ['basicConnection_main_menu_item', 'Preconfigured'], +]; diff --git a/webapp/packages/plugin-connection-preconfigured/src/locales/ru.ts b/webapp/packages/plugin-connection-preconfigured/src/locales/ru.ts new file mode 100644 index 0000000000..56172a475d --- /dev/null +++ b/webapp/packages/plugin-connection-preconfigured/src/locales/ru.ts @@ -0,0 +1,13 @@ +export default [ + ['basicConnection_connectionDialog_newConnection', 'Новое подключение'], + ['basicConnection_connectionDialog_title', 'Подключение к базе данных'], + ['basicConnection_connectionDialog_listTitle', 'Базы данных:'], + ['basicConnection_connectionDialog_username', 'Имя пользователя:'], + ['basicConnection_connectionDialog_usernamePlaceholder', 'user'], + ['basicConnection_connectionDialog_password', 'Пароль пользователя:'], + ['basicConnection_connectionDialog_passwordPlaceholder', 'password'], + ['basicConnection_connectionDialog_connecting', 'Подключение...'], + ['basicConnection_connectionDialog_connect', 'Подключиться'], + ['basicConnection_connectionDialog_connecting_message', 'Подключение к базе...'], + ['basicConnection_main_menu_item', 'Подключиться'], +]; diff --git a/webapp/packages/plugin-connection-preconfigured/src/manifest.ts b/webapp/packages/plugin-connection-preconfigured/src/manifest.ts index 77e6689f65..1237827819 100644 --- a/webapp/packages/plugin-connection-preconfigured/src/manifest.ts +++ b/webapp/packages/plugin-connection-preconfigured/src/manifest.ts @@ -10,6 +10,7 @@ import { PluginManifest } from '@cloudbeaver/core-di'; import { BasicConnectionPluginBootstrap } from './BasicConnectionPluginBootstrap'; import { BasicConnectionService } from './BasicConnectionService'; +import { LocaleService } from './LocaleService'; export const basicConnectionPluginManifest: PluginManifest = { info: { @@ -18,6 +19,7 @@ export const basicConnectionPluginManifest: PluginManifest = { providers: [ BasicConnectionService, + LocaleService, ], initialize(services): void { diff --git a/webapp/packages/plugin-data-viewer/locales/en.json b/webapp/packages/plugin-data-viewer/locales/en.json deleted file mode 100644 index 4c66cfe33f..0000000000 --- a/webapp/packages/plugin-data-viewer/locales/en.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "table_header_sql_expression": "Enter a SQL expression to filter results" -} \ No newline at end of file diff --git a/webapp/packages/plugin-data-viewer/locales/ru.json b/webapp/packages/plugin-data-viewer/locales/ru.json deleted file mode 100644 index d4062890cc..0000000000 --- a/webapp/packages/plugin-data-viewer/locales/ru.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "table_header_sql_expression": "Введите SQL выражение чтобы отфильтровать результаты" -} \ No newline at end of file diff --git a/webapp/packages/plugin-data-viewer/src/LocaleService.ts b/webapp/packages/plugin-data-viewer/src/LocaleService.ts new file mode 100644 index 0000000000..63ab3fb719 --- /dev/null +++ b/webapp/packages/plugin-data-viewer/src/LocaleService.ts @@ -0,0 +1,32 @@ +/* + * cloudbeaver - Cloud Database Manager + * Copyright (C) 2020 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ + +import { Bootstrap, injectable } from '@cloudbeaver/core-di'; +import { LocalizationService } from '@cloudbeaver/core-localization'; + +@injectable() +export class LocaleService extends Bootstrap { + constructor(private localizationService: LocalizationService) { + super(); + } + + register(): void | Promise { + this.localizationService.addProvider(this.provider.bind(this)); + } + + load(): void | Promise { } + + private async provider(locale: string) { + switch (locale) { + case 'ru': + return (await import('./locales/ru')).default; + default: + return (await import('./locales/en')).default; + } + } +} diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/TableHeader/TableHeaderService.ts b/webapp/packages/plugin-data-viewer/src/TableViewer/TableHeader/TableHeaderService.ts index d14ea4e6d5..300e8d31f2 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/TableHeader/TableHeaderService.ts +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/TableHeader/TableHeaderService.ts @@ -16,7 +16,8 @@ import { TableWhereFilter } from './TableWhereFilter'; export class TableHeaderService extends Bootstrap { readonly tableHeaderPlaceholder = new PlaceholderContainer() - bootstrap() { + register() { this.tableHeaderPlaceholder.add(TableWhereFilter, 1); } + load(): void | Promise { } } diff --git a/webapp/packages/plugin-data-viewer/src/locales/en.ts b/webapp/packages/plugin-data-viewer/src/locales/en.ts new file mode 100644 index 0000000000..5e0f9c4e70 --- /dev/null +++ b/webapp/packages/plugin-data-viewer/src/locales/en.ts @@ -0,0 +1,3 @@ +export default [ + ['table_header_sql_expression', 'Enter a SQL expression to filter results'], +]; diff --git a/webapp/packages/plugin-data-viewer/src/locales/ru.ts b/webapp/packages/plugin-data-viewer/src/locales/ru.ts new file mode 100644 index 0000000000..978e5942c4 --- /dev/null +++ b/webapp/packages/plugin-data-viewer/src/locales/ru.ts @@ -0,0 +1,3 @@ +export default [ + ['table_header_sql_expression', 'Введите SQL выражение чтобы отфильтровать результаты'], +]; diff --git a/webapp/packages/plugin-data-viewer/src/manifest.ts b/webapp/packages/plugin-data-viewer/src/manifest.ts index 2557680815..15fd220ba0 100644 --- a/webapp/packages/plugin-data-viewer/src/manifest.ts +++ b/webapp/packages/plugin-data-viewer/src/manifest.ts @@ -11,6 +11,7 @@ import { IServiceInjector, PluginManifest } from '@cloudbeaver/core-di'; import { DataViewerBootstrap } from './DataViewerBootstrap'; import { DataViewerTableService } from './DataViewerTableService'; import { DataViewerTabService } from './DataViewerTabService'; +import { LocaleService } from './LocaleService'; import { TableFooterMenuService } from './TableViewer/TableFooter/TableFooterMenu/TableFooterMenuService'; import { TableHeaderService } from './TableViewer/TableHeader/TableHeaderService'; import { TableViewerStorageService } from './TableViewer/TableViewerStorageService'; @@ -26,6 +27,7 @@ export const manifest: PluginManifest = { TableViewerStorageService, TableFooterMenuService, TableHeaderService, + LocaleService, ], async initialize(services: IServiceInjector) { diff --git a/webapp/packages/plugin-authentication/public/icons/account.svg b/webapp/packages/product-default/public/icons/account.svg similarity index 100% rename from webapp/packages/plugin-authentication/public/icons/account.svg rename to webapp/packages/product-default/public/icons/account.svg diff --git a/webapp/packages/product-default/src/index.html.ejs b/webapp/packages/product-default/src/index.html.ejs index c9000cd045..1cb1dcb46c 100644 --- a/webapp/packages/product-default/src/index.html.ejs +++ b/webapp/packages/product-default/src/index.html.ejs @@ -18,9 +18,9 @@ type="image/svg+xml" /> - DBeaver web + Cloudbeaver - +
Loading...