[pyddr-discuss] gettext support

Carles Pina i Estany carles at pina.cat
Mon Feb 4 15:08:45 EST 2008


Hello Pavel,

On Feb/03/2008, Pavel N. Krivitsky wrote:

> Glad to hear pydance is working for you. The main developer had moved
> on to other projects, so I've kind of taken over by default, and the
> development has been a bit slow, but there are some new features in
> the development version*, and one of these days, I'll put together the
> next release.

ok, I understand

> > We missed something: a translation to Catalan. I looked on the code and
> > I have not seen gettext (or other systems) support. I have read some
> > documentation and even the loooong TODO list and I have not found it.
> > 
> > The question is: pydance hasn't gettext support because you have been
> > doing other things or because you thought and dismiss for some reason.
> 
> Just doing other things. We've talked about it before (in the IRC
> channel), but never got around to it.

I've already started :-)

> > Since we are interested on it, and I code in Python often, we would be
> > interested to add and we would work on it.
> 
> Such a feature would be very welcome, as long as it doesn't clutter
> things up or slow things down too much. Some notes:
> - Class TextDisplay can adjust font size to have the text (whatever it
> is) fit into a box of specified size; this should be useful, since
> different languages would have strings of different lengths.

ok, I will look on it too. No problem.
We will see if in "phase 0" (or iteration 0, or whatever) is enough with
gettext support without resize the letteres. All programs has this
problem, translators are used to try to use the same space (yes, I know,
in graphics things this can be worst)

> - Most of the text is "implemented" as strings which are rendered as
> needed, but some (particularly the "Ready?" "Go!" text that pops up in
> the beginning of the song) are pre-rendered images. I don't know whether
> those can be internationalized, and how.

Well, to avoid rendering text inside pydance (we could have the string
and render it to image starting up... but then we would need more
dependencies...) we can have some PNG file for each language (like
images/go-ca.png, images/go-es.png, etc.) (maybe a script using
imagemagic would be nice to generate this graphics for each language,
not in execution time but offline... but I think that this is Iteration
1 or 2 :-) )

> - A recent commit to the development version* changed the default font
> to one that implements more of the Unicode characters (whether we are
> going to ship it with pydance, or make it a dependency is still
> undecided). This should make it possible to internationalize to
> non-Indo-European languages as well.

good!

> * --- Subversion repository at
> http://kai.vm.bytemark.co.uk/svn/pydance/trunk/pydance

checked out

Maybe I can have a running version in some days, it depends of some
other things (without TextDisplay). My initial tests has been
satisfactories.

Thanks for your notes, are very usefull,

-- 
Carles Pina i Estany		GPG id: 0x8CBDAE64
	http://pinux.info	Manresa - Barcelona



More information about the pyddr-discuss mailing list