[PATCH 00 of 17] Mass marking of strings for translation

Martin Geisler mg at daimi.au.dk
Sat Aug 30 06:56:13 CDT 2008


"Benoit Boissinot" <bboissin at gmail.com> writes:

> On Sat, Aug 23, 2008 at 10:55 PM, Martin Geisler <mg at daimi.au.dk> wrote:
>
>> * Patch 3 marks strings in helptable for translation and runs
>>   extension docstrings through gettext.
>
> Does it have a runtime impact ?

The module docstrings are only run through the _ function when the help
command is called, so that should not affect performance in general. The
text in the helptable is now always run through the _ function like all
other text strings.

In the case where no translation exists (this is determined then the
i18n module is first imported), the _ function is really the bound
gettext method on a NullTranslations object, which does is a nop-op:

    def gettext(self, message):
        if self._fallback:
            return self._fallback.gettext(message)
        return message

Here self._fallback is None. So the speed impact should be tiny.

>> * Patch 4 marks strings in Mercurial for translation.
>>
>> * Patch 5--17 marks strings in the extensions. They should be trivial,
>>  if a bit tedious, to verify :-)
>>
>> Please note that these patches are independent of the actual Gettext
>> infrastructure I have propsed in my other patchbombs. So I hope
>> someone will accept them.
>
> Can you put them online ? (for example in bitbucket) Especially
> patches 4-17 (they are rather uncontroversial)

You mean so that you can pull from a repository instead of applying them
From the emails?

I have now created a patch queue on bitbucket, please qclone this:

  http://www.bitbucket.org/mg/hg-i18n-patches/

I could not figure out how MQ works on bitbucket until I read this
guide:

  http://ches.nausicaamedia.com/articles/technogeekery/using-mercurial-queues-and-bitbucket-org

-- 
Martin Geisler

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


More information about the Mercurial-devel mailing list