You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The filter operation names can be translated – there is code directly supporting that in the repo. The filter groups, however, are always handled as raw strings, preventing them from being translated.
There's no actual need to do so; in fact, the way they are used in the frontend allows to safely replace them with translated strings in HTML without affecting any backend handling (though doing so externally requires implementing some tricky JS code); they are inserted within raw JSON into the HTML which is then immediately used by the filters script (as keys in filter-groups-data, and the 2nd tuple field in active-filters-data), and for some reason are taken directly from the filters dropdown item caption on click.
I suggest modifying the generation code so that these changes are done at the time of code generation (or better yet, handle them as lazy strings when there's a need to do so).
P.S. I also suggest moving out the "extract lazy string key" logic into helpers (tools?), and possibly handling the strings with context as well.
The text was updated successfully, but these errors were encountered:
The filter operation names can be translated – there is code directly supporting that in the repo. The filter groups, however, are always handled as raw strings, preventing them from being translated.
There's no actual need to do so; in fact, the way they are used in the frontend allows to safely replace them with translated strings in HTML without affecting any backend handling (though doing so externally requires implementing some tricky JS code); they are inserted within raw JSON into the HTML which is then immediately used by the filters script (as keys in
filter-groups-data
, and the 2nd tuple field inactive-filters-data
), and for some reason are taken directly from the filters dropdown item caption on click.I suggest modifying the generation code so that these changes are done at the time of code generation (or better yet, handle them as lazy strings when there's a need to do so).
P.S. I also suggest moving out the "extract lazy string key" logic into helpers (tools?), and possibly handling the strings with context as well.
The text was updated successfully, but these errors were encountered: