Problem/Motivation

For making recipes translatable we need to translate the strings for the input section in recipe.yml.
Example from core/recipes/feedback_contact_form/recipe.yml:

input:
  recipient:
    data_type: email
    description: 'The email address that should receive submissions from the feedback form.'
    constraints:
      NotBlank: []
    prompt:
      method: ask
      arguments:
        question: 'What email address should receive website feedback?'

Proposed resolution

While we could use the generic '!translate' tag approach proposed in #3313863: Translation of recipe input and config actions [monolingual], there may be better options, like just running the - known, limited - translatable parameters through localization.

In both cases, it needs some adjustments on the code using that strings - mostly in Recipes/ConsoleInputCollector which won't take TranslatableMarkup as a parameter.

User interface changes

All strings should show up translated when running a recipe install.

Data model changes

Only recipe.yml files need to be updated.

Issue fork drupal-3529418

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jose reyero created an issue. See original summary.

jose reyero’s picture

jose reyero’s picture

Issue summary: View changes

anjali rathod made their first commit to this issue’s fork.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.