Bug 361510

Summary: With i18n() empty strings as arguments seem ignored, placeholder slip into result
Product: [Frameworks and Libraries] frameworks-ki18n Reporter: Friedrich W. H. Kossebau <kossebau>
Component: generalAssignee: Chusslove Illich <caslav.ilic>
Status: REPORTED ---    
Severity: normal CC: aspotashev, kdelibs-bugs-null
Priority: NOR    
Version First Reported In: 5.20.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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