- Issue created by @pdureau
- πΊπ¦Ukraine SmovS Lutsk
Hi guys!
I tested the UIP2 (beta6) a bit with multilingual locally.
My local env. is Drupal 11.0.9, PHP8.3. I also installed but did not enable the UI Suite DaisyUI (4.0alpha) theme which includes many ready components for testing.
For translation, I used Core Multilingual modules with installed Ukrainian as a second language (around 95% of interface translation is available by default)I tested the layout builder, views, and blocks (as a plugin in block layout).
The translation generally works fine if the user sets translate pairs in the User interface translation page (/admin/config/regional/translate
).I noticed a few things:
Not all props titles have a translation possibility e.g. "Attributes" because they are not wrapped by the translate function (
/ui_patterns/src/ComponentPluginManager.php:261
).
Meanwhile, descriptions, sources, and help text are translatable there (I added a Cyrillic word beside the English origin one to show that in the screenshots).Props properties titles and descriptions implemented as a component in UI Suite DaisyUI (e.g.
/ui_suite_daisyui/components/button/button.component.yml:87
) can not be translated via the User interface translation page. E.g. the "Block?" title and nested "It is possible to display button as a block?" description text.
At the same time category, label, and description names in DaisyUI classes (/ui_suite_daisyui/ui_suite_daisyui.ui_styles.yml
) are translatable.Translation in the Views and Blocks has the same behavior.
I haven't tested layout builder overrides with symmetric and asymmetric translation yet because related contribs modules don't support Drupal 11. I need to set up the Drupal 10 environment for the test.
I assume we need to double-check Source plugins and add translations to titles and descriptions where it is possible.
- π«π·France pdureau Paris
Florent, are some Sviatoslav's feedbacks overlapping with π¬ Components metadata translation questions/ideas Active ?
- π«π·France Grimreaper France π«π·
Hi,
Props properties titles and descriptions implemented as a component in UI Suite DaisyUI (e.g. /ui_suite_daisyui/components/button/button.component.yml:87) can not be translated via the User interface translation page
For me it is the same subject as #3481491-7: [2.0.0-rc1] MakeΒ components metadata translatable β .
At the same time category, label, and description names in DaisyUI classes are translatable.
Because it is from UI Styles: https://git.drupalcode.org/project/ui_styles/-/blob/8.x-1.x/src/StylePlu...
- π«π·France pdureau Paris
I tested the UIP2 (beta6) a bit with multilingual locally.
My local env. is Drupal 11.0.9, PHP8.3. I also installed but did not enable the UI Suite DaisyUI (4.0alpha) theme which includes many ready components for testing.
For translation, I used Core Multilingual modules with installed Ukrainian as a second language (around 95% of interface translation is available by default)User Interface translation
Not all props titles have a translation possibility e.g. "Attributes" because they are not wrapped by the translate function (/ui_patterns/src/ComponentPluginManager.php:261).
Meanwhile, descriptions, sources, and help text are translatable there (I added a Cyrillic word beside the English origin one to show that in the screenshots).Props properties titles and descriptions implemented as a component in UI Suite DaisyUI (e.g. /ui_suite_daisyui/components/button/button.component.yml:87) can not be translated via the User interface translation page. E.g. the "Block?" title and nested "It is possible to display button as a block?" description text.
At the same time category, label, and description names in DaisyUI classes (/ui_suite_daisyui/ui_suite_daisyui.ui_styles.yml) are translatable.Translation in the Views and Blocks has the same behavior.
As said by Grimreaper, this is the scope of another UI Patterns issue π¬ Components metadata translation questions/ideas Active .
It is also covered by this Core issue β¨ Props have no (translatable) labels Active
Config translation
I haven't tested layout builder overrides with symmetric and asymmetric translation yet because related contribs modules don't support Drupal 11. I need to set up the Drupal 10 environment for the test.
Indeed:
- https://www.drupal.org/project/layout_builder_at β is Drupal 10 only
- https://www.drupal.org/project/layout_builder_st β is Drupal 10 only
We need to test that, testign in a Drupal 10.3 or 10.4 environment. I may do it if I have time, but the task is open to anybody willing to take it.
- πΊπ¦Ukraine SmovS Lutsk
I have also tested the Drupal 10 version (Core 10.4, PHP 8.3, UIP2 beta6).
With enabled default Core multilingual modules translations works as in Drupal 11.Installed and enabled Layout Builder Symmetric Translations (1.0-alpha3) and disabled Core Configuration Translation module.
Translation for Component titles as block titles still doesn't work as with the Core Configuration Translation module.
I can't translate titles via User interface translation because titles of components (e.g. Accordion, Avatar) don't exist there.Disabled Layout Builder Symmetric Translations and installed and enabled Layout Builder Asymmetric Translation. (v. 2.13)
I am not sure that Layout Builder Asymmetric Translation works properly with UIP2.When I tried to manage display of my custom block type via Layout Builder for secondary translation language ( in my case:
/uk/admin/structure/block-content/manage/test_block/display
) I got these errors.
When I disabled the Layout Builder Asymmetric Translation I didn't catch these errors.Let me know if I need to check anything else.
In my point of view, the best way to use UIP2 with multilingual is by using Core modules for translation. - π«π·France pdureau Paris
Translation for Component titles as block titles still doesn't work as with the Core Configuration Translation module.
I can't translate titles via User interface translation because titles of components (e.g. Accordion, Avatar) don't exist there.If my understanding is right, this is lready covered by:
- π¬ Components metadata translation questions/ideas Active
- β¨ Props have no (translatable) labels Active
Let me know if I need to check anything else.
Is it possible to translate a slot or prop value using
layout_builder_at
andlayout_builder_st
?For examples:
- I add a component as a layout, can i different slot & props values according to languages? If there some different behaviours according to prop types?
- Same for component as a block and component in field formatters?
Nice to have: Same analysis for views.
When I tried to manage display of my custom block type via Layout Builder for secondary translation language ( in my case: /uk/admin/structure/block-content/manage/test_block/display ) I got these errors.
When I disabled the Layout Builder Asymmetric Translation I didn't catch these errors.Which errors?
- πΊπ¦Ukraine SmovS Lutsk
I tested translations with the enabled
layout_builder_at
andlayout_builder_st
modules (separated enabled) and without them only Core modules (Language
andUser Translations
).
My steps:
1. Installed and enabled UIP2 and its submodules, installedui_suite_daisyui
.
2. Enabled Core Language and Interface Translation.
3. Enabled Ukrainian as a second language.
4. Tried translating (via User Translations) labels and titles that use components like Props, Slots, Source, and Variant. Tried translating props values like "Attributes", "Data from a field" etc. Both times translations work as expected only with enabled Core modules. Checked via Layout Builder, Block Layout, Views, and components as a field formatter.
Labels of the props types like "Size", and "Modal ID" aren't translatable.
5. Installed, enabled, and tested layout_builder_at and layout_builder_st modules separately to avoid conflicts. I didn't find any extra possibility to translate anything that wasn't translable by Core modules via User Translations.I am not familiar with the layout_builder_at and layout_builder_st modules well. Maybe I missed something and for these modules need to use something other/extra than User Translations. Let me know, please.