提交 15c1b55a 编写于 作者: tony001's avatar tony001

优化国际化附加逻辑内容

上级 bcd78dea
...@@ -13,7 +13,7 @@ import iviewZhCnLocale from 'view-design/dist/locale/zh-CN'; ...@@ -13,7 +13,7 @@ import iviewZhCnLocale from 'view-design/dist/locale/zh-CN';
import elementZhLocale from 'element-ui/lib/locale/lang/zh-CN'; import elementZhLocale from 'element-ui/lib/locale/lang/zh-CN';
const messages = { const messages = {
'zh-CN': Object.assign(iviewZhCnLocale, elementZhLocale, zhCn), 'zh-CN': Object.assign(iviewZhCnLocale, elementZhLocale, zhCn()),
}; };
<#if app.getAllPSAppLans()??> <#if app.getAllPSAppLans()??>
...@@ -24,7 +24,7 @@ import iviewEnUsLocale from 'view-design/dist/locale/en-US'; ...@@ -24,7 +24,7 @@ import iviewEnUsLocale from 'view-design/dist/locale/en-US';
import elementEnLocale from 'element-ui/lib/locale/lang/en'; import elementEnLocale from 'element-ui/lib/locale/lang/en';
Object.assign(messages, { Object.assign(messages, {
'en-US': Object.assign(iviewEnUsLocale, elementEnLocale, enUs), 'en-US': Object.assign(iviewEnUsLocale, elementEnLocale, enUs()),
}); });
</#if> </#if>
</#list> </#list>
......
...@@ -3,6 +3,10 @@ TARGET=PSSYSAPP ...@@ -3,6 +3,10 @@ TARGET=PSSYSAPP
</#ibiztemplate> </#ibiztemplate>
import app_en_US_Base from './en-US-base'; import app_en_US_Base from './en-US-base';
const app_en_US_OwnData = {}; function getLocaleResource(){
const targetData = Object.assign(app_en_US_Base, app_en_US_OwnData); const app_en_US_OwnData = {};
export default targetData; const targetData = Object.assign(app_en_US_Base(), app_en_US_OwnData);
\ No newline at end of file return targetData;
}
export default getLocaleResource;
\ No newline at end of file
...@@ -3,6 +3,10 @@ TARGET=PSSYSAPP ...@@ -3,6 +3,10 @@ TARGET=PSSYSAPP
</#ibiztemplate> </#ibiztemplate>
import app_zh_CN_Base from './zh-CN-base'; import app_zh_CN_Base from './zh-CN-base';
const app_zh_CN_OwnData = {}; function getLocaleResource(){
const targetData = Object.assign(app_zh_CN_Base, app_zh_CN_OwnData); const app_zh_CN_OwnData = {};
export default targetData; const targetData = Object.assign(app_zh_CN_Base(), app_zh_CN_OwnData);
\ No newline at end of file return targetData;
}
export default getLocaleResource;
\ No newline at end of file
...@@ -3,6 +3,9 @@ TARGET=PSSYSAPP ...@@ -3,6 +3,9 @@ TARGET=PSSYSAPP
</#ibiztemplate> </#ibiztemplate>
import codelist_en_US_Base from './codelist_en_US_base'; import codelist_en_US_Base from './codelist_en_US_base';
const codelist_en_US_OwnData = {}; function getLocaleResource(){
const targetData = Object.assign(codelist_en_US_Base, codelist_en_US_OwnData); const codelist_en_US_OwnData = {};
export default targetData; const targetData = Object.assign(codelist_en_US_Base(), codelist_en_US_OwnData);
\ No newline at end of file return targetData;
}
export default getLocaleResource;
\ No newline at end of file
...@@ -4,23 +4,28 @@ TARGET=PSSYSAPP ...@@ -4,23 +4,28 @@ TARGET=PSSYSAPP
import commonLogic from '@/locale/logic/common/common-logic'; import commonLogic from '@/locale/logic/common/common-logic';
<#ibizinclude>../../@MACRO/FUNC.ts</#ibizinclude> <#ibizinclude>../../@MACRO/FUNC.ts</#ibizinclude>
<#assign langrestype = 'EN'/> <#assign langrestype = 'EN'/>
export default {
<#if app.getAllPSAppCodeLists()??> function getLocaleResourceBase(){
<#list app.getAllPSAppCodeLists() as codelist> const data:any = {
<#if codelist.getCodeListType() == "STATIC"> <#if app.getAllPSAppCodeLists()??>
${codelist.codeName}: { <#list app.getAllPSAppCodeLists() as codelist>
<#if codelist.getAllPSCodeItems?? && codelist.getAllPSCodeItems()??> <#if codelist.getCodeListType() == "STATIC">
<#list codelist.getAllPSCodeItems() as codeitem> ${codelist.codeName}: {
"${codeitem.getValue()?j_string}": commonLogic.appcommonhandle("<@getTextLanguage codeitem langrestype />",null), <#if codelist.getAllPSCodeItems?? && codelist.getAllPSCodeItems()??>
</#list> <#list codelist.getAllPSCodeItems() as codeitem>
"${codeitem.getValue()?j_string}": commonLogic.appcommonhandle("<@getTextLanguage codeitem langrestype />",null),
</#list>
</#if>
"empty": commonLogic.appcommonhandle("<@getEmptyTextLanguage codelist langrestype '' />",null)
},
<#elseif codelist.getCodeListType() == "DYNAMIC">
${codelist.codeName}: {
"empty": commonLogic.appcommonhandle("<@getEmptyTextLanguage codelist langrestype '' />",null),
},
</#if> </#if>
"empty": commonLogic.appcommonhandle("<@getEmptyTextLanguage codelist langrestype '' />",null) </#list>
}, </#if>
<#elseif codelist.getCodeListType() == "DYNAMIC"> };
${codelist.codeName}: { return data;
"empty": commonLogic.appcommonhandle("<@getEmptyTextLanguage codelist langrestype '' />",null), }
}, export default getLocaleResourceBase;
</#if> \ No newline at end of file
</#list>
</#if>
};
\ No newline at end of file
...@@ -3,6 +3,10 @@ TARGET=PSSYSAPP ...@@ -3,6 +3,10 @@ TARGET=PSSYSAPP
</#ibiztemplate> </#ibiztemplate>
import codelist_zh_CN_Base from './codelist_zh_CN_base'; import codelist_zh_CN_Base from './codelist_zh_CN_base';
const codelist_zh_CN_OwnData = {}; function getLocaleResource(){
const targetData = Object.assign(codelist_zh_CN_Base, codelist_zh_CN_OwnData); const codelist_zh_CN_OwnData = {};
export default targetData; const targetData = Object.assign(codelist_zh_CN_Base(), codelist_zh_CN_OwnData);
\ No newline at end of file return targetData;
}
export default getLocaleResource;
\ No newline at end of file
...@@ -4,23 +4,28 @@ TARGET=PSSYSAPP ...@@ -4,23 +4,28 @@ TARGET=PSSYSAPP
import commonLogic from '@/locale/logic/common/common-logic'; import commonLogic from '@/locale/logic/common/common-logic';
<#ibizinclude>../../@MACRO/FUNC.ts</#ibizinclude> <#ibizinclude>../../@MACRO/FUNC.ts</#ibizinclude>
<#assign langrestype = 'ZH_CN'/> <#assign langrestype = 'ZH_CN'/>
export default {
<#if app.getAllPSAppCodeLists()??> function getLocaleResourceBase(){
<#list app.getAllPSAppCodeLists() as codelist> const data:any = {
<#if codelist.getCodeListType() == "STATIC"> <#if app.getAllPSAppCodeLists()??>
${codelist.codeName}: { <#list app.getAllPSAppCodeLists() as codelist>
<#if codelist.getAllPSCodeItems?? && codelist.getAllPSCodeItems()??> <#if codelist.getCodeListType() == "STATIC">
<#list codelist.getAllPSCodeItems() as codeitem> ${codelist.codeName}: {
"${codeitem.getValue()?j_string}": commonLogic.appcommonhandle("<@getTextLanguage codeitem langrestype />",null), <#if codelist.getAllPSCodeItems?? && codelist.getAllPSCodeItems()??>
</#list> <#list codelist.getAllPSCodeItems() as codeitem>
"${codeitem.getValue()?j_string}": commonLogic.appcommonhandle("<@getTextLanguage codeitem langrestype />",null),
</#list>
</#if>
"empty": commonLogic.appcommonhandle("<@getEmptyTextLanguage codelist langrestype '' />",null),
},
<#elseif codelist.getCodeListType() == "DYNAMIC">
${codelist.codeName}: {
"empty": commonLogic.appcommonhandle("<@getEmptyTextLanguage codelist langrestype '' />",null),
},
</#if> </#if>
"empty": commonLogic.appcommonhandle("<@getEmptyTextLanguage codelist langrestype '' />",null), </#list>
}, </#if>
<#elseif codelist.getCodeListType() == "DYNAMIC"> };
${codelist.codeName}: { return data;
"empty": commonLogic.appcommonhandle("<@getEmptyTextLanguage codelist langrestype '' />",null), }
}, export default getLocaleResourceBase;
</#if> \ No newline at end of file
</#list>
</#if>
};
\ No newline at end of file
...@@ -3,6 +3,10 @@ TARGET=PSAPPDATAENTITY ...@@ -3,6 +3,10 @@ TARGET=PSAPPDATAENTITY
</#ibiztemplate> </#ibiztemplate>
import ${item.getCodeName()}_en_US_Base from './${srffilepath2(item.getCodeName())}_en_US_base'; import ${item.getCodeName()}_en_US_Base from './${srffilepath2(item.getCodeName())}_en_US_base';
const ${item.getCodeName()}_en_US_OwnData = {}; function getLocaleResource(){
const targetData = Object.assign(${item.getCodeName()}_en_US_Base, ${item.getCodeName()}_en_US_OwnData); const ${item.getCodeName()}_en_US_OwnData = {};
export default targetData; const targetData = Object.assign(${item.getCodeName()}_en_US_Base(), ${item.getCodeName()}_en_US_OwnData);
\ No newline at end of file return targetData;
}
export default getLocaleResource;
\ No newline at end of file
...@@ -3,6 +3,10 @@ TARGET=PSAPPDATAENTITY ...@@ -3,6 +3,10 @@ TARGET=PSAPPDATAENTITY
</#ibiztemplate> </#ibiztemplate>
import ${item.getCodeName()}_zh_CN_Base from './${srffilepath2(item.getCodeName())}_zh_CN_base'; import ${item.getCodeName()}_zh_CN_Base from './${srffilepath2(item.getCodeName())}_zh_CN_base';
const ${item.getCodeName()}_zh_CN_OwnData = {}; function getLocaleResource(){
const targetData = Object.assign(${item.getCodeName()}_zh_CN_Base, ${item.getCodeName()}_zh_CN_OwnData); const ${item.getCodeName()}_zh_CN_OwnData = {};
export default targetData; const targetData = Object.assign(${item.getCodeName()}_zh_CN_Base(), ${item.getCodeName()}_zh_CN_OwnData);
\ No newline at end of file return targetData;
}
export default getLocaleResource;
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册