Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There are some strings in AT theme settings which can not be translated ("HTML tags are not allowed"). For example:
<div class="description">Files will be saved to: <code>@public_files
<div class="description">Files will be saved to: <code>@theme_directory
<div class="description">In this layout <em>Second sidebar</em> wraps below.</div>
Steps to reproduce
- Install and activate any language different from English
- Install and activate Adaptive Theme
- Go to admin->Regional and Language->Interface Translation and try to manually translate AT or import an AT .po file
Proposed solution
Move div tags anywhere outside t function in order to be able to translate those strings.
Comments
Comment #1
Jeff Burnz CreditAttribution: Jeff Burnz commentedAre some tags allowed or no tags at all, this has never been really clear to me. Easy to fix either way.
Comment #2
Pablo Romero CreditAttribution: Pablo Romero commentedExtracted from includes/locale.inc (Drupal 7.35):
Any other tags are filtered as "not safe" for Locale module.
Comment #3
NSp CreditAttribution: NSp commentedWhy do you think the "table" tag is allowed and the "div" is not?
Comment #5
Jeff Burnz CreditAttribution: Jeff Burnz commentedBetter late than never, fixed it.
@NSp, div is not allowed because it's not in the locale_string_is_safe() list of allowable tags.
Comment #7
VVS CreditAttribution: VVS commentedBad commit...
And how to translate these strings? :(