Merge branch 'hotfix/v2.0.1' into bugfix/deeplink
This commit is contained in:
commit
258bab5b34
@ -336,7 +336,7 @@ export const isLanguageRtl = (lng: string) => {
|
||||
|
||||
// temporary function needed to replace rtl language in Editor to ltr
|
||||
export const getLtrLanguageForEditor = (
|
||||
userLng: string,
|
||||
userLng: string | undefined,
|
||||
portalLng: string,
|
||||
isEditor: boolean = false
|
||||
): string => {
|
||||
@ -349,7 +349,6 @@ export const getLtrLanguageForEditor = (
|
||||
|
||||
if ((!isEditor && !isEditorPath) || (userLng && !isUserLngRtl))
|
||||
return userLng;
|
||||
if (portalLng && !isPortalLngRtl) return portalLng;
|
||||
|
||||
return "en";
|
||||
};
|
||||
|
@ -181,7 +181,7 @@ if (IS_DEVELOPMENT) {
|
||||
|
||||
const portalLng =
|
||||
getLanguage(initialEditorState?.portalSettings?.culture) || "en";
|
||||
const userLng = getLanguage(initialEditorState?.user?.cultureName) || "en";
|
||||
const userLng = getLanguage(initialEditorState?.user?.cultureName);
|
||||
const finalLng = getLtrLanguageForEditor(userLng, portalLng, true);
|
||||
|
||||
await i18next.changeLanguage(finalLng);
|
||||
|
@ -156,10 +156,9 @@ export const initDocEditor = async (req) => {
|
||||
config.editorConfig.customization.logo.url +
|
||||
getLogoFromPath(config.editorConfig.customization.customer.logo);
|
||||
}
|
||||
|
||||
// needed to reset rtl language in Editor
|
||||
config.editorConfig.lang = getLtrLanguageForEditor(
|
||||
user?.cultureName || "en",
|
||||
user?.cultureName,
|
||||
settings.culture,
|
||||
true
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user