<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/118678/">https://git.reviewboard.kde.org/r/118678/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Can I check I'm understanding the objective.
For the language KCM we want to list all possible languages. Potentially systemsettings isn't translated so won't be listed. In order to get round this we need to pick a random other component that we can assume is translated in order to list all possible languages?
If so we could just do:
QStringList localeDirPaths = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation,
QString::fromLatin1("locale"),
QStandardPaths::LocateDirectory);
foreach (const QString &localDirPath, localeDirPaths) {
languages << localeDir.entryList(QDir::AllDirs);
}
which is what kcatalog is doing internally and will list everything.
</pre>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/118678/diff/1/?file=280353#file280353line133" style="color: black; font-weight: bold; text-decoration: underline;">src/kcatalog.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">QString KCatalog::catalogLocaleDir(const QByteArray &domain,</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">133</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">qDebug</span><span class="p">()</span> <span class="o"><<</span> <span class="s">"Locale Dir Paths: "</span> <span class="o"><<</span> <span class="n">localeDirPaths</span><span class="p">;</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This isn't very relevant.</pre>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/118678/diff/1/?file=280355#file280355line1289" style="color: black; font-weight: bold; text-decoration: underline;">src/klocalizedstring.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">bool KLocalizedString::isApplicationTranslatedInto(const QString &language)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">1289</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="n">QSet</span><span class="o"><</span><span class="n">QString</span><span class="o">></span> <span class="n">KLocalizedString</span><span class="o">::</span><span class="n">availableApplicationTranslations</span><span class="p">()</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">1289</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="n">QSet</span><span class="o"><</span><span class="n">QString</span><span class="o">></span> <span class="n">KLocalizedString</span><span class="o">::</span><span class="n">availableApplicationTranslations</span><span class="p">(</span><span class="k"><span class="hl">const</span></span><span class="hl"> </span><span class="n"><span class="hl">QByteArray</span></span><span class="hl"> </span><span class="o"><span class="hl">&</span></span><span class="n"><span class="hl">domain_</span></span><span class="p">)</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I'd make this a new static method;
availablleDomainTranslations(const QByte..)
We're using a method called availableApplicationTranslations to list things outside the application which is going against the name of the method.
</pre>
</div>
<br />
<p>- David Edmundson</p>
<br />
<p>On June 11th, 2014, 10:09 p.m. UTC, Sebastian Kügler 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 Plasma, Chusslove Illich and John Layt.</div>
<div>By Sebastian Kügler.</div>
<p style="color: grey;"><i>Updated June 11, 2014, 10:09 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
ki18n
</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;">Allow querying for translations of a specific domain
In the new translations KCM, we want to list available languages for the
workspace. This might, or might not be the same application domain as
the one set (current translation is different from installed
translations). In order to list the installed translations, we need to
specify that domain, independently from the one set in
KLocalizedString's global static.
With this patch, I can successfully list installed languages in the new KCM.
I'm not super-familiar with how this stuff works, there might be a better way,
in which case I'm sure you guys will enlighten me. :)</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;">Tested new translations KCM, languages show up.</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>src/kcatalog.cpp <span style="color: grey">(7711e9b261fc30d8faa355af9014d320275463a5)</span></li>
<li>src/klocalizedstring.h <span style="color: grey">(1a9fce8abcafcc8be0a2601c9062c33509dd403e)</span></li>
<li>src/klocalizedstring.cpp <span style="color: grey">(e12d6dfa9c147ffb127f462dc5db236be0d2ff75)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/118678/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>