On Sat, Jan 14, 2017 at 8:07 AM, Milos Sramek <sramek.mi...@gmail.com> wrote:
>
> twice a year we get thousands of strings for translation.

This is not true since master project was created in pootle. This was
intruduced exact for this reason, to prevent a big string dump.

> On the one
> hand this is good but translation of strings which we have translated
> many times in the past is pretty boring.

It definitely is, but that is not because you get new strings, but
rather that you still have old projects untranslated.

> So I have written a python
> script, which can translate strings using unique existing translations.

Again: this won't help with the new strings you get, as obviously
those have been changed/newly introduced.
It might come in helpful for projects having to catch up/not focusing
on master but translating the old projects in parallel.

> These are then uploaded using Pootle. Its functionality is similar to
> two tools from the translate toolkit: pretranslate and poconflicts. I do
> not use these, because: pretranslate requires pot files (we do not have
> them)

Again wrong, "templates" is a project in pootle just like the actual
languages. You can get the pot from pootle the same way as you get
your po files.

> The script is attached (I hope we can attach stuff here).

Nope, list strips attachments.

> […] The output odir
> contains only files with changes which can be uploaded to pootle.

But please double-check whether the script actually works for your
language/did what you expected it to do. Admins won't like to revert
your broken uploads ;-)

Also please double-check that you keep the correct directory hierarchy
when reuploading/don't upload those files as new files into the wrong
directory.

> In
> this case idir is used also as the source for translated strings. In our
> case numerous translations may be missing (they were probably deleted
> when updating). You may use:
>
> ./selftranslate.py -i idir -r rdir -o odir

Again no idea how that tool works, as the attachment was stripped, but
if a string is removed, it is not deleted from the po file completely,
but marked as obsolete (lines starting with #~) - so if you had it
translated before, but is now gone, you'll find it in the obsolete
sections.

> 3. Upload to pootle: zip the odir directory and upload to Pootle

See note above: please make sure to use the proper directory
layout/don't introduce additional subdirectories and the like.

> ./selftranslate.py -i idir -r rdir  -g > conflicts.json
>
> outputs their list in the form (json)
>
> {
>   "Start": "Začiatok/Spustiť",
>   "Spacing:": "Rozostupy:/Riadkovanie:",
>   "Collapse": "Zbaliť/Zmrštiť zo strán"
> }
>
> where the alternative translations are separated by "/".
This is suboptimal choice, as / might appear in regular translation.
I'd rather make the output a proper array of separate strings for the
alternative translations.

ciao
Christian

-- 
To unsubscribe e-mail to: l10n+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/l10n/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to