enterprise
enterprise copied to clipboard
ListView: Better translations for selected label
We are using the List view component with the single select configuration in our widget. Its working and translations are being applied as well (by default). However our translation team noted that the translation are not correct in the context of our application. With this, can we control the source of the text via code/setup?
What are you trying to do customize the value of the "Selected" text from component based(default) to code controlled (via variable?)
Version IDS Enterprise 4.62.1 IDS Enterprise NG 13.3.
Screenshots English:
Japanese
Currently "Selected" is appended to a number therefore translations are incorrect. A variable is required e.g.
%1 Record(s) Selected Selection: %1
Thanks
We can be default change this to turn toggle between single and more than one selected. Would be a change around here https://github.com/infor-design/enterprise/blob/main/src/components/listview/listview.js#L1129
You can also try to manually add the title
<div class="contextual-toolbar toolbar is-hidden">
<div class="title selection-count">0 Selected</div>
But i think it will get overwritten so we probably need a change
thanks @tmcconechy we will wait for the update.
So the solution is to use Selection: %1
instead of 1 Selected
? This is anywhere with contextual toolbar.
Selection: %1 (where %1 is a number) or % Record(s) Selected
Thanks
Ok lets go with {0} Record(s) Selected
for the new string where {0} is a number dynamically inserted. But lets wait until the translation team is "re-established"
Thanks for "{0} Record(s) Selected". If you can, please add a comment indicating that {0} is a number. Thanks again
@tmcconechy Is this ticket ready for retest? Are translations available? Thanks
No we have not had time to work on it. Will see if we can get it in a sprint soon.
@cpinatel7 should it be one label {0} Record(s) Selected
or two labels {0} Record Selected
vs {0} Records Selected
Ideally 3 labels:
- 0 Records Selected (In English, "0 Records" is plural but in most languages, 0 is singular)
- 1 Record Selected
- {0} Records Selected
Thanks
@tmcconechy Issue has been closed so a fix is available but the next step is to translate these new strings. Could you please advise? Thanks
I will put the elements into queue for Henry to translate next round. Can you tell me the server where i upload (fromDev). I have a new machine and that URL is not saved.
Then once i upload them, next round they will translate and i will include them in the next version after thats done.
@cpinatel7
QA Passed. Verified in https://main-enterprise.demo.design.infor.com/components/listview/example-multiselect.html thanks!