-
Notifications
You must be signed in to change notification settings - Fork 445
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
Translations for submission form labels and hints #646
Comments
At this time, Submission labels/hints are managed in the So, as far as I'm aware, they will be manages similar to DSpace 6, unless we find a volunteer to create a different approach. At a simple level, if anyone is interested, it might be relatively simple to have |
I am strongly in favour of adding i18n keys to submission forms! From what I've seen in my recent work, there wouldn't be any problems implementing this and it would make multilingual submission form management much easier. Right now, if I change some config for a few fields in my submission form, I have to repeat or sync the same change across all the languages I support which is cumbersome, prone to error, and essentially is storing i18n in the DSpace REST app even though it's displayed in angular. If we moved to i18n keys that are piped to translate in dspace-angular a single As far as I'm aware, the REST API doesn't use the values from label / hint / required except in logging. |
A further note here that all the form components pass |
As per notes on #1670 the above approach was rejected. The changes in DSpace/DSpace#8322 (also closed) may or may not be useful to somebody else who implements translation in the REST response. |
Per discussions above, we all agree this would be nice to have, but would prefer a solution where the "submission-forms.xml" uses the Messages.properties on the backend. That way, the translation occurs on the backend, and Angular just displays whatever language is sent to it. In the meantime, it is possible to support multiple languages in the submission form, but it requires unnecessary duplication of the "submission-forms.xml" config. For example:
|
I and my team currently working on this case and we are able to contribute to this issue. |
@tdonohue What I mentioned above, I could be assigned to this task, if the method described there is acceptable |
@michdyk : Please be aware of the discussion that occurred in this previous (now rejected) PR: #1670 In there, it was noted by several that passing keys from the REST API to the Angular UI is very problematic. The biggest issue is that adding a new key to the frontend requires a full rebuild of the frontend... it's not a simple config like on the backend. But, it was also pointed out that this model is bad for other clients. If someone is using our REST API for a different client and reading this endpoint, they won't know what So, if you'd like to volunteer to look at this, please feel free. However, I'd stress that you should review the past discussions, as several of us feel that it'd be better to do translations via Messages.properties on the backend, rather than have the REST API return an i18n key, which you then need to translate in the UI. |
@tdonohue I understand your point. If the community and your previous discussions indicate that translations should be added via Messages.properties on the backend, I will try to do it that way. |
@michdyk : Sounds fine. For the past discussions regarding moving these translations to Messages.properties, see the discussion in this older PR #1670 That PR had a solution similar to your proposal, as it created these new i18n keys in the Angular UI An initial approach at moving the i18n keys to Messages.properties was also started in this other PR DSpace/DSpace#8322 However, the developer mentioned that he didn't get it completely working & didn't have time to move it forward and therefore closed the PR. |
I think this discussion should be reopen, considering the new DS9... Things I consider disadvantages of not having translatable keys in the UI:
|
Traditionally, labels for the submission forms were managed in input-forms.xml, outside of the general message catalog. It's not 100% clear to me how we are going to tackle i18n for the submission forms in DSpace 7.
Are we continuing keeping this separate?
Or is there a plan to add the input forms messages to the main catalog?
The text was updated successfully, but these errors were encountered: