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.
Randy Fay points out that the list of contexts used is hard to get to (and requires translation team membership), while contributed module maintainers could use that data to choose appropriate contexts. We should have functionality to expose the contexts used so far and the strings under those contexts to give an idea to developers about the right contexts to pick.
Comments
Comment #1
rfaysubscribe
Comment #2
zirvap CreditAttribution: zirvap commentedSee also #1035716: [policy, no patch] Decide and document guidelines for using string context.
By the way: l.d.o. includes strings from all releases of modules. This list should show contexts only from latest major release of each module. If someone introduces a mis-spelled or redundant context in some beta-release and later fixes it, we don't want the wrong context listed here for all future, to confuse others and increase the risk of the mistake propagating to new modules.
Comment #3
Gábor HojtsyWell, in fact, anybody can browse any translation team without becoming a member, so they can figure out all available contexts and their use, but the UI and navigation for that is far from optimal. Anyhow, retitling for that.
Comment #4
DamienMcKennaThere should be a standard page in the documentation for tracking the contexts and where they are used, developers should't have to dig (and dig, and dig) to find this.
Comment #5
Gábor HojtsyDamien: the purpose of opening that issue was to figure out what to write on that page. That is not figured out yet...
Comment #6
SebCorbin CreditAttribution: SebCorbin commentedThis would be cool to offer a page and an API to list contexts. See also #1791612: [META] Find solution for growing number of strings extremely fast