API page: https://api.drupal.org/api/drupal/core!modules!system!language.api.php/g...
At the bottom of this page, there is supposed to be a code section giving examples of how to internationalize various types of text.
It is not showing up as code.
The reason is that there is no @endcode at the end of the code section.
So, the task here is to add the @endcode line, right after these lines in language.api.php:
* // Twig template
* {% trans with {'context': 'Long month name'} %}
* May
* {% endtrans %}
Reference for @code/@endcode tags:
https://www.drupal.org/node/1354#code
Also note that on another issue we are planning to move this language.api.php file to a different directory. So if the above link to the Internationalization topic doesn't work, it's probably already been moved. In this case, go to the Topics list for Drupal 8 on api.drupal.org and find the Internationalization topic, which will tell you where the file is.
Comment | File | Size | Author |
---|---|---|---|
#2 | drupal-translation-code-documentation-2487464-2.patch | 364 bytes | mark.labrecque |
Comments
Comment #1
mark.labrecqueComment #2
mark.labrecqueI think this is all that was needed, but perhaps other changes are needed? I will stand by for any other changes needed on this.
Thanks!
Comment #3
mark.labrecqueComment #4
jhodgdonYes, that's it, thanks! Committed to 8.0.x.