Problem/Motivation
The README is a really great overview of the module! Unfortunately it shows TranslatableMarkup which is used with a variable. However, such usage is disallowed and the first argument to TranslatableMarkup or related functions should always be a static string. This ensures that Drupal's translation template extractor can properly find the string and make it available for translation on https://translate.drupal.org/
Since this is documentation, this is not a big issue, but it might encourage newcomers to do the wrong thing and run into unexpected problems.
Steps to reproduce
Proposed resolution
Inline the $str variable so that the full string is statically provided as first argument to TranslatableMarkup.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork grequest-3459017
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
Comment #2
jagraj_singh_gill commentedI am working on this issue.
Comment #6
jagraj_singh_gill commentedHey @Kingdutch I have corrected the incorrect usage of TranslatableMarkup in README and created the MR for same. Please review.
Thank You !!
Comment #7
ankitv18 commentedChanges looks clean, hence marking this RTBC
Comment #8
gogowitsch commentedThe proposed change looks good. Let’s get this merged. 🙂