mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Make search operators translatable
This commit is contained in:
parent
39ac19db20
commit
50b25572f1
2 changed files with 24 additions and 15 deletions
|
|
@ -106,20 +106,18 @@ BlazeComponent.extendComponent({
|
||||||
const reOperator2 = /^(?<operator>\w+):(?<quote>["']*)(?<value>.*?)\k<quote>(\s+|$)/;
|
const reOperator2 = /^(?<operator>\w+):(?<quote>["']*)(?<value>.*?)\k<quote>(\s+|$)/;
|
||||||
const reText = /^(?<text>\S+)(\s+|$)/;
|
const reText = /^(?<text>\S+)(\s+|$)/;
|
||||||
const reQuotedText = /^(?<quote>["'])(?<text>\w+)\k<quote>(\s+|$)/;
|
const reQuotedText = /^(?<quote>["'])(?<text>\w+)\k<quote>(\s+|$)/;
|
||||||
const operatorMap = {
|
const operatorMap = {};
|
||||||
board: 'boards',
|
operatorMap[TAPi18n.__('operator-board')] = 'boards';
|
||||||
b: 'boards',
|
operatorMap[TAPi18n.__('operator-board-abbrev')] = 'boards';
|
||||||
label: 'labels',
|
operatorMap[TAPi18n.__('operator-swimlane')] = 'swimlanes';
|
||||||
lable: 'labels',
|
operatorMap[TAPi18n.__('operator-swimlane-abbrev')] = 'swimlanes';
|
||||||
user: 'users',
|
operatorMap[TAPi18n.__('operator-list')] = 'lists';
|
||||||
u: 'users',
|
operatorMap[TAPi18n.__('operator-list-abbrev')] = 'lists';
|
||||||
swimlane: 'swimlanes',
|
operatorMap[TAPi18n.__('operator-label')] = 'labels';
|
||||||
swim: 'swimlanes',
|
operatorMap[TAPi18n.__('operator-label-abbrev')] = 'labels';
|
||||||
s: 'swimlanes',
|
operatorMap[TAPi18n.__('operator-user')] = 'users';
|
||||||
list: 'lists',
|
operatorMap[TAPi18n.__('operator-user-abbrev')] = 'users';
|
||||||
l: 'lists',
|
operatorMap[TAPi18n.__('operator-is')] = 'is';
|
||||||
is: 'is',
|
|
||||||
};
|
|
||||||
const selector = {
|
const selector = {
|
||||||
boards: [],
|
boards: [],
|
||||||
swimlanes: [],
|
swimlanes: [],
|
||||||
|
|
|
||||||
|
|
@ -871,5 +871,16 @@
|
||||||
"user-username-not-found": "Username '%s' not found.",
|
"user-username-not-found": "Username '%s' not found.",
|
||||||
"globalSearch-title": "Search All Boards",
|
"globalSearch-title": "Search All Boards",
|
||||||
"one-results": "One Result",
|
"one-results": "One Result",
|
||||||
"n-results": "%s Results"
|
"n-results": "%s Results",
|
||||||
|
"operator-board": "board",
|
||||||
|
"operator-board-abbrev": "b",
|
||||||
|
"operator-swimlane": "swimlane",
|
||||||
|
"operator-swimlane-abbrev": "s",
|
||||||
|
"operator-list": "list",
|
||||||
|
"operator-list-abbrev": "l",
|
||||||
|
"operator-label": "label",
|
||||||
|
"operator-label-abbrev": "lbl",
|
||||||
|
"operator-user": "user",
|
||||||
|
"operator-user-abbrev": "u",
|
||||||
|
"operator-is": "is"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue