i18n: beginnings of a Danish translation

Martin Geisler mg at daimi.au.dk
Thu Jan 15 13:34:54 CST 2009


Matt Mackall <mpm at selenic.com> writes:

> On Thu, 2009-01-15 at 15:29 +0100, Martin Geisler wrote:
>> # HG changeset patch
>> # User Martin Geisler <mg at daimi.au.dk>
>> # Date 1232029722 -3600
>> # Node ID be7dd1e073716ada34a04a9e40c2450ea9f3682d
>> # Parent  0173d4706f6bc7b78fd62da1a7980e1da0a0ffed
>> i18n: beginnings of a Danish translation
>
> Queued.
>
> Still seems to be a piece missing. I need to type 'python setup.py
> build_mo' rather than just 'make local' to get 'LANG=da hg help add'
> to talk funny.

Hehe... :-) Anyway -- that would be because 'make local' calls the build
subcommands directly instead of calling build. I've sent a tiny patch.

> Also, we need to document the best way to turn off l10n, if indeed
> want to default to on. That's not completely clear as it has both
> compatibility and performance impacts:
>
> $ hg perfstartup
> ! wall 0.049808 comb 0.000000 user 0.000000 sys 0.000000 (best of 100)
>
> $ LANG=da hg perfstartup
> ! wall 0.083391 comb 0.000000 user 0.000000 sys 0.000000 (best of 100)
>
> Almost all of that is imports that we normally don't need.

As for Python module imports, then I believe the code does the same
imports as before.

The difference is that the code now loads a 26 KiB hg.mo file and parses
it into a GNUTranslations class instead of a NullTranslations class.
This involves a lot more work... and most of it is sadly wasted when we
only ever use a couple of the strings in a given invocation.

Maybe we could find a better format to save the translations in?

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20090115/8a8bff8b/attachment.pgp 


More information about the Mercurial-devel mailing list