Issue #3629113: Contextual trigger Open and Close labels need a verb translation context

The contextual links trigger label is built from the strings "Open" and "Close" in core/modules/contextual/js/contextual.js. Both are translated without a context, so they share their translation with the same words used elsewhere as a state (for example the "Open" comment status). In languages where the state and the action differ (Spanish "Abierta" versus "Abrir"), the trigger can end up with the state form.

This change passes the translation context "Verb" to both Drupal.t() calls, so translators can give the trigger actions their own translation. There is no change to the English label.

Verified with a JavaScript syntax check and a Prettier check using core's configuration, plus a check that the locale JavaScript string parser matches the new call shape. I could not run the test suites locally and am relying on the pipeline for them.

Merge request reports

Loading
Loading