Skip to content

Add block syntax for pgettext #1430

@remram44

Description

@remram44

Follow up on #441, #1126

It was difficult to come to an agreement on the syntax for block translation with context, so it was left out of #1126. However this should still be added.

The possibilities that were discussed are:

  • context keywords: {% trans context "mycontext" num=3 %}One Text{% pluralize %}{{num}} Texts{% endtrans%}
  • {% context %} block: {% trans %}Click me{% context %}In annoying popup{% endtrans %} (similar to {% pluralize %}
    • But context is usually very short, using a block might be wasteful
  • Adding on trans directly: {% trans "greeting" %}Hello{% endtrans %} or {% trans(greeting) %}Hello{% endtrans %}

I personally don't feel strongly at all, but I really could use such a syntax.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions