Incorrect Placeholder Check for Plural Forms in Weblate #13016
Labels
enhancement
Adding or requesting a new feature.
undecided
These features might not be implemented. Can be prioritized by sponsorship.
Describe the issue
I encountered a bug in Weblate related to the placeholder check when handling plural forms. Specifically, when plural forms use variables that differ from those in the singular form, Weblate incorrectly validates the placeholders in the translation.
I already tried
Steps to reproduce the behavior
Create a translation entry with the following:
Singular form: @(count) Stck.
Plural form: @(otherVariable) Stck.
Use the placeholder check feature in Weblate:
placeholders:r"@([^)]+)"
Attempt to translate both forms.
The placeholder check incorrectly validates the plural form.
Weblate expects the variable @(count) in the plural form, marking @(otherVariable) as superfluous and @(count) as missing.
Expected behavior
The placeholder check should correctly recognize and validate the variables specific to each form (plural or singular). In this case, it should acknowledge @(otherVariable) as the appropriate variable for the plural form without expecting @(count).
Screenshots
Exception traceback
No response
How do you run Weblate?
PyPI module
Weblate versions
5.4.2
Weblate deploy checks
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: