Fix: Translate and add colors to IFTTT Rules dropdown."

This fixes commit 44e4df2492.

When the label has a name, not setting `translatedname` results in a
blank item in the IFTTT label trigger.
This commit is contained in:
Benjamin Tissoires 2019-01-22 15:32:40 +01:00
parent 6fbadbe5bc
commit ba9f0ca672

View file

@ -8,6 +8,8 @@ BlazeComponent.extendComponent({
if (labels[i].name === '' || labels[i].name === undefined) {
labels[i].name = labels[i].color;
labels[i].translatedname = `${TAPi18n.__(`color-${ labels[i].color}`)}`;
} else {
labels[i].translatedname = labels[i].name;
}
}
return labels;