Description
A ZMultilingualString/Z12 component is a collection of ZMonolingualStrings/Z11.
This component is generally used to provide mulilingual labels to ZPersistentObject/Z2, ZArgumentDeclaration/Z17 or ZKey/Z3, but it could be used in any other way or even find saved as a root ZObject.
For Z2 and Z17 there are ad-hoc components, but for Z3 we need a bespoke component that will be shown inside of the ZObjectKeyValue-ZObjectKeyValueSet tree.
Desired behavior/Acceptance criteria
- It is pretty much the same as a ZTypedList component, so it can use or expand ZTypedList
- It should only show one selected item
- The featured item should be the one in the user language or closest fallback
- It should show a button with a message showing the number of available languages
- Clicking on this button will show the full list of available languages in a dialog
- We build on top of the current patterns for the label box/about widget, hence display values in other languages in a dialog.
- It should allow to add a new ZMonolingualString item to the list
- When adding a new item to the list, it should add a Z11K1/Monolingual String initialized to the user language if it's not available
- When adding a new item to the list, it should make sure that the Z11K1/Monolingual String Language is not repeated
- It should allow to remove any of its ZMonolingualString items from the list
Devices and Design (URLs or screenshots)
✨ new link/figma file ✨
https://www.figma.com/file/lo0B4gg1Bpj98d8eefTDaO/T337227-Multilingual-text-component?type=design&node-id=13%3A11245&t=gWX11jI3oTB5KoZf-1
Completion checklist
- Before closing this task, review one by one the checklist available here: https://www.mediawiki.org/wiki/Abstract_Wikipedia_team/Definition_of_Done#Front-end_Task/Bug_Completion_Checklist