-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deriveLabelForUISchemaElement() return undefined if no translation was found and no label defined #2290
Comments
Hi @davewwww , thanks for reporting this issue. I agree that it is unexpected and possibly hard to properly detect in the UI when just |
I'm not sure. If you have a category without "type": "Category",
"i18n": "address",
"label": "address",
"elements": [] |
But in deriveLabelForUISchemaElement() you have this check: if (
(uischema.label === undefined ||
uischema.label === null ||
uischema.label === true) &&
!isInternationalized(uischema)
) {
return undefined;
} it says that if you have no label and no i18n, then return undefined. this means that if no label exists but an i18n does, then this check does not apply. so either this check is wrong or the following code ignores the fact that you don't need a label if i18n is set. so what is the intended behavior of you? |
Describe the bug
While working on #2270 (review), it was discovered that the translation was not working properly.
In the example https://deploy-preview-2270--jsonforms-examples.netlify.app/vue-vanilla/#categorization the second tab "address" is empty. In uischema there is only an "i18n" key defined and no label.
Expected behavior
the expected behavior is that at least the key "address" will be returned, even if it cannot be translated.
Steps to reproduce the issue
Screenshots
No response
Which Version of JSON Forms are you using?
v3.2.1
Framework
Vue
RendererSet
Vanilla
Additional context
No response
The text was updated successfully, but these errors were encountered: