Werk #20133: Named parameters for localized formspec labels
| Component | Checks & agents | ||
| Title | Named parameters for localized formspec labels | ||
| Date | Jul 3, 2026 | ||
| Level | Trivial Change | ||
| Class | New Feature | ||
| Compatibility | Compatible - no manual interaction needed | ||
| Checkmk versions & editions |
|
Localizable strings created via Title, Label, Help and Message
(from cmk.rulesets.v1) can now be formatted with named parameters
instead of only positional ones.
Previously only positional formatting was possible:
Title("Replaced %s by %s") % (old, new)
Now you can pass a mapping and reference the parameters by name:
Title("Replaced %(old)s by %(new)s") % {"old": old, "new": new}
Named parameters give translators more context and let them reorder the parameters for languages with a different word order. Positional formatting continues to work, so no changes to existing plugins are required.