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

优化国际化附加逻辑内容

上级 bcd78dea
......@@ -13,7 +13,7 @@ import iviewZhCnLocale from 'view-design/dist/locale/zh-CN';
import elementZhLocale from 'element-ui/lib/locale/lang/zh-CN';
const messages = {
'zh-CN': Object.assign(iviewZhCnLocale, elementZhLocale, zhCn),
'zh-CN': Object.assign(iviewZhCnLocale, elementZhLocale, zhCn()),
};
<#if app.getAllPSAppLans()??>
......@@ -24,7 +24,7 @@ import iviewEnUsLocale from 'view-design/dist/locale/en-US';
import elementEnLocale from 'element-ui/lib/locale/lang/en';
Object.assign(messages, {
'en-US': Object.assign(iviewEnUsLocale, elementEnLocale, enUs),
'en-US': Object.assign(iviewEnUsLocale, elementEnLocale, enUs()),
});
</#if>
</#list>
......
......@@ -11,8 +11,9 @@ import userCustom_en_US from '@locale/lanres/userCustom/userCustom_en_US';
import commonLogic from '@/locale/logic/common/common-logic';
<#assign langrestype = 'EN'/>
export default {
<#-- local langue english -->
function getAppLocale(){
const data:any = {
<#-- local langue english -->
app: {
commonWords:{
error: "Error",
......@@ -239,10 +240,13 @@ export default {
},
entities: {
<#list app.getAllPSAppDataEntities() as dataEntitey>
${dataEntitey.getCodeName()?lower_case}: ${dataEntitey.getCodeName()?lower_case}_en_US,
${dataEntitey.getCodeName()?lower_case}: ${dataEntitey.getCodeName()?lower_case}_en_US(),
</#list>
},
components: components_en_US,
codelist: codelist_en_US,
userCustom: userCustom_en_US,
};
\ No newline at end of file
components: components_en_US(),
codelist: codelist_en_US(),
userCustom: userCustom_en_US(),
};
return data;
}
export default getAppLocale;
\ No newline at end of file
......@@ -3,6 +3,10 @@ TARGET=PSSYSAPP
</#ibiztemplate>
import app_en_US_Base from './en-US-base';
const app_en_US_OwnData = {};
const targetData = Object.assign(app_en_US_Base, app_en_US_OwnData);
export default targetData;
\ No newline at end of file
function getLocaleResource(){
const app_en_US_OwnData = {};
const targetData = Object.assign(app_en_US_Base(), app_en_US_OwnData);
return targetData;
}
export default getLocaleResource;
\ No newline at end of file
......@@ -11,8 +11,9 @@ import userCustom_zh_CN from '@locale/lanres/userCustom/userCustom_zh_CN';
import commonLogic from '@/locale/logic/common/common-logic';
<#assign langrestype = 'ZH_CN'/>
export default {
<#-- 本地化语言资源 中文 -->
function getAppLocale(){
const data:any = {
<#-- 本地化语言资源 中文 -->
app: {
commonWords:{
error: "失败",
......@@ -238,10 +239,13 @@ export default {
},
entities: {
<#list app.getAllPSAppDataEntities() as dataEntitey>
${dataEntitey.getCodeName()?lower_case}: ${dataEntitey.getCodeName()?lower_case}_zh_CN,
${dataEntitey.getCodeName()?lower_case}: ${dataEntitey.getCodeName()?lower_case}_zh_CN(),
</#list>
},
components: components_zh_CN,
codelist: codelist_zh_CN,
userCustom: userCustom_zh_CN,
};
\ No newline at end of file
components: components_zh_CN(),
codelist: codelist_zh_CN(),
userCustom: userCustom_zh_CN(),
};
return data;
}
export default getAppLocale;
\ No newline at end of file
......@@ -3,6 +3,10 @@ TARGET=PSSYSAPP
</#ibiztemplate>
import app_zh_CN_Base from './zh-CN-base';
const app_zh_CN_OwnData = {};
const targetData = Object.assign(app_zh_CN_Base, app_zh_CN_OwnData);
export default targetData;
\ No newline at end of file
function getLocaleResource(){
const app_zh_CN_OwnData = {};
const targetData = Object.assign(app_zh_CN_Base(), app_zh_CN_OwnData);
return targetData;
}
export default getLocaleResource;
\ No newline at end of file
......@@ -3,6 +3,9 @@ TARGET=PSSYSAPP
</#ibiztemplate>
import codelist_en_US_Base from './codelist_en_US_base';
const codelist_en_US_OwnData = {};
const targetData = Object.assign(codelist_en_US_Base, codelist_en_US_OwnData);
export default targetData;
\ No newline at end of file
function getLocaleResource(){
const codelist_en_US_OwnData = {};
const targetData = Object.assign(codelist_en_US_Base(), codelist_en_US_OwnData);
return targetData;
}
export default getLocaleResource;
\ No newline at end of file
......@@ -4,8 +4,10 @@ TARGET=PSSYSAPP
import commonLogic from '@/locale/logic/common/common-logic';
<#ibizinclude>../../@MACRO/FUNC.ts</#ibizinclude>
<#assign langrestype = 'EN'/>
export default {
<#if app.getAllPSAppCodeLists()??>
function getLocaleResourceBase(){
const data:any = {
<#if app.getAllPSAppCodeLists()??>
<#list app.getAllPSAppCodeLists() as codelist>
<#if codelist.getCodeListType() == "STATIC">
${codelist.codeName}: {
......@@ -22,5 +24,8 @@ export default {
},
</#if>
</#list>
</#if>
};
\ No newline at end of file
</#if>
};
return data;
}
export default getLocaleResourceBase;
\ No newline at end of file
......@@ -3,6 +3,10 @@ TARGET=PSSYSAPP
</#ibiztemplate>
import codelist_zh_CN_Base from './codelist_zh_CN_base';
const codelist_zh_CN_OwnData = {};
const targetData = Object.assign(codelist_zh_CN_Base, codelist_zh_CN_OwnData);
export default targetData;
\ No newline at end of file
function getLocaleResource(){
const codelist_zh_CN_OwnData = {};
const targetData = Object.assign(codelist_zh_CN_Base(), codelist_zh_CN_OwnData);
return targetData;
}
export default getLocaleResource;
\ No newline at end of file
......@@ -4,8 +4,10 @@ TARGET=PSSYSAPP
import commonLogic from '@/locale/logic/common/common-logic';
<#ibizinclude>../../@MACRO/FUNC.ts</#ibizinclude>
<#assign langrestype = 'ZH_CN'/>
export default {
<#if app.getAllPSAppCodeLists()??>
function getLocaleResourceBase(){
const data:any = {
<#if app.getAllPSAppCodeLists()??>
<#list app.getAllPSAppCodeLists() as codelist>
<#if codelist.getCodeListType() == "STATIC">
${codelist.codeName}: {
......@@ -22,5 +24,8 @@ export default {
},
</#if>
</#list>
</#if>
};
\ No newline at end of file
</#if>
};
return data;
}
export default getLocaleResourceBase;
\ No newline at end of file
......@@ -3,6 +3,10 @@ TARGET=PSAPPDATAENTITY
</#ibiztemplate>
import ${item.getCodeName()}_en_US_Base from './${srffilepath2(item.getCodeName())}_en_US_base';
const ${item.getCodeName()}_en_US_OwnData = {};
const targetData = Object.assign(${item.getCodeName()}_en_US_Base, ${item.getCodeName()}_en_US_OwnData);
export default targetData;
\ No newline at end of file
function getLocaleResource(){
const ${item.getCodeName()}_en_US_OwnData = {};
const targetData = Object.assign(${item.getCodeName()}_en_US_Base(), ${item.getCodeName()}_en_US_OwnData);
return targetData;
}
export default getLocaleResource;
\ No newline at end of file
......@@ -6,47 +6,48 @@ import commonLogic from '@/locale/logic/common/common-logic';
<#assign langrestype = 'EN'/>
<#assign emptyText = 'No data.'>
export default {
<#-- 实体属性输出 -->
<#if item.getAllPSAppDEFields()??>
function getLocaleResourceBase(){
const data:any = {
<#-- 实体属性输出 -->
<#if item.getAllPSAppDEFields()??>
fields: {
<#list item.getAllPSAppDEFields() as field>
${field.getPSDEField().getCodeName()?lower_case}: commonLogic.appcommonhandle("<@getLogicNameLanguage field.getPSDEField() langrestype />",null),
</#list>
},
</#if>
<#if item.getAllPSDEFValueRules?? && item.getAllPSDEFValueRules()??>
</#if>
<#if item.getAllPSDEFValueRules?? && item.getAllPSDEFValueRules()??>
derules:{
<#list item.getAllPSDEFValueRules() as deValueRule>
<#if deValueRule?? && deValueRule.getPSDEFVRGroupCondition?? && deValueRule.getPSDEFVRGroupCondition()?? && deValueRule.getPSDEFVRGroupCondition().getPSDEFVRConditions?? && deValueRule.getPSDEFVRGroupCondition().getPSDEFVRConditions()??>
<#assign deVRConditions = deValueRule.getPSDEFVRGroupCondition().getPSDEFVRConditions() />
<#list deVRConditions as singleCondition>
<#list item.getAllPSDEFValueRules() as deValueRule>
<#if deValueRule?? && deValueRule.getPSDEFVRGroupCondition?? && deValueRule.getPSDEFVRGroupCondition()?? && deValueRule.getPSDEFVRGroupCondition().getPSDEFVRConditions?? && deValueRule.getPSDEFVRGroupCondition().getPSDEFVRConditions()??>
<#assign deVRConditions = deValueRule.getPSDEFVRGroupCondition().getPSDEFVRConditions() />
<#list deVRConditions as singleCondition>
${deValueRule.getCodeName()?lower_case}:commonLogic.appcommonhandle("${singleCondition.getRuleInfo()}",null),
</#list>
</#if>
</#list>
</#list>
</#if>
</#list>
},
</#if>
<#-- 属性值规则输出 -->
<#if item.getPSDataEntity().getAllPSDEFValueRules?? && item.getPSDataEntity().getAllPSDEFValueRules()??>
</#if>
<#-- 属性值规则输出 -->
<#if item.getPSDataEntity().getAllPSDEFValueRules?? && item.getPSDataEntity().getAllPSDEFValueRules()??>
derules:{
<#list item.getPSDataEntity().getAllPSDEFValueRules() as deValueRule>
<#if deValueRule?? && (deValueRule.isDefaultMode() == false) && deValueRule.getPSDEFVRGroupCondition?? && deValueRule.getPSDEFVRGroupCondition()?? && deValueRule.getPSDEFVRGroupCondition().getPSDEFVRConditions?? && deValueRule.getPSDEFVRGroupCondition().getPSDEFVRConditions()??>
<#assign deVRConditions = deValueRule.getPSDEFVRGroupCondition().getPSDEFVRConditions() />
<#list deVRConditions as singleCondition>
<#list item.getPSDataEntity().getAllPSDEFValueRules() as deValueRule>
<#if deValueRule?? && (deValueRule.isDefaultMode() == false) && deValueRule.getPSDEFVRGroupCondition?? && deValueRule.getPSDEFVRGroupCondition()?? && deValueRule.getPSDEFVRGroupCondition().getPSDEFVRConditions?? && deValueRule.getPSDEFVRGroupCondition().getPSDEFVRConditions()??>
<#assign deVRConditions = deValueRule.getPSDEFVRGroupCondition().getPSDEFVRConditions() />
<#list deVRConditions as singleCondition>
${deValueRule.getCodeName()?lower_case}<#if singleCondition.getDEFName?? && singleCondition.getDEFName()??>${singleCondition.getDEFName()?lower_case}</#if>${singleCondition.getCondType()?lower_case}:commonLogic.appcommonhandle("${singleCondition.getRuleInfo()}",null),
<#if singleCondition.getPSDEFVRConditions?? && singleCondition.getPSDEFVRConditions()??>
<#list singleCondition.getPSDEFVRConditions() as sonsingleCondition>
${deValueRule.getCodeName()?lower_case}<#if sonsingleCondition.getDEFName?? && sonsingleCondition.getDEFName()??>${sonsingleCondition.getDEFName()?lower_case}</#if>${sonsingleCondition.getCondType()?lower_case}:commonLogic.appcommonhandle("${sonsingleCondition.getRuleInfo()}",null),
</#list>
</#if>
</#list>
</#if>
</#list>
</#list>
</#if>
</#list>
},
</#if>
<#-- 实体视图输出 -->
<#if item.getAllPSAppViews()??>
</#if>
<#-- 实体视图输出 -->
<#if item.getAllPSAppViews()??>
views: {
<#list item.getAllPSAppViews() as obj>
${obj.getPSDEViewCodeName()?lower_case}: {
......@@ -55,14 +56,14 @@ export default {
},
</#list>
},
</#if>
<#-- 实体部件输出 -->
<#if item.getPSControls()??>
<#assign ctrltypes = ['FORM', 'GRID','LIST', 'DATAVIEW', 'CHART', 'KANBAN', 'GANTT', 'TREEGRIDEX', 'SEARCHFORM', 'TOOLBAR', 'TREEVIEW', 'CALENDAR']>
<#list ctrltypes as ctrltype>
<#list item.getPSControls() as ctrl>
<#if ctrl.getControlType() == ctrltype>
<#if !P.exists(ctrltype, ctrl.getCodeName(), "_class_")>
</#if>
<#-- 实体部件输出 -->
<#if item.getPSControls()??>
<#assign ctrltypes = ['FORM', 'GRID','LIST', 'DATAVIEW', 'CHART', 'KANBAN', 'GANTT', 'TREEGRIDEX', 'SEARCHFORM', 'TOOLBAR', 'TREEVIEW', 'CALENDAR']>
<#list ctrltypes as ctrltype>
<#list item.getPSControls() as ctrl>
<#if ctrl.getControlType() == ctrltype>
<#if !P.exists(ctrltype, ctrl.getCodeName(), "_class_")>
${ctrl.getCodeName()?lower_case}_${ctrl.getControlType()?lower_case}: {
<#if ctrl.getControlType() == 'FORM' || ctrl.getControlType() == 'SEARCHFORM'>
details: {
......@@ -123,9 +124,13 @@ export default {
},
</#if>
},
</#if>
</#if>
</#list>
</#list>
</#if>
};
\ No newline at end of file
</#if>
</#if>
</#list>
</#list>
</#if>
};
return data;
}
export default getLocaleResourceBase;
\ No newline at end of file
......@@ -3,6 +3,10 @@ TARGET=PSAPPDATAENTITY
</#ibiztemplate>
import ${item.getCodeName()}_zh_CN_Base from './${srffilepath2(item.getCodeName())}_zh_CN_base';
const ${item.getCodeName()}_zh_CN_OwnData = {};
const targetData = Object.assign(${item.getCodeName()}_zh_CN_Base, ${item.getCodeName()}_zh_CN_OwnData);
export default targetData;
\ No newline at end of file
function getLocaleResource(){
const ${item.getCodeName()}_zh_CN_OwnData = {};
const targetData = Object.assign(${item.getCodeName()}_zh_CN_Base(), ${item.getCodeName()}_zh_CN_OwnData);
return targetData;
}
export default getLocaleResource;
\ No newline at end of file
......@@ -6,35 +6,37 @@ import commonLogic from '@/locale/logic/common/common-logic';
<#assign langrestype = 'ZH_CN'/>
<#assign emptyText = '暂无数据'>
export default {
<#-- 实体属性输出 -->
<#if item.getAllPSAppDEFields()??>
function getLocaleResourceBase(){
const data:any = {
<#-- 实体属性输出 -->
<#if item.getAllPSAppDEFields()??>
fields: {
<#list item.getAllPSAppDEFields() as field>
${field.getPSDEField().getCodeName()?lower_case}: commonLogic.appcommonhandle("<@getLogicNameLanguage field.getPSDEField() langrestype />",null),
</#list>
},
</#if>
<#-- 属性值规则输出 -->
<#if item.getPSDataEntity().getAllPSDEFValueRules?? && item.getPSDataEntity().getAllPSDEFValueRules()??>
</#if>
<#-- 属性值规则输出 -->
<#if item.getPSDataEntity().getAllPSDEFValueRules?? && item.getPSDataEntity().getAllPSDEFValueRules()??>
derules:{
<#list item.getPSDataEntity().getAllPSDEFValueRules() as deValueRule>
<#if deValueRule?? && (deValueRule.isDefaultMode() == false) && deValueRule.getPSDEFVRGroupCondition?? && deValueRule.getPSDEFVRGroupCondition()?? && deValueRule.getPSDEFVRGroupCondition().getPSDEFVRConditions?? && deValueRule.getPSDEFVRGroupCondition().getPSDEFVRConditions()??>
<#assign deVRConditions = deValueRule.getPSDEFVRGroupCondition().getPSDEFVRConditions() />
<#list deVRConditions as singleCondition>
<#list item.getPSDataEntity().getAllPSDEFValueRules() as deValueRule>
<#if deValueRule?? && (deValueRule.isDefaultMode() == false) && deValueRule.getPSDEFVRGroupCondition?? && deValueRule.getPSDEFVRGroupCondition()?? && deValueRule.getPSDEFVRGroupCondition().getPSDEFVRConditions?? && deValueRule.getPSDEFVRGroupCondition().getPSDEFVRConditions()??>
<#assign deVRConditions = deValueRule.getPSDEFVRGroupCondition().getPSDEFVRConditions() />
<#list deVRConditions as singleCondition>
${deValueRule.getCodeName()?lower_case}<#if singleCondition.getDEFName?? && singleCondition.getDEFName()??>${singleCondition.getDEFName()?lower_case}</#if>${singleCondition.getCondType()?lower_case}:commonLogic.appcommonhandle("${singleCondition.getRuleInfo()}",null),
<#if singleCondition.getPSDEFVRConditions?? && singleCondition.getPSDEFVRConditions()??>
<#list singleCondition.getPSDEFVRConditions() as sonsingleCondition>
${deValueRule.getCodeName()?lower_case}<#if sonsingleCondition.getDEFName?? && sonsingleCondition.getDEFName()??>${sonsingleCondition.getDEFName()?lower_case}</#if>${sonsingleCondition.getCondType()?lower_case}:commonLogic.appcommonhandle("${sonsingleCondition.getRuleInfo()}",null),
</#list>
</#if>
</#list>
</#if>
</#list>
</#list>
</#if>
</#list>
},
</#if>
<#-- 实体视图输出 -->
<#if item.getAllPSAppViews()??>
</#if>
<#-- 实体视图输出 -->
<#if item.getAllPSAppViews()??>
views: {
<#list item.getAllPSAppViews() as obj>
${obj.getPSDEViewCodeName()?lower_case}: {
......@@ -43,14 +45,14 @@ export default {
},
</#list>
},
</#if>
<#-- 实体部件输出 -->
<#if item.getPSControls()??>
<#assign ctrltypes = ['FORM', 'GRID', 'LIST', 'DATAVIEW', 'CHART','KANBAN', 'GANTT', 'TREEGRIDEX', 'SEARCHFORM', 'TOOLBAR', 'TREEVIEW', 'TREEGRIDEX', 'CALENDAR']>
<#list ctrltypes as ctrltype>
<#list item.getPSControls() as ctrl>
<#if ctrl.getControlType() == ctrltype>
<#if !P.exists(ctrltype, ctrl.getCodeName(), "_class_")>
</#if>
<#-- 实体部件输出 -->
<#if item.getPSControls()??>
<#assign ctrltypes = ['FORM', 'GRID', 'LIST', 'DATAVIEW', 'CHART','KANBAN', 'GANTT', 'TREEGRIDEX', 'SEARCHFORM', 'TOOLBAR', 'TREEVIEW', 'TREEGRIDEX', 'CALENDAR']>
<#list ctrltypes as ctrltype>
<#list item.getPSControls() as ctrl>
<#if ctrl.getControlType() == ctrltype>
<#if !P.exists(ctrltype, ctrl.getCodeName(), "_class_")>
${ctrl.getCodeName()?lower_case}_${ctrl.getControlType()?lower_case}: {
<#if ctrl.getControlType() == 'FORM' || ctrl.getControlType() == 'SEARCHFORM'>
details: {
......@@ -111,9 +113,12 @@ export default {
},
</#if>
},
</#if>
</#if>
</#list>
</#list>
</#if>
};
\ No newline at end of file
</#if>
</#if>
</#list>
</#list>
</#if>
};
return data;
}
export default getLocaleResourceBase;
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册