From e6aa96029ddb34586d27c2806fabbfe64029183e Mon Sep 17 00:00:00 2001
From: pengm <674192343@qq.com>
Date: Wed, 18 Jun 2025 13:52:34 +0800
Subject: [PATCH] 1.完善英文版的多语言翻译
---
src/components/Common/CommonComponent/index.js | 23 +++++++++++++----------
src/components/Common/CommonComponent/index_new.js | 3 ++-
src/components/Common/CommonTable/index.js | 20 ++++++++++++++------
src/components/CommonElementEvent/StatementInfo.js | 8 +++++---
src/components/Manufacture/ProcessCardPack/ProcessCardPackTableTree.js | 9 ++++++---
src/components/Manufacture/ProcessCardPackTableTreeNew/index.js | 12 ++++++------
src/components/Manufacture/WorkOrderPack/WorkOrderPackTableTree.js | 23 +++++++++++++++--------
src/components/Manufacture/WorkOrderPack/WorkOrderResearchTableTree.js | 17 +++++++++++++----
8 files changed, 74 insertions(+), 41 deletions(-)
diff --git a/src/components/Common/CommonComponent/index.js b/src/components/Common/CommonComponent/index.js
index eb97465..356ca1b 100644
--- a/src/components/Common/CommonComponent/index.js
+++ b/src/components/Common/CommonComponent/index.js
@@ -2961,6 +2961,8 @@ export default class CommonComponent extends Component {
);
}
const sModelsType = commonUtils.isNotEmptyObject(this.props) && commonUtils.isNotEmptyObject(this.props.app) ? this.props.app.currentPane.sModelsType : '';
+ const pleaseSelect = commonUtils.isNotEmptyObject(this.props) && commonUtils.isNotEmptyObject(this.props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'pleaseSelect') : '请选择' ;
+ const combinedInfo = commonUtils.isNotEmptyObject(this.props) && commonUtils.isNotEmptyObject(this.props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'CombinedInfo') : '合版信息' ;
let bParamColor = false;
if (this.props && sName === 'sParamValue' && this.props.dataValue) {
if (this.props.dataValue === '选择色序' || this.props.record.sParamKey === 'sParam1001') {
@@ -2985,7 +2987,7 @@ export default class CommonComponent extends Component {
});
sValue = commonUtils.isNotEmptyObject(sValue) ? sValue.substr(0, sValue.length - 1) : '';
}
- } else if (sName === 'sColorSerialMemo' || bSColorSerialMemo || sName === 'sPositiveColor' || sName === 'sOppositeColor' || bParamColor) {
+ } else if (sName === "sColorSerialMemo" || bSColorSerialMemo || sName === "sPositiveColor" || sName === "sOppositeColor" || bParamColor) {
let JsonData = [];
if (commonUtils.isNotEmptyObject(this.props.dataValue)) {
try {
@@ -2994,13 +2996,13 @@ export default class CommonComponent extends Component {
JsonData = [];
}
}
- if (typeof JsonData === 'object' && commonUtils.isNotEmptyArr(JsonData)) {
- JsonData.forEach((item) => {
+ if (typeof JsonData === "object" && commonUtils.isNotEmptyArr(JsonData)) {
+ JsonData.forEach(item => {
sValue += `${item.sName}+`;
});
- sValue = commonUtils.isNotEmptyObject(sValue) ? sValue.substr(0, sValue.length - 1) : '';
+ sValue = commonUtils.isNotEmptyObject(sValue) ? sValue.substr(0, sValue.length - 1) : "";
}
- } else if (sName === 'sParams' || sName === 'sQuoParams' || sName === 'sParamsNew') {
+ } else if (sName === "sParams" || sName === "sQuoParams" || sName === "sParamsNew") {
if (this.props.onGetParamsValue) {
// 页面自行处理sparams的sValue
sValue = this.props.onGetParamsValue({ sName, sValue: this.props.dataValue, record: this.props.record });
@@ -3014,13 +3016,13 @@ export default class CommonComponent extends Component {
}
}
if (commonUtils.isNotEmptyArr(JsonData)) {
- JsonData.forEach((item) => {
+ JsonData.forEach(item => {
if (item.bSelfCbx) {
- const strValue = commonUtils.isNotEmptyObject(item.sParamValue) ? item.sParamValue : '';
+ const strValue = commonUtils.isNotEmptyObject(item.sParamValue) ? item.sParamValue : "";
sValue += `${item.sParamName}:${strValue},`;
}
});
- sValue = commonUtils.isNotEmptyObject(sValue) ? sValue.substr(0, sValue.length - 1) : '';
+ sValue = commonUtils.isNotEmptyObject(sValue) ? sValue.substr(0, sValue.length - 1) : "";
}
}
} else {
@@ -3043,15 +3045,16 @@ export default class CommonComponent extends Component {
style={{
width: '100%', overflow: 'hidden', color: '#2f54eb', background: 'transparent',
}}
- > {commonUtils.isNotEmptyObject(sValue) ? sValue : sName === 'sCombinedMemo' ? '合版信息' : '请选择'}
+ > {commonUtils.isNotEmptyObject(sValue) ? sValue : sName === 'sCombinedMemo' ? combinedInfo : pleaseSelect}
);
}
/* commonClassify 制单日期、制单人员新增时设置保存时自动生成 */
let speacilNote = '';
const { record } = this.props;
+ const afterSave = commonUtils.isNotEmptyObject(this.props) && commonUtils.isNotEmptyObject(this.props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'afterSave') : '保存后自动生成';
if (commonUtils.isNotEmptyObject(record) && commonUtils.isEmptyObject(record[sName]) && commonUtils.isNotEmptyObject(sName) && (sName === 'tCreateDate' || sName === 'sMakePerson')) {
- speacilNote = (
保存后自动生成
);
+ speacilNote = ( {afterSave}
);
}
const bShowMemo = false && commonUtils.isNotEmptyObject(sName) && sName.indexOf('sMemo') > -1 && !sName.includes('ProcessMemo'); /* 非编辑状态下 备注以蓝色链接呈现 */
diff --git a/src/components/Common/CommonComponent/index_new.js b/src/components/Common/CommonComponent/index_new.js
index 3e4ccef..a3b7bf5 100644
--- a/src/components/Common/CommonComponent/index_new.js
+++ b/src/components/Common/CommonComponent/index_new.js
@@ -1150,8 +1150,9 @@ function CommonComponent(props) {
}
let speacilNote = '';
const { record } = props;
+ const afterSave = commonUtils.isNotEmptyObject(this.props) && commonUtils.isNotEmptyObject(this.props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'afterSave') : '保存后自动生成';
if (commonUtils.isNotEmptyObject(record) && commonUtils.isEmptyObject(record[sName]) && commonUtils.isNotEmptyObject(sName) && (sName === 'tCreateDate' || sName === 'sMakePerson')) {
- speacilNote = ( 保存后自动生成
);
+ speacilNote = ( {afterSave}
);
}
let imgBox = '';
if (commonUtils.isNotEmptyObject(sName) && sName.indexOf('picture') > -1) {
diff --git a/src/components/Common/CommonTable/index.js b/src/components/Common/CommonTable/index.js
index 1dbc0ad..3a4216d 100644
--- a/src/components/Common/CommonTable/index.js
+++ b/src/components/Common/CommonTable/index.js
@@ -1967,6 +1967,7 @@ class CommonTableRc extends React.Component {
}
// 处理拖拽排序
if (this.props.dragHandle) {
+ const handleSortTitle = commonFunc.showMessage(this.props.app.commonConst, 'sort') || '排序' ;
const handleSort = tableColumn.filter(item => item.dataIndex === 'handleSort').length;
if (tableColumn[0]) {
function arrayMoveMutable(array, fromIndex, toIndex) {
@@ -2029,7 +2030,7 @@ class CommonTableRc extends React.Component {
}
tableColumn.unshift(
{
- title: '排序',
+ title: handleSortTitle,
dataIndex: 'handleSort',
fixed: 'left',
width: 40,
@@ -4924,17 +4925,20 @@ class CommonTableRc extends React.Component {
/** 删除行 */
handleDelRow = (index, record) => {
if(this.props.name !== 'slaveFilter') {
+ const sureDel = commonUtils.isNotEmptyObject(this.props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'SureDel') : '确认要删除吗?' ;
+ const BtnSure = commonUtils.isNotEmptyObject(this.props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'BtnSure') : '确定?' ;
+ const BtnCancel = commonUtils.isNotEmptyObject(this.props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'BtnCancel') : '确定?' ;
const _this = this;
confirm({
- title: '确认要删除吗?',
+ title: sureDel,
onOk() {
_this.handleDelOkRow(index, record);
},
onCancel() {
return false;
},
- okText: '确定',
- cancelText: '取消'
+ okText: BtnSure,
+ cancelText: BtnCancel
});
} else {
this.handleDelOkRow(index, record);
@@ -5575,6 +5579,10 @@ class CommonTableRc extends React.Component {
let clickEvent = '';
/* 选择合版产品弹窗 */
const sModelsType = commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyObject(props.app) ? props.app.currentPane.sModelsType : '';
+ const combinedInfo = commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyObject(props.app) ? commonFunc.showMessage(props.app.commonConst, 'CombinedInfo') : '合版信息' ;
+
+ const pleaseSelect = commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyObject(props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'pleaseSelect') : '请选择' ;
+
if (commonUtils.isNotEmptyObject(sName) && ( sName === 'sCombinedMemo' || sName ==='sCombineProductNameNew' || sName === 'sColorSerialMemo' || sName === 'sPositiveColor' || sName === 'sOppositeColor' || sName === 'sParams' || sName === 'sParamsNew'|| sName === 'sQuoParams' || (commonUtils.isNotEmptyObject(sModelsType) && !sModelsType.includes('Set') && sName === 'sCombinePartsNameNew'))) {
linkStyle = 'linksActiveIdStyle';
clickEvent = 'onViewChoose';
@@ -5651,7 +5659,7 @@ class CommonTableRc extends React.Component {
}
}
}
- sValue = commonUtils.isEmpty(sValue) ? sName === 'sCombinedMemo' ? '合版信息' : '请选择' : sValue;
+ sValue = commonUtils.isEmpty(sValue) ? sName === 'sCombinedMemo' ? combinedInfo : pleaseSelect : sValue;
} else if ((!props.enabled) && sName.indexOf('Memo') > -1 && showConfigObj.iTag !== 3 ) {
linkStyle = 'linksActiveIdStyle';
clickEvent = 'onMemoShow';
@@ -6715,7 +6723,7 @@ class CommonTableRc extends React.Component {
/* 通用弹窗功能 */
let commonPopupProps = {};
let commonPopupTitle = '选择弹窗';
- let bCommonPopup = false; /* 多列弹出窗 */
+ let bCommonPopup = false; /* 多列弹出窗11 */
let bCommonPopup1 = false; /* 单列弹出窗 */
let bCommonPopupTree = false; /* 树形列弹出窗 */
let bCommonPopupProcess = false;
diff --git a/src/components/CommonElementEvent/StatementInfo.js b/src/components/CommonElementEvent/StatementInfo.js
index e519057..384098c 100644
--- a/src/components/CommonElementEvent/StatementInfo.js
+++ b/src/components/CommonElementEvent/StatementInfo.js
@@ -36,18 +36,20 @@ export default class StatementInfo extends Component {
let { reportColumn } = nextProps;
const { app, visibleStatement } = nextProps;
const reportName = commonFunc.showMessage(app.commonConst, 'reportName');/* 设计功能 */
+ const sTemplateName= commonFunc.showMessage(app.commonConst, 'sTemplateName') || '模板名称' ;
+ const sReportName= commonFunc.showMessage(app.commonConst, 'sReportName') || '报表名称' ;
if (commonUtils.isEmptyArr(reportColumn) && visibleStatement) {
const reportConfig = {};
reportConfig.gdsconfigformslave = [{
bVisible: true,
sName: 'sReportName',
bNotEmpty: true,
- showName: '报表名称',
+ showName: sReportName,
}, {
bVisible: true,
sName: 'sReportPath',
bReadOnly: true,
- showName: '模板名称',
+ showName: sTemplateName,
iTag: 1,
}];
reportColumn = [{
@@ -55,7 +57,7 @@ export default class StatementInfo extends Component {
dataIndex: 'sReportName',
width: 200,
}, {
- title: '模板名称',
+ title: sTemplateName,
dataIndex: 'sReportPath',
width: 239,
}];
diff --git a/src/components/Manufacture/ProcessCardPack/ProcessCardPackTableTree.js b/src/components/Manufacture/ProcessCardPack/ProcessCardPackTableTree.js
index 16df3f1..c78415c 100644
--- a/src/components/Manufacture/ProcessCardPack/ProcessCardPackTableTree.js
+++ b/src/components/Manufacture/ProcessCardPack/ProcessCardPackTableTree.js
@@ -7665,7 +7665,7 @@ const ProcessCardComponent = Form.create({
if(commonUtils.isNotEmptyObject(processShowLeft)) {
if(processShowLeft.bVisible) {
- processShowTitle = processShowLeft.sChinese;
+ processShowTitle = processShowLeft.showName;
}
}
@@ -8236,6 +8236,9 @@ const ProcessCardComponent = Form.create({
height: 50,
}
}
+
+ const deleteAll = commonFunc.showMessage(props.app.commonConst, 'deleteAll') || '删除' ;
+
const autoHeight = `calc( 100vh - 92px )`;
const renderByLayout = () => {
@@ -8405,7 +8408,7 @@ const ProcessCardComponent = Form.create({
materialsChildTableProps = materialsChildTablePropsList[`${item}ChildTableProps`];
sWidth = '58.5%';
sRightWidth = '42%';
- materialsChildTableTitle = commonUtils.isNotEmptyObject(materialsChildTableProps) && commonUtils.isNotEmptyObject(materialsChildTableProps.config) ? materialsChildTableProps.config.sChinese : '';
+ materialsChildTableTitle = commonUtils.isNotEmptyObject(materialsChildTableProps) && commonUtils.isNotEmptyObject(materialsChildTableProps.config) ? materialsChildTableProps.config.showName : '';
} else {
sWidth = '100%';
}
@@ -8422,7 +8425,7 @@ const ProcessCardComponent = Form.create({
- {index === 0 ? : ""}
+ {index === 0 ? : ""}
{
commonUtils.isNotEmptyObject(materialsChildTableProps)?
diff --git a/src/components/Manufacture/ProcessCardPackTableTreeNew/index.js b/src/components/Manufacture/ProcessCardPackTableTreeNew/index.js
index 722b3f1..bb852cb 100644
--- a/src/components/Manufacture/ProcessCardPackTableTreeNew/index.js
+++ b/src/components/Manufacture/ProcessCardPackTableTreeNew/index.js
@@ -3776,8 +3776,8 @@ const OtherComponent = props => {
const dailyInfo = commonFunc.showMessage(commonConst, "dailyInfo"); // 日志信息
const visionInfo = commonUtils.isNotEmptyObject(commonFunc.showMessage(commonConst, "visionInfo")) ?
commonFunc.showMessage(commonConst, "visionInfo") : '改版记录';
- const colorInfo = commonUtils.isNotEmptyObject(colorConfig) && commonUtils.isNotEmptyObject(colorConfig.sChinese ) ?
- colorConfig.sChinese :
+ const colorInfo = commonUtils.isNotEmptyObject(colorConfig) && commonUtils.isNotEmptyObject(colorConfig.showName ) ?
+ colorConfig.showName :
commonUtils.isNotEmptyObject(commonFunc.showMessage(commonConst, "colorInfo")) ?
commonFunc.showMessage(commonConst, "colorInfo") : '工艺颜色'; // "工艺颜色";
@@ -3878,13 +3878,13 @@ const OtherComponent = props => {
{materialsChildInfoListFilter.map(tablename => {
- const { sChinese } = props[`${tablename}Config`];
+ const { showName } = props[`${tablename}Config`];
return (
@@ -3955,7 +3955,7 @@ const ProcessComponent = props => {
const showLeftConfig = processConfig.gdsconfigformslave.find(item => item.sControlName === "bShowLeft");
if (showLeftConfig) {
- const { iColValue, sChinese: processShowTitle } = showLeftConfig;
+ const { iColValue, showName: processShowTitle } = showLeftConfig;
const processTitleWidth = processConfig.gdsconfigformslave.find(item => item.sControlName === "titleWidth")?.sDefault;
const commonViewDragableProps = {
@@ -4059,7 +4059,7 @@ const MaterialsComponent = props => {
materialsChildTableProps = materialsChildTablePropsList[`${item}ChildTableProps`];
sWidth = "58.5%";
sRightWidth = "42%";
- materialsChildTableTitle = materialsChildTableProps.config.sChinese || "";
+ materialsChildTableTitle = materialsChildTableProps.config.showName || "";
}
} else {
sWidth = "100%";
diff --git a/src/components/Manufacture/WorkOrderPack/WorkOrderPackTableTree.js b/src/components/Manufacture/WorkOrderPack/WorkOrderPackTableTree.js
index 9cf61ce..cae75e6 100644
--- a/src/components/Manufacture/WorkOrderPack/WorkOrderPackTableTree.js
+++ b/src/components/Manufacture/WorkOrderPack/WorkOrderPackTableTree.js
@@ -8190,7 +8190,7 @@ const WorkOrderComponent = Form.create({
if(commonUtils.isNotEmptyObject(processShowLeft)) {
if(processShowLeft.bVisible) {
- processShowTitle = processShowLeft.sChinese;
+ processShowTitle = processShowLeft.showName;
}
}
@@ -8738,7 +8738,7 @@ const WorkOrderComponent = Form.create({
let visionTableTitle = '改版记录';
const { visionConfig } = props;
if (commonUtils.isNotEmptyObject(visionConfig)) {
- visionTableTitle = visionConfig.sChinese;
+ visionTableTitle = visionConfig.showName;
}
str =
{visionTableTitle}
@@ -8901,7 +8901,7 @@ const WorkOrderComponent = Form.create({
const iIndex = materialsChildInfoList.findIndex(child => child.includes(item));
if(iIndex > -1) {
materialsChildTableProps = materialsChildTablePropsList[`${item}ChildTableProps`];
- materialsChildTableTitle = commonUtils.isNotEmptyObject(materialsChildTableProps) && commonUtils.isNotEmptyObject(materialsChildTableProps.config) ? materialsChildTableProps.config.sChinese : '';
+ materialsChildTableTitle = commonUtils.isNotEmptyObject(materialsChildTableProps) && commonUtils.isNotEmptyObject(materialsChildTableProps.config) ? materialsChildTableProps.config.showName : '';
}
}
return (
@@ -9348,7 +9348,14 @@ const WorkOrderComponent = Form.create({
// 工艺参数弹窗
const ModalComponent = props => {
const modalName = 'sWorkParamsModalVisible'; // commonParamVisible
- const sProcessParams = "工单参数";
+ const sProcessParams = commonFunc.showMessage(props.app.commonConst, 'workParam') || '工单参数' ;
+ const BtnFirst= commonFunc.showMessage(props.app.commonConst, 'BtnFirst') || '首条' ;
+
+ const BtnLast= commonFunc.showMessage(props.app.commonConst, 'Btnlast') || '末条' ;
+
+ const BtnPrior= commonFunc.showMessage(props.app.commonConst, 'BtnPrior') || '上一条' ;
+
+ const BtnNext= commonFunc.showMessage(props.app.commonConst, 'BtnNext') || '下一条' ;
return props[modalName] ?
{
>
-
-
-
-
+
+
+
+
{
[''].map(() => {
diff --git a/src/components/Manufacture/WorkOrderPack/WorkOrderResearchTableTree.js b/src/components/Manufacture/WorkOrderPack/WorkOrderResearchTableTree.js
index 465974c..e9f4e57 100644
--- a/src/components/Manufacture/WorkOrderPack/WorkOrderResearchTableTree.js
+++ b/src/components/Manufacture/WorkOrderPack/WorkOrderResearchTableTree.js
@@ -8998,6 +8998,14 @@ const WorkOrderComponent = Form.create({
const ModalComponent = props => {
const modalName = 'sWorkParamsModalVisible'; // commonParamVisible
const sProcessParams = "工单参数";
+ const BtnFirst= commonFunc.showMessage(props.app.commonConst, 'BtnFirst') || '首条' ;
+
+ const BtnLast= commonFunc.showMessage(props.app.commonConst, 'Btnlast') || '末条' ;
+
+ const BtnPrior= commonFunc.showMessage(props.app.commonConst, 'BtnPrior') || '上一条' ;
+
+ const BtnNext= commonFunc.showMessage(props.app.commonConst, 'BtnNext') || '下一条' ;
+
return props[modalName] ?
{
>
-
-
-
-
+
+
+
+
{
[''].map(() => {
@@ -9052,4 +9060,5 @@ const ModalComponent = props => {
};
+
export default CommonBase(CommonSales(WorkOrderPack));
--
libgit2 0.22.2