rdio / vernacular

MIT License
170 stars 42 forks source link

Entry: new resx-template option #24

Open StephaneDelcroix opened 12 years ago

StephaneDelcroix commented 12 years ago

Specifying the resx-template option, along with the -g resx generator, allows to create files, from translated .po's for aspx consumption.

Let's say you have a login.aspx.resx file used by asp.NET globalization. You first prepare a .pot as translation template:

vernacular -i login.apsx.resx -g po --pot -o login.pot

At some point in time later, you get a fully translated login page in, say, French, named fr.po. If we convert it at this point back into a resx, we'll have vernacular generated ids, unsuitable for asp.NET. But we can use our original file as template, to generate the right ids:

vernacular -i fr.po --resx-template login.aspx.resx -g resx -o fr.aspx.resx

That's it.