提交 79e08ae8 编写于 作者: RedPig97's avatar RedPig97

update:国际化静态资源分离

上级 24d583ad
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
// 基于 APP/src/locale/lang/en-US-base.ts.ftl 生成
function getLocaleResource(){
const data:any = {
<#if app.getAllPSAppLans()??>
<#list app.getAllPSAppLans() as lans>
<#if lans.getLanguage() == 'EN' && lans.getAllPSLanguageItems?? && lans.getAllPSLanguageItems()??>
<#list lans.getAllPSLanguageItems() as languageItem>
'${languageItem.getLanResTag()}': '<#compress><#if languageItem.getContent?? && languageItem.getContent()??>${languageItem.getContent()}</#if></#compress>',
</#list>
</#if>
</#list>
</#if>
};
return data;
}
export default getLocaleResource;
\ No newline at end of file
...@@ -3,10 +3,11 @@ TARGET=PSSYSAPP ...@@ -3,10 +3,11 @@ TARGET=PSSYSAPP
</#ibiztemplate> </#ibiztemplate>
// 基于 APP/src/locale/lang/en-US.ts.ftl 生成 // 基于 APP/src/locale/lang/en-US.ts.ftl 生成
import getCustomLocaleResource from '../custom/custom_en_US'; import getCustomLocaleResource from '../custom/custom_en_US';
import getBaseLocaleResource from './en-US-base';
function getLocaleResource(){ function getLocaleResource(){
const data:any = { const data:any = {
<#-- local langue english --> <#-- local langue english -->
app: { app: {
commonWords:{ commonWords:{
error: "Error", error: "Error",
success: "Success", success: "Success",
...@@ -645,15 +646,7 @@ function getLocaleResource(){ ...@@ -645,15 +646,7 @@ function getLocaleResource(){
}, },
}, },
custom: getCustomLocaleResource(), custom: getCustomLocaleResource(),
<#if app.getAllPSAppLans()??> ...getBaseLocaleResource()
<#list app.getAllPSAppLans() as lans>
<#if lans.getLanguage() == 'EN' && lans.getAllPSLanguageItems?? && lans.getAllPSLanguageItems()??>
<#list lans.getAllPSLanguageItems() as languageItem>
'${languageItem.getLanResTag()}': '<#compress><#if languageItem.getContent?? && languageItem.getContent()??>${languageItem.getContent()}</#if></#compress>',
</#list>
</#if>
</#list>
</#if>
}; };
return data; return data;
} }
......
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
// 基于 APP/src/locale/lang/zh-CN-base.ts.ftl 生成
function getLocaleResource(){
const data:any = {
<#if app.getAllPSAppLans()??>
<#list app.getAllPSAppLans() as lans>
<#if lans.getLanguage() == 'ZH_CN' && lans.getAllPSLanguageItems?? && lans.getAllPSLanguageItems()??>
<#list lans.getAllPSLanguageItems() as languageItem>
'${languageItem.getLanResTag()}': '<#compress><#if languageItem.getContent?? && languageItem.getContent()??>${languageItem.getContent()}</#if></#compress>',
</#list>
</#if>
</#list>
</#if>
};
return data;
}
export default getLocaleResource;
\ No newline at end of file
...@@ -3,10 +3,11 @@ TARGET=PSSYSAPP ...@@ -3,10 +3,11 @@ TARGET=PSSYSAPP
</#ibiztemplate> </#ibiztemplate>
// 基于 APP/src/locale/lang/zh-CN.ts.ftl 生成 // 基于 APP/src/locale/lang/zh-CN.ts.ftl 生成
import getCustomLocaleResource from '../custom/custom_zh_CN'; import getCustomLocaleResource from '../custom/custom_zh_CN';
import getBaseLocaleResource from './zh-CN-base';
function getLocaleResource(){ function getLocaleResource(){
const data:any = { const data:any = {
<#-- 本地化语言资源 中文 --> <#-- 本地化语言资源 中文 -->
app: { app: {
commonWords:{ commonWords:{
error: "失败", error: "失败",
success: "成功", success: "成功",
...@@ -645,15 +646,7 @@ function getLocaleResource(){ ...@@ -645,15 +646,7 @@ function getLocaleResource(){
} }
}, },
custom: getCustomLocaleResource(), custom: getCustomLocaleResource(),
<#if app.getAllPSAppLans()??> ...getBaseLocaleResource()
<#list app.getAllPSAppLans() as lans>
<#if lans.getLanguage() == 'ZH_CN' && lans.getAllPSLanguageItems?? && lans.getAllPSLanguageItems()??>
<#list lans.getAllPSLanguageItems() as languageItem>
'${languageItem.getLanResTag()}': '<#compress><#if languageItem.getContent?? && languageItem.getContent()??>${languageItem.getContent()}</#if></#compress>',
</#list>
</#if>
</#list>
</#if>
}; };
return data; return data;
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册