enterprise icon indicating copy to clipboard operation
enterprise copied to clipboard

ListView: Better translations for selected label

Open javenturina opened this issue 2 years ago • 5 comments

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:

image

Japanese

image

javenturina avatar Jun 01 '22 09:06 javenturina

Currently "Selected" is appended to a number therefore translations are incorrect. A variable is required e.g.

%1 Record(s) Selected Selection: %1

Thanks

cpinatel7 avatar Jun 01 '22 09:06 cpinatel7

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

tmcconechy avatar Jun 01 '22 13:06 tmcconechy

thanks @tmcconechy we will wait for the update.

javenturina avatar Jun 02 '22 02:06 javenturina

So the solution is to use Selection: %1 instead of 1 Selected? This is anywhere with contextual toolbar.

tmcconechy avatar Sep 28 '22 13:09 tmcconechy

Selection: %1 (where %1 is a number) or % Record(s) Selected

Thanks

cpinatel7 avatar Sep 28 '22 14:09 cpinatel7

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"

tmcconechy avatar Oct 26 '22 13:10 tmcconechy

Thanks for "{0} Record(s) Selected". If you can, please add a comment indicating that {0} is a number. Thanks again

cpinatel7 avatar Oct 26 '22 14:10 cpinatel7

@tmcconechy Is this ticket ready for retest? Are translations available? Thanks

cpinatel7 avatar Jan 27 '23 18:01 cpinatel7

No we have not had time to work on it. Will see if we can get it in a sprint soon.

tmcconechy avatar Jan 27 '23 19:01 tmcconechy

@cpinatel7 should it be one label {0} Record(s) Selected or two labels {0} Record Selected vs {0} Records Selected

tmcconechy avatar Feb 21 '23 15:02 tmcconechy

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

cpinatel7 avatar Feb 21 '23 16:02 cpinatel7

@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

cpinatel7 avatar Feb 23 '23 15:02 cpinatel7

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

tmcconechy avatar Feb 23 '23 15:02 tmcconechy

QA Passed. Verified in https://main-enterprise.demo.design.infor.com/components/listview/example-multiselect.html thanks! image

janahintal avatar Feb 27 '23 17:02 janahintal