thingsboard icon indicating copy to clipboard operation
thingsboard copied to clipboard

Filter names and predicate labels of user-editable filters are not localizeable.

Open thomas-seag opened this issue 1 year ago • 6 comments

Describe the bug Filter names and predicate labels of user-editable filters are not localizeable. Using "{i18n:...}" for either displays the "{i18n:...} verbatim instead of translating. (And yes, the corresponding keys are defined.)

Your Server Environment

Additional context Seems to me translation is missing at

https://github.com/thingsboard/thingsboard/blob/6d92637c89df12bf931e91a1b860bfadec0a7e69/ui-ngx/src/app/shared/models/query/query.models.ts#L657-L668

(if the label is not auto-generated, there is no translation of the userInfo.label) and at

https://github.com/thingsboard/thingsboard/blob/6d92637c89df12bf931e91a1b860bfadec0a7e69/ui-ngx/src/app/modules/home/components/filter/user-filter-dialog.component.html#L20

for the filter name.

thomas-seag avatar Oct 10 '25 16:10 thomas-seag

Hi. Please describe this ticket in as much detail as possible with full steps to reproduce

mykhailokornieiev avatar Oct 13 '25 08:10 mykhailokornieiev

What exactly was unclear to you?

thomas-seag avatar Oct 13 '25 08:10 thomas-seag

Filter names and predicate labels of user-editable filters are not localizeable. Using "{i18n:...}" for either displays the "{i18n:...} verbatim instead of translating. (And yes, the corresponding keys are defined.)

Where do you try to use a custom translation? Please provide full, detailed steps to reproduce. In the other case, I will close this ticket as the one without a valid description

mykhailokornieiev avatar Oct 13 '25 08:10 mykhailokornieiev

Import the attached dashboard nofiltertranslation.json. It just contains an entity table showing all devices.

It uses localization "{i18n:entity-field.owner-type}" in two places. This localization key is defined. The UI does not translate these items.

The dashboard has a filter defined; the filter name should be localized:

Image

The key predicate has a custom user label using localization:

Image

Yet when displayed (click the "Filters" button), the dialog shows the localization placeholder verbatim, even though the localization keys used exist.

Image

thomas-seag avatar Oct 13 '25 10:10 thomas-seag

Thank you for the clarification and the detailed description. Indeed, there is no possibility of using a custom translation in dashboard filter name and label. Thank you for the suggestion, I already added such a feature request to our backlog for developers. Please follow our Release Notes to see all new additions and fixes to the platform in subsequent releases.

mykhailokornieiev avatar Oct 13 '25 11:10 mykhailokornieiev

Appears to have been fixed in #14151.

thomas-seag avatar Jan 05 '26 09:01 thomas-seag