| Summary: |
i18ncp() incorrectly appends I18N_EXCESS_ARGUMENTS_SUPPLIED when singular and plural format strings use different variables |
| Product: |
[Frameworks and Libraries] frameworks-ki18n
|
Reporter: |
Nate Graham <nate> |
| Component: |
general | Assignee: |
Chusslove Illich <caslav.ilic> |
| Status: |
RESOLVED
NOT A BUG
|
|
|
| Severity: |
normal
|
CC: |
kdelibs-bugs-null, null
|
| Priority: |
NOR
|
|
|
| Version First Reported In: |
5.39.0 | |
|
| Target Milestone: |
--- | |
|
| Platform: |
Neon | |
|
| OS: |
Linux | |
|
|
Latest Commit:
|
|
Version Fixed/Implemented In:
|
|
|
Sentry Crash Report:
|
|
| |
Consider the following code: int numberOfImages = [1 or 2]; QString fileName = "someFile.jpg"; QString windowTitle = QString(i18ncp("@title:window", "Copy %2", "Copy %1 images", numberOfImages, fileName)) The singular case correctly displays "Copy someFile.jpg" However, the plural case, displays "Copy 2 images(I18N_EXCESS_ARGUMENTS_SUPPLIED)" In fact, there aren't excess arguments, it's just that both variables aren't used in each string. But besides the error message, the output is otherwise perfectly valid.