mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
perf: 优化自定义国际化加载路径
This commit is contained in:
committed by
fit2cloud-chenyw
parent
d0db747cae
commit
dfba990892
@@ -50,7 +50,10 @@ const createI18nOptions = async (): Promise<I18nOptions> => {
|
||||
|
||||
const loadRemoteI18n = async (option: any) => {
|
||||
const name = option.lang.replace('-', '_')
|
||||
const path = PATH_URL.startsWith('./') && PATH_URL.length > 2 ? PATH_URL.substring(1) : PATH_URL
|
||||
const path =
|
||||
PATH_URL.startsWith('./') && PATH_URL.length > 2
|
||||
? window.location.pathname + PATH_URL.substring(2)
|
||||
: PATH_URL
|
||||
const url = `${path}/i18n/custom_${name}_front_${option.name}.js`
|
||||
return await import(url)
|
||||
}
|
||||
|
||||
2
de-xpack
2
de-xpack
Submodule de-xpack updated: af394f2d3a...feab899f0f
Reference in New Issue
Block a user