[Freeipa-devel] [PATCH] 698 Translate exception messages

Rob Crittenden rcritten at redhat.com
Tue Feb 1 22:36:52 UTC 2011


Pavel mentioned this morning that translations didn't seem to be 
working. I remembered that I did some things on the cli so I re-tested. 
Turned out that exceptions aren't being translated.

I'm not at all sure this patch does the right thing, so take it with a 
grain of salt. What it does is translates the message before stuffing it 
into the exception.

Note that this will also translate messages returned via XML-RPC so I 
wonder if we need to force LANG to en_US.UTF-8 there.

In any case, this seems to fix the client side anyway. I'm open to 
criticism on this one.

To test do something like:

$ kinit admin
$ export LANG=es_US.UTF-8
$ ipa user-add --first=Kermit --last=Frog kfrog
$ ipa user-add --first=Kermit --last=Frog kfrog

You should get a DuplicateEntry() response in Spanish.

rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-rcrit-698-translate.patch
Type: text/x-diff
Size: 1588 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110201/287511cb/attachment.bin>


More information about the Freeipa-devel mailing list