[opensuse-translation] Command-line downloading of OpenSUSE translation files from Weblate
Hi! Does anyone here have any experience downloading and uploading translations from Weblate? From what I can see, there’s an API (https://docs.weblate.org/en/latest/api.html#), but I find it quite complex, and I couldn’t get it to work. Basically, what I want to do is in principle very simple: 1. Download all .po files for a given language. 2. Download all template files (.pot files). 3. Upload all .po files for a given language to Weblate (overwriting any existing translations). Has anybody done this, and can instruction me on how to do it? -- Karl Ove Hufthammer -- To unsubscribe, e-mail: opensuse-translation+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-translation+owner@opensuse.org
Hello, Weblate API requires HTTP client (curl, wget, etc.) and JSON encoder/decoder. Attached my perl script is just for:
1. Download all .po files for a given language. $API_KEY and @LANG_CODES should be filled before run (embedded in script itself).
Hope it is helpful. Thanks, On Mon, 3 Jul 2017 16:25:30 +0200 Karl Ove Hufthammer <karl@huftis.org> wrote:
Hi!
Does anyone here have any experience downloading and uploading translations from Weblate? From what I can see, there’s an API (https://docs.weblate.org/en/latest/api.html#), but I find it quite complex, and I couldn’t get it to work.
Basically, what I want to do is in principle very simple:
1. Download all .po files for a given language. 2. Download all template files (.pot files). 3. Upload all .po files for a given language to Weblate (overwriting any existing translations).
Has anybody done this, and can instruction me on how to do it?
-- Karl Ove Hufthammer
-- To unsubscribe, e-mail: opensuse-translation+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-translation+owner@opensuse.org
-- Yasuhiko Kamata E-mail: belphegor@belbel.or.jp
Yasuhiko Kamata skreiv 04. juli 2017 00:57:
Weblate API requires HTTP client (curl, wget, etc.) and JSON encoder/decoder.
Attached my perl script is just for:
1. Download all .po files for a given language. $API_KEY and @LANG_CODES should be filled before run (embedded in script itself).
Hope it is helpful.
Thank you. It was *very* helpful. Using it, I think I understand how the API works, and will be able to download (and hopefully eventually reupload) the translations, so that I can easily do offline translation. -- Karl Ove Hufthammer -- To unsubscribe, e-mail: opensuse-translation+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-translation+owner@opensuse.org
participants (2)
-
Karl Ove Hufthammer
-
Yasuhiko Kamata