#79 please migrate to the new Fedora translation platform
Closed: Fixed 3 years ago by jibecfed. Opened 4 years ago by jibecfed.

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 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


[mandatory] which branch is your development branch?

master

[mandatory] have you merged latest translation from Zanata and locked the project?

I'm not sure. I haven't, but it's possible someone else has (@codeblock, do you know?)

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

Ack.

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

It appears we use CC BY-SA 3.0, but I don't see that explicitly anywhere.

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

None, unless someone else has one.

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

None, unless someone else has one.

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

That would be ideal if it's reasonable to implement.

Metadata Update from @bcotton:
- Issue assigned to bcotton
- Issue tagged with: translations

4 years ago

If you create a repository https://pagure.io/fedora-web/translations and provide:
@jibecfed as maintainer and admin
@weblatebot as commiter

I'll move all translations there, I'll do the weblate settings.

I'm already maintainer of https://fedora.zanata.org/project/view/websites and can lock it myself (but this may crash automated builds if you have some)
I need to be maintainer https://fedora.zanata.org/project/view/fedora-web to lock translations

what I can do: move translations to the repository and properly plug weblate on it
what I can't do: change automation (but I can give guidance and tests myself)

If you create a repository https://pagure.io/fedora-web/translations and provide:
@jibecfed as maintainer and admin
@weblatebot as commiter

Done!

I'm already maintainer of https://fedora.zanata.org/project/view/websites and can lock it myself (but this may crash automated builds if you have some)

I guess we'll find out?

I need to be maintainer https://fedora.zanata.org/project/view/fedora-web to lock translations

I'm not a maintainer there. @codeblock or @robyduck, can you help?

Is there still need to take action? I see @jibecfed is now admin in the new repo, if I can help in some way just let me know.

yes @robyduck please lock https://fedora.zanata.org/project/view/fedora-web until migration is done (or set me admin so I do it myself)

I'll be able to do some basic stuff, but automation will most probably require to be changed, and this is something I have no idea how it works

Done, the repo is now read only. Let me know if you need more or it should be reactivated.

translations were moved to: https://pagure.io/fedora-web/translations/tree/master

If I understand correctly, I'll have to change this file: https://pagure.io/fedora-websites/blob/master/f/Makefile.in#_50

pushpot and pull pot should be changed so that this file works:
https://pagure.io/fedora-websites/blob/master/f/tools/l10N_update.sh

correct?

I do I generate all pot files in once? Should I be in each folder to make it works?

Next steps:

  • Allow pot generation to update translation repository
  • Configure Weblate to allow new translations
  • Allow to pull po files into fedora-website repository
  • Generate websites in stg using the new makefile

Hmm, I didn't follow this, but I guess this translation repo on pagure is just temporary, right?
Similar to the migration to Zanata you need to setup the repo on weblate and create for every single website a different version.
You will be able to pull and push translations with the weblate command, this has to be in the makefile in order to be able to use the alias commands (pullpos and pushpot).
You should not touch the l10n update file, this should still work, but you need to work on Infra and set up a dummy user for weblate, because the server does its own pullpos, hourly or how often you want. Remember the translation files in the repo are not the files we use on the websites, they are only used for local builds and testing.

No, it's not temporary Weblate is designed to interact with a git repository

I used a separate one for Websites because of the traffic it will create and because I know it's not the usage here to commit translations

Now, we need to replace zanata push/pull by git interactions

Makefile and l10N_update files pull request: https://pagure.io/fedora-websites/pull-request/1015
This means the automation running the script should have write access to this repository

we can probably do better to prevent a too many git clone, but I bet it will always be faster than any previous execution time.

Hi, it looks like we now have bugs because pot files are not updated when required.

On this screen-shot you can see the right block is in English:
Capture_decran_du_2020-06-14_00-10-02.png

At the same time, I see 100% translated in Weblate: https://translate.fedoraproject.org/projects/fedora-websites/getfedoraorg/fr/

a commit changed a string there: https://pagure.io/fedora-web/websites/c/4079cdd1622a41d132948477d4a93e4fbd631c65

but the pot remained unchanged: https://pagure.io/fedora-web/translations/history/getfedora.org-redesign/getfedora.org.pot?identifier=master

as a result, the French pot file is outdated and still contain the old string:
https://pagure.io/fedora-web/translations/blob/master/f/getfedora.org-redesign/fr/LC_MESSAGES/messages.po

The only issue to solve: make sure to generate pot files.

As far as I know, this was done manually in the past, and the command still works.

The only issue to solve: make sure to generate pot files.

Is this something that needs to be added to the build process or does it need to be run manually?

There is still an issue somewhere as the translations do not appear correctly on the website:

Is this something that needs to be added to the build process or does it need to be run manually?

@bcotton To the build process would be my first choice.

let's finish this discussion in https://pagure.io/fedora-websites/issue/1013
I'm confused about website tickets organization...

Metadata Update from @jibecfed:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata
Attachments 1