Bug 361510 - With i18n() empty strings as arguments seem ignored, placeholder slip into result
Summary: With i18n() empty strings as arguments seem ignored, placeholder slip into re...
Status: REPORTED
Alias: None
Product: frameworks-ki18n
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.20.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Chusslove Illich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-08 00:22 UTC by Friedrich W. H. Kossebau
Modified: 2019-05-27 12:36 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Friedrich W. H. Kossebau 2016-04-08 00:22:46 UTC
Seems (in Plasma widget code at least) when arguments which are empty strings are passed to i18n() & friend calls, they are treated as non-existent, resulting in placeholders to survive the replacement and replacements done in wrong places.

Examples:
i18n("%1", "") -> "%1"
i18n("%1-%2", "", "text") -> "text-%2"

This happens both for verbatim empty strings and variables containing empty strings.

Reproducible: Always
Comment 1 Alexander Potashev 2019-05-27 12:36:02 UTC
i18n() is part of KF5::I18n