Hi,

Whereas most strings for flags are translatable, the optional 'Unflag not allowed text' does not seem to be translatable at this moment. Or at least it's not showing up when I search for the value I entered.

Deliberate choice or just a matter of wrapping it in a t-function?

Thanks,
Wouter

Comments

joachim’s picture

Version: 7.x-2.0-beta9 » 7.x-3.x-dev

> most strings for flags are translatable

Normally, user-entered text isn't translatable; or at least, you can't wrap it a t(). How are the other strings made translatable?

Wouter Van den Bosch’s picture

Hi Joachim,

Well, when I use the locale module's 'translate interface' option to manually translate translatable strings, then I do seem to find most other user-entered strings from the flags module. For example, any string entered in the Messages fieldset (eg. 'Flag link text') pop up in the translate interface search functionality.

Since I am using the 'Unflag not allowed text' in this particular project, I was surprised to find that that particular string isn't translatable.

Regards,
Wouter

joachim’s picture

I can't see how the unflag denied text is being treated any differently.

However, I'm concerned that what appears to be the mechanism for translating these goes against the correct use of t():

  function get_label($label, $entity_id = NULL) {
    if (!isset($this->$label)) {
      return;
    }
    $label = t($this->$label);

-- compare with docs at http://api.drupal.org/api/drupal/includes!bootstrap.inc/function/t/7

Wouter Van den Bosch’s picture

Digging deeper into this (didn't have the time to take a look at the code earlier today), you are correct.

Nevertheless, being able to have these strings translatable is extremely useful in a multilingual environment. Seems like the use of t() here should eventually be substituted by l18n's translatable variables functionality, i guess.

I figure this issue can be closed, to be replaced by a feature request for such integration?