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

To reproduce :
- On Drupal 6 enable content_access module.
- Translate the string : "This role has '@perm' permission, so access is granted." using double quotes. (ex: This roles has "@perm" permission.)
- Make sure you have a role using 'administer nodes' permission.
- Go to 'Access control' page (admin/content/node-type/[type]/access) and show checkbox tooltip related to role on the previous step.
- You will just see the tooltip part before double quotes.
Solution
Wrap the title attribute in drupal_attributes function.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | content_access.title_property-D7.patch | 2.23 KB | theo_ |
| content_access.admin-tooltip.patch | 2.17 KB | theo_ | |
| content_access.admin-tooltip.png | 249 KB | theo_ |
Comments
Comment #1
good_man commentedFirst 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() ?
Comment #2
theo_ commentedI translated changing quotes just cause it is a possible use case.
I used drupal_attributes because the previous code had issue with quotes.
Comment #3
good_man commentedMoving this to 7.x. Let's get this fixed in 7.x then 6.x.
Comment #4
theo_ commentedHere is the fix for 7.x-1.x-dev
Comment #5
theo_ commentedComment #6
good_man commentedCommitted to 6.x and 7.x. Thanks dex_.
Comment #7
good_man commentedComment #8
theo_ commentedIt was a pleasure for my first contrib. But i am wondering why the commit was not attribute to me ?
Comment #9
good_man commentedYou 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.