|
@@ -91,11 +91,9 @@ class NCoreUIKitLocalize<T extends LocalizeType> extends NCoreContext<LocalizeCo
|
|
|
const defaultState: LocalizeContextStateType = {
|
|
const defaultState: LocalizeContextStateType = {
|
|
|
localeKeys: defaultLocalesData.map(lDI => lDI.locale) as Array<keyof NCoreUIKit.LocaleKey>,
|
|
localeKeys: defaultLocalesData.map(lDI => lDI.locale) as Array<keyof NCoreUIKit.LocaleKey>,
|
|
|
activeLocale: defaultLocale.locale as keyof NCoreUIKit.LocaleKey,
|
|
activeLocale: defaultLocale.locale as keyof NCoreUIKit.LocaleKey,
|
|
|
- // localizeWithObject: this.localizeWithObject,
|
|
|
|
|
translations: defaultLocale.translations,
|
|
translations: defaultLocale.translations,
|
|
|
rruleConfig: defaultLocale.rruleConfig,
|
|
rruleConfig: defaultLocale.rruleConfig,
|
|
|
isRTL: defaultLocale.isRTL
|
|
isRTL: defaultLocale.isRTL
|
|
|
- // localize: this.localize
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
if(!this.projectLocales || (this.projectLocales && !this.projectLocales.length)) {
|
|
if(!this.projectLocales || (this.projectLocales && !this.projectLocales.length)) {
|
|
@@ -118,13 +116,11 @@ class NCoreUIKitLocalize<T extends LocalizeType> extends NCoreContext<LocalizeCo
|
|
|
const newState: LocalizeContextStateType = {
|
|
const newState: LocalizeContextStateType = {
|
|
|
activeLocale: currentProjectLocale.locale as keyof NCoreUIKit.LocaleKey,
|
|
activeLocale: currentProjectLocale.locale as keyof NCoreUIKit.LocaleKey,
|
|
|
localeKeys: dLKeys as Array<keyof NCoreUIKit.LocaleKey>,
|
|
localeKeys: dLKeys as Array<keyof NCoreUIKit.LocaleKey>,
|
|
|
- // localizeWithObject: this.localizeWithObject,
|
|
|
|
|
rruleConfig: {
|
|
rruleConfig: {
|
|
|
...defaultLocale.rruleConfig,
|
|
...defaultLocale.rruleConfig,
|
|
|
...currentProjectLocale.rruleConfig
|
|
...currentProjectLocale.rruleConfig
|
|
|
},
|
|
},
|
|
|
isRTL: currentProjectLocale.isRTL,
|
|
isRTL: currentProjectLocale.isRTL,
|
|
|
- // localize: this.localize,
|
|
|
|
|
translations: {
|
|
translations: {
|
|
|
...defaultLocale.translations,
|
|
...defaultLocale.translations,
|
|
|
...currentProjectLocale.translations
|
|
...currentProjectLocale.translations
|