Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
joachim CreditAttribution: joachim commented> 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?
Comment #2
Wouter Van den Bosch CreditAttribution: Wouter Van den Bosch commentedHi 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
Comment #3
joachim CreditAttribution: joachim commentedI 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():
-- compare with docs at http://api.drupal.org/api/drupal/includes!bootstrap.inc/function/t/7
Comment #4
Wouter Van den Bosch CreditAttribution: Wouter Van den Bosch commentedDigging 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?