Message 47503 - Python tracker

Message47503

Author nobody
Recipients
Date 2005-09-22.07:45:54
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: NO 

Code review....   
   
1.  
You have a few lines like :  
s = '%s' % ' '.join(newlines)  
Surely that is the same as just:  
s = ' '.join(newlines)  
  
2.  
You use the single line option value as part of the key in __messages  
dictionary. That means that the output will have duplicate msgid values  
if your source contains both _normal('hello world') and _single('hello 
world'). Other GNU gettext tools assume that there will not be 
duplicates.  
 
(assuming --keyword=_normal --keyword-single=_single) 
  
3.  
You also get duplicates for:  
  
_single("""this is one line  
and this is another""")  
  
and  
  
_single("""this is one line and  
this is another""")  
  
because normalization is performed just before output. Unless Im  
missing something, I think the right solution to these two problems is  
to normalize before calling __addentry, and leave the key to   
__messages as it was originally.  
  
  
  
History
Date User Action Args
2007-08-23 15:41:13adminlinkissue1098749 messages
2007-08-23 15:41:13admincreate