<table><tr><td style="">broulik added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D16595">View Revision</a></tr></table><br /><div><div><p>We use everything in Plasma "as a library", that's why <tt style="background: #ebebeb; font-size: 13px;">KDeclarative::QmlObject</tt> sets a translation context on the root context, so that plasmoids, wallpaper plugins, and other QML bits can use <tt style="background: #ebebeb; font-size: 13px;">i18n</tt> with no translation domain (only exception really being the look and feel packages). I'm too tired to explain right now but note when you run the KCM from within Plasma you get a warning like:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">QQmlContext: Cannot set context object for internal context.
QQmlContext: Cannot set property on internal context.</pre></div>
<p>That is what breaks the translations in this case and used to work until we shared <tt style="background: #ebebeb; font-size: 13px;">QQmlEngines</tt> between the KCM and the window around it. However, if we don't then the KCM uses the Plasma Qt Quick Controls style which is also undesirable. We also don't want separate <tt style="background: #ebebeb; font-size: 13px;">QQmlEngine</tt>s as then you run into bugs and crashes since we would have objects (e.g. context properties and singletons) between engines and they clean up each other's stuff and crash.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R115 Plasma Audio Volume Applet</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D16595">https://phabricator.kde.org/D16595</a></div></div><br /><div><strong>To: </strong>aacid, Plasma, davidedmundson, mart<br /><strong>Cc: </strong>broulik, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>