On 2014-02-13 4:36 PM, Dirk Stöcker wrote: > Hello, > > as you seem to have trouble with updating translations in Trac a comment > from my side. > > For JOSM we're currently in the process of moving from Launchpad to > Transifex. For us this means we have a completely automated process to > update translations.
Yes, having a somewhat automated and no-brainer process is the key. So far, the manual procedure we have is too tedious. > For JOSM we don't manage different release translations, but separate in > core, data and plugins. We have one big text space, split it into the > three parts and later join them again. Having one big text space is also a key point for the simplicity. However having different files for the different domains is not such a big deal for us, and I think it even makes it easier for most translators as not every translator will want to push as far as to translate tracini.pot ;-) I think it is rather having to juggle between the branch specific catalogs which is the real issue for us, and a pain when it comes to integrating the changes in the repository. > > Means core: all in core > data: all in data except stuff already in core > plugins: all in plugins except stuff already in core and data > > For Trac that could mean that main translation is trunk and the others > only contain strings, which are not already in the others. That could be one way, but I'm currently experimenting with a single .pot file per domain (that is, tx-messages.pot, tx-messages-js.pot and tx-tracini.pot), each containing the messages gathered from *all* the branches (0.12-stable, 1.0-stable and trunk). These will be the only 3 resources (message catalog templates) pushed to Transifex. Once translated, the corresponding message catalogs (i.e. the .po files for all locales) will be pulled and split back into the different branches according to the message IDs present in the .pot file for that branch. If you would excuse my ASCII-art, the following diagrams illustrate the new operating mode. I assume we start from a folder containing all the different repositories. $ ls 0.12-stable/ 1.0-stable/ trunk/ $ cd trunk $ make merge-pots | 0.12-stable/trac/locale/messages.pot ->-. | 1.0-stable/trac/locale/messages.pot -->-| | trunk/trac/locale/messages.pot ------->-| | | | trunk/trac/locale/tx-messages.pot <-----' (that actually happens for messages-js.pot and tracini.pot as well) $ tx push (let the translators translate...) $ tx pull | trac/locale/fr/LC_MESSAGES/tx-messages.po (and all the .po for the other locales and domains) $ make unmerge-pos | trunk/trac/locale/fr/LC_MESSAGES/tx-messages.po --->-.->-.->-. | | | | | 0.12-stable/trac/locale/messages.pot -------------->-| | | | | | | | 0.12-stable/trac/locale/fr/LC_MESSAGES/messages.po <-' | | | | | | 1.0-stable/trac/locale/messages.pot ------------------->-| | | | | | 1.0-stable/trac/locale/fr/LC_MESSAGES/messages.po <------' | | | | trunk/trac/locale/messages.pot ---------------------------->-| | | | trunk/trac/locale/fr/LC_MESSAGES/messages.po <---------------' (that actually happens also for tx-messages-js.po and tx-tracini.po, but also for all the locales) > > The required task to do message extraction and joining are available as > "ant" task in JOSM repo (JOSM is Java, thus ant). But they aren't that > complicated. It is simply a set of msgmerge and similar commands. Likewise, the above merge/unmerge operations can easily be done with Babel. I implemented it using Babel 0.9.6, but it should also work with more recent versions. > > Using this approach you can even have a nightly/weekly automated > translations update (for JOSM upload is weekly, download is still called > manual, but it is a single "ant update") and translators need to > translate each string only once. We could indeed build on the above to automate things further, with a few higher-level targets: - tx-collect would do retrieve the translations and build them (tx-pull, unmerge-pos, check-all, compile-all) - tx-prepare would prepare and send the new messages to be translated (extraction-all, merge-pots and tx-push) - and finally tx-update would combine that (tx-collect, tx-prepare) > Ciao Thanks for the input! To add some meat to the proposal, I've prepared the initial scripts and added the merge-pots and unmerge-pos targets to the Makefile, in http://trac.edgewall.org/changeset/167001b0/cboos.git but there's no .tx/config change yet and nothing new on Transifex itself, yet. I'd like to get some feedback about this approach first. Then the next step would be to bootstrap the process and push the new resources and catalogs (built from the existing translations) on Transifex. Once we feel comfortable with that, we can remove the older resources. -- Christian -- You received this message because you are subscribed to the Google Groups "Trac Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to trac-dev+unsubscr...@googlegroups.com. To post to this group, send email to trac-dev@googlegroups.com. Visit this group at http://groups.google.com/group/trac-dev. For more options, visit https://groups.google.com/groups/opt_out.