[stephan k.] gettext to return unicode isntances
This commit is contained in:
		
							parent
							
								
									12ef793d54
								
							
						
					
					
						commit
						40c17be36a
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -36,7 +36,7 @@ def init():
 | 
			
		|||
def _(s):
 | 
			
		||||
	if s == '':
 | 
			
		||||
		return s
 | 
			
		||||
	return _translation.gettext(s)
 | 
			
		||||
	return _translation.ugettext(s)
 | 
			
		||||
 | 
			
		||||
def Q_(s):
 | 
			
		||||
	# Qualified translatable strings
 | 
			
		||||
| 
						 | 
				
			
			@ -59,7 +59,7 @@ def ngettext(s_sing, s_plural, n, replace_sing = None, replace_plural = None):
 | 
			
		|||
	
 | 
			
		||||
	in other words this is a hack to ngettext() to support %s %d etc..
 | 
			
		||||
	'''
 | 
			
		||||
	text = _translation.ngettext(s_sing, s_plural, n)
 | 
			
		||||
	text = _translation.ungettext(s_sing, s_plural, n)
 | 
			
		||||
	if n == 1 and replace_sing is not None:
 | 
			
		||||
		text = text % replace_sing
 | 
			
		||||
	elif n > 1 and replace_plural is not None:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue