Locale: Deal with locale initialisation more safely
This commit is contained in:
		
							parent
							
								
									0049cfbd3c
								
							
						
					
					
						commit
						2c8f219c50
					
				| 
						 | 
					@ -34,8 +34,8 @@ import Configuration
 | 
				
			||||||
import Exceptions
 | 
					import Exceptions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import locale
 | 
					import locale
 | 
				
			||||||
lang=locale.getdefaultlocale()[0][0:2]
 | 
					(lang, charset) = locale.getdefaultlocale()
 | 
				
			||||||
if lang=="en":
 | 
					if lang = None or lang == "en":
 | 
				
			||||||
    def _(string): return string
 | 
					    def _(string): return string
 | 
				
			||||||
else:
 | 
					else:
 | 
				
			||||||
    import gettext
 | 
					    import gettext
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user