[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-i18n-doc
Subject: Re: Review Request 7126: message extraction of json files for scripty
From: "Milian Wolff" <mail () milianw ! de>
Date: 2014-11-22 14:40:54
Message-ID: 20141122144054.22980.28371 () probe ! kde ! org
[Download RAW message or body]
--===============5828885809073209044==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://svn.reviewboard.kde.org/r/7126/#review11144
-----------------------------------------------------------
Ship it!
Just some small nitpicks, ignore at all. I just looked at our desktop files and \
indeed, they contain the translated GenericName which is nowhere displayed. Same for \
kate and KPluginSelector in kcmutils. So getting rid of that sounds fine with me! A \
name + description is all I can think of that needs to be translated.
thanks!
trunk/l10n-kf5/scripts/create_json_files.sh
<https://svn.reviewboard.kde.org/r/7126/#comment14060>
you should add a copyright header, no?
trunk/l10n-kf5/scripts/createjsoncontext.py
<https://svn.reviewboard.kde.org/r/7126/#comment14061>
same, please add a copyright notice
trunk/l10n-kf5/scripts/createjsoncontext.py
<https://svn.reviewboard.kde.org/r/7126/#comment14062>
not sure about any pyton style policies, but here and below I'd personally add a \
space `..." % time.strftime(...)`. In C++ code we also add spaces around operators \
after all
trunk/l10n-kf5/scripts/createjsoncontext.py
<https://svn.reviewboard.kde.org/r/7126/#comment14063>
trailing space
trunk/l10n-kf5/scripts/createjsoncontext.py
<https://svn.reviewboard.kde.org/r/7126/#comment14064>
spaces around operator?
- Milian Wolff
On Nov. 21, 2014, 4 p.m., Burkhard Lück wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://svn.reviewboard.kde.org/r/7126/
> -----------------------------------------------------------
>
> (Updated Nov. 21, 2014, 4 p.m.)
>
>
> Review request for Localization and Translation (l10n) and Milian Wolff.
>
>
> Repository: kde
>
>
> Description
> -------
>
> createjsoncontext.py extracts the fields KPlugin.Name and KPlugin.Description from \
> all json files in a repo into a gettext template (has to be postprocessed to be \
> valid)
> Only the field name is used as msgctxt as we do it with desktop files
>
> Question is which fields we need/want to support here.
> desktop files have Language, Keywords, X-KDE-Keywords, About, Description, Query,
> ExtraNames, X-KDE-Submenu as translatable fields
>
> But from the plugins desktop/json files in kdevelop afaik only Name + Description \
> (=Comment in desktop) are used in the GUI.
>
> create_json_files.sh is a modified/stripped down copy of create_desktop_files.sh \
> and has to be adapted for $mod with unterscores
>
>
> Diffs
> -----
>
> trunk/l10n-kf5/scripts/create_json_files.sh PRE-CREATION
> trunk/l10n-kf5/scripts/createjsoncontext.py PRE-CREATION
>
> Diff: https://svn.reviewboard.kde.org/r/7126/diff/
>
>
> Testing
> -------
>
> Manually running
> l10n-kf5/scripts$ python createjsoncontext.py $(find \
> ../../extragear/build/kdevelop_kdevplatform/ -name *.json) ../../extragear/build/ \
> generates a gettext template which needs to be processed further by \
> create_json_files.sh to get rid of some duplicate messages.
>
>
> Thanks,
>
> Burkhard Lück
>
>
--===============5828885809073209044==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;"> \
<tr> <td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://svn.reviewboard.kde.org/r/7126/">https://svn.reviewboard.kde.org/r/7126/</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;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Just \
some small nitpicks, ignore at all. I just looked at our desktop files and indeed, \
they contain the translated GenericName which is nowhere displayed. Same for kate and \
KPluginSelector in kcmutils. So getting rid of that sounds fine with me! A name + \
description is all I can think of that needs to be translated.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">thanks!</p></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://svn.reviewboard.kde.org/r/7126/diff/1/?file=48619#file48619line1" \
style="color: black; font-weight: bold; text-decoration: \
underline;">trunk/l10n-kf5/scripts/create_json_files.sh</a> <span \
style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<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">1</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="c">#! /bin/bash</span></pre></td> </tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">you \
should add a copyright header, no?</p></pre> </div>
</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://svn.reviewboard.kde.org/r/7126/diff/1/?file=48620#file48620line1" \
style="color: black; font-weight: bold; text-decoration: \
underline;">trunk/l10n-kf5/scripts/createjsoncontext.py</a> <span \
style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<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">1</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="c">#!/usr/bin/env python</span></pre></td> </tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">same, \
please add a copyright notice</p></pre> </div>
</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://svn.reviewboard.kde.org/r/7126/diff/1/?file=48620#file48620line15" \
style="color: black; font-weight: bold; text-decoration: \
underline;">trunk/l10n-kf5/scripts/createjsoncontext.py</a> <span \
style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<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">15</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="n">headertxt</span> <span class="o">+=</span> <span \
class="s">"</span><span class="se">\"</span><span \
class="s">POT-Creation-Date: </span><span class="si">%s</span><span \
class="s">+0000</span><span class="se">\\</span><span class="s">n</span><span \
class="se">\"\n</span><span class="s">"</span> <span \
class="o">%</span><span class="n">time</span><span class="o">.</span><span \
class="n">strftime</span><span class="p">(</span><span \
class="s">"%Y-%m-</span><span class="si">%d</span><span class="s"> \
%H:%M"</span><span class="p">)</span></pre></td> </tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">not \
sure about any pyton style policies, but here and below I'd personally add a space \
<code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: \
normal;margin: 0;line-height: inherit;">..." % time.strftime(...)</code>. In C++ code \
we also add spaces around operators after all</p></pre> </div>
</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://svn.reviewboard.kde.org/r/7126/diff/1/?file=48620#file48620line40" \
style="color: black; font-weight: bold; text-decoration: \
underline;">trunk/l10n-kf5/scripts/createjsoncontext.py</a> <span \
style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<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">40</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="k">if</span> <span class="n">pottxt</span><span class="o">!=</span><span \
class="s">""</span><span class="p">:</span><span class="ew"> \
</span></pre></td> </tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">trailing space</p></pre> </div>
</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://svn.reviewboard.kde.org/r/7126/diff/1/?file=48620#file48620line41" \
style="color: black; font-weight: bold; text-decoration: \
underline;">trunk/l10n-kf5/scripts/createjsoncontext.py</a> <span \
style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<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">41</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="k">print</span> <span class="n">potheader</span><span class="p">()</span><span \
class="o">+</span><span class="n">pottxt</span></pre></td> </tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">spaces around operator?</p></pre> </div>
</div>
<br />
<p>- Milian Wolff</p>
<br />
<p>On November 21st, 2014, 4 p.m. UTC, Burkhard Lück wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;"> <tr>
<td>
<div>Review request for Localization and Translation (l10n) and Milian Wolff.</div>
<div>By Burkhard Lück.</div>
<p style="color: grey;"><i>Updated Nov. 21, 2014, 4 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kde
</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">createjsoncontext.py extracts the fields KPlugin.Name \
and KPlugin.Description from all json files in a repo into a gettext template (has to \
be postprocessed to be valid)</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">Only the field name is \
used as msgctxt as we do it with desktop files</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Question is which fields we need/want to support here. desktop files have \
Language, Keywords, X-KDE-Keywords, About, Description, Query, ExtraNames, \
X-KDE-Submenu as translatable fields</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">But from the plugins \
desktop/json files in kdevelop afaik only Name + Description (=Comment in desktop) \
are used in the GUI.</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">create_json_files.sh is a \
modified/stripped down copy of create_desktop_files.sh and has to be adapted for \
$mod with unterscores</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Manually running l10n-kf5/scripts$ python \
createjsoncontext.py $(find ../../extragear/build/kdevelop_kdevplatform/ -name \
*.json) ../../extragear/build/ generates a gettext template which needs to be \
processed further by create_json_files.sh to get rid of some duplicate \
messages.</p></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>trunk/l10n-kf5/scripts/create_json_files.sh <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>trunk/l10n-kf5/scripts/createjsoncontext.py <span style="color: \
grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="https://svn.reviewboard.kde.org/r/7126/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============5828885809073209044==--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic