Updates in localization

This commit is contained in:
Tomas Bures 2018-11-22 09:53:08 +03:00
parent 35fdae8f73
commit aeaaf116d7
3 changed files with 22 additions and 15 deletions

View file

@ -129,23 +129,23 @@ export function getRuleHelpers(t, fields) {
},
eqTodayPlusDays: {
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: {
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: {
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: {
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: {
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')]),
}
};

View file

@ -558,18 +558,25 @@
"afterOrOn": "After or on",
"dateInColumnColNameIsAfterOrOnValue": "Date in column \"{{colName}}\" is after or on {{value}}",
"onXthDayBeforeafterCurrentDate": "On x-th day before/after current date",
"dateInColumnIsValuethDayAfterTheCurrent": "Date in column is {{value}}-th day after the current date",
"dateInColumnIsValuethDayBeforeTheCurrent": "Date in column is {{value}}-th day before the current date",
"dateInColumnColNameIsTheCurrentDate": "Date in column \"{{colName}}\" is 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",
"dateInColumnIsBeforeValuethDayAfterThe": "Date in column is before {{value}}-th day after the current date",
"dateInColumnIsBeforeValuethDayBeforeThe": "Date in column is before {{value}}-th day before the current date",
"dateInColumnColNameIsBeforeTheCurrent": "Date in column \"{{colName}}\" is 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",
"dateInColumnIsBeforeOrOnValuethDayAfter": "Date in column is before or on {{value}}-th day after the current date",
"dateInColumnIsBeforeOrOnValuethDayBefore": "Date in column is before or on {{value}}-th day before the current date",
"dateInColumnColNameIsBeforeOrOnThe": "Date in column \"{{colName}}\" is before or on 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",
"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",
"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",
"valueInColumnColNameIsSelected": "Value in column \"{{colName}}\" is selected",
"isNotSelected": "Is not selected",

View file

@ -147,7 +147,7 @@ function parseSpec(specStr) {
}
// 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 jsxParser = acorn.Parser.extend(acornJsx());
@ -230,7 +230,7 @@ function parseT(fragment) {
return null;
}
// console.log(`${file}: ${line}`);
// console.log(`${fragment}`);
// console.log(` |${match[1]}|${match[2]}|${match[4]}|${match[5]}|${match[6]}| - ${JSON.stringify(spec)}`);
let value;