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

hass’s picture

Status: Active » Closed (works as designed)

Sorry, but dynamic permissions are not translatable. This is a limitation of core :-(. Same issue in CCK and other modules...

hass’s picture

Title: I can not translate some strings » Static permissions not translatable/extractable by POTX
Status: Closed (works as designed) » Active
'widget:permission' => 'edit description meta tag'

need to be

'widget:permission' => t('edit description meta tag')

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.

hass’s picture

basic_metatags_perm() is missing and can have the static variables.

  foreach (nodewords_get_possible_tags() as $name => $info) {
    if (!empty($info['widget:permission'])) {
      $permissions[] = $info['widget:permission'];
    }
  }

may be removed from nodewords module. It doesn't look as modular as it should be.

hass’s picture

Category: feature » bug
avpaderno’s picture

Title: Static permissions not translatable/extractable by POTX » permission strings are not translatable
Version: 6.x-1.2 » 6.x-1.x-dev

I 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.

avpaderno’s picture

Title: permission strings are not translatable » Permission strings are not translatable
Component: User interface » Code
avpaderno’s picture

Status: Active » Fixed

The code has been changed, and committed in CVS.
Now the permissions are separated, and listed for each module implementing them.

Thanks for your report.

Status: Fixed » Closed (fixed)

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