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

List:       kwin
Subject:    Re: Review Request 118585: [scripting] Support loading translations for UI loaded configs
From:       Aurélien Gâteau <agateau () kde ! org>
Date:       2014-06-10 11:51:59
Message-ID: 20140610115159.17951.12451 () probe ! kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118585/#review59668
-----------------------------------------------------------

Ship it!


Looks good. I now understand your decision of keeping context and domain separated.

- Aurélien Gâteau


On June 10, 2014, 8:25 a.m., Martin Gräßlin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118585/
> -----------------------------------------------------------
> 
> (Updated June 10, 2014, 8:25 a.m.)
> 
> 
> Review request for kwin.
> 
> 
> Repository: kwin
> 
> 
> Description
> -------
> 
> [scripting] Support loading translations for UI loaded configs
> 
> Scripts and scripted effects can provide a ui file which gets loaded at
> runtime. Obviously such a ui file is not translated. This introduces
> quite a hack to load the translated strings.
> 
> In the metadata.desktop file the scripted component can provide a key
> X-KWin-Config-TranslationDomain. The genericscriptedconfig tries to
> locate the metadata.desktop file and reads this entry. If it is present
> we extract all string properties of the loaded UI and pass them through
> ki18nd.
> 
> [kcmkwin/deco] Support loading translations for UI loaded configs
> 
> Qml based Aurorae themes can provided a ui file which gets loaded at
> runtime. Obviously such a ui file is not translated. This introduces
> quite a hack to load the translated strings.
> 
> First of all a new property is added to the service file for
> specifying the translation domain to be used for the config UI. If
> such a translation domain is set we extract all string properties of
> the loaded UI and pass them through ki18nd.
> 
> 
> Diffs
> -----
> 
>   clients/aurorae/themes/plastik/package/metadata.desktop ed0071b562472a20e121eb3f2f6d2b6a73720a16 
>   effects/login/package/metadata.desktop 109bde471b4485bc5dd00f8635de21007298427d 
>   effects/translucency/package/metadata.desktop b104057716a0cb7e8a5fae606965bb4499447178 
>   kcmkwin/kwindecoration/CMakeLists.txt 448817765d03e4d02fdbc4826ff212e3417a08f2 
>   kcmkwin/kwindecoration/decorationmodel.h b2deff15e84083223f33ec60b0812ef343834e59 
>   clients/aurorae/src/kwindecoration.desktop a926cb54c339c51b07161a089dc8b68047dd0af6 
>   kcmkwin/kwindecoration/decorationmodel.cpp 96a2f10677f6a4f4feb91697cce3583e2c7f9217 
>   kcmkwin/kwindecoration/kwindecoration.h fb9ac7cf121b7f69732c0c3007c9024704e69beb 
>   kcmkwin/kwindecoration/kwindecoration.cpp 726ccf3ef4bf70d1a62d64097aa4354aa6f86465 
>   kcmkwin/utils/uitranslator.h PRE-CREATION 
>   kcmkwin/utils/uitranslator.cpp PRE-CREATION 
>   scripting/CMakeLists.txt 2160a4f0cfefe70cbdb3611af176f4a0045616c2 
>   scripting/genericscriptedconfig.h 8950f3c2e50e0ddac0d7960a7ae34b445a8b48cc 
>   scripting/genericscriptedconfig.cpp 4797b38cf38c16609bc7fcf87a665981e88e4eab 
> 
> Diff: https://git.reviewboard.kde.org/r/118585/diff/
> 
> 
> Testing
> -------
> 
> * Plastik has translated config interface
> * Breeze (not adjusted) doesn't have translated interface
> * Login effect config has translated interface
> * Translucency effect config has translated interface
> 
> 
> Thanks,
> 
> Martin Gräßlin
> 
>


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/118585/">https://git.reviewboard.kde.org/r/118585/</a>
  </td>
    </tr>
   </table>
   <br />



 <p>Ship it!</p>



 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Looks good. I now \
understand your decision of keeping context and domain separated.</pre>  <br />









<p>- Aurélien Gâteau</p>


<br />
<p>On June 10th, 2014, 8:25 a.m. CEST, Martin Gräßlin wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for kwin.</div>
<div>By Martin Gräßlin.</div>


<p style="color: grey;"><i>Updated June 10, 2014, 8:25 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kwin
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">[scripting] Support loading translations for UI loaded configs

Scripts and scripted effects can provide a ui file which gets loaded at
runtime. Obviously such a ui file is not translated. This introduces
quite a hack to load the translated strings.

In the metadata.desktop file the scripted component can provide a key
X-KWin-Config-TranslationDomain. The genericscriptedconfig tries to
locate the metadata.desktop file and reads this entry. If it is present
we extract all string properties of the loaded UI and pass them through
ki18nd.

[kcmkwin/deco] Support loading translations for UI loaded configs

Qml based Aurorae themes can provided a ui file which gets loaded at
runtime. Obviously such a ui file is not translated. This introduces
quite a hack to load the translated strings.

First of all a new property is added to the service file for
specifying the translation domain to be used for the config UI. If
such a translation domain is set we extract all string properties of
the loaded UI and pass them through ki18nd.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
                break-word;">* Plastik has translated config interface
* Breeze (not adjusted) doesn&#39;t have translated interface
* Login effect config has translated interface
* Translucency effect config has translated interface</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>clients/aurorae/themes/plastik/package/metadata.desktop <span style="color: \
grey">(ed0071b562472a20e121eb3f2f6d2b6a73720a16)</span></li>

 <li>effects/login/package/metadata.desktop <span style="color: \
grey">(109bde471b4485bc5dd00f8635de21007298427d)</span></li>

 <li>effects/translucency/package/metadata.desktop <span style="color: \
grey">(b104057716a0cb7e8a5fae606965bb4499447178)</span></li>

 <li>kcmkwin/kwindecoration/CMakeLists.txt <span style="color: \
grey">(448817765d03e4d02fdbc4826ff212e3417a08f2)</span></li>

 <li>kcmkwin/kwindecoration/decorationmodel.h <span style="color: \
grey">(b2deff15e84083223f33ec60b0812ef343834e59)</span></li>

 <li>clients/aurorae/src/kwindecoration.desktop <span style="color: \
grey">(a926cb54c339c51b07161a089dc8b68047dd0af6)</span></li>

 <li>kcmkwin/kwindecoration/decorationmodel.cpp <span style="color: \
grey">(96a2f10677f6a4f4feb91697cce3583e2c7f9217)</span></li>

 <li>kcmkwin/kwindecoration/kwindecoration.h <span style="color: \
grey">(fb9ac7cf121b7f69732c0c3007c9024704e69beb)</span></li>

 <li>kcmkwin/kwindecoration/kwindecoration.cpp <span style="color: \
grey">(726ccf3ef4bf70d1a62d64097aa4354aa6f86465)</span></li>

 <li>kcmkwin/utils/uitranslator.h <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>kcmkwin/utils/uitranslator.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>scripting/CMakeLists.txt <span style="color: \
grey">(2160a4f0cfefe70cbdb3611af176f4a0045616c2)</span></li>

 <li>scripting/genericscriptedconfig.h <span style="color: \
grey">(8950f3c2e50e0ddac0d7960a7ae34b445a8b48cc)</span></li>

 <li>scripting/genericscriptedconfig.cpp <span style="color: \
grey">(4797b38cf38c16609bc7fcf87a665981e88e4eab)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/118585/diff/" style="margin-left: \
3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin


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

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