fedora-selinux / setroubleshoot

Abandoned, use https://gitlab.com/setroubleshoot
https://gitlab.com/setroubleshoot
9 stars 12 forks source link

please migrate to the new Fedora translation platform #89

Closed Jibec closed 4 years ago

Jibec commented 4 years ago

Hello, the Fedora project migrates its translation platform to Weblate [1].

This tool directly interact with your git repository, and requires us to know:

Please note:

[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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

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

Jibec commented 4 years ago

Done and you are admin, sorry for the delay

Jibec commented 4 years ago
Message from Petr Lautrbach 

Hello,

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

~~~
$ curl -v -X POST -F "file=@setroubleshoot.pot" -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:

In your development process:

Alternatives:

Hope it helps

bachradsusi commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

$ curl -v -X POST -F "file=@setroubleshoot.pot" -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 commented 4 years ago

I see.

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

Thanks!