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.
Looking at the code for st() in Drupal 7, it does support contexts. However, the parsing code in potx does not support for that. We should fix that. $t() is a common shorthand for st() or t(), so that should be fixed too.
Comment | File | Size | Author |
---|---|---|---|
#1 | st-context-parsing.patch | 8.37 KB | Gábor Hojtsy |
Comments
Comment #1
Gábor HojtsyAttached patch implements support for this and includes test coverage. Also found this issue while building tests for this: #1039552: Add test coverage for context support in format_plural().
Comment #2
Gábor HojtsyOk, committed to Drupal 7.x-1.x. Need to be backported.
Comment #3
Gábor HojtsySame patch applied cleanly to Drupal 6 version, committed there too.