Bug 1783579 - please migrate to the new Fedora translation platform
Summary: please migrate to the new Fedora translation platform
Keywords:
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt-glib
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Daniel Berrangé
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-13 23:03 UTC by jibecfed
Modified: 2020-02-03 10:35 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description jibecfed 2019-12-13 23:03:40 UTC
Hello, the Fedora project migrates its translation platform to Weblate [1].

This tool directly interact with your git repository, and requires us to know:
* [mandatory] which branch is your development branch?
* [mandatory] have you merged latest translation from Zanata and locked the project?
* [info] Weblate will handle updates when pot file changes, don't edit po files for this [2]
* [optional] what is the license of translation? (please use a code from https://spdx.org/licenses/)
* [optional] do you have any announcement/warning you would like to display to the translators? (it will be displayed in Weblate)
* [optional] do you need us to activate any specific checks? (this is a setting per component [3])
* [optional] do you need us to automatically detect new translation files? (typical usecase: website translation with one translation file per page)

Please note:
* For github hosted projects, Weblate open pull request. For other project, you'll have to add a key to allow commits.
* In Weblate's vocable, one project is a group of component. Each component is a translation file. You can have many projects or many components or both.
* You can change your mind over time, just reach trans@lists.fedoraproject.org

[1] https://communityblog.fedoraproject.org/fedora-localization-platform-migrates-to-weblate/ 
[2] https://docs.weblate.org/en/latest/admin/continuous.html#avoiding-merge-conflicts
[3] https://docs.weblate.org/en/latest/user/checks.html#translation-checks

Comment 1 jibecfed 2019-12-13 23:11:13 UTC
On translation mailing list, you wrote:


https://libvirt.org/git/?p=libvirt-glib.git;a=log
https://fedora.zanata.org/project/view/libvirt-glib/?dswid=478

 * which branch is your development branch?

   master, but note weblate won't be allowed to either push or pull,
   we must manually upload & download .pot/.po files

 * have you merged latest translation from Zanata and locked the project?

   I've hit the "make this project readonly" assuming that's what
   you mean by 'locked'.

 * Weblate will handle updates when pot file changes, don't edit po files for this [2]

   As above, we can't have weblate directly accessing git

 * what is the license of translation? (please use a code from https://spdx.org/licenses/)

    LGPLv2-or-later

 * do you have any announcement/warning you would like to display to the translators? (it will be displayed in Weblate)

   Questions/clarifications about translations should be sent to the
   libvir-list@redhat.com mailing list. For further information
   consult https://libvirt.org

 * do you need us to activate any specific checks? (this is a setting per component [3])

   Any .po file validation rules relevant to the C language.

   Especially validating that printf format specifiers have
   not been re-ordered/removed/changed, since we see that
   screw up alot.


 * do you need us to automatically detect new translation files? (typical usecase: website translation with one translation file per page)

   Nope

Comment 2 jibecfed 2019-12-13 23:37:07 UTC
Daniel P. Berrange is no admin on https://translate.stg.fedoraproject.org/projects/libvirt-glib/

I created a single empty component in it:
https://translate.stg.fedoraproject.org/projects/libvirt-glib/application/

I assume you'll be able to interact with it using the weblate cli:
https://docs.weblate.org/en/weblate-3.9.1/wlc.html

I've never tried to fully interact with Weblate without using any git repository. This is a workflow you'll have to figure out by yourself.
My suggestion would be to keep to pot file in your git repository, let weblate have the "normal" po files, and adapat your push/pull mechanism with weblate's command line interface.

Comment 3 jibecfed 2019-12-14 11:33:47 UTC
I figured you you may do the following to make it easy:

You have a git address to access Weblate internal git repository there:
https://translate.stg.fedoraproject.org/projects/libvirt-glib/application/#information

You may write a script that:
* generate pot file and update it in weblate's internal git repository
* generate use your script to generate minimized po files from weblate's internal git repository

I can easily ask Weblate update all po files when a new pot is generated (I suggest you to let Weblate to it to limit potential conflicts).

You also have many empty po files. Could you please only keep those with actual translation?

libvirt-glib/po/uk.mini.po
libvirt-glib/po/pl.mini.po
libvirt-glib/po/ca.mini.po
libvirt-glib/po/fr.mini.po
libvirt-glib/po/cs.mini.po
libvirt-glib/po/es.mini.po
libvirt-glib/po/hi.mini.po
libvirt-glib/po/ja.mini.po
libvirt-glib/po/pt_BR.mini.po
libvirt-glib/po/en_GB.mini.po
libvirt-glib/po/fi.mini.po
libvirt-glib/po/ru.mini.po

Thanks for your help

Comment 4 Daniel Berrangé 2019-12-16 12:42:55 UTC
Posted patches that update libvirt-glib to use Weblate

  https://www.redhat.com/archives/libvir-list/2019-December/msg01012.html

All empty translations are culled. We use wlc upload/download to update the .pot / .po files

Comment 5 jibecfed 2019-12-17 12:52:58 UTC
bravo :)

few questions:

1. why do you have this empty "en" file in Weblate?
In https://translate.stg.fedoraproject.org/settings/libvirt-glib/application/#files

You should probably:
. empty the option Monolingual base language file 
. disable the option "Edit base file "
. set the pot file in "Template for new translations"

FYI: gettext is not a monolingual base language file (as it contains both source and target)


2. would you like to have one single project in Weblate named "libvirt" and multiple components in it?
This allows easy propagation of translation across projects for translators and makes browsing easier.


3. I see many projects in https://libvirt.org/git/
Do you have more than the "libvirt" project to migrate?

4. Is it possible to split libvirt project in subparts to make it easier to translate it step by step?

Comment 6 Daniel Berrangé 2019-12-18 13:53:46 UTC
(In reply to jibecfed from comment #5)
> bravo :)
> 
> few questions:
> 
> 1. why do you have this empty "en" file in Weblate?
> In
> https://translate.stg.fedoraproject.org/settings/libvirt-glib/application/
> #files
> 
> You should probably:
> . empty the option Monolingual base language file 
> . disable the option "Edit base file "
> . set the pot file in "Template for new translations"
> 
> FYI: gettext is not a monolingual base language file (as it contains both
> source and target)

The project was configured as  "gettext (monolingual)" when created AFAICT.

I've now changed this to "gettext", and cleared the "monoligual base language file" and "Edit base file" options.

I can find no way to actually upload the "libvirt-glib.pot" file via the wlc client app. The exported GIT repo appears to be read-only too - get 403 if attempting to push, even with he API access key in the git URI 

Best I can do is set "en.po" as the "Template for new translations" which is not very nice.

> 2. would you like to have one single project in Weblate named "libvirt" and
> multiple components in it?
> This allows easy propagation of translation across projects for translators
> and makes browsing easier.

There isn't likely to be overlap of strings beween the libvirt projects.

> 3. I see many projects in https://libvirt.org/git/
> Do you have more than the "libvirt" project to migrate?

Yep, "libvirt" and "libvirt-sandbox" only though.

> 4. Is it possible to split libvirt project in subparts to make it easier to
> translate it step by step?

I don't think its practical to split up the libvirt.pot file any time in the forseeable future.

Comment 7 Daniel Berrangé 2020-01-03 13:52:33 UTC
FYI, i'm happy to go ahead with migrating  libvirt & libvirt-sandbox modules to weblate. 

When setting up project in weblate, they can be configured with the same options as libvirt-glib, just with the name change.

I have already made Zanata read-only for these projects.

Comment 8 jibecfed 2020-01-03 14:13:48 UTC
if it's the same project organization, could I change the project name for libvirt and the component "application" into "libvirt-glib" ?

https://translate.stg.fedoraproject.org/projects/libvirt-glib/application/
will become
https://translate.stg.fedoraproject.org/projects/libvirt/libvirt-glib/

I'll add libvirt as https://translate.stg.fedoraproject.org/projects/libvirt/libvirt/
I'll add libvirt-sandbox as https://translate.stg.fedoraproject.org/projects/libvirt/libvirt-sandbox

fine for you?

Comment 9 Daniel Berrangé 2020-01-03 14:15:27 UTC
Yes, that is fine with me.

Comment 10 jibecfed 2020-01-03 14:27:38 UTC
renaming was applied
the two components are created
as you are admin, you can change the configuration if required

I added this addon in your components:
https://docs.weblate.org/en/weblate-3.9.1/admin/addons.html#contributors-in-comment
https://docs.weblate.org/en/weblate-3.9.1/admin/addons.html#addon-weblate-consistency-languages (this may impact you)
https://docs.weblate.org/en/weblate-3.9.1/admin/addons.html#automatic-translation (this only impact translators as it open suggestions)


let me know when I can announced these project as ready for translation to the community

Comment 11 jibecfed 2020-01-30 23:30:19 UTC
hello, what is the status of this? Did you decide to go for the standalone repository or to continue manual push/pull?

Comment 12 Daniel Berrangé 2020-02-03 10:35:53 UTC
I haven't had time to do more work on this yet. I'll be trying a separate repo most likely.


Note You need to log in before you can comment on or make changes to this bug.