[2.0.0-rc1] Test with multilingual websites

Created on 13 December 2024, about 1 month ago

Problem/Motivation

I am afraid we didn't test UIP2 with multilingual websites. Also, we already have many users, but we don't know if they work with multilingual projects.

Proposed resolution

Test UIP2 with:

what else?

Steps to reproduce

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡«πŸ‡·France pdureau Paris

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • 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:

    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:

    Let me know if I need to check anything else.

    Is it possible to translate a slot or prop value using layout_builder_at and layout_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?

  • πŸ‡«πŸ‡·France pdureau Paris
  • πŸ‡ΊπŸ‡¦Ukraine SmovS Lutsk

    I tested translations with the enabled layout_builder_at and layout_builder_st modules (separated enabled) and without them only Core modules (Language and User Translations).
    My steps:
    1. Installed and enabled UIP2 and its submodules, installed ui_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.

  • πŸ‡«πŸ‡·France pdureau Paris
Production build 0.71.5 2024