formio / formio.js

JavaScript powered Forms with JSON Form Builder
https://formio.github.io/formio.js
MIT License
1.87k stars 1.06k forks source link

Is it possible to translate the following error in the form builder: "API Key is not unique: "? #5154

Open Skipperwastaken opened 1 year ago

Skipperwastaken commented 1 year ago

The error message appears when two components have the same API key.

Alexandr-Lonski commented 1 year ago

Hi! Thank you for your message! Could you describe your question in more detail?

Skipperwastaken commented 1 year ago

I'm basically looking for the i18n key of the message, but I'm not sure there is one. I've looked at the source code and it seems like it doesn't get passed through the translation function as opposed to any other error message.

travist commented 1 year ago

Looks like it isn't...

https://github.com/formio/formio.js/blob/master/src/WebformBuilder.js#L1249

I am curious if this would work if we just sent this string through the translate function like so?

this.t('API Key is not unique')

If you submit a PR with this change we will pull it into future releases.

Tatsiana8 commented 4 months ago

Thank you for taking the time to report this issue! I have created a ticket for our backlog.
 For internal reference: FIO-8366