RED-5485: allow runtime i18n init

This commit is contained in:
Dan Percic 2022-11-20 00:44:59 +02:00
parent b819cd4bf7
commit 6b38b86a85
4 changed files with 18 additions and 23 deletions

View File

@ -93,7 +93,7 @@ export const appModuleFactory = (config: AppConfig) => {
preventDuplicates: true,
resetTimeoutOnDuplicate: true,
}),
IqserTranslateModule.forRoot(),
IqserTranslateModule.forRoot({ pathPrefix: config.BASE_TRANSLATIONS_DIRECTORY }),
IqserLoadingModule.forRoot(),
IqserPermissionsModule.forRoot(),
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }),

View File

@ -17,5 +17,6 @@
"MANUAL_BASE_URL": "https://docs.redactmanager.com/preview",
"RSS_ENABLED": true,
"ANNOTATIONS_THRESHOLD": 1000,
"THEME": "theme-template"
"THEME": "theme-template",
"BASE_TRANSLATIONS_DIRECTORY": "/assets/i18n/"
}

@ -1 +1 @@
Subproject commit d11abf9de5706b4d2189bb04beda0a1f5b46fae8
Subproject commit df2f052a8323afddb478f7ded960a46f58b65042

View File

@ -1,21 +1,15 @@
export interface AppConfig {
ADMIN_CONTACT_NAME: string;
ADMIN_CONTACT_URL: string;
API_URL: string;
APP_NAME: string;
AUTO_READ_TIME: number;
BACKEND_APP_VERSION: string;
EULA_URL: string;
FRONTEND_APP_VERSION: string;
MAX_FILE_SIZE_MB: number;
MAX_RETRIES_ON_SERVER_ERROR: number;
OAUTH_CLIENT_ID: string;
OAUTH_IDP_HINT: null;
OAUTH_URL: string;
RECENT_PERIOD_IN_HOURS: number;
SELECTION_MODE: string;
MANUAL_BASE_URL: string;
RSS_ENABLED: boolean;
ANNOTATIONS_THRESHOLD: number;
THEME: string;
import { IqserAppConfig } from '@iqser/common-ui';
export interface AppConfig extends IqserAppConfig {
readonly ADMIN_CONTACT_NAME: string;
readonly ADMIN_CONTACT_URL: string;
readonly AUTO_READ_TIME: number;
readonly BACKEND_APP_VERSION: string;
readonly EULA_URL: string;
readonly MAX_FILE_SIZE_MB: number;
readonly MAX_RETRIES_ON_SERVER_ERROR: number;
readonly RECENT_PERIOD_IN_HOURS: number;
readonly SELECTION_MODE: string;
readonly ANNOTATIONS_THRESHOLD: number;
readonly THEME: string;
}