| Summary: | KLocalizedString::toString not behaving as documented | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-ki18n | Reporter: | Harald Sitter <sitter> |
| Component: | general | Assignee: | Chusslove Illich <caslav.ilic> |
| Status: | CONFIRMED --- | ||
| Severity: | normal | CC: | claudius.ellsel, kdelibs-bugs-null |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Harald Sitter
2020-01-14 13:27:16 UTC
Reproduced with https://invent.kde.org/plasma/kinfocenter/-/blob/master/Modules/about-distro/src/Entry.cpp#L43 Using an empty list as argument returns the German Strings for me. Documentation: https://api.kde.org/frameworks/ki18n/html/classKLocalizedString.html Probably relevant part of the implementation: https://api.kde.org/frameworks/ki18n/html/klocalizedstring_8cpp_source.html#l00530 *** Bug 453313 has been marked as a duplicate of this bug. *** Still relevant today. I browsed source code, and tracked this problem down to the definition of `KFormatPrivate::formatByteSize`: it uses a bunch of unqualified tr() calls. The function tr() is declared by Q_DECLARE_TR_FUNCTIONS(KFormat), and delegates actual work to QCoreApplication::translate() which uses globally installed QTranslator object. |