Who are we?

We are a group of enthousiastic people working for Nedap, a Dutch company with a single goal: solve problems.

« ActiveResource: REST, WSDL, XSD? | Main | Sort, sort_by and group_by »

Solving PO translation conflicts

If your using gettext in an svn environment, you probably have had the following problem: You and your colleague add some code and some translations. Now you check in your work. What will happen is that the last one o the two who checked in has a major problem. He has a conflict in the po and mo, as they differ. But his mo and po are also completely wrong, as they are based on a now old version of your application. To make things worse, subversion does an extremely bad job in resolving this, as it tries to juggle the three versions.

Luckally I added something to the latest version of my gettext generators plugin: the svnmerge rake task. It works as follows:

 rake gettext:pomerge FOLDER=/po/nl-NL/ APP=moves VER1=mine VER2=r318

What this does is create a new po and mo file so that they reflect you current mess. It then fills the new po translation with translations coming from the two conflicting versions (the mine and the r.318) in this example. It does this by using msgmerge in a smart way (so you need msgmerge for this).

After this is done, mark your po, pot and mo as resolved, run rake gettext:makemo and check your source in with a smile.

This was brought to you live from the lounge of Railsconf europe 2007 :).

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments (5)

You also have a complete line of replica watches to choose from to suit your various needs - from the reasonably priced Caravelle line to the signature Bulova, from the sporty Accutron to the dressy Wittnauer Swiss. Fossil fake watches are best known for their affordable designer swiss watches for urban professionals with the ability to surprise you with its designs.

September 24, 2010 | Unregistered Commenterfdsaf

Post very nicely written, and it contains useful facts. I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement. Thanks for sharing with us.hermes replica handbags

November 24, 2010 | Unregistered CommenterMargaret

Finding the Cheap Plus Size Prom Dresses is moderately easy if you plan ahead. Most girls will want a unique perfect cheap Long Prom Dresses.
About Prom Dresses 2012. Aside from a wedding dress, one of the most important ... with a rayon or silk skirt that reaches the floor. The bodice is a snug corset. ... Cheap Cocktail Dresses to Find Inexpensive Prom Dresses in Atlanta ...

July 20, 2011 | Unregistered CommenterRed Prom Dresses

the designs and Air Jordan Flight 45 styles that beach footwear come in continue to vary. A while back, Ugg Boots Outlet Sale if you wanted beach footwear you had to choose between the flip-flop Nike Shoes Cheap and the Birkenstock.

November 1, 2011 | Unregistered CommenterNike Blazer Sb

Replica handbags will be the most popular handbags. To be able to havereplica lv 2011, i highly recommend you mouse clickreplica lv), I uncoveredlouis vuitton wallets replicaround this webpage will be most economical plus top of the line, you will realise an array of best replica handbags, desired to that save, enjop you!!!

December 6, 2011 | Unregistered CommenterCrystal

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>