Re: Translations workflow

Jean-Philippe Braun <jpbraun-4qZELD6FgxhWk0Htik3J/[email protected]> Wed, 11 May 2011 19:26:45 +0200
Newsgroups gmane.linux.mandrake.cooker.internationalization
Message-ID <[email protected]>
Le mercredi 11 mai 2011 à 19:25 +0300, Marek Laane a écrit :
> 
> 
> 2011/5/11 Jean-Philippe Braun <jpbraun-4qZELD6FgxhWk0Htik3J/[email protected]>
>         Hello all,
>         
>         Since Transifex has been setup I think we need to agree on a
>         new
>         workflow for translations.
>         
>         First I think that Transifex has to be the main source for
>         translations
>         because translations will be submited there. This is what
>         Transifex is
>         made for, right?. The svn needs to reflect what we have in
>         Transifex. As
>         I said in some other mail, submitting new strings in svn and
>         not in
>         Transifex (and the opposite) will diverge the svn and
>         Transifex and
>         then, the merge of the two will be painful..
>         
>         So basically what I propose is simple :
>         translator -> Transifex -> svn -> package -> distrib
>         
>         Next the question is in this case, how do we commit PO files
>         to the svn.
>         It can be done manually but given the fact Transifex has some
>         command-line tools to fetch translations from it, I think it
>         is possible
>         to automatize this task. We are all busy no ? ;-)
>         
>         My idea is to 'record' all new translations done and commit
>         every day
>         the files that needs to be updated in the svn from Transifex
>         automatically.
>         
>         Based on that it will be also possible to add a validation
>         step before
>         the commit if needed. But I don't know if it's really usefull
>         
>         So in my idea the basic process is :
>         1. someone add/change some translation string in Transifex
>         2. the translation string is saved in a queue with other
>         information :
>         language, resource (mdkonline.pot for example), translator,
>         date,
>         status="new"... (all of this will be used to determine which
>         file needs
>         to be updated)
>         3. a cron job (script) that runs every day (for example),
>         checks if
>         there is new translations to commit in the svn (aka
>         translations with
>         status="new" in the queue)
>         4. the script determine what ressource for which language
>         needs to be
>         fetch from transifex and then fetch the PO file
>         5. finally the script commit the file
>         6. set the status as "commited"
>         
>         So that's for my proposal
>         
>         What do you think ?
>         
>         JP
>         
> 
> That's mostly very nice approach and I really welcome it. I've just
> one concern: translation history or infamous "information in
> translation file header". It's traditionally the place where is
> recorded previous translators with names, email addresses and years
> they contributed. For example, Lokalize (excellent tool for
> translating offline) updates it automatically based, of course, on
> information you provide. Transifex just deletes all that and replaces
> with some template. It's not very big concern for me particularly
> because I've been sole translator to Estonian some eight years now but
> AFAIK there are bigger teams which may have quite a big list of
> contributors recorded in the header. It would be so very un-nice to
> just throw them away (I'm even unsure is it in concordance with GPL or
> other free software licenses or at least with spirit of them).
> But wanting to be not thoroughly negative, I've a thought (which,
> though, I don't know is realizable): could we add same information to
> the field "Translators" in the translation file - which, of course,
> means, such a field has to be in every file (IINM just now it is only
> in drakconf or at least not all files have it).
> 
> 
> Marek Laane
> 
> 

Yep I forgot to talk about that

I understand that throwing away the history of translators is not nice.

Actually what does basically Transifex when it export a PO file, it
takes the source language file (usually an english POT file) and fill
the msgstr "" strings with the corresponding language you want to
export. So the template and the comments you get in the PO file are the
ones of the POT file

We can't include the history of all translators for all languages in the
POT file because it is not sure that the POT file will be included in
the rpm package and usually when the developpers generate a POT file the
old one is deleted. So we can't keep the history here.

With the VSC integration I've proposed, my solution would be to store
the history of translators for each resource for each language. So when
a commit needs to be done, we take the PO from transifex and append the
history to the begining of the file before comiting the file in the svn.
With that approach the history could be also updated automatically as we
know who has done what in transifex. So adding a user name + email +
date to the history should be doable

JP