Migrating 6.3 project to Weblate

Hi all,

Christian will migrate the projects in Pootle to Weblate in the next weeks.
For offline translators, would that be a problem for you to have 6.3 on
Weblate and not more in Pootle?
Thanks in advance,
Cheers
Sophie

Hi,

for us no problem.

The only thing I need is, once migration done and before we start to "really" translate, to have the possibility to manage admin/user rights, in order to assign correctly them to users.

Ciao

Valter Mura (<valtermura@libreoffice.org>), 30. september 2019 kell 00:17:

> Hi all,
>
> Christian will migrate the projects in Pootle to Weblate in the next
weeks.
> For offline translators, would that be a problem for you to have 6.3 on
> Weblate and not more in Pootle?

Hi,

for us no problem.

The only thing I need is, once migration done and before we start to
"really" translate, to have the possibility to manage admin/user rights,
in order to assign correctly them to users.

Hi,

Will there be a way to download and upload many/all files at once on
Weblate, as it can be done on Pootle?
If "yes", then OK by me.
If "no", then it's a problem, as I'm in the middle of some
terminology/consistency work across the translation (UI/help), with many
files being changed.
Additionally, on a quick glance, I didn't find an option to download the
templates (.pot's). I kinda need those for my (offline) workflow.

Also +1 to what Valter said about managing the rights.

Best regards,
Mihkel
Estonian one-man-team

Hi Valter,

> Hi all,
>
> Christian will migrate the projects in Pootle to Weblate in the next weeks.
> For offline translators, would that be a problem for you to have 6.3 on
> Weblate and not more in Pootle?

The only thing I need is, once migration done and before we start to
"really" translate, to have the possibility to manage admin/user rights,
in order to assign correctly them to users.

Does your team really change that frequently that you need to do it
yourself/that going through Sophie or other admins as an intermediate
step doesn't work for you?

Or do you ask because your current team members don't have the correct
privileges?

ciao
Christian

Hi *,

Valter Mura (<valtermura@libreoffice.org>), 30. september 2019 kell 00:17:

Will there be a way to download and upload many/all files at once on
Weblate, as it can be done on Pootle?
If "yes", then OK by me.

"Yes", but not via weblate ui, but via the repository
https://github.com/LibreOffice/translations-weblate
At least until we patched that into weblate, but I wouldn't count on
that in the next month or two...

If "no", then it's a problem, as I'm in the middle of some
terminology/consistency work across the translation (UI/help), with many
files being changed.
Additionally, on a quick glance, I didn't find an option to download the
templates (.pot's). I kinda need those for my (offline) workflow.

Those are also in the abovementioned repo.

Also +1 to what Valter said about managing the rights.

Same question to you then. Do you ask because current permissions are
not correct or because you have high fluctuation in your team?

ciao
Christian

Christian Lohmaier (<lohmaier+ooofuture@googlemail.com>), 30. september
2019 kell 16:02:

Hi *,

> Valter Mura (<valtermura@libreoffice.org>), 30. september 2019 kell
00:17:
>
> Will there be a way to download and upload many/all files at once on
> Weblate, as it can be done on Pootle?
> If "yes", then OK by me.

"Yes", but not via weblate ui, but via the repository
https://github.com/LibreOffice/translations-weblate
At least until we patched that into weblate, but I wouldn't count on
that in the next month or two...

What about batch *up*loading? If there's no way for that in Weblate, I see
two possibilities, neither of which is exactly good:
a) committing the files to GitHub directly - but won't they then get
overwritten again by whatever is on Weblate?
b) removing Estonian from Weblate and committing to GitHub directly - but
then there's no easily accessible public overview of the state of things.
How is this solved for the few other teams who translate offline?

If "no", then it's a problem, as I'm in the middle of some
> terminology/consistency work across the translation (UI/help), with many
> files being changed.
> Additionally, on a quick glance, I didn't find an option to download the
> templates (.pot's). I kinda need those for my (offline) workflow.

Those are also in the abovementioned repo.

> Also +1 to what Valter said about managing the rights.

Same question to you then. Do you ask because current permissions are
not correct or because you have high fluctuation in your team?

There is literally no fluctuation in my team, only me :slight_smile: / :frowning:
The reason for asking is that in Pootle I have set that any (not
necessarily even logged in) users can make suggestions, in case someone
finds an error in translation or has an improvement idea. This possibility
has also been used a few times. If this can be set up like this also in
Weblate by Sophie or anyone else, then fine by me.
In addition, I presume that if someone requests to join my language team,
that request would then be passed to me for approval, so I can make sure
the applicant has needed level of language skills, agree on
style/terminology, etc.

Best regards,
Mihkel

I haven't had time yet to try Weblate.

Like others I would like to make sure it is possible to download and upload
files to enable offline translation. Can someone please summarise what is
possible on Weblate?

Thanks
Friedel

Op Wo. 25 Sep. 2019 om 15:43 het sophi <sophi@libreoffice.org> geskryf:

F Wolff (<friedel@translate.org.za>), 2. oktoober 2019 kell 20:22:

I haven't had time yet to try Weblate.

Like others I would like to make sure it is possible to download and upload
files to enable offline translation. Can someone please summarise what is
possible on Weblate?

On Weblate itself, download/upload only works one file at a time.
However there is https://github.com/LibreOffice/translations-weblate which
at least allows to batch *download* via a Git client.
Possibilities for batch *upload* are still unclear, it seems.

HTH,
Mihkel

Hi *,

Christian Lohmaier (<lohmaier+ooofuture@googlemail.com>), 30. september 2019 kell 16:02:

What about batch *up*loading? If there's no way for that in Weblate, I see two possibilities, neither of which is exactly good:
a) committing the files to GitHub directly - but won't they then get overwritten again by whatever is on Weblate?

They wouldn't get overridden by weblate, rather weblate would error
out with a merge error that I would then have to fix, and I'd rather
tend to avoid that :slight_smile:

b) removing Estonian from Weblate and committing to GitHub directly - but then there's no easily accessible public overview of the state of things.
How is this solved for the few other teams who translate offline?

Thats even worse, then you wouldn't get the sanity-checks done by
weblate and similar and likely will mess with my process of updating
templates and committing to source again as well.

but there's option
c) for those projects really wanting to upload all at once: use the
weblate client program and use a script to automate the upload using
the API:
https://docs.weblate.org/en/weblate-3.8/wlc.html

There is literally no fluctuation in my team, only me :slight_smile: / :frowning:
The reason for asking is that in Pootle I have set that any (not necessarily even logged in) users can make suggestions, in case someone finds an error in translation or has an improvement idea. This possibility has also been used a few times. If this can be set up like this also in Weblate by Sophie or anyone else, then fine by me.

Sure, that can be setup. so to confirm: you want anyone, including
anonymous users without any login to be able to make suggestions?

In addition, I presume that if someone requests to join my language team, that request would then be passed to me for approval, so I can make sure the applicant has needed level of language skills, agree on style/terminology, etc.

yes, basically it is handled with pootle as well for cases where
people don't find the admin-interface for it or where the old contact
is no longer active.

ciao
Christian

Þann 4.10.2019 10:16, skrifaði Christian Lohmaier:

  c) for those projects really wanting to upload all at once: use the
weblate client program and use a script to automate the upload using
the API:
https://docs.weblate.org/en/weblate-3.8/wlc.html

This is interesting. I guess that those who are susceptible to use batch upload/download are mostly language coordinators with some scripting experience. We could of course share our scripts here.

best,
Sveinn í Felli

Hi,

Þann 4.10.2019 10:16, skrifaði Christian Lohmaier:

c) for those projects really wanting to upload all at once: use the
weblate client program and use a script to automate the upload using
the API:
https://docs.weblate.org/en/weblate-3.8/wlc.html

This is interesting. I guess that those who are susceptible to use batch
upload/download are mostly language coordinators with some scripting
experience. We could of course share our scripts here.

That's a good idea :slight_smile: maybe best would be to store them in the 10n part
of the wiki?
Cheers
Sophie

Hi Sophie, *,

> Þann 4.10.2019 10:16, skrifaði Christian Lohmaier:
>> c) for those projects really wanting to upload all at once: use the
>> weblate client program and use a script to automate the upload using
>> the API:
>> https://docs.weblate.org/en/weblate-3.8/wlc.html
>
> This is interesting. I guess that those who are susceptible to use batch
> upload/download are mostly language coordinators with some scripting
> experience. We could of course share our scripts here.

That's a good idea :slight_smile: maybe best would be to store them in the 10n part
of the wiki?

As I like perl better than python, I wrote a helper script that will
take care of downloading multiple files
https://gist.github.com/cloph/76d4c22f0e0d8c81c55a8acab98c3311

copying the builtin help here for reference.

Usage:
    weblate-download.pl is used to download multiple po files for a project
    from TDF's weblate server. Downloading will replicate the directory
    structure as used in the repository. Note that anonymous access is
    restricted to 100 requests/day.

    Examples (use --help to see all options):

    "weblate-download.pl -t /tmp/pofiles -p libo_help-master -l fr"
    "weblate-download.pl -k -l vec -f dictionaries"

Options:
    All options names are case-insensitive and can be abbreviated as long as
    the prefix is still unique

    --target=/path/to/save/to
        the target directory (will be created if it doesn't exist already) to
        use for the download

        defaults to /var/tmp/weblate-download

    --project=project
        the project to process - either "libo_ui-master" or "libo_help-master"
        defaults to libo_ui-master

    --language=lang
        the language to download, required.

    --filter=componenteprefix
        optional option to restrict the download to only those components that
        start with "componentprefix"

    --verbose
        optional switch to output more progress information

    --keyfile[=fileWithApiKey]
        optional switch to enable authenticated API access. If "--keyfile" is
        specified without a pathname, it defaults to ~/.config/tdf-weblate

        If the option is not specified, anonymous access is used (restricted
        to 100 requests/day) The file should contain just your personal API
        key (found in weblate → profile-icon → settings → API access)

    --overwrite
        optional switch to overwrite already existing files. If not specified,
        download will be skipped for existing files.

        Use at your own risk.

    --help
        show this help

ciao
Christian

Þann 4.10.2019 16:06, skrifaði Christian Lohmaier:

Hi Sophie, *,

Þann 4.10.2019 10:16, skrifaði Christian Lohmaier:

   c) for those projects really wanting to upload all at once: use the
weblate client program and use a script to automate the upload using
the API:
https://docs.weblate.org/en/weblate-3.8/wlc.html

This is interesting. I guess that those who are susceptible to use batch
upload/download are mostly language coordinators with some scripting
experience. We could of course share our scripts here.

That's a good idea :slight_smile: maybe best would be to store them in the 10n part
of the wiki?

As I like perl better than python, I wrote a helper script that will
take care of downloading multiple files
https://gist.github.com/cloph/76d4c22f0e0d8c81c55a8acab98c3311

copying the builtin help here for reference.

Usage:
     weblate-download.pl is used to download multiple po files for a project
     from TDF's weblate server. Downloading will replicate the directory
     structure as used in the repository. Note that anonymous access is
     restricted to 100 requests/day.

     Examples (use --help to see all options):

     "weblate-download.pl -t /tmp/pofiles -p libo_help-master -l fr"
     "weblate-download.pl -k -l vec -f dictionaries"

Options:
     All options names are case-insensitive and can be abbreviated as long as
     the prefix is still unique

     --target=/path/to/save/to
         the target directory (will be created if it doesn't exist already) to
         use for the download

         defaults to /var/tmp/weblate-download

     --project=project
         the project to process - either "libo_ui-master" or "libo_help-master"
         defaults to libo_ui-master

     --language=lang
         the language to download, required.

     --filter=componenteprefix
         optional option to restrict the download to only those components that
         start with "componentprefix"

     --verbose
         optional switch to output more progress information

     --keyfile[=fileWithApiKey]
         optional switch to enable authenticated API access. If "--keyfile" is
         specified without a pathname, it defaults to ~/.config/tdf-weblate

         If the option is not specified, anonymous access is used (restricted
         to 100 requests/day) The file should contain just your personal API
         key (found in weblate → profile-icon → settings → API access)

     --overwrite
         optional switch to overwrite already existing files. If not specified,
         download will be skipped for existing files.

         Use at your own risk.

     --help
         show this help

ciao
Christian

Hi Christian,

Was trying to get your script running:
$ perl weblate-download.pl -t /tmp/pofiles -p libo_ui-master -l is
Got this back: "Too late for "-CSDA" option at weblate-download.pl line 1."

Tried to remove the -CSDA options from the file and got this:
Error while downloading componentlist: 500 Can't connect to weblate.documentfoundation.org:443
aborting... if the message is about too many requests, consult --help for keyfile option

Aha, a missing API-key, right?

Also, whatever I've tried in the wlc-client points to a missing API-key.

So, two questions:

1. the key in question, is it the SSH-RSA key listed at 'About Weblate / Weblate keys' in <https://weblate.documentfoundation.org/keys/> ?

2. where can I find simple example on how to install the key? Is it done through the wlc-client or just by throwing a file with the key contents into my .ssh folder?

Bestest regards,
Sveinn í Felli

Hi Sveinn, *,

Þann 4.10.2019 16:06, skrifaði Christian Lohmaier:
> […]
> As I like perl better than python, I wrote a helper script that will
> take care of downloading multiple files
> https://gist.github.com/cloph/76d4c22f0e0d8c81c55a8acab98c3311
[…]
Was trying to get your script running:
$ perl weblate-download.pl -t /tmp/pofiles -p libo_ui-master -l is
Got this back: "Too late for "-CSDA" option at weblate-download.pl line 1."

The -C option is meant to switch all perl handles to use UTF-8, the
letters SDA specify what the utf8 should apply to.
S: stdin, stdout, stderr
D: input and output streams (→ reading/writing files)

Tried to remove the -CSDA options from the file and got this:

if you don't run the script itself (chmod u+x weblate-download.pl and
then ./weblate-download.pl directly), it is better to run
perl -CSDA weblate-download.pl …
But the error is not related to connection failures, but rather would
lead to wrongly encoded filenames and similar (but should not be an
issue for LO's pootle, all filenames are ASCII)

Error while downloading componentlist: 500 Can't connect to
weblate.documentfoundation.org:443
aborting... if the message is about too many requests, consult --help
for keyfile option

Aha, a missing API-key, right?

Without API you can only do a limited number of requests per day,
while OK to get a list of files/components, not enough to actually
download them all.
But you're already getting a different error 500 is internal server
error. Maybe you were unlucky with your timing and you tried just when
the machine was rebooted. The 500 error /can't connect message is not
related to the api-request limit.

Also, whatever I've tried in the wlc-client points to a missing API-key.

So if you tried numerous times: are you behind a (mandatory) proxy?

So, two questions:

1. the key in question, is it the SSH-RSA key listed at 'About Weblate /
Weblate keys' in <https://weblate.documentfoundation.org/keys/> ?

No, that is for when weblate is pushing changes to the git repository.
You can find your api-key/token in your user profile
(user-icon → Settings → Api-access)
https://weblate.documentfoundation.org/accounts/profile/#api

2. where can I find simple example on how to install the key? Is it done
through the wlc-client or just by throwing a file with the key contents
into my .ssh folder?

The weblate-download script would look in ~/.config/tdf-weblate by
default (should contain just the key, nothing else), or you can use -k
/path/to/someother/file to use a different file.

But your problem is not related to the keyfile (you'll need it anyway,
since LibreOffice consists of too many components to fit in the limit)
- but you should be able to download ~95 files (the other 5 are used
to get the list of components) and then it would fail with something
like this:
Successfully downloaded /tmp/pofiles/is/dictionaries//cs_CZ.po
Successfully downloaded /tmp/pofiles/is/dictionaries//vi.po
Error: downloading /tmp/pofiles/is/dictionaries//pt_PT.po failed200 OK
Error: downloading /tmp/pofiles/is/dictionaries//gd_GB.po failed200 OK
Error: downloading /tmp/pofiles/is/dictionaries//sw_TZ.po failed200 OK
Error: downloading /tmp/pofiles/is/dictionaries//be_BY.po failed200 OK
Error: downloading /tmp/pofiles/is/dictionaries//sv_SE.po failed200 OK
Error while downloading componentlist: 429 Too Many Requests
aborting... if the message is about too many requests, consult --help
for keyfile option

ciao
Christian

Christian Lohmaier (<lohmaier+ooofuture@googlemail.com>), 4. oktoober 2019
kell 19:06:

Hi Sophie, *,

> > Þann 4.10.2019 10:16, skrifaði Christian Lohmaier:
> >> c) for those projects really wanting to upload all at once: use the
> >> weblate client program and use a script to automate the upload using
> >> the API:
> >> https://docs.weblate.org/en/weblate-3.8/wlc.html
> >
> > This is interesting. I guess that those who are susceptible to use
batch
> > upload/download are mostly language coordinators with some scripting
> > experience. We could of course share our scripts here.
>
> That's a good idea :slight_smile: maybe best would be to store them in the 10n part
> of the wiki?

As I like perl better than python, I wrote a helper script that will
take care of downloading multiple files
https://gist.github.com/cloph/76d4c22f0e0d8c81c55a8acab98c3311

Hi Christian, all,

Do you know if anyone already has written a proper script for mass upload
as well?
If not, then I can share my amateurish (but working) Bash script.

Best regards,
Mihkel
Estonian team