mirror of
https://github.com/wekan/wekan.git
synced 2026-02-28 19:00:17 +01:00
Hopeful fix for i18n not working in onRendered()
* Remove the i18n initialization code from an `autorun()` block * Add some console statements to help with debugging production. * Add functions to `Boards` for label colors and color mapping
This commit is contained in:
parent
4fc2d7b935
commit
e4f50d4713
4 changed files with 42 additions and 31 deletions
|
|
@ -200,11 +200,7 @@ Meteor.publish('globalSearch', function(sessionId, queryParams) {
|
|||
comments: [],
|
||||
};
|
||||
|
||||
this.colorMap = {};
|
||||
for (const color of Boards.simpleSchema()._schema['labels.$.color']
|
||||
.allowedValues) {
|
||||
this.colorMap[TAPi18n.__(`color-${color}`)] = color;
|
||||
}
|
||||
this.colorMap = Boards.colorMap();
|
||||
}
|
||||
|
||||
hasErrors() {
|
||||
|
|
@ -234,7 +230,11 @@ Meteor.publish('globalSearch', function(sessionId, queryParams) {
|
|||
});
|
||||
});
|
||||
this.notFound.labels.forEach(label => {
|
||||
messages.push({ tag: 'label-not-found', value: label, color: true });
|
||||
messages.push({
|
||||
tag: 'label-not-found',
|
||||
value: label,
|
||||
color: Boards.labelColors().includes(label),
|
||||
});
|
||||
});
|
||||
this.notFound.users.forEach(user => {
|
||||
messages.push({ tag: 'user-username-not-found', value: user });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue