Fridge and UWN translations through Rosetta?

Danilo Šegan danilo at canonical.com
Mon Aug 21 08:50:56 BST 2006


Hi Jan,

Yesterday at 17:33, Jan Vancura wrote:

> ATM, I have no clue where to start (I suppose I need a way to generate
> PO files of each), so any help is welcome. My reply may be delayed, as
> I'm not here next week.

Yes, we'd need a POT ("PO Template") file for each.  They are really
simple text files looking like:

    #: weekly10.xhtml:6(h2)
    msgid "Ubuntu Weekly Newsletter - Issue 10"
    msgstr ""

    #: weekly10.xhtml:11(h3)
    msgid "In This Issue"
    msgstr ""
...

So, you need a way to extract small, self-contained units of text to
be translated separately (i.e. you don't want to split in the middle
of sentences).

How are you going to do this depends entirely on you (do you want to
write separate wiki syntax parser? use existing tools and hack around
them?).  

For example, for the following:

  https://wiki.ubuntu.com/UbuntuWeeklyNewsletter/Issue10

I separated <div id="content"> into a new file weekly10.html,
transformed it to well-formed XML using:

  xmllint --html --xmlout weekly10.html > weekly10.xhtml

and then processed it with xml2po:

  xml2po -a -o weekly10.pot weekly10.xhtml

to get a weekly10.pot which can then be imported into Rosetta.


Still, the problem of export remains (well, with xml2po you can still
get translated XHTML files you started with, but you probably want
wiki syntax instead).  So I figure you'd need to write a separate tool
to work with MoinMoin syntax, or switch to some form of XML inside Wiki
instead.

I'd be glad to help with this.


Cheers,
Danilo



More information about the launchpad-users mailing list