Updates in localization
This commit is contained in:
parent
35fdae8f73
commit
aeaaf116d7
3 changed files with 22 additions and 15 deletions
|
@ -129,23 +129,23 @@ export function getRuleHelpers(t, fields) {
|
||||||
},
|
},
|
||||||
eqTodayPlusDays: {
|
eqTodayPlusDays: {
|
||||||
dropdownLabel: t('onXthDayBeforeafterCurrentDate'),
|
dropdownLabel: t('onXthDayBeforeafterCurrentDate'),
|
||||||
treeLabel: rule => getRelativeDateTreeLabel(rule, 'is', [tMark('Date in column "{{colName}}" is the current date'), tMark('Date in column "{{colName}}" is {{value}}-th day after the current date'), tMark('Date in column "{{colName}}" is {{value}}-th day before the current date')]),
|
treeLabel: rule => getRelativeDateTreeLabel(rule, 'is', [tMark('dateInColumnColNameIsTheCurrentDate'), tMark('dateInColumnColNameIsValuethDayAfterThe'), tMark('dateInColumnColNameIsValuethDayBeforeThe')]),
|
||||||
},
|
},
|
||||||
ltTodayPlusDays: {
|
ltTodayPlusDays: {
|
||||||
dropdownLabel: t('beforeXthDayBeforeafterCurrentDate'),
|
dropdownLabel: t('beforeXthDayBeforeafterCurrentDate'),
|
||||||
treeLabel: rule => getRelativeDateTreeLabel(rule, [tMark('Date in column "{{colName}}" is before the current date'), tMark('Date in column "{{colName}}" is before {{value}}-th day after the current date'), tMark('Date in column "{{colName}}" is before {{value}}-th day before the current date')]),
|
treeLabel: rule => getRelativeDateTreeLabel(rule, [tMark('dateInColumnColNameIsBeforeTheCurrent'), tMark('dateInColumnColNameIsBeforeValuethDay'), tMark('dateInColumnColNameIsBeforeValuethDay-1')]),
|
||||||
},
|
},
|
||||||
leTodayPlusDays: {
|
leTodayPlusDays: {
|
||||||
dropdownLabel: t('beforeOrOnXthDayBeforeafterCurrentDate'),
|
dropdownLabel: t('beforeOrOnXthDayBeforeafterCurrentDate'),
|
||||||
treeLabel: rule => getRelativeDateTreeLabel(rule, [tMark('Date in column "{{colName}}" is before or on the current date'), tMark('Date in column "{{colName}}" is before or on {{value}}-th day after the current date'), tMark('Date in column "{{colName}}" is before or on {{value}}-th day before the current date')]),
|
treeLabel: rule => getRelativeDateTreeLabel(rule, [tMark('dateInColumnColNameIsBeforeOrOnThe'), tMark('dateInColumnColNameIsBeforeOrOnValueth'), tMark('dateInColumnColNameIsBeforeOrOnValueth-1')]),
|
||||||
},
|
},
|
||||||
gtTodayPlusDays: {
|
gtTodayPlusDays: {
|
||||||
dropdownLabel: t('afterXthDayBeforeafterCurrentDate'),
|
dropdownLabel: t('afterXthDayBeforeafterCurrentDate'),
|
||||||
treeLabel: rule => getRelativeDateTreeLabel(rule, [tMark('Date in column "{{colName}}" is after the current date'), tMark('Date in column "{{colName}}" is after {{value}}-th day after the current date'), tMark('Date in column "{{colName}}" is after {{value}}-th day before the current date')]),
|
treeLabel: rule => getRelativeDateTreeLabel(rule, [tMark('dateInColumnColNameIsAfterTheCurrentDate'), tMark('dateInColumnColNameIsAfterValuethDay'), tMark('dateInColumnColNameIsAfterValuethDay-1')]),
|
||||||
},
|
},
|
||||||
geTodayPlusDays: {
|
geTodayPlusDays: {
|
||||||
dropdownLabel: t('afterOrOnXthDayBeforeafterCurrentDate'),
|
dropdownLabel: t('afterOrOnXthDayBeforeafterCurrentDate'),
|
||||||
treeLabel: rule => getRelativeDateTreeLabel(rule, [tMark('Date in column "{{colName}}" is after or on the current date'), tMark('Date in column "{{colName}}" is after or on {{value}}-th day after the current date'), tMark('Date in column "{{colName}}" is after or on {{value}}-th day before the current date')]),
|
treeLabel: rule => getRelativeDateTreeLabel(rule, [tMark('dateInColumnColNameIsAfterOrOnTheCurrent'), tMark('dateInColumnColNameIsAfterOrOnValuethDay'), tMark('dateInColumnColNameIsAfterOrOnValuethDay-1')]),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -558,18 +558,25 @@
|
||||||
"afterOrOn": "After or on",
|
"afterOrOn": "After or on",
|
||||||
"dateInColumnColNameIsAfterOrOnValue": "Date in column \"{{colName}}\" is after or on {{value}}",
|
"dateInColumnColNameIsAfterOrOnValue": "Date in column \"{{colName}}\" is after or on {{value}}",
|
||||||
"onXthDayBeforeafterCurrentDate": "On x-th day before/after current date",
|
"onXthDayBeforeafterCurrentDate": "On x-th day before/after current date",
|
||||||
"dateInColumnIsValuethDayAfterTheCurrent": "Date in column is {{value}}-th day after the current date",
|
"dateInColumnColNameIsTheCurrentDate": "Date in column \"{{colName}}\" is the current date",
|
||||||
"dateInColumnIsValuethDayBeforeTheCurrent": "Date in column is {{value}}-th day before the current date",
|
"dateInColumnColNameIsValuethDayAfterThe": "Date in column \"{{colName}}\" is {{value}}-th day after the current date",
|
||||||
|
"dateInColumnColNameIsValuethDayBeforeThe": "Date in column \"{{colName}}\" is {{value}}-th day before the current date",
|
||||||
"beforeXthDayBeforeafterCurrentDate": "Before x-th day before/after current date",
|
"beforeXthDayBeforeafterCurrentDate": "Before x-th day before/after current date",
|
||||||
"dateInColumnIsBeforeValuethDayAfterThe": "Date in column is before {{value}}-th day after the current date",
|
"dateInColumnColNameIsBeforeTheCurrent": "Date in column \"{{colName}}\" is before the current date",
|
||||||
"dateInColumnIsBeforeValuethDayBeforeThe": "Date in column is before {{value}}-th day before the current date",
|
"dateInColumnColNameIsBeforeValuethDay": "Date in column \"{{colName}}\" is before {{value}}-th day after the current date",
|
||||||
|
"dateInColumnColNameIsBeforeValuethDay-1": "Date in column \"{{colName}}\" is before {{value}}-th day before the current date",
|
||||||
"beforeOrOnXthDayBeforeafterCurrentDate": "Before or on x-th day before/after current date",
|
"beforeOrOnXthDayBeforeafterCurrentDate": "Before or on x-th day before/after current date",
|
||||||
"dateInColumnIsBeforeOrOnValuethDayAfter": "Date in column is before or on {{value}}-th day after the current date",
|
"dateInColumnColNameIsBeforeOrOnThe": "Date in column \"{{colName}}\" is before or on the current date",
|
||||||
"dateInColumnIsBeforeOrOnValuethDayBefore": "Date in column is before or on {{value}}-th day before the current date",
|
"dateInColumnColNameIsBeforeOrOnValueth": "Date in column \"{{colName}}\" is before or on {{value}}-th day after the current date",
|
||||||
|
"dateInColumnColNameIsBeforeOrOnValueth-1": "Date in column \"{{colName}}\" is before or on {{value}}-th day before the current date",
|
||||||
"afterXthDayBeforeafterCurrentDate": "After x-th day before/after current date",
|
"afterXthDayBeforeafterCurrentDate": "After x-th day before/after current date",
|
||||||
"dateInColumnIsAfterValuethDayAfterThe": "Date in column is after {{value}}-th day after the current date",
|
"dateInColumnColNameIsAfterTheCurrentDate": "Date in column \"{{colName}}\" is after the current date",
|
||||||
|
"dateInColumnColNameIsAfterValuethDay": "Date in column \"{{colName}}\" is after {{value}}-th day after the current date",
|
||||||
|
"dateInColumnColNameIsAfterValuethDay-1": "Date in column \"{{colName}}\" is after {{value}}-th day before the current date",
|
||||||
"afterOrOnXthDayBeforeafterCurrentDate": "After or on x-th day before/after current date",
|
"afterOrOnXthDayBeforeafterCurrentDate": "After or on x-th day before/after current date",
|
||||||
"dateInColumnIsAfterOrOnValuethDayAfter": "Date in column is after or on {{value}}-th day after the current date",
|
"dateInColumnColNameIsAfterOrOnTheCurrent": "Date in column \"{{colName}}\" is after or on the current date",
|
||||||
|
"dateInColumnColNameIsAfterOrOnValuethDay": "Date in column \"{{colName}}\" is after or on {{value}}-th day after the current date",
|
||||||
|
"dateInColumnColNameIsAfterOrOnValuethDay-1": "Date in column \"{{colName}}\" is after or on {{value}}-th day before the current date",
|
||||||
"isSelected": "Is selected",
|
"isSelected": "Is selected",
|
||||||
"valueInColumnColNameIsSelected": "Value in column \"{{colName}}\" is selected",
|
"valueInColumnColNameIsSelected": "Value in column \"{{colName}}\" is selected",
|
||||||
"isNotSelected": "Is not selected",
|
"isNotSelected": "Is not selected",
|
||||||
|
|
|
@ -147,7 +147,7 @@ function parseSpec(specStr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// see http://blog.stevenlevithan.com/archives/match-quoted-string
|
// see http://blog.stevenlevithan.com/archives/match-quoted-string
|
||||||
const tMatcher = /(^|[ {+(=.])((?:tUI|tLog|t|tMark)\s*\(\s*(?:\/\*(.*?)\*\/)?\s*)(["'])((?:(?!\4)[^\\]|\\.)*)(\4)/;
|
const tMatcher = /(^|[ {+(=.\[])((?:tUI|tLog|t|tMark)\s*\(\s*(?:\/\*(.*?)\*\/)?\s*)(["'])((?:(?!\4)[^\\]|\\.)*)(\4)/;
|
||||||
const transMatcher = /(\/\*(.*?)\*\/\s*)?(\<Trans[ >][\s\S]*?\<\/Trans\>)/;
|
const transMatcher = /(\/\*(.*?)\*\/\s*)?(\<Trans[ >][\s\S]*?\<\/Trans\>)/;
|
||||||
|
|
||||||
const jsxParser = acorn.Parser.extend(acornJsx());
|
const jsxParser = acorn.Parser.extend(acornJsx());
|
||||||
|
@ -230,7 +230,7 @@ function parseT(fragment) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log(`${file}: ${line}`);
|
// console.log(`${fragment}`);
|
||||||
// console.log(` |${match[1]}|${match[2]}|${match[4]}|${match[5]}|${match[6]}| - ${JSON.stringify(spec)}`);
|
// console.log(` |${match[1]}|${match[2]}|${match[4]}|${match[5]}|${match[6]}| - ${JSON.stringify(spec)}`);
|
||||||
|
|
||||||
let value;
|
let value;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue