[mobile] fix bug 53253
This commit is contained in:
parent
ec46276bea
commit
1b0b18b691
|
@ -59,12 +59,13 @@
|
||||||
return urlParams;
|
return urlParams;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
window.Common = {Locale: {defaultLang: <%= htmlWebpackPlugin.options.system.env.defaultLang %>}};
|
||||||
let params = getUrlParams(),
|
let params = getUrlParams(),
|
||||||
lang = (params["lang"] || 'en').split(/[\-\_]/)[0];
|
lang = (params["lang"] || window.Common.Locale.defaultLang).split(/[\-\_]/)[0];
|
||||||
|
|
||||||
|
window.Common.Locale.currentLang = lang;
|
||||||
window.frameEditorId = params["frameEditorId"];
|
window.frameEditorId = params["frameEditorId"];
|
||||||
window.parentOrigin = params["parentOrigin"];
|
window.parentOrigin = params["parentOrigin"];
|
||||||
window.Common = {Locale: {currentLang: lang}};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
|
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
|
||||||
|
|
|
@ -6,7 +6,7 @@ i18n.use(initReactI18next)
|
||||||
.use(Fetch)
|
.use(Fetch)
|
||||||
.init({
|
.init({
|
||||||
lng: Common.Locale.currentLang,
|
lng: Common.Locale.currentLang,
|
||||||
fallbackLng: "en",
|
fallbackLng: Common.Locale.defaultLang,
|
||||||
escapeValue: false,
|
escapeValue: false,
|
||||||
backend: {
|
backend: {
|
||||||
loadPath: './locale/{{lng}}.json'
|
loadPath: './locale/{{lng}}.json'
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
let params = getUrlParams(),
|
let params = getUrlParams(),
|
||||||
lang = (params["lang"] || 'en').split(/[\-\_]/)[0];
|
lang = (params["lang"] || <%= htmlWebpackPlugin.options.system.env.defaultLang %>).split(/[\-\_]/)[0];
|
||||||
|
|
||||||
window.frameEditorId = params["frameEditorId"];
|
window.frameEditorId = params["frameEditorId"];
|
||||||
window.parentOrigin = params["parentOrigin"];
|
window.parentOrigin = params["parentOrigin"];
|
||||||
|
|
|
@ -6,7 +6,7 @@ i18n.use(initReactI18next)
|
||||||
.use(Fetch)
|
.use(Fetch)
|
||||||
.init({
|
.init({
|
||||||
lng: Common.Locale.currentLang,
|
lng: Common.Locale.currentLang,
|
||||||
fallbackLng: "en",
|
fallbackLng: Common.Locale.defaultLang,
|
||||||
escapeValue: false,
|
escapeValue: false,
|
||||||
backend: {
|
backend: {
|
||||||
loadPath: './locale/{{lng}}.json'
|
loadPath: './locale/{{lng}}.json'
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
let params = getUrlParams(),
|
let params = getUrlParams(),
|
||||||
lang = (params["lang"] || 'en').split(/[\-\_]/)[0];
|
lang = (params["lang"] || <%= htmlWebpackPlugin.options.system.env.defaultLang %>).split(/[\-\_]/)[0];
|
||||||
|
|
||||||
window.frameEditorId = params["frameEditorId"];
|
window.frameEditorId = params["frameEditorId"];
|
||||||
window.parentOrigin = params["parentOrigin"];
|
window.parentOrigin = params["parentOrigin"];
|
||||||
|
|
|
@ -6,7 +6,7 @@ i18n.use(initReactI18next)
|
||||||
.use(Fetch)
|
.use(Fetch)
|
||||||
.init({
|
.init({
|
||||||
lng: Common.Locale.currentLang,
|
lng: Common.Locale.currentLang,
|
||||||
fallbackLng: "en",
|
fallbackLng: Common.Locale.defaultLang,
|
||||||
escapeValue: false,
|
escapeValue: false,
|
||||||
backend: {
|
backend: {
|
||||||
loadPath: './locale/{{lng}}.json'
|
loadPath: './locale/{{lng}}.json'
|
||||||
|
|
|
@ -204,6 +204,11 @@ module.exports = {
|
||||||
removeStyleLinkTypeAttributes: true,
|
removeStyleLinkTypeAttributes: true,
|
||||||
useShortDoctype: true
|
useShortDoctype: true
|
||||||
} : false,
|
} : false,
|
||||||
|
system: {
|
||||||
|
env: {
|
||||||
|
defaultLang: JSON.stringify(process.env.DEFAULT_LANG || "en"),
|
||||||
|
}
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
new MiniCssExtractPlugin({
|
new MiniCssExtractPlugin({
|
||||||
filename: 'css/[name].css',
|
filename: 'css/[name].css',
|
||||||
|
|
Loading…
Reference in a new issue