Skip to content

Add check for C++ std::format template strings #22938

Description

@evan-goode

Describe the problem

A malformed translated string recently caused crashes in our project, dnf5: rpm-software-management/dnf5#3056.

The translation in question was:

#: output/transaction_table.cpp:365 output/transaction_table.cpp:435
#: output/transaction_table.cpp:476
#, c++-format
msgid "{} -> {}"
msgstr "{} -} {}"

std::format throws when passed "{} -} {}".

Solution brainstorm

I'd like to enable a check in Weblate that can flag malformed c++-format translations. In https://docs.weblate.org/en/latest/user/checks.html#formatted-strings, I see there are checks available for many other format string conventions, e.g. C-style format strings. However I don't see one for C++'s std::format template strings, documented here: https://en.cppreference.com/cpp/utility/format/format.

Describe alternatives you have considered

The python-brace-format check is probably the closest thing to matching C++ std::format.

Screenshots

No response

Additional context

No response

Activity

  1. added
    Waiting for: Triage
    on Nov 18, 2026
  2. added theissue type on Nov 19, 2026
  3. added
    Waiting for: Demand
    good first issue
    on Nov 19, 2026
  4. removed
    Waiting for: Triage
    on Nov 19, 2026
  5. github-actions commented on Nov 19, 2026

    @github-actions

    This issue seems to be a good fit for newbie contributors. You are welcome to contribute to Weblate! Don't hesitate to ask any questions you would have while implementing this.

    You can learn about how to get started in our contributors documentation.

  6. added a commit that references this issue on Nov 21, 2026
    bd33f39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: Quality checksWaiting for: Demandgood first issue

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions