Edgewall Software

Changes between Version 26 and Version 27 of TracL10N/Transifex


Ignore:
Timestamp:
Feb 10, 2015, 9:03:21 AM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • TracL10N/Transifex

    v26 v27  
    11= Transifex and Trac
    2  ''Transifex is a modern, open-source localization platform. It’s a web system which automates the translation workflow for complex international projects.''
     2
     3[https://www.transifex.com/ Transifex] is a modern, open-source localization platform. It is a web system which automates the translation workflow for complex international projects. It is the alternative to the more laborious [[TracL10N]] process, involving svn, Babel, make, etc.
    34
    45{{{#!box info
    5 This page is mainly targeted at translation team coordinators who need to synchronize the translation updates with the translation catalogs in the repository.
     6This page is targeted at translation team coordinators who need to synchronize the translation updates with the translation catalogs in the repository.
    67
    78If you just want to contribute translations by using Transifex, you can read the [#Translationteammember section for team members below] and then head directly on the [transifex: Transifex project].
    8 
    9 Even if you're a translation team coordinator, this page is perhaps not as clear as it should be, as it was written while defining the process...
    109}}}
    1110
    1211[[PageOutline]]
    1312
    14 Transifex is indeed a nice tool and can be seen as much more attractive for potential translation contributors than having to go through the somewhat complex procedure described in the [[TracL10N]] page, involving svn, Babel, make, etc.
    15 
    16 
    17 
    18 **However...**
    19 
    20 Things are not so simple, or rather, we should take an extra step to make it really as simple as it looks.
    21 
    22 The problem is that we might have **two** sources of changes, and it will make no good to anyone if the two sources are not in sync:
     13The key is to keep all sources in sync, if there is more than one:
    2314 - a Transifex translator might work on an out-of-date catalog, redoing the work the translator coordinator committed directly in the catalog file in the repository
    2415   - worse, pulling updates from Transifex and blindly committing them could lead to regressions
     
    2617   - here as well there's a risk for him to overwrite changes made by Transifex contributors if he pushes changes carelessly
    2718
    28 In the following, we'll try to present a workflow which avoids those pitfalls and enable changes to flow in both directions.
    29 
    30 See also the related discussion in Trac-dev, [gdiscussion:trac-dev:8e4PFgkabmM Trac translations and Transifex].
    31 
     19In the following, a workflow which avoids those pitfalls and enables changes to flow in both directions is described. See also the related discussion in Trac-dev, [gdiscussion:trac-dev:8e4PFgkabmM Trac translations and Transifex].
    3220
    3321== Roles
    3422
    35 Once you're familiar with Transifex (and they have some very good [http://help.transifex.com/ documentation] on their site), you can apply for membership to one translation team for a language, or create a new team if your language of choice isn't yet represented there (be aware that undertaking a new translation for Trac represents a //lot// of work).
     23Once you're familiar with Transifex (and they have some very good [http://help.transifex.com/ documentation] on their site), you can apply for membership to one translation team for a language, or create a new team if your language of choice isn't yet represented there. Be aware that a new translation for Trac represents a //lot// of work.
    3624
    3725=== Translation team coordinator
     
    3927It's much better if the translation team coordinator on Transifex is also the committer responsible for that language in the Trac project itself.
    4028
    41 As a committer, he's ultimately in charge of the synchronization work, pulling changes made by members of the translation team on Transifex and pushing back changes made directly to the repository.
    42 
    43 Here's an overview of the different teams and status.
    44 
    45 
    46 
     29A committer is ultimately in charge of the synchronization work, pulling changes made by members of the translation team on Transifex and pushing back changes made directly to the repository.
     30
     31Here's an overview of the different teams and status:
    4732
    4833||= Language name ||= Repository ||= Committer ||= Transifex ||= Coordinator ||= Push 0.12 ||= Push 1.0 ||= Push trunk ||
     
    238223
    239224 - for the languages in [#group1], the translation maintainers are primarily in charge for doing the synchronization
    240  - for [#group2] there's nothing to do (besides "normal" maintenance, of course), as long as there's no activity on Transifex
    241  - for [#group3], the translation team coordinators are invited to ask for commit privileges (and integrate [#group1])
    242  - for [#group4] the translations will be "promoted" to [#group3] (i.e. integrated in the repository) as soon as a decent coverage is reached (say > 50%)
     225 - for [#group2], there is only "normal" maintenance to do
     226 - for [#group3], the translation team coordinators are invited to ask for commit privileges and integrate [#group1]
     227 - for [#group4] the translations will be "promoted" to [#group3], ie integrated in the repository, as soon as a decent coverage is reached (say > 50%)
    243228{{{#!comment
    244229 - for the languages in [#group5]
     
    248233=== Translation team member
    249234
    250 Updating translations on Transifex is only one part of the story, since you need to get your changes integrated into the source code. For that, you need to inform the translator coordinator for your language (see [..#Translationcoordination tickets for translation coordination]). She will pull the changes from Transifex using the procedure described below, verify them, and commit them. If the translator coordinator doesn't react in due time or is not active anymore, a member of the Trac team will likely notice the activity on the ticket and he could do the same but without the language verification step, obviously.
    251 
    252 It's even a better idea to contact and discuss with the translator coordinator **before** updating the catalogs on Transifex, as some might not be up to date, and you will risk to duplicate work and make integration harder. Transifex provides all the facilities for smooth communications between team members. There's also the tickets, or plain e-mail on trac-dev@googlegroups.com or directly to the translators.
    253 
     235Updating translations on Transifex is only one part of the story, since you need to get your changes integrated into the source code. For that, you need to inform the translator coordinator for your language. See [..#Translationcoordination tickets for translation coordination]. The translator coordinator will pull the changes from Transifex using the procedure described below, verify them, and commit them. If the translator coordinator doesn't react in due time or is not active anymore, a member of the Trac team will likely notice the activity on the ticket and he could do the same, but without the language verification step, obviously.
     236
     237It's even a better idea to contact and discuss with the translator coordinator **before** updating the catalogs on Transifex, as some might not be up to date, and you will risk duplicating work and making integration harder. Transifex provides all the facilities for communication between team members. There are also the tickets, or plain e-mail on trac-dev@googlegroups.com or directly to the translators.
    254238
    255239== Synchronization with Transifex
     
    257241As discussed above, this is normally the responsibility of the translation team coordinator who has the commit permissions on the catalog files in the Trac subversion repository.
    258242
    259 Typically you'd do this for approving and committing changes if you're a translation coordinator, but even if you're not a committer you could do this if you want to prepare a patch for submitting those changes for review on a ticket.
    260 
     243Typically you'd do this for approving and committing changes if you're a translation coordinator. Even if you're not a committer, you could do this if you want to prepare a patch for submitting those changes for review on a ticket.
    261244
    262245=== Prerequisites
    263246
    264 You first need to install the [http://help.transifex.com/features/client/index.html#user-client Transifex client].
    265 
    266 Well, it's usually nothing more than:
     247You first need to install the [http://help.transifex.com/features/client/index.html#user-client Transifex client]:
    267248{{{
    268249easy_install transifex-client
    269250}}}
    270 (or one [http://help.transifex.com/features/client/index.html#getting-the-client variation of the above]).
    271 
    272 If you're on Windows, you'll also need a [https://github.com/cboos/transifex-client/tree/0.8/tx-config-posix-paths-on-windows hack]...
    273 
    274 Of course, you also need to have a [TracRepositories checkout of the source], of the branch where you want to work. [source:branches//0.12-stable] will be maintained for the foreseeable future, so you may want to continue contributing there, but [source:branches//1.0-stable] is now the official stable release branch, so don't neglect it. [source:trunk] is where the new interesting stuff happen (TracDev/Proposals/ConfigEnumTranslation?).
    275 
    276 
    277 Now let's go through a complete example. I made one update to the resource corresponding to the messages catalog on 0.12 for the [Transifex:language/fr/ French translation] (more specifically, on that page: Transifex:resource/0_12-stable-messages-pot/l/fr/).
     251or a [http://help.transifex.com/features/client/index.html#getting-the-client variation of the above].
     252
     253If you're on Windows, you'll also need a [https://github.com/cboos/transifex-client/tree/0.8/tx-config-posix-paths-on-windows hack].
     254
     255Of course, you also need to have a [TracRepositories checkout of the source] of the branch you want to work on. [source:branches//0.12-stable] will be maintained for the foreseeable future, so you may want to continue contributing there, but [source:branches//1.0-stable] is now the official stable release branch. [source:trunk] is where the new interesting stuff happen (TracDev/Proposals/ConfigEnumTranslation?).
     256
     257Now let's go through a complete example, starting from one update to the resource corresponding to the messages catalog on 0.12 for the [Transifex:language/fr/ French translation], more specifically, on that page: Transifex:resource/0_12-stable-messages-pot/l/fr/.
    278258
    279259=== Checking the status
    280260
    281 As I tried to emphasize in the previous sections, what is really important is to not **lose** translations, in one direction or the other. Well, at least on the Trac side we have version control, which doesn't seem to be the case on the Transifex side...
    282 
    283 Back to the command line, for checking the status.
    284 First thing to do is to verify that everything is correctly configured:
     261The key is to not **lose** translations, in one direction or the other. Unlike Trac, Transifex does not support version control.
     262
     263In the command line, verify that everything is correctly configured:
    285264{{{#!console
    286265cboos@linux:~/trac/0.12-stable$ tx status
     
    332311}}}
    333312
    334 
    335 A very important preparation task that must be done before pulling is to make sure the .po file was updated. Even if you think it must be because there are no local changes, it's a good idea to `make update-..` (`fr` in this example). Perhaps the Babel version you're using at the moment is different from the one which was used before the last version was committed, or a manual change was done at the last minute, etc.
     313A very important preparation task that must be done before pulling is to make sure the `.po` file was updated. Even if you think it must be because there are no local changes, it's a good idea to `make update-..` (`fr` in this example). Perhaps the Babel version you're using at the moment is different from the one which was used before the last version was committed, or a manual change was done at the last minute.
    336314
    337315Doing a catalog update ensures that we have a "normalized" content to compare with  the version of the catalog pulled from Transifex, after the latter has been "normalized" as well by another Babel update, as the automatic formatting done by Transifex is completely different.
     
    339317Make sure to "freeze" that updated Trac version, by making a commit in a local branch (if you use git or hg) or even a "maintenance" commit in Subversion.
    340318
    341 
    342 === Pulling the French catalogs from Transifex #pull-example
    343 
    344 Now, before pulling changes from Transifex, **make sure you have no local modifications to the catalogs you're about to update**. Otherwise, those local modifications will be lost (well, on Windows at least; seems that on Linux it manages to make better checks with the timestamps between the local file and the file on the server).
     319=== Pulling the catalogs from Transifex #pull-example
     320
     321Now, before pulling changes from Transifex, **make sure you have no local modifications to the catalogs you're about to update**. Otherwise, those local modifications will be lost, on Windows at least; seems that on Linux it manages to make better checks with the timestamps between the local file and the file on the server.
    345322
    346323Once you made sure you have no pending local modifications, you may now pull:
     
    358335==== Examining the changes
    359336
    360 If at this point you want to check the difference ... good luck!
    361 Transifex introduces a bunch of unrelated formatting changes in the translations, folding multiple lines into one, etc.
     337If at this point you want to check the differences. Transifex introduces a bunch of unrelated formatting changes in the translations, folding multiple lines into one, etc.
    362338
    363339You can get rid of these spurious changes by doing an update with Babel, which can be seen as a kind of "normalization" step:
     
    371347}}}
    372348
    373 Now the changes are hopefully much more significant:
     349Now the changes should be much more significant:
    374350{{{#!diff
    375351diff --git a/trac/locale/fr/LC_MESSAGES/messages.po b/trac/locale/fr/LC_MESSAGES/messages.po
     
    417393}}}
    418394
    419 It's a good idea to get rid of the changes in the first hunk. With git, it's easy:
     395It's a good idea to get rid of the changes in the first instance. With git, it's easy:
    420396{{{#!console
    421397cboos@linux:~/trac/0.12-stable> git checkout -p
     
    466442}}}
    467443
    468 Note that you can also do `make diff` for a more up-to-the-point output (`make diff vc=git` if you're working in a git checkout).
    469 
    470 ==== Do something with those changes...
    471 
    472 ... do whatever you wish, for example commit the changes to the source with an appropriate log message, **but**, please!, before that:
    473  - remember to check your catalog with `make check` (here, `make check-fr`)
    474  - remember to check your catalog by compiling it (here, `make compile-fr`)
    475 
    476 Once you're done, make sure you **push back** the changes to Transifex.
    477 See the other example below.
    478 
    479 === Pushing local modifications of the French catalogs to Transifex #push-example
     444Note that you can also do `make diff` for a more up-to-the-point output: `make diff vc=git` if you're working in a git checkout.
     445
     446==== Do something with those changes
     447
     448You can do whatever you wish, for example commit the changes to the source with an appropriate log message, **but**, please!, before that:
     449 - remember to check your catalog with `make check`, here: `make check-fr`
     450 - remember to check your catalog by compiling it, here: `make compile-fr`
     451
     452Once you're done, make sure you **push back** the changes to Transifex. See the other example below.
     453
     454=== Pushing local modifications of the catalogs to Transifex #push-example
    480455
    481456After committing changes to the message catalog, it's a good idea to push those changes to Transifex so that other contributors can see these changes.
    482457
    483 Even if you just pulled changes from Transifex (coming from the other example above), you most certainly did  local adaptations like the removal of the spurious metadata changes, or small fixes, then you should also push those changes back to Transifex the same way, as Transifex **won't** pick up the changes made to the translated catalogs from the repository (it will do that for the catalog templates though, so the latter are always up-to-date).
     458Even if you just pulled changes from Transifex (coming from the other example above), you most certainly did local adaptations like the removal of the spurious metadata changes, or small fixes, then you should also push those changes back to Transifex the same way, as Transifex **won't** pick up the changes made to the translated catalogs from the repository. It will do that for the catalog templates though, so the latter are always up-to-date.
    484459
    485460But if you didn't do a pull just before, doing a push //might// overwrite changes contributed to Transifex, so you should be careful. The safest thing to do is to simply  do a pull first, normalize the changes by running `make update-..`, compare, and //only then//, if there are no changes but spurious ones in the metadata in the comments in the header, revert those spurious changes and do the push of your committed state. If the changes were significant, you're simply back to the [#pull-example] situation described before.
     
    525500
    526501== Notes about the Transifex "Releases"  #Releases
    527 Transifex is not exactly clear if a release should be a line of development (branch) or a given released version. It supports both and let you choose to organize you the way wish.
    528 
    529 I opted to make the "releases" match our maintenance branches, and not individual releases (well, we still have a [Transifex:r/012-stable-3/ few of these], as apparently you can't delete a release).
    530 
    531 The downside is that string freeze periods and release dates will need to be adjusted constantly on the same release. The alternative, creating a new "release" for each actual version we release bears as much overhead (more even, are there's no //copy// operation) and doesn't bring any benefit besides keeping a record of the versions we made, record that we obviously maintain here anyway in the [/roadmap].
    532 
    533 OTOH, the big benefit is that all the links from t.e.o to Tx won't need to be updated after each minor release. The only updates needed will be at the occasion of introducing a new major release (i.e. for 1.2).
     502
     503Transifex is not exactly clear if a release should be a line of development (branch) or a given released version. It supports both and let you choose to organize the way you wish.
     504
     505I opted to make the "releases" match our maintenance branches, and not individual releases; well, we still have a [Transifex:r/012-stable-3/ few of these], as apparently you can't delete a release.
     506
     507The downside is that string freeze periods and release dates will need to be adjusted constantly on the same release. The alternative, creating a new "release" for each actual version we release bears as much overhead (moreover, are there's no //copy// operation) and doesn't bring any benefit besides keeping a record of the versions we made, record that we obviously maintain here anyway in the [/roadmap].
     508
     509On the other hand, the big benefit is that all the links from t.e.o to Tx won't need to be updated after each minor release. The only updates needed will be when introducing a new major release (i.e. for 1.2).