[PATCH 0 of 7] Gettext infrastructure and Danish translation

Matt Mackall mpm at selenic.com
Fri Aug 22 12:27:29 CDT 2008


On Fri, 2008-08-22 at 17:16 +0200, Martin Geisler wrote:
> Problems:
> 
> * Many short strings make little sense in isolation, but this is
>   difficult to fix.
> 
> * Some strings use abbreviations ('repo', 'rev') which can be
>   difficult to carry over.

Probably shouldn't? If you translate the 'jargon', you're going to have
to consistently translate all the documentation sources.

> * Some strings build larger strings from smaller pieces, such as this
>   one from mercurial/commands.py:2208:
> 
>     ui.warn(_('not removing %s: file %s (use -f to force removal)\n')
>             % (m.rel(f), reason))
> 
> * Much of the help is in docstrings -- and pygettext.py can extract
>   those. But we don't want to translate all docstrings...

I was worried about extracting those. We'll need a bit of smarts in
help() for this too, no? I think we only care about commands.py and
extensions?

>   Also, the record extension runs *part* of a docstring through _()
>   which is clever, but not such a good idea from a translation point
>   of view.

?

> * If this goes in, all tests should be run in the C locale to ensure
>   deterministic output.

Not a bad idea.

> * The dist target in the Makefile should probably depend on the
>   update-pot target.
> 
> * It needs testing :-) I don't know if the py2exe stuff works...
> 
> 
> But please give it a try and let me know what you think! You can
> create a new language by going to the po directory and running
> 
>   msginit -l xx
> 
> where xx is your language code (not country code: da vs dk). Then edit
> away and run
> 
>   make update-mo
> 
> from the root to compile the .po file into a .mo file. Then set
> LANG=xx and run hg.

Looks promising.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list