The group description is not translated before being output on the screen.

In #1155054: Improve consistency with FAPI fieldset description: allow html tags the description was changed to allow (simple) html tags like strong and em. But in that change (or maybe it was never there, also not before) we lost the translation of it. I am also still trying to find some time to start off with #1175802: Support for field groups? and its counterpart in i18n, but until that time the description should be passed through t() (before being passed through xss filtering).

Patch would change 3 characters:

  $description = isset($group->format_settings['instance_settings']['description']) ? filter_xss_admin(t($group->format_settings['instance_settings']['description'])) : '';

I think it is faster to change that in an editor than attaching and applying a patch:) ...

CommentFileSizeAuthor
#3 group-description-translation-1196890.patch677 bytesyop
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fietserwin’s picture

Sorry, I'm already referring to its counterpart in i18n, in field_groups the issue is #1175102: Make field groups localizable the same way as fields in core.

nils.destoop’s picture

Status: Active » Closed (duplicate)
yop’s picture

For the ones who are interested in having a usable and automated solution of this 6 months old issue, here is the corresponding patch.

Stalski’s picture

fair enough. Pushed to git.

jeff h’s picture

Status: Closed (duplicate) » Active

Isn't pushing user-entered data through t() a no-no?

fietserwin’s picture

kunago’s picture

@jeff-h: Would a use of "check_plain" function fix it? It is as easy as wrapping the "t" function in the "check_plain" function and I assume that should do it, right?

Stalski’s picture

Status: Active » Closed (duplicate)

this indeed is a duplicate of #1175102: Make field groups localizable the same way as fields in core and #1175802: Support for field groups? and will be handled there, if it even gets through.
Seems dangerous at this stage for all existing sites.

- Edit - this means for me there is no difference between the description and the label of the group when it boils down to translation.