[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-i18n-doc
Subject: Re: Review Request 7106: AppStream support for l10n-script (example)
From: "Matthias Klumpp" <matthias () tenstral ! net>
Date: 2014-04-23 23:58:45
Message-ID: 20140423235845.3536.74442 () probe ! kde ! org
[Download RAW message or body]
> On April 23, 2014, 10:58 p.m., Albert Astals Cid wrote:
> > Please integrate Burkhard suggestions/patch
I updated the patch, but there's one thing which as far as I can see can't work (see below).
- Matthias
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://svn.reviewboard.kde.org/r/7106/#review11094
-----------------------------------------------------------
On April 23, 2014, 11:54 p.m., Matthias Klumpp wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://svn.reviewboard.kde.org/r/7106/
> -----------------------------------------------------------
>
> (Updated April 23, 2014, 11:54 p.m.)
>
>
> Review request for Localization and Translation (l10n) and Albert Astals Cid.
>
>
> Repository: kde
>
>
> Description
> -------
>
> Hi!
> It's very difficult to extend the l10n-script if you don't know it's internal workings,
> and if all comments are stripped out, so in order to get AppStream support into the
> l10n-script, I created two small bash scripts to translate AppStream upstream metadata:
>
> extract_metainfo.sh: This script generates .pot files from metadata
> XML files found in a project. Just cd to the directory you want the
> resulting pot files to be stored in, then call the script and point it
> at the project's source tree you want to be searched for the XML
> files.
>
> merge_metainfo.sh: The script merges translation back into the XML
> files. Simply cd to a directory which stores .mo files with the
> translated data and call the script with the project's source dir as
> first parameter.
>
> These scripts illustrate how translation of the XML can be done in
> KDE. I would kindly ask the l10n-script developers to take a look at
> it any maybe integrate it at the proper places, because they know the
> code way better than I do.
> The scripts can also be found at:
> http://people.freedesktop.org/~mak/appstream/kde-asmetadata-l10n.tar.gz
> (I also included a demo XML file there)
>
> If you have questions, please let me know!
> Cheers,
> Matthias
>
>
> Diffs
> -----
>
> trunk/l10n-kde4/scripts/merge_metainfo.sh PRE-CREATION
> trunk/l10n-kde4/scripts/extract_metainfo.sh PRE-CREATION
> trunk/l10n-kde4/scripts/as-metainfo.its PRE-CREATION
> trunk/l10n-kde4/scripts/update_translations 1384853
>
> Diff: https://svn.reviewboard.kde.org/r/7106/diff/
>
>
> Testing
> -------
>
> * Finds AppStream metadata in project source directories
> * .pot extraction works
> * Merging translation to untranslated files works
> * Merging new translation into already translated metadata files works (without duplicating entries)
> * Resulting files are valid AppStream metadata files (compliance-check passed)
>
>
> Thanks,
>
> Matthias Klumpp
>
>
[Attachment #3 (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://svn.reviewboard.kde.org/r/7106/">https://svn.reviewboard.kde.org/r/7106/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On April 23rd, 2014, 10:58 p.m. UTC, <b>Albert \
Astals Cid</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px \
solid #d0d0d0; padding-left: 10px;"> <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Please integrate Burkhard suggestions/patch</pre> </blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I updated the patch, but \
there's one thing which as far as I can see can't work (see below).</pre> <br \
/>
<p>- Matthias</p>
<br />
<p>On April 23rd, 2014, 11:54 p.m. UTC, Matthias Klumpp wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://svn.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 Localization and Translation (l10n) and Albert Astals \
Cid.</div> <div>By Matthias Klumpp.</div>
<p style="color: grey;"><i>Updated April 23, 2014, 11:54 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;">Hi! It's very difficult to extend the l10n-script if you don't \
know it's internal workings, and if all comments are stripped out, so in order to \
get AppStream support into the l10n-script, I created two small bash scripts to \
translate AppStream upstream metadata:
extract_metainfo.sh: This script generates .pot files from metadata
XML files found in a project. Just cd to the directory you want the
resulting pot files to be stored in, then call the script and point it
at the project's source tree you want to be searched for the XML
files.
merge_metainfo.sh: The script merges translation back into the XML
files. Simply cd to a directory which stores .mo files with the
translated data and call the script with the project's source dir as
first parameter.
These scripts illustrate how translation of the XML can be done in
KDE. I would kindly ask the l10n-script developers to take a look at
it any maybe integrate it at the proper places, because they know the
code way better than I do.
The scripts can also be found at:
http://people.freedesktop.org/~mak/appstream/kde-asmetadata-l10n.tar.gz
(I also included a demo XML file there)
If you have questions, please let me know!
Cheers,
Matthias
</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;">* Finds AppStream metadata in project source directories
* .pot extraction works
* Merging translation to untranslated files works
* Merging new translation into already translated metadata files works (without \
duplicating entries)
* Resulting files are valid AppStream metadata files (compliance-check passed)
</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-kde4/scripts/merge_metainfo.sh <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>trunk/l10n-kde4/scripts/extract_metainfo.sh <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>trunk/l10n-kde4/scripts/as-metainfo.its <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>trunk/l10n-kde4/scripts/update_translations <span style="color: \
grey">(1384853)</span></li>
</ul>
<p><a href="https://svn.reviewboard.kde.org/r/7106/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic