[Sugar-devel] playing w/ i18n
bryan at olenepal.org
Thu Jul 2 08:36:40 EDT 2009
i think it is key that we can mark strings as translatable without
making the html invalid.
I like the idea of picking up certain tags by default like title, meta
tags, and then picking up h1, h2, etc. unless they have the lang=""
attribute specified. Then it would be nice to pick up everything else
that belongs to the class="translate". What u think?
I am looking thru src of html2po and it appears that the primary fault
is that it uses the horrible HTMLParser.py webunit.HTMLParser.py
instead of something more sane like lxml or beautiful soup
it may be easier to swap out HTMLParser for lxml than improve html2po on
top of HTMLParser
I will play w/ lxml and html2po to see what i can work out.
re: beautiful soup vs. lxml . My heart is w/ lxml, enjoyed working w/ it
before and seems to have better css selectors than beautiful soup.
tks again for your help sayamindu!
On Thu, 2009-07-02 at 16:54 +0530, Sayamindu Dasgupta wrote:
> I did a little tweaking of html2po to get http://pastebin.be/19509
> The label tags need to be fixed - but apart from that I think the rest
> of that is OK. May be we can try and build upon html2po and see how it
> works out.
> 2009/7/2 Bryan Berry <bryan at olenepal.org>:
> > subzero,
> > i have been having a lot of discussions about i18n w/ the ever patient
> > sayamindu and reading a lot on the subject. However, I haven't
> > accomplished much. Here is my current playground
> > http://karma.sugarlabs.org/yes_no/
> > am currently wrangling how to generate a meaningful po file from an html
> > page.
> > --
> > Bryan W. Berry
> > Technology Director
> > OLE Nepal, http://www.olenepal.org
> > _______________________________________________
> > Sugar-devel mailing list
> > Sugar-devel at lists.sugarlabs.org
> > http://lists.sugarlabs.org/listinfo/sugar-devel
Bryan W. Berry
OLE Nepal, http://www.olenepal.org
More information about the Sugar-devel