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
This method ideally should check if a key exists and, if it exists, should use the key translation. If the key doesn't exist, it uses a fallback.
Since the entire project is in English, it isn't easy to know that it's not working, since the key and its fallback have the same text, but it breaks when working in another language.
I've tried to use an existent key on the code, but it always uses the fallback.
Thanks for reporting this one, We don't currently fully support translations so I am not sure if this is expected because it still something in progress or if this is actually something we should fix now.
I have added this to the internal backlog ticket we have for i18n which is N8N-2650 and it it covers a number of issues that need to resolved.
Bug Description
Working on some translations I've noticed that on editor-ui, the i18n main file (packages/editor-ui/src/plugins/i18n/index.ts) have a method called dynamicRender.
This method ideally should check if a key exists and, if it exists, should use the key translation. If the key doesn't exist, it uses a fallback.
Since the entire project is in English, it isn't easy to know that it's not working, since the key and its fallback have the same text, but it breaks when working in another language.
I've tried to use an existent key on the code, but it always uses the fallback.
To Reproduce
On the file (packages/editor-ui/src/plugins/i18n/index.ts), edit the method called dynamicRender.
Instead of
return this.i18n.te(key) ? this.i18n.t(key).toString() : fallback ?? '';
, edit it to make it use an existent key, like the code below:Doing so you can notice that the value of
exampleFallback
is always used.Also, if the key doesn't exist, the frontend UI breaks in errors, meaning that the
this.i18n.te(key)
part of the code is not working.Expected behavior
Translations to work with dynamic keys.
Operating System
Tested on macOS, Debian 12, Ubuntu 22.04
n8n Version
1.29.1
Node.js Version
20
Database
SQLite (default)
Execution mode
main (default)
The text was updated successfully, but these errors were encountered: