Skip to content

Alternative placeholder syntaxes #15

@lime

Description

@lime
Background:

Some i18n tools (e.g. Tolk, different translation services) attempt to detect the default %{key} syntax, and warn you if the same placeholder is missing from the translation. Understandably, they often stumble at the syntax used by It, as %{link:potato} differs from %{link:pomme de terre}.

Proposal:

What do you think about enabling an alternative syntax, that would be "backwards-compatible" with conventional i18n interpolations? It would of course be optional, e.g. enabled in an initializer.

My first thought would be to pass the text content in separate parentheses after the normal interpolation, e.g. %{link}(potato) or %{link}[potato]. Maybe there are other viable options as well?

I'd be ready to develop this feature, but I thought I'd ask for opinions first to see if someone else considers it an idea worth pursuing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions