#8159 please migrate to the new Fedora translation platform
Closed: fixed by abbra. Opened 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 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


Metadata Update from @abbra:
- Issue assigned to abbra

Thanks, @jibecfed. It'll take me some time to merge recent translations from Zanata because of a broken set of tools for communicating with Zanata in Fedora (new tools written in Python do mis-attribution of translation authorship, old tools break directory placement and do some weird changes in the metadata when retrieved/pushed).

Some answers:
- we have multiple branches developed in parallel. In Zanata we maintained several branches and periodically did merges between them. How is this going to be tracked in Weblate?
- pot file is not stored in git right now, it is build time generated. Should we store and update it in git to get weblate to notice it? Is there a way to run per-project hook to generate pot file instead?
- we host freeipa source code on pagure but work through Github pull requests workflow, so for Weblate we'd prefer a pull request to be opened on github.

For all your questions, I suggest you follow the same scheme as Anaconda: https://github.com/rhinstaller/anaconda-l10n

They have a dedicated repo for all pot and po files, with direct commit from weblates.
It makes all the thing easy to handle for everyone.
Using Pagure is fine, user to set with commit right is @weblatebot

Here are translations from zanata master to help you:

po.7z

I dont really understand your issues, please let me know if I can help you.

Last Zanata import lost translators' attribution and quite a few other things. I need now to manually undo some of those changes.
Thanks for the export, I'm working on the integration back to IPA.

@jibecfed I submitted a pull request that prepares for Weblate use: https://github.com/freeipa/freeipa/pull/4419
Once it is accepted, we can proceed with the switch.

master:

  • 92e36258cee838a378729d06fc4134b5c4428f87 Keep ipa.pot translation file in git for weblate
  • b4722f3917d6c2a6849931e9c68896f83a0cc09b Update translation infrastructure
  • 3fc932a2a859898d718d850fbcd558a1e960e91f po: update ipa.pot template
  • 0be22a6ae71a3261c9e9333a01dc028f55554924 po: update Bengali translation timestamp
  • 6cd244da6be890e577bf381c6303363e2a6f237f po: update Catalan translation timestamp
  • 68cc049124f2acf66b4fdd4588e1fb25d50a9364 po: update Czech translation timestamp
  • 117893f03e4f26044e7b15053e336b8d42b4f180 po: update German translation
  • 439c488f04b857cfb83f779e450c34b93f7c38bb po: update English (United Kingdom) translation timestamp
  • 2859216b4cbb763a25792cffe6204da8edb4a232 po: update Spanish translation
  • e6574914ade837f1d49579394437dfe720b55b22 po: update Basque translation timestamp
  • 1a0232a6938c64277c4b8f2cdc35be650da644cc po: update French translation
  • 35c1da8346c1b671b1a1bffa51199324c3947d9f po: update Hindi translation timestamp
  • f18a4f8dd34134b3c08b1169ba42ebcffa49ac72 po: update Hungarian translation timestamp
  • 347d9c78b17176e7677995c2ecbbfc7b13d50dcc po: update Indonesian translation timestamp
  • 60d69a8755d3f32d6fed70ba541f70e4069e0647 po: update Japanese translation timestamp
  • 1c30d18611519aca5244b2315a5d8a3e198eea38 po: update Kannada translation timestamp
  • 0c9066e8f3b7b78fb7cf4763fa51919aa6c4965c po: update Marathi translation timestamp
  • 7f3cc11a20ad1705cb62ec0075d1e7ec863fced7 po: update Dutch translation timestamp
  • 3e636959ff14e454329a6806bf4fe4f560ccf398 po: update Punjabi translation timestamp
  • 047c8cc55d0845123160e94c69bf0f4efe47059e po: update Polish translation
  • baf1a7217d35c2142953a098f4caf88f181e42b0 po: update Portuguese translation timestamp
  • 45dede73c7106b234f0c1d022bd20260d9c7c7fa po: update Portuguese (Brazil) translation timestamp
  • ad3ef9de44f41051fed8f743fb4bc7cf2e896ea7 po: update Russian translation
  • ed55c408f8599dd4c0be8261c34930b9c7416171 po: update Slovak translation timestamp
  • e50c2500f440caa59fa78320ed669db9f0a25d10 po: update Tajik translation timestamp
  • 9fcae1590ddb2fd240b200d0960e33323d594acb po: update Ukrainian translation
  • 42e86692b6b12728e0fb7e3bc17613ef072b624a po: update Chinese (China) translation

Failed to apply patches onto origin/ipa-4-8. Manual backport is needed.

ipa-4-8:

  • 9ff7b4a411d13ca148d2f53603dbcc812d92380a Keep ipa.pot translation file in git for weblate
  • 831f4dd320a93d01df6b06058c3ab618a98c9fd8 Update translation infrastructure
  • e23ba779d3aefd871e348b91e7b0fa003d97c96e po: update ipa.pot template
  • 16d9556c6f3d19f73256d6698a7659f78961a378 po: update Bengali translation timestamp
  • 29e3ade05c8bea23c07ed1a1b5612af01f924d2d po: update Catalan translation timestamp
  • c8ba436c0dad467bf12dec4d4f141916d0b3fbbd po: update Czech translation timestamp
  • 0d053d8b1df33f5602ae0e154743f1d1dce2c72d po: update German translation
  • 37a1e927a1f123b8b9fdbaf815003cb04726f72c po: update English (United Kingdom) translation timestamp
  • 7af52df7a8e54afe36649c5436fcfce759111751 po: update Spanish translation
  • 92fb5c5268b8b1b02b7a1d12b9a6417c893a18f1 po: update Basque translation timestamp
  • a2ca393d35a1f34b2dbbd54c9c1d24b9f20960f0 po: update French translation
  • c4dd8b226ae97011bcc0546209f8473fbcd75ab8 po: update Hindi translation timestamp
  • 595d5062b9e770a946156f69df2fe522d4745d9e po: update Hungarian translation timestamp
  • 124a563eb64d7f9a2190a13e9d68a7b608be2d22 po: update Indonesian translation timestamp
  • 89dbf88abb108cad7f44f92b4e94e66f21746cd3 po: update Japanese translation timestamp
  • 89b048d1408834dde38321ac4f402083ebd30247 po: update Kannada translation timestamp
  • 28a963eed0f27c214543b02fc34e15182e6fcc04 po: update Marathi translation timestamp
  • e7945284906998da0a798a1ff15a42dd3fdb96d9 po: update Dutch translation timestamp
  • e4dfb7409bd25dc5bc2cc1e99562f912a98509f8 po: update Punjabi translation timestamp
  • 4e3867fcc49a8d2ff1085e630abd77666a06d838 po: update Polish translation
  • 31a9da8efa793d492352f646fc804b902beec088 po: update Portuguese translation timestamp
  • eab195ff3884b482279279326b3a84ced4723b7e po: update Portuguese (Brazil) translation timestamp
  • db433fbe4e521d08dee2cdc2e65344d8203e03a4 po: update Russian translation
  • 3c15e47a7c2212aab0ecdc320093bee2afa0bfdc po: update Slovak translation timestamp
  • 3d411cf29f29e1d391ed8f6eb159b88d450a332b po: update Tajik translation timestamp
  • 855a36b6c093fd21af7cf87524acc5d297692de3 po: update Ukrainian translation
  • c6adee04068ce946f8c9b8ad5db19721db13c602 po: update Chinese (China) translation

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

Sorry, autoclosed for PR push but we need the other parts still to be done.

Metadata Update from @abbra:
- Issue status updated to: Open (was: Closed)

@jibecfed, I added weblate app to https://github.com/freeipa/freeipa and locked Zanata project.
I have no rights to create freeipa project at translate.fedoraproject.org, so I need your help.

Current state: the way weblate works doesn't really suit FreeIPA workflow. We have few requirements that aren't possible to support with Weblate:

  • .po files should have location information stripped and they should be sorted in a specific order.
  • Weblate submits .po files as they are in weblate's git repo, with Github refusing to show any content because it is too big (25-40K lines per file)
  • Weblate doesn't force-push upstream changes to own repository which makes it impossible to individually push stripped .po files as updates. It might, actually fail our way of merging pull requests because we do not merge on github and thus commit IDs will be different between what is submitted and what is committed

A proposal is to use a separate git repository for translations and let Weblate handle it. Alternatively, Weblate 4.0 might get support for VCS-less projects where PO/POT files can be uploaded separately, pretty much like it was with Zanata.

master:

  • ac5cb4260320a4509c840f679633eb36a79f6f99 po: fix LINGUAS to use whitespace separation

ipa-4-8:

  • 616ad399c99292542638e9e8f0995873e5c4f311 po: fix LINGUAS to use whitespace separation

master:

  • 894b3f1d0bcaaf432eea4536c7a7c120b3fcd7a2 po: remove zanata config since translation was moved to weblate

ipa-4-8:

  • a29eec33fa2bc4b5e57f3f63c67d212aeb5c5ff4 po: remove zanata config since translation was moved to weblate

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

I locked your components long ago to prevent conflicts: https://translate.fedoraproject.org/changes/?project=freeipa&lang=&action=14&action=15

I totally forgot about this, I'll update your repositories and unlock them.

You may receive some useless update commits before getting actual translatiosn.

@jibecfed we still need to solve the issue with sorting and clearing up the updates. They aren't going to be accepted upstream in the current shape as provided by weblate so unlocking repositories is not helpful as it creates a false impression that the process was worked out.

oops, what are the issues?

Jean-Baptiste

See https://pagure.io/freeipa/issue/8159#comment-637457

ok, striping line numbers is easy=2E I'll do that=2E

commit size is depending on the size of your translation files, so if you =
want to reduce it, do multiple po files=2E It doesn't change much for trans=
lators=2E

about string order, you are the first project I see asking that, what is t=
he usecase?

about other contributions on po files they should be none=2E
Anyone you included can import po files into weblate in a few easy steps=
=2E
The issue with accepting PR prevents translators to see changes in Weblate=
and to work as a team=2E

adding a new repository wouldn't be my recommendation=2E

Both stripping and ordering are used to keep reduce the diff size for po updates. We prefer to keep a clean and lean git history.

stripping was added, let's see if this has an impact on ordering

Hey guys, I want to start a Hebrew translation, Hebrew (along with some other languages) is not handled correctly by the various terminal emulators (For example: hello will appear as olleh).

I was wondering if there's a way to ditinguish between WebUI strings and CLI strings in FreeIPA, thank you!

There is in general no way to distinguish between those two targets in the translation strings. They are not marked for a specific purpose and any client (both CLI and Web UI are just two different frontends, there could be more) can use the strings returned by the server's end-points.

Both stripping and ordering are used to keep reduce the diff size for po updates. We prefer to keep a clean and lean git history.

Stripping worked as expected: https://github.com/freeipa/freeipa/commit/963c015a0d1376145232ffe59977d04343f3c68c

rest of the commit volume is related to outdated po files:
https://github.com/freeipa/freeipa/blob/master/po/ipa.pot says: "POT-Creation-Date: 2020-06-10 22:26+0300\n"

While https://github.com/freeipa/freeipa/blob/master/po/bn_IN.po says "POT-Creation-Date: 2019-08-14 10:13+0300\n"

It makes first commits really big. There is nothing I can do against that.

After this first huge commit, you will have per release:

  • one commit updating all your po files with new strings coming from POT updates
  • one commit per po file with translations updates

The fact you can't read this pull request with Github really isn't an issue (you can read it in CLI).
You can trust Weblate for correctly doing his job. This tool is used for that for years now.
If you don't trust Weblate, do it yourself using gettext tools, the result will be the same.

If you feel like this may creates a too big git log over time, you'll be always able move the po folder from one git repository to another repo, keeping its history and remove the folder and his history from your git repository. I'll change the Weblate configuration so make that easy.

@jibecfed thanks. I can see stripping work now, that's good.

Since we are not committing to github directly, I need to check how this pull request would work with our tooling. Give me day or two to see over it, I am in the middle of something else right now.

@jibecfed I tried to look at the https://github.com/freeipa/freeipa/pull/4981.patch (weblate patch for master). It applies cleanly but after running

./autogen.sh
make -C po

in the source tree, I get a lot of differences (added, removed, file path):

$  git diff --numstat
15      23419   po/bn_IN.po
361     23990   po/ca.po
594     24906   po/cs.po
3168    24960   po/de.po
16      23191   po/en_GB.po
11436   27586   po/es.po
337     24548   po/eu.po
14455   28444   po/fr.po
30      23179   po/hi.po
87      23835   po/hu.po
147     23411   po/id.po
285     24399   po/ja.po
449     24320   po/kn.po
40      23226   po/mr.po
1       23182   po/nl.po
34      23309   po/pa.po
1038    24807   po/pl.po
140     23662   po/pt.po
334     23032   po/pt_BR.po
27280   28739   po/ru.po
1786    25371   po/sk.po
206     23768   po/tg.po
1235    22964   po/tr.po
29293   29293   po/uk.po
8536    20783   po/zh_CN.po

Effectively, the update is incompatible with our current use of GNU gettext. And this is not about stripping the file locations and reordering -- actual translations are missing. For example, looking at po/bg_IN.po, I see a removal of a translation that exists in the POT file:

$  git diff po/bn_IN.po |grep -A1 'must be an integer'
-msgid "must be an integer"
-msgstr "একটি দশমিক সংখ্যা হওয়া জরুরি"
$ cat po/ipa.pot |grep -A1 'must be an integer'
msgid "must be an integer"
msgstr ""

These changes happen over multiple translation files. Any ideas how we can get around this?

In: https://github.com/freeipa/freeipa/blob/master/po/bn_IN.po#L52

You'll see:

msgid "must be a decimal number"
msgstr "একটি দশমিক সংখ্যা হওয়া জরুরি"

In https://patch-diff.githubusercontent.com/raw/freeipa/freeipa/pull/4981.patch
I see for the same language:

+#, fuzzy
+#| msgid "must be a decimal number"
+msgid "must be an integer"
+msgstr "একটি দশমিক সংখ্যা হওয়া জরুরি"

It means Weblate detected close content and marked it as fuzzy.
The string "একটি দশমিক সংখ্যা হওয়া জরুরি" isn't the translation of "must be an integer".

The content file: https://github.com/freeipa/freeipa/blob/5b962b0ba1f7aaa00c0ba9f55efc30e1dc1e1483/po/bn_IN.po looks fine to me. You can access it through https://github.com/freeipa/freeipa/pull/4981/files and click "see file" button.

Metadata