- Issue created by @jose reyero
- ๐ช๐ธSpain jose reyero
This is the full patch, just to get started for now.
- ๐ช๐ธSpain jose reyero
Converted the patch to a new branch.
Notes for quick manual testing, examples for es/Spanish:
* Manually add 'language' into URL, like
https://drupalcmsmultilingual.ddev.site/core/install.php?langcode=es
* Add some custom strings translations into settings.php
$settings['locale_custom_strings_es'][''] = [ 'Case Studies' => 'Casos de Estudio', 'Events' => 'Eventos', 'News' => 'Noticias', ];
- ๐ญ๐บHungary Gรกbor Hojtsy Hungary
Is this an API that is being changed or is not? Looks like it is defined by recipe_installer_kit :)
Is this issue for discussion? I think the ultimate MRs will be against recipe_installer_kit and drupal_cms repos?
- ๐ญ๐บHungary Gรกbor Hojtsy Hungary
Also Adam Hoenich may know if it was intended that the recipe name was not pulled dynamically but rather an alternate name was possible to be provided here. That may be a loss of a feature to not allow that anymore. That said it would be harder to translate it then :D
- ๐ฎ๐ณIndia anjali rathod India
Yes Gรกbor, the ultimate MRs will be against recipe_installer_kit and drupal_cms repos , this issue is for review and discussion for the implementation that is done so that all the work can be reviewed and worked upon at a single place and then the work can be splitted into their respective repositories once the review is complete.
- ๐บ๐ธUnited States phenaproxima Massachusetts
Also Adam Hoenich may know if it was intended that the recipe name was not pulled dynamically but rather an alternate name was possible to be provided here. That may be a loss of a feature to not allow that anymore. That said it would be harder to translate it then :D
Gรกbor is correct -- the recipe name is not meant to be pulled dynamically. The idea here is that you can combine multiple recipes under a single arbitrary label. So it is actually the info file itself that needs to be translated.
So unfortunately I cannot merge this into Recipe Installer Kit as written. :(
- ๐ช๐ธSpain jose reyero
Yes, that makes sense, thanks for the feedback @gรกbor, @anjali, @phenaproxima
So I'm wondering whether we can build upon current yml to add support for these - name translation, multiple recipes.. - and other features.. and ideally make something extendable...
How would something like this look like?
... optional: blog: name: Blog recipes: - drupal/drupal_cms_blog case_studies: name: Case Studies recipes: - drupal/drupal_cms_case_study ...
- ๐บ๐ธUnited States phenaproxima Massachusetts
I think that makes sense. Recipe Installer Kit will need to do it in a backwards-compatible way, but it could be done.
I propose this format:
recipes: optional: - name: Blog # this is translatable packages: ['drupal/drupal_cms_blog'] - ...
- ๐ช๐ธSpain jose reyero
jose reyero โ changed the visibility of the branch 3530520-installer-make-features-translatable to hidden.
- Merge request !2Implemented support for new profile.yml format for recipes/optional โ (Open) created by jose reyero
- ๐ช๐ธSpain jose reyero
Implemented support for the format presented in the previous comment, plus localization for recipe names. Still keeping backwards compatibility.
Note the recipes/optional items in `drupal_cms_installer.info.yml` file have been only partially updated to test/check support for old format too.
If this looks good we can complete the file update and/or also spin off two patches for Recipe Installer Kit and Drupal CMS projects.
- ๐บ๐ธUnited States phenaproxima Massachusetts
Recipe Installer Kit already implemented the change (it uses the key
packages
instead ofrecipes
, though):https://git.drupalcode.org/project/recipe_installer_kit/-/blob/1.x/src/D...
- ๐ช๐ธSpain jose reyero
jose reyero โ changed the visibility of the branch 3530520-installer-yaml-translate-recipes to hidden.
- ๐ช๐ธSpain jose reyero
jose reyero โ changed the visibility of the branch 1.0.x to hidden.
- ๐ช๐ธSpain jose reyero
jose reyero โ changed the visibility of the branch 3530520-installer-yaml-translate-recipes to active.
- ๐ช๐ธSpain jose reyero
jose reyero โ changed the visibility of the branch 3530520-installer-translate-recipes to hidden.
- Merge request !5Resolve #3530520 Make installer recipes translatable โ (Open) created by jose reyero
- ๐ช๐ธSpain jose reyero
Ok, updated code to match latest changes from Recipe Installer Kit.
- ๐บ๐ธUnited States phenaproxima Massachusetts
That looks fine, matches the changes in Drupal CMS and Recipe Installer Kit except for calling t() on a non-literal...what's up with that?
- ๐บ๐ธUnited States phenaproxima Massachusetts
Oh, wait, I see -- it's so that the string will run through the translation at all. That makes sense; I can make that same change in Recipe Installer Kit if someone can confirm that this does what we want.
- ๐บ๐ธUnited States phenaproxima Massachusetts
Pushed the analogous fix to Recipe Installer Kit (unreleased): https://git.drupalcode.org/project/recipe_installer_kit/-/blob/1.x/src/F...
- ๐ช๐ธSpain penyaskito Seville ๐, Spain ๐ช๐ธ, UTC+2 ๐ช๐บ
@phenaproxima As noted in your comment ๐ Make feature names on the installer translatable. Active , I think the
phpcs:ignore
is relevant for explicitly showing this wasn't an overlook.