mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 07:20:12 +01:00
Merge pull request #3519 from jrsupplee/issue-2074
Hopeful fix for i18n not working in `onRendered()`
This commit is contained in:
commit
76ef6a81ab
4 changed files with 42 additions and 31 deletions
|
|
@ -78,12 +78,10 @@ BlazeComponent.extendComponent({
|
|||
onRendered() {
|
||||
Meteor.subscribe('setting');
|
||||
|
||||
this.colorMap = {};
|
||||
for (const color of Boards.simpleSchema()._schema['labels.$.color']
|
||||
.allowedValues) {
|
||||
this.colorMap[TAPi18n.__(`color-${color}`)] = color;
|
||||
}
|
||||
// // eslint-disable-next-line no-console
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('lang:', TAPi18n.getLanguage());
|
||||
this.colorMap = Boards.colorMap();
|
||||
// eslint-disable-next-line no-console
|
||||
// console.log('colorMap:', this.colorMap);
|
||||
|
||||
if (Session.get('globalQuery')) {
|
||||
|
|
@ -296,13 +294,14 @@ BlazeComponent.extendComponent({
|
|||
if (m.groups.operator) {
|
||||
op = m.groups.operator.toLowerCase();
|
||||
} else {
|
||||
op = m.groups.abbrev;
|
||||
op = m.groups.abbrev.toLowerCase();
|
||||
}
|
||||
if (operatorMap.hasOwnProperty(op)) {
|
||||
let value = m.groups.value;
|
||||
if (operatorMap[op] === 'labels') {
|
||||
if (value in this.colorMap) {
|
||||
value = this.colorMap[value];
|
||||
// console.log('found color:', value);
|
||||
}
|
||||
} else if (
|
||||
['dueAt', 'createdAt', 'modifiedAt'].includes(operatorMap[op])
|
||||
|
|
@ -388,7 +387,7 @@ BlazeComponent.extendComponent({
|
|||
params.text = text;
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
// console.log('params:', params);
|
||||
console.log('params:', params);
|
||||
|
||||
this.queryParams = params;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue