Missing Translation Key for "equal" in Query builder

I have added below code for getting error in console like "Missing Translation Key for “equal”,

var locale = app.getService(“locale”);
locale.polyglot.onMissingKey = (a) => a;

This fix is worked while query added as new (create mode).

I am getting same error when edit the existing query that is needed to modify.

CODE SNIPPET:

class CustomFilter extends query.views.filter {

                CreateFilter(field, type, format, conditions, place) {

                    const newConditions = conditions.map(id => {

                        if (id === 'richselect_name') {

                            return richselectConditions;

                        }

                        return id;

                    });

                    const ui = {

                        view: 'filter',

                        localId: 'filter',

                        inputs: field == "RecordColumnCount" ? recordColumnCountInputs : field == "RecordDelimiter" ? recordDelimiterInputs : associatedFileListInputs,

                        conditions: newConditions,

                        field,

                        mode: type,

                        template: (o) => {

                            let str = o[field];

                            const parser = o.format || (type === 'date' ? webix.i18n.dateFormatStr : null);

                            if (parser) str = parser(str);

                            return str;

                        },

                        margin: 6,

                    };

                    const filter = webix.ui(ui, place);

                    const data = this.app.getService("backend").data(field);

                    const local = this.app.getService("locale");

                    local.polyglot.onMissingKey = (a) => a;

                    filter.parse(data);

                   

                    const inputBox = filter.queryView({ view: "text" }) || filter.queryView({ view: "richselect" });

                    if (inputBox) {

                        inputBox.focus();

                    }

                    return filter;

                }

            }

            class List extends query.views.list {

                GetList() {

                    const list = super.GetList();

                    list.onClick["action-menu"] = (e, id) => {

                        const item = this.$$("list").getItem(id);

                        this.Actions.Show(e.target, item);

                    };

                    return list;

                }

            }

            class ActionMenu extends query.views.actions {

                Show(node, item) {

                    if (item.$level + 1 > this.app.config.maxLevel)

                        this.getRoot().queryView("list").disableItem("add-group");

                    else

                        this.getRoot().queryView("list").enableItem("add-group");

                    super.Show(node, item.id);

                }

            }

           

            this.ui = webix.ui({

                view: "query",

                id: "query",

                maxLevel: 4,

                override: new Map([[query.views.filter, CustomFilter], [query.views.actions, ActionMenu],

                [query.views.list, List]]),

                data: [],

                width: 430,

                fields: this.props.field,

                value: this.props.value,

                simple: this.props.simpleMode,

                container,

                scroll: false

       

            });

        });

        this.resObserver = new ResizeObserver(() => {

            if (this.ui) this.ui.adjust();

        });

        this.resObserver.observe(container);

    }

Console :

Hi Team,

It is creating blocker for us. Please let us know update for this issue.

Thanks,

Hello @Pravin121763 ,
Unfortunately, we didn’t managed to reproduce the described issue with your code snippet: Code Snippet .
CreateFilter() is called when Editing too so the warning really shoud be suppressed. To reproduce the problem we would need an example (you could use our snippet tool) or a minimal working demo where the problem can be seen.

In general, we can recommend you to add onMissingKey function one time on the widget’s init, you could use onInit event for it:

on: {
      onInit: (app) => {
        const local = app.getService("locale");
        local.polyglot.onMissingKey = (a) => a;
      },
}

Or you could add the missing translation as suggested here.