Summary: | Semantic tags not respected in nested xi18nc calls | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-ki18n | Reporter: | Elvis Angelaccio <elvis.angelaccio> |
Component: | general | Assignee: | Chusslove Illich <caslav.ilic> |
Status: | RESOLVED NOT A BUG | ||
Severity: | normal | CC: | kdelibs-bugs |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Results of nesting xi18nc calls with different context |
Description
Elvis Angelaccio
2015-12-28 18:27:09 UTC
Created attachment 96337 [details]
Results of nesting xi18nc calls with different context
*** Bug 357273 has been marked as a duplicate of this bug. *** xi18n* call return a QString, and QString as argument to an *xi18n* call has to be escaped for XML, as it could be anything. For example, it could be a file path which happens to have something looking like a tag in it. So this behavior is as expected. Instead, kxi18n* calls should be used for nesting. These return KLocalizedString, for which it is guaranteed that what looks like markup really is markup (as consequence of escaping any other argument type). The section in documentation that talks about this: http://api.kde.org/frameworks-api/frameworks5-apidocs/ki18n/html/prg_guide.html#kuit_escape Thanks for the explanation :) Unfortunately is not trivial to refactor existing code to support KLocalizedString. I guess I will simply avoid to use markup in the nested translated messages... |