Browse Source
Merge pull request #1063 from luncheon/localize-sort
Localize hardcoded texts (in `sort.js`)
master
mengshukeji
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
9 additions and
4 deletions
-
src/global/sort.js
|
|
@ -7,6 +7,7 @@ import { rowlenByRange } from './getRowlen'; |
|
|
|
import { jfrefreshgrid } from './refresh'; |
|
|
|
import {checkProtectionAuthorityNormal} from '../controllers/protection'; |
|
|
|
import Store from '../store'; |
|
|
|
import locale from '../locale/locale'; |
|
|
|
import numeral from 'numeral'; |
|
|
|
|
|
|
|
//数据排序方法
|
|
|
@ -185,12 +186,16 @@ function sortSelection(isAsc) { |
|
|
|
if(!checkProtectionAuthorityNormal(Store.currentSheetIndex, "sort")){ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
const _locale = locale(); |
|
|
|
const locale_sort = _locale.sort; |
|
|
|
|
|
|
|
if(Store.luckysheet_select_save.length > 1){ |
|
|
|
if(isEditMode()){ |
|
|
|
alert("不能对多重选择区域执行此操作,请选择单个区域,然后再试"); |
|
|
|
alert(locale_sort.noRangeError); |
|
|
|
} |
|
|
|
else{ |
|
|
|
tooltip.info("不能对多重选择区域执行此操作,请选择单个区域,然后再试", ""); |
|
|
|
tooltip.info(locale_sort.noRangeError, ""); |
|
|
|
} |
|
|
|
|
|
|
|
return; |
|
|
@ -255,10 +260,10 @@ function sortSelection(isAsc) { |
|
|
|
|
|
|
|
if(hasMc){ |
|
|
|
if(isEditMode()){ |
|
|
|
alert("选区有合并单元格,无法执行此操作!"); |
|
|
|
alert(locale_sort.mergeError); |
|
|
|
} |
|
|
|
else{ |
|
|
|
tooltip.info("选区有合并单元格,无法执行此操作!", ""); |
|
|
|
tooltip.info(locale_sort.mergeError, ""); |
|
|
|
} |
|
|
|
|
|
|
|
return; |
|
|
|