[Freeipa-devel] Localization patches.

Pavel Zůna pzuna at redhat.com
Thu Feb 17 19:51:05 UTC 2011


On 2011-02-17 05:09, Rob Crittenden wrote:
> Pavel Zůna wrote:
>> My efforts in fixing localization all around the framework and preparing
>> it for localizing docstrings have resulted in a lot of patches. Because
>> I understand they have become a bit hard to track, I decided to post
>> them all together in this thread to make review easier.
>>
>> After this is committed, there will be one more patch that switches
>> xgettext for pygettext. Then hopefully, we'll be pretty much set when it
>> comes to i18n.
>>
>> Pavel
>
> Patch 81 isn't applying for me.
>
> Help is not working for me either, this is due to patch 80.
>
> $ ipa help user
> ipa: ERROR: NameError: global name '_' is not defined
> Traceback (most recent call last):
> File "/home/rcrit/redhat/freeipa-version/ipalib/cli.py", line 1087, in run
> api.finalize()
> File "/home/rcrit/redhat/freeipa-version/ipalib/plugable.py", line 619,
> in finalize
> plugin_iter(base, (magic[k] for k in magic))
> File "/home/rcrit/redhat/freeipa-version/ipalib/base.py", line 397, in
> __init__
> sorted(members, key=lambda m: getattr(m, name_attr))
> File "/home/rcrit/redhat/freeipa-version/ipalib/plugable.py", line 608,
> in plugin_iter
> plugins[klass] = PluginInstance(klass)
> File "/home/rcrit/redhat/freeipa-version/ipalib/plugable.py", line 585,
> in __init__
> self.instance = klass()
> File "/home/rcrit/redhat/freeipa-version/ipalib/plugable.py", line 184,
> in __init__
> self.doc = _(inspect.getdoc(cls))
> NameError: global name '_' is not defined
> ipa: ERROR: an internal error has occurred
>
> Patches 69, 71 and 73 are still working fine.
>
> What is switching from xgettext to pygettext going to do?

This was answered by John Dennis: xgettext doesn't parse python docstrings.

>
> rob

Rebased version of 81 attached. It should also fix the traceback you're 
getting.

Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pzuna-81-2-fixlocstrings.patch
Type: application/mbox
Size: 17314 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110217/003c4a21/attachment.mbox>


More information about the Freeipa-devel mailing list