[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    D18836: Make the button tooltips on the "Configure Virtual Desktops" page translatable
From:       Albert Astals Cid <noreply () phabricator ! kde ! org>
Date:       2019-02-08 20:32:00
Message-ID: 608917338ac8b253f158c1749fd68b02 () localhost ! localdomain
[Download RAW message or body]

[Attachment #2 (text/plain)]

aacid added subscribers: mart, aacid.
aacid added a comment.


  There are three KDeclarative with their three KLocalizedContexts being created when \
"executing" this QML file.  
  Only one of them has a call to setDomainTranslation, the other two are "outside" \
main.qml so don't get that call, that's fine.  
  I think the problem lies in kirigami's DelegateRecycler that is using the wrong \
context and thus the wrong translation domain for those i18nc calls.  
  In fact commenting out these lines
  
    if (QQmlEngine *eng = qmlEngine(this)) {
        //share context object in order to never lose track of global i18n()
        ctx->setContextObject(eng->rootContext()->contextObject());
    }
  
  fixes the problem, which makes sense because it stops using the global i18n and \
uses the "correct" i18n. the question is what bug was those lines supposed to fix.  
  @mart any idea?

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D18836

To: yurchor, #kwin, #localization, davidedmundson
Cc: aacid, mart, victorr, davidedmundson, ngraham, broulik, pino, kwin, jraleigh, \
GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, alexeymin, \
lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol


[Attachment #3 (text/html)]

<table><tr><td style="">aacid added subscribers: mart, aacid.<br />aacid 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/D18836">View Revision</a></tr></table><br \
/><div><div><p>There are three KDeclarative with their three KLocalizedContexts being \
created when &quot;executing&quot; this QML file.</p>

<p>Only one of them has a call to setDomainTranslation, the other two are \
&quot;outside&quot; main.qml so don&#039;t get that call, that&#039;s fine.</p>

<p>I think the problem lies in kirigami&#039;s DelegateRecycler that is using the \
wrong context and thus the wrong translation domain for those i18nc calls.</p>

<p>In fact commenting out these lines</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 \
&quot;Menlo&quot;, &quot;Consolas&quot;, &quot;Monaco&quot;, monospace; padding: \
12px; margin: 0; background: rgba(71, 87, 120, 0.08);">if (QQmlEngine *eng = \
qmlEngine(this)) {  //share context object in order to never lose track of global \
i18n()  ctx-&gt;setContextObject(eng-&gt;rootContext()-&gt;contextObject());
}</pre></div>

<p>fixes the problem, which makes sense because it stops using the global i18n and \
uses the &quot;correct&quot; i18n. the question is what bug was those lines supposed \
to fix.</p>

<p><a href="https://phabricator.kde.org/p/mart/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;">@mart</a> any idea?</p></div></div><br \
/><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br \
/><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D18836">https://phabricator.kde.org/D18836</a></div></div><br \
/><div><strong>To: </strong>yurchor, KWin, Localization, davidedmundson<br \
/><strong>Cc: </strong>aacid, mart, victorr, davidedmundson, ngraham, broulik, pino, \
kwin, jraleigh, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, \
ZrenBot, alexeymin, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, \
sebas, apol<br /></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic