Certificate form markup missing translation function

Created on 11 May 2023, over 1 year ago

Problem/Motivation

Markup describing available tokens on certificate form is missing translation function

Steps to reproduce

  • Setup an Drupal site with (at least) 2 languages installed
  • Go to /certificate/add/wysiwyg
  • See next string in Body tokens : The following tokens are available, and make possible to have some information about user data, training
  • Try to find in /admin/config/regional/translate : no result

Proposed resolution

Update opigno_certificate.module to have t() function wrapping markup content.
Attached patch does that

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

🐛 Bug report
Status

Needs review

Version

3.0

Component

Code

Created by

🇫🇷France nguerrier

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

Comments & Activities

  • Issue created by @nguerrier
  • 🇫🇷France nguerrier

    Updated patch (typo in first one)

  • 🇫🇷France andypost
    +++ b/opigno_certificate.module
    @@ -314,7 +314,7 @@ function opigno_certificate_form_alter(&$form, FormStateInterface $form_state, $
    +      '#markup' => t('<p>The following tokens are available, and make possible to have some information about user data, training\'s name, completion date automatically inserted into the certificate when it is issued.</p>
    

    I bet potx will throw error on exporting multiline string, moreover very probably translation will not be imported

Production build 0.71.5 2024