Closed (fixed)
Project:
Nodewords: D6 Meta Tags
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Sep 2009 at 20:24 UTC
Updated:
13 Oct 2009 at 14:20 UTC
I cannot translate the permission rules. These are like: edit Bing Webmaster Center verification meta tag, edit Dublin Core title meta tag, edit keywords meta tag, etc.
I just have found a "widget:permission" string in the nodewords.module:411,412 lines. The code for this is:
foreach (nodewords_get_possible_tags() as $name => $info) {
$permissions = array('administer nodewords');
if (!empty($info['widget:permission'])) {
$permissions[] = $info['widget:permission'];
}
}
It seems tricky because I do not see there any translateable string but I can translate the 'administer nodewords' string. It would be nice to use real translateable stings, so I could translate these to "kulcsszavak meta jelölő szerkesztése" for examle.
Or, the other case: I do not understand the Drupal translation system. (I am a quite newbie...)
Comments
Comment #1
hass commentedSorry, but dynamic permissions are not translatable. This is a limitation of core :-(. Same issue in CCK and other modules...
Comment #2
hass commentedneed to be
and may also need to be moved to hook_permission... I've never hacked around core this way... not sure if all works without adding them to hook_perm.
Comment #3
hass commentedbasic_metatags_perm() is missing and can have the static variables.
may be removed from nodewords module. It doesn't look as modular as it should be.
Comment #4
hass commentedComment #5
avpadernoI thought that the permissions were translatable strings only on Drupal 7.
I will fix this. Clearly, each Nodewords module needs to implement
hook_perm(), or the script that extracts the strings to translate will not extract the permission strings.Comment #6
avpadernoComment #7
avpadernoThe code has been changed, and committed in CVS.
Now the permissions are separated, and listed for each module implementing them.
Thanks for your report.