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

List:       kde-i18n-doc
Subject:    Re: Web Translation tool
From:       Oliver Kellogg <olivermkellogg () gmail ! com>
Date:       2024-04-05 18:55:16
Message-ID: CANZbxGnUf59LHoxC9U1w1uofzs5rbKOW_pbG79iUQ4+Jd=ZUrw () mail ! gmail ! com
[Download RAW message or body]

I had come across that exact question and made a script that does this (for
eo), see
https://websvn.kde.org/trunk/l10n-support/eo/scripts/svncopy2po.sh?view=log
It  is somewhat specific for my purposes, e.g. the language is hard coded
and on creating the pot -> po copy a further script is called which
pre-translates commonly found strings using a translation database (
initpo.pl)
but with a bit of stripping down it could be useful.

Hope this helps,

Oliver


On Fri, Apr 5, 2024 at 7:38 PM Yaron Shahrabani <sh.yaron@gmail.com> wrote:

> I failed to explain.
> I can update the existing po files with the pot equivalent from the
> templates.
> But if the po file is missing, bit there is a pot file it won't be created
> automatically.
> Does that make sense?
> 
> On Tue, 2 Apr 2024, 20:59 Łukasz Wojniłowicz, <
> lukasz.wojnilowicz@gmail.com> wrote:
> 
> > Hi,
> > 
> > do you know that you can svn checkout
> > svn+ssh://svn@svn.kde.org/home/kde/trunk/l10n-kf6/templates for the
> > right side of your picture and have it updated automatically afterwards?
> > Templates are common for all languages.
> > 
> > Cheers,
> > Łukasz
> > 
> > On Mon, 1 Apr 2024 14:18:50 +0300
> > Yaron Shahrabani <sh.yaron@gmail.com> wrote:
> > 
> > > Hey,
> > > This is the diagram:
> > > 
> > > Local copy                        Template copy
> > > ┌──────────────────────┐         \
> > > ┌─────────────────────────────┐ │  \
> > > alpaka.po           │         │  alpaka.pot                 │ │                      │    \
> > > │                             │ │  alpaka._desktop_.po │         │  alpaka._desktop_.pot  \
> > > │ │                      │         │                             │
> > > │                      │         │  org.kde.alpaka.metainfo.pot│
> > > 
> > > └──────────────────────┘         \
> > > └─────────────────────────────┘ 
> > > Let's assume that I translated the part on the left and these files
> > > are 100% complete, when I'm updating my local copy against the SVN
> > > I'm not getting any new updates unless scripty merged them with their
> > > corresponding POT files.
> > > For existing files, it works great, but if I have new files (in the
> > > templates) I can't fetch them automatically unless I'm either
> > > fetching them manually from the templates or looking at the UI and
> > > finding that there are missing strings in an app I've already fully
> > > translated.
> > > 
> > > I hope it makes sense.
> > > Yaron Shahrabani
> > > 
> > > <DevOps - Hebrew translator>
> > > 
> > > 
> > > 
> > > On Mon, Apr 1, 2024 at 10:46 AM Łukasz Wojniłowicz <
> > > lukasz.wojnilowicz@gmail.com> wrote:
> > > 
> > > > Hi, and no problem.
> > > > 
> > > > On Sun, 31 Mar 2024 12:22:23 +0300
> > > > Yaron Shahrabani <sh.yaron@gmail.com> wrote:
> > > > 
> > > > > Hi, and thank you for your patience and for going deeper into this
> > > > > with me. This is what I'm experiencing (Hypothetically because I
> > > > > can't remember where it was precisely):
> > > > > Several months ago, I downloaded a package with 3 POT files.
> > > > > Several months later, a fourth file appeared (usually the _json
> > > > > one).
> > > > 
> > > > A package like a tarball?
> > > > 
> > > > > My local repo appears complete, and there's no way for me to know
> > > > > that there's a new POT file just by syncing my copy. I either
> > > > > need to look at the web UI or make a comparison with the
> > > > > templates.
> > > > 
> > > > Have you already tried using projects in Lokalize and "svn
> > > > update" command on templates (aka POT files)?
> > > > 
> > > > > I can indeed write a script to solve that but given the time I can
> > > > > spend, I'd instead look at the web UI and solve this manually.
> > > > > Localization platforms inform you when a new module/file is
> > > > > added, so you don't need to check manually in addition to all the
> > > > > other operations that don't require any manual involvement.
> > > > 
> > > > Cheers,
> > > > Łukasz
> > > > 
> > 
> 


[Attachment #3 (text/html)]

<div dir="ltr"><div>I had come across that exact question and made a script that does this (for eo), \
see<br></div><div><a \
href="https://websvn.kde.org/trunk/l10n-support/eo/scripts/svncopy2po.sh?view=log">https://websvn.kde.org/trunk/l10n-support/eo/scripts/svncopy2po.sh?view=log</a></div><div>It \
is somewhat specific for my purposes, e.g. the language is hard coded and on creating the pot -&gt; po \
copy a further script is called which pre-translates commonly found strings using a translation database \
(<a href="http://initpo.pl">initpo.pl</a>)</div><div>but with a bit of stripping down it could be \
useful.<br></div><div><br></div><div>Hope this \
helps,</div><div><br></div><div>Oliver<br></div><div><br></div></div><br><div class="gmail_quote"><div \
dir="ltr" class="gmail_attr">On Fri, Apr 5, 2024 at 7:38 PM Yaron Shahrabani &lt;<a \
href="mailto:sh.yaron@gmail.com">sh.yaron@gmail.com</a>&gt; wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="auto">I failed to explain.  <div dir="auto">I can update the \
existing po files with the pot equivalent from the templates.</div><div dir="auto">But if the po file is \
missing, bit there is a pot file it won&#39;t be created automatically.  </div><div dir="auto">Does that \
make sense?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 2 Apr 2024, \
20:59 Łukasz Wojniłowicz, &lt;<a href="mailto:lukasz.wojnilowicz@gmail.com" \
target="_blank">lukasz.wojnilowicz@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" \
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br> <br>
do you know that you can svn checkout<br>
svn+ssh://<a href="http://svn@svn.kde.org/home/kde/trunk/l10n-kf6/templates" rel="noreferrer noreferrer" \
target="_blank">svn@svn.kde.org/home/kde/trunk/l10n-kf6/templates</a> for the<br> right side of your \
picture and have it updated automatically afterwards?<br> Templates are common for all languages.<br>
<br>
Cheers,<br>
Łukasz<br>
<br>
On Mon, 1 Apr 2024 14:18:50 +0300<br>
Yaron Shahrabani &lt;<a href="mailto:sh.yaron@gmail.com" rel="noreferrer" \
target="_blank">sh.yaron@gmail.com</a>&gt; wrote:<br> <br>
&gt; Hey,<br>
&gt; This is the diagram:<br>
&gt; <br>
&gt;              Local copy                                    Template copy<br>
&gt;           ┌──────────────────────┐              \
┌─────────────────────────────┐<br> &gt;    \
│   alpaka.po                 │              │   alpaka.pot                          │<br> &gt;   \
│                                 │              │                                            \
│<br> &gt;           │   alpaka._desktop_.po │              │   alpaka._desktop_.pot           \
│<br> &gt;           │                                 │              │                           \
│<br> &gt;           │                                 │              │   \
org.kde.alpaka.metainfo.pot│<br> &gt; <br>
&gt;           └──────────────────────┘              \
└─────────────────────────────┘<br> &gt; \
<br> &gt; Let&#39;s assume that I translated the part on the left and these files<br>
&gt; are 100% complete, when I&#39;m updating my local copy against the SVN<br>
&gt; I&#39;m not getting any new updates unless scripty merged them with their<br>
&gt; corresponding POT files.<br>
&gt; For existing files, it works great, but if I have new files (in the<br>
&gt; templates) I can&#39;t fetch them automatically unless I&#39;m either<br>
&gt; fetching them manually from the templates or looking at the UI and<br>
&gt; finding that there are missing strings in an app I&#39;ve already fully<br>
&gt; translated.<br>
&gt; <br>
&gt; I hope it makes sense.<br>
&gt; Yaron Shahrabani<br>
&gt; <br>
&gt; &lt;DevOps - Hebrew translator&gt;<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; On Mon, Apr 1, 2024 at 10:46 AM Łukasz Wojniłowicz &lt;<br>
&gt; <a href="mailto:lukasz.wojnilowicz@gmail.com" rel="noreferrer" \
target="_blank">lukasz.wojnilowicz@gmail.com</a>&gt; wrote:   <br> &gt; <br>
&gt; &gt; Hi, and no problem.<br>
&gt; &gt;<br>
&gt; &gt; On Sun, 31 Mar 2024 12:22:23 +0300<br>
&gt; &gt; Yaron Shahrabani &lt;<a href="mailto:sh.yaron@gmail.com" rel="noreferrer" \
target="_blank">sh.yaron@gmail.com</a>&gt; wrote:<br> &gt; &gt;   <br>
&gt; &gt; &gt; Hi, and thank you for your patience and for going deeper into this<br>
&gt; &gt; &gt; with me. This is what I&#39;m experiencing (Hypothetically because I<br>
&gt; &gt; &gt; can&#39;t remember where it was precisely):<br>
&gt; &gt; &gt; Several months ago, I downloaded a package with 3 POT files.<br>
&gt; &gt; &gt; Several months later, a fourth file appeared (usually the _json<br>
&gt; &gt; &gt; one).   <br>
&gt; &gt;<br>
&gt; &gt; A package like a tarball?<br>
&gt; &gt;   <br>
&gt; &gt; &gt; My local repo appears complete, and there&#39;s no way for me to know<br>
&gt; &gt; &gt; that there&#39;s a new POT file just by syncing my copy. I either<br>
&gt; &gt; &gt; need to look at the web UI or make a comparison with the<br>
&gt; &gt; &gt; templates.   <br>
&gt; &gt;<br>
&gt; &gt; Have you already tried using projects in Lokalize and &quot;svn<br>
&gt; &gt; update&quot; command on templates (aka POT files)?<br>
&gt; &gt;   <br>
&gt; &gt; &gt; I can indeed write a script to solve that but given the time I can<br>
&gt; &gt; &gt; spend, I&#39;d instead look at the web UI and solve this manually.<br>
&gt; &gt; &gt; Localization platforms inform you when a new module/file is<br>
&gt; &gt; &gt; added, so you don&#39;t need to check manually in addition to all the<br>
&gt; &gt; &gt; other operations that don&#39;t require any manual involvement.   <br>
&gt; &gt;<br>
&gt; &gt; Cheers,<br>
&gt; &gt; Łukasz<br>
&gt; &gt;   <br>
</blockquote></div>
</blockquote></div>



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

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