Skip to content
This repository has been archived by the owner on Dec 9, 2022. It is now read-only.

please migrate to the new Fedora translation platform #89

Closed
Jibec opened this issue Jan 9, 2020 · 11 comments
Closed

please migrate to the new Fedora translation platform #89

Jibec opened this issue Jan 9, 2020 · 11 comments

Comments

@Jibec
Copy link

Jibec commented Jan 9, 2020

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 and gitlab hosted projects, Weblate open pull request. For other git hosting, 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 [email protected]

[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

Project: https://fedora.zanata.org/project/view/setroubleshoot

@bachradsusi
Copy link
Member

I've updated Zanata project so that it points to the correct home page and repository on https://pagure.io/setroubleshoot

Development branch is currently master. We've updated translation from Zanata recently and haven't locked the project. Why?

I'm not aware of any special license for translation, SETroubleshoot itself uses GPLv2+

We are not going to allow 3rd party to write directly to the repository.

@Jibec
Copy link
Author

Jibec commented Aug 15, 2020

Zanata server will be removed in a few weeks: https://fedoraproject.org/wiki/Changes/Zanata_removal
Migration is mandatory (to Fedora Weblate or whatever place of your choice).

I don't understand why you have a setroubleshoot on both github and pagure.
If you want to move to Fedora Weblate, could you please explain your workflow so I can suggest the easiest configuration?

may you reopen this?

@bachradsusi
Copy link
Member

Our workflow is:

  1. check the current Fedora preferred translation platform: fedorahosted, transifex, zanata, weblate, ...
  2. download translations
  3. update git

So if you need to migrate to another platform, please do it, let us know and we will strart downloading translations from new place.

pagure.io is our primary source and issue tracker, this repository is just a minor and is used as a legacy point of contact. I'm not going to reopen this ticket, but feel free to open new one on pagure.io/setroubleshoot

@bachradsusi
Copy link
Member

@Jibec we want configuration as simple as possible. Just a project with 2 components setroubleshoot and setoubleshoot-plugin with 2 versions - master and stable. As we don't track pot files in the repository we will update translation sources manually as we do it now in Zanata. And we will download translations during release process directly from weblate - no intermediate repo, no write access to our repository. We would do it on our own but we are not allowed to create a new project in translation.fedoraproject.org. And again, this project is just a legacy mirror, the main point of contact is https://pagure.io/setroubleshoot ,(and there's discussion to move to gitlab.com)

@bachradsusi
Copy link
Member

@Jibec Could you create project called setroubleshoot similar to fedora-selinux as you did at fedora-selinux/selinux#59 (comment) ? Homepage and repo would be https://pagure.io/setroubleshoot but I can set it later when it's created.

@Jibec
Copy link
Author

Jibec commented Aug 27, 2020 via email

@Jibec
Copy link
Author

Jibec commented Aug 31, 2020

Message from Petr Lautrbach 

Hello,

[..]I'm not able to update translation sources neither via web nor rest api:

~~~
$ curl -v -X POST -F "[email protected]" -H "Authorization: Token xyz" -F method=source https://translate.fedoraproject.org/api/translations/setroubleshoot/setroubleshoot/cs/file/
...
{"detail":"You do not have permission to perform this action."}%                                                               
~~~

How should I update translation sources in this projects? Note that follow workflow we had in zanata - upload .pot files, download .po files. We don't want to allow weblate write to our repo or use any intermediate git repo. We also don't store .pot files in git.

You can't interact with Weblate the same way you did with Zanata, it won't work.

To keep your life easy:

  • add the .pot in you source
  • configure your component to Weblate to follow your git repository (you can use the github one, it will save you the configuration of hooks in pagure)

In your development process:

  • update the .pot file each time required
  • Weblate and translators will do their work
  • before release, merge changes coming from weblate, using the public git address weblate provides with translation

Alternatives:

Hope it helps

@bachradsusi
Copy link
Member

So what is this https://docs.weblate.org/en/latest/user/files.html#upload-method good for? Especially the part with:

Update source strings (source)

Updates source strings in bilingual translation file. This is similar to what Update PO files to match POT (msgmerge) does.

source method is mentioned at https://docs.weblate.org/en/latest/api.html#post--api-translations-(string-project)-(string-component)-(string-language)-file- as well.

@bachradsusi
Copy link
Member

Btw the api doesn't report I can't do it, it reports that I don't have a permission to do it:

{"detail":"You do not have permission to perform this action."}

nijel added a commit to WeblateOrg/weblate that referenced this issue Sep 7, 2020
@nijel
Copy link

nijel commented Sep 7, 2020

You need to do source upload on the source language, so most likely:

$ curl -v -X POST -F "[email protected]" -H "Authorization: Token xyz" -F method=source https://translate.fedoraproject.org/api/translations/setroubleshoot/setroubleshoot/en/file/

I've just adjusted the error handling in Weblate to provide more useful feedback in the future.

@bachradsusi
Copy link
Member

I see.

It works. Also https://translate.fedoraproject.org/projects/setroubleshoot/setroubleshoot/en/#upload contains "Update source strings"

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants