Browse Source

Merge pull request #1149 from luncheon/localize

fix: localize hardcoded texts
master
DreamNum 3 years ago
committed by GitHub
parent
commit
1b53a3d56e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      src/controllers/menuButton.js

13
src/controllers/menuButton.js

@ -162,7 +162,7 @@ const menuButton = {
if(has_PartMC){ if(has_PartMC){
// *提示后中止下一步 // *提示后中止下一步
tooltip.info('无法对部分合并单元格执行此操作', ''); tooltip.info(_locale.merge.partiallyError, '');
return; return;
} }
@ -1273,16 +1273,19 @@ const menuButton = {
//合并单元格 //合并单元格
$("#luckysheet-icon-merge-button").click(function(){ $("#luckysheet-icon-merge-button").click(function(){
const _locale = locale();
const locale_merge = _locale.merge;
if(!checkProtectionNotEnable(Store.currentSheetIndex)){ if(!checkProtectionNotEnable(Store.currentSheetIndex)){
return; return;
} }
if(selectIsOverlap()){ if(selectIsOverlap()){
if(isEditMode()){ if(isEditMode()){
alert("不能合并重叠区域"); alert(locale_merge.overlappingError);
} }
else{ else{
tooltip.info("不能合并重叠区域", ""); tooltip.info(locale_merge.overlappingError, "");
} }
return; return;
} }
@ -1305,10 +1308,10 @@ const menuButton = {
if(has_PartMC){ if(has_PartMC){
if(isEditMode()){ if(isEditMode()){
alert("无法对部分合并单元格执行此操作"); alert(locale_merge.partiallyError);
} }
else{ else{
tooltip.info("无法对部分合并单元格执行此操作", ""); tooltip.info(locale_merge.partiallyError, "");
} }
return; return;
} }

Loading…
Cancel
Save