Skip to content

External type hints for ICU Message Format checks #17269

@nijel

Description

@nijel

Describe the problem

Some formats (at least ARB) provide type hints for ICU Message Format externally. There is currently no way for Weblate to understand this.

    "loadCountMoreParticipants": "{count, plural, one{Загрузить еще одного участника} few{Загрузить еще # участников} other{Загрузить еще # участников}}",
    "@loadCountMoreParticipants": {
        "type": "String",
        "placeholders": {
            "count": {
                "type": "int"
            }
        }
    },

Solution brainstorm

  • Introduce flag like icu-format-hint:placeholder:type:other-placeholder:other-type and let the ICU typing check get types from here if present
  • Extend the ARB parser to emit these flags for the ARB placeholder annotations

Describe alternatives you have considered

No response

Screenshots

No response

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: File format supportIssues related to file formats implemented in Weblate.Area: Quality checksWaiting for: DemandLow priority for development. Pull requests welcome. Can be prioritized by sponsorship.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions