[PATCH 0 of 1] replace Python standard textwrap by MBCS sensitive one for i18n text

Martin Geisler mg at lazybytes.net
Wed May 19 08:54:03 CDT 2010


Martin Geisler <mg at lazybytes.net> writes:

> On May 18, 2010 4:15 PM, "FUJIWARA Katsunori" <fujiwara at ascade.co.jp> wrote:
>
> Hi, Martin.
>
> At Tue, 18 May 2010 00:20:01 +0200,
>
> Martin Geisler wrote:
>
>> > So, this patch introduces "filltext"/"wraptext" hook points in i18n.py
>> ...
> I does not use util.wrap() from other which are using textwrap
> directly, only becuase util.wrap() currently lacks distinction between
> initial_indent and subsequent_indent as textwrap does.
>
> So, it is ok to centralize wrapping text functionality into
> util.wrap() with some extension for indentation.

Okay, so I think we should enhance util.wrap to be correct for
multibytes and add another function in util there which does that your
i18n.filltext and i18n.wraptext functions did. I don't think they should
be in i18n since they don't have anything to do with translation.

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://aragost.com/mercurial/


More information about the Mercurial-devel mailing list