When marking "English" as translatable, Drupal will fail to locate a proper po file. That message is correct, however, there are double-escaping issues. Example:

Drupal core (8.0.0-beta1). File not found at <em class="placeholder"></em> nor at <em class="placeholder">translations://drupal-8.0.0-beta1.en.po</em>

Proposed resolution

To be determined

Remaining tasks

Probably fairly simple code, we're looking into it.

User interface changes

API changes

@akoe and me will work on it

Members fund testing for the Drupal project. Drupal Association Learn more


ChristianAdamski’s picture

To reproduce:
- enable "language" and "Interace translation"
- go to languages and set "English" to be translatable
- go to admin/reports/translations
- expend the description on "English"

You should see above faulty message

ChristianAdamski’s picture

Issue tags: +D8MI, +Twig

It's probably core/modules/locale/src/Form/TranslationStatusForm.php at line 253+ creating an emphasized placeholder.
In line 209 this one is put into an array without any theming infos.
At line 89 this gets embedded into another array.
And finally at 102 a drupal_render gets called.

akoe’s picture

As far as we see it there are 3 possible solutions as described in

  1. modifying the existing template in core/modules/locale/templates/locale-translation-update-info.html.twig in line 30 to render the given array in details properly
  2. creating an inline template in like suggested (#2311123) in core/modules/locale/src/Form/TranslationStatusForm.php probably after line 209 to render the given returned strings from createInfoString($project_info), properly, so that twig doesnt escape it
  3. modifying the returned strings to an render array in core/modules/locale/src/Form/TranslationStatusForm.php probably after line 209 to let twig render it properly
ChristianAdamski’s picture

Turns out, the issue is actually in core/modules/locale/

ChristianAdamski’s picture

String concatenation replaced with inline template.

ChristianAdamski’s picture

Status: Active » Needs review
41.22 KB
43.96 KB
ChristianAdamski’s picture

ChristianAdamski’s picture

Just found this:

It's an alternative fix altering the inclusion of update info in the t() instead of an inline_template

akoe’s picture

Just tested the patch from #5 which implements an inline template in core/modules/locale/ to render the array as secured string, without escaping.
It worked locally and solved the issue.

SteffenR’s picture

Status: Needs review » Reviewed & tested by the community
36.8 KB

I also had a look at the issue - everything looks fine for me. The formely double escpaed strings are gone...

I also attached a screenshot showing the working result:

roderik’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

Sorry all. Just making a change to the t() argument seems simpler than implementing an inline_template around it.

jibran’s picture

Issue tags: +SafeMarkup