Problem

On node-type 'Access control' page checkbox tooltip goes wrong if translation use double quotes.

content_access.admin-tooltip

To reproduce :

  1. On Drupal 6 enable content_access module.
  2. Translate the string : "This role has '@perm' permission, so access is granted." using double quotes. (ex: This roles has "@perm" permission.)
  3. Make sure you have a role using 'administer nodes' permission.
  4. Go to 'Access control' page (admin/content/node-type/[type]/access) and show checkbox tooltip related to role on the previous step.
  5. You will just see the tooltip part before double quotes.

Solution

Wrap the title attribute in drupal_attributes function.

Comments

good_man’s picture

First I didn't understand why you translate a 'something' with "something" (i.e. changing the quotes?) ? the second one is why using drupal_attributes() , since already t() also do a check_plain() ?

theo_’s picture

I translated changing quotes just cause it is a possible use case.

I used drupal_attributes because the previous code had issue with quotes.

good_man’s picture

Title: Tooltip goes wrong on 'Access control' page after translation » Title properity not escaping double quotes correctly
Version: 6.x-1.2 » 7.x-1.x-dev
Status: Active » Needs work
Issue tags: -admin, -tooltip, -Content access +needs backport to 6.x

Moving this to 7.x. Let's get this fixed in 7.x then 6.x.

theo_’s picture

Title: Title properity not escaping double quotes correctly » Title property not escaping double quotes correctly
Version: 7.x-1.x-dev » 6.x-1.2
Status: Needs work » Active
StatusFileSize
new2.23 KB

Here is the fix for 7.x-1.x-dev

theo_’s picture

Version: 6.x-1.2 » 7.x-1.x-dev
Status: Active » Needs work
good_man’s picture

Committed to 6.x and 7.x. Thanks dex_.

good_man’s picture

Status: Needs work » Fixed
theo_’s picture

It was a pleasure for my first contrib. But i am wondering why the commit was not attribute to me ?

good_man’s picture

You remind me of this one, I didn't use it before, nor did I see a maintainer doing this, I think this is the reason why I don't remember to use it. But I do list the names of the involved people with issues numbers when releasing a new release. However, it should be done also in git commit message like core does.

Automatically closed -- issue fixed for 2 weeks with no activity.