Thanks for your reviews.

I asked the help to update the current patch with the suggestions below 
yesterday.

 >> I don't understand the question.  My question is why not just use _() all
 >> > the time?  You install it once, with gettext.install() when the program
 >> > first starts up, and then you have _() in the builtin dictionary in all
 >> > modules from there on out.
 >
 > Ah, thanks for pointing out this. Let's gettext.install() is removed.

 >> No, those are two different statements.  I'm simply saying that if you've
 >> > got an expression that's enclosed in parentheses, it can span multiple
 >> > lines without needing the backslash to indicate continuation.
 >
 > OK, I understood you're talking about the coding style which originally 
 > exists.
 > The backslash will be removed.
 >

 >> Why is it needed here and not everywhere else?  The lack of consistency is
 >> > incredibly confusing.
 >
 > I'd like to change all parts to gettext.textdomain().
 > The default _ is gettext.translation(domain, localedir).gettext and it's not 
 > useful for me when I try to get the default domain with 
gettext.textdomain(None)
 >
 > gettext.textdomain (domain)
 > gettext.bindtextdomain (domain, localedir)
 > _ = gettext.gettext

Thanks,
fujiawra

Danek Duvall-san wrote (10/29/08 02:48 PM):
> On Wed, Oct 29, 2008 at 12:19:58PM +0900, Takao Fujiwara - Tokyo S/W Center 
> wrote:
> 
>> OK, I see. I thought you were convinced since you didn't reply the previous 
>> mail.
> 
> No, I didn't understand it, so I spent some time tracing the python code to
> try to figure out what you meant.
> 
>> When the argument of C-version textdomain(3) is NULL, the behavior is 
>> defined and then the compatible functions are needed in Python 
>> applications.
>>
>> E.g.
>> current_domain = textdomain (None)
>> open (something + current_domain + ".txt", "r")
>> print dgettext (current_domain + "-lib", "msgid")
> 
> So you need to retrieve the current domain because you're going to alter it
> in some cases to retrieve other messages.  That wasn't at all clear.
> 
> I don't see anywhere you're actually doing that, though.  Nor do I
> understand why you'd want to do that.  (I can hazily imagine some things,
> but I'd appreciate a real use-case.)
> 
> I do see, however, how what the docs call the "class-based API" doesn't
> allow you to do this (at least, not by default), and how the "GNU gettext
> API" does.
> 
> So what I think I need to know now is what domains you're expecting to use
> in the various pkg(5)-related apps, and in the modules they use.  From
> that, I may be able to figure out how to make the code to manipulate all
> this stuff more consistent across the .py files.
> 
> Thanks for walking me through this -- I think I'm beginning to understand
> this (though that's usually the first sign that I understand nothing at
> all).
> 
> Thanks,
> Danek
> 

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to