No Subject

Shaun McCance shaunm at gnome.org
Mon Apr 5 20:04:30 UTC 2010


On Tue, 2010-04-06 at 00:04 +0530, Anirudh Sanjeev wrote:
> Hi Shaun!
> 
> Excerpts from Shaun McCance's message of Mon Apr 05 23:23:48 +0530 2010:
> > Is this something that could just be built into Yelp, perhaps
> > as a plugin? I've already talked with other documentation teams
> > about making Yelp able to query the package manager for extra
> > documentation.
> I don't see why this shouldn't be a problem. In fact, it'll save me a lot
> of trouble. I will prod the source of yelp today.
> Does it rely on an embedded Webkit/Gecko system to display the text, or
> pure Pango/Cairo?

Yelp 2 uses Gecko. Yelp 3 uses WebKit. There are no Yelp 3 releases
yet, but it is what's in git master. Yelp has a transformation API
called YelpDocument for reading documents in different formats and
spitting out XHTML. New formats are implementations of the base
class. The API handles DocBook, Mallard, man, info, search, and
TOC listings.

If you just use Mallard, then it will just work for free. I have
been toying around with a single-file format for Mallard, which
I've tentatively called "flock files". They'd basically be a zip
containing a cache, the pages, and any media or other supporting
files. This could be useful for systems like this, where you want
to download a document from the web.

> > The text portion is the easy part for translators. Taking
> > new screenshots is the hard part. Note that translators
> > aren't usually the expert users that the writers are, so
> > they might have to do a lot of setup to get to the point
> > where they can take equivalent screenshots.
> One ridiculously ugly hack I can think of is to use gconf to modify the
> language each time the "take screenshot" button is pressed so the Desktop
> switches to individual languages and takes a screenshot for each one of
> them. Since Gnome doesn't need to restart for applying language changes (or
> I think it doesn't, based on my little experience with this functionality),
> this _just_ might work.

It doesn't switch languages on the fly, in fact. It's one of
the few things that can't be changed without logging out and
back in. That's because language is set by a (standard) set
of environment variables, and there's no way to change those
out from underneath a running process.

This has been discussed in the past. We could do something with
XSettings. But there's a lot of thorny issues with particular
applications. A lot of applications (including Yelp) do a lot
more with the language than just gettext lookups, and those
programs are usually written with the assumption that language
doesn't change at run-time.

> I was also considering using OCR in the long term to identify the content
> on the screen and make it searchable, so you can search for individual menu
> items and tutorials that feature it will turn up. Maybe this can be
> employed to help with translations.

That would be amazing. And definitely not easy.

--
Shaun McCance
http://syllogist.net/







More information about the ubuntu-doc mailing list