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
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:
<img alt="po.7z" src="/freeipa/issue/raw/files/d1369459ce8c3cc8fe4d8d57ffd7415477db9ab0be73659f48fca1f9cf55b64f-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:
Failed to apply patches onto origin/ipa-4-8. Manual backport is needed.
ipa-4-8:
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
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.
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.
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.
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:
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:
po/bg_IN.po
$ 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.
Log in to comment on this ticket.