| Summary: | private/TextFieldContextMenu.qml:103: ReferenceError: i18nc is not defined | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-qqc2-desktop-style | Reporter: | ratijas <me> |
| Component: | general | Assignee: | Marco Martin <notmart> |
| Status: | RESOLVED INTENTIONAL | ||
| Severity: | normal | CC: | ahiemstra, kde, nate, noahadvs |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
ratijas
2021-09-27 17:01:01 UTC
The i18n() function (as well as many others in that family) comes from a context object KLocalizationContext from KF::I18n package. This object should be initialized and set to QML engine in C++ code, there's currently no way around doing that. QQC2 Desktop Style, by not being a Tier 1 framework, can expect that i18n stuff will be set up by any calling code. On the other hand, for example Kirigami is a Tier 1 framework which can not depend on KI18n, so can only use simpler qsTr() functions in its components. So, to sum up: these reference errors are not bugs in org.kde.desktop but an issue with me using a runtime without expected context object. To solve this problem I created `kqml` — QML runtime with initialized KLocalizedContext. Read more: https://invent.kde.org/plasma/plasma-sdk/-/merge_requests/79 |