예제 #1
0
def lval0():
	"""
	Return an empty localized value instance.
	"""
	obj = uit.LocalizedValue()
	uit.set_language('fr')
	return obj
예제 #2
0
def ldict0():
	"""
	Return an empty localized dictionary instance.
	"""
	obj = uit.LocalizedDictionary()
	uit.set_language('fr')
	return obj
예제 #3
0
 def test_global(self):
     """Test global set_language() setting."""
     uit.set_language('de')
     self.assertEqual('foo', self.lval.get())
     self.assertEqual('foo', self.ldict['val'])
     uit.set_language('en')
     self.assertEqual('bar', self.lval.get())
     self.assertEqual('bar', self.ldict['val'])
예제 #4
0
	def test_global(self):
		"""Test global set_language() setting."""
		uit.set_language('de')
		self.assertEqual('foo', self.lval.get())
		self.assertEqual('foo', self.ldict['val'])
		uit.set_language('en')
		self.assertEqual('bar', self.lval.get())
		self.assertEqual('bar', self.ldict['val'])
예제 #5
0
	def test_global(self, lval, ldict):
		"""Test global set_language() setting."""
		uit.set_language('de')
		assert 'foo' == lval.get()
		assert 'foo' == ldict['val']
		uit.set_language('en')
		assert 'bar' == lval.get()
		assert 'bar' == ldict['val']
예제 #6
0
 def test_default(self):
     """Test default set_language() setting."""
     uit.set_language('fr')
     self.assertEqual('baz', self.lval.get())
     self.assertEqual('baz', self.ldict['val'])
예제 #7
0
 def setUp(self):
     """Create object."""
     self.obj = uit.LocalizedValue()
     uit.set_language('fr')
예제 #8
0
파일: __init__.py 프로젝트: B-Rich/smart
	def init(self):
		uit.set_language(str(self.locale))
예제 #9
0
def set_language(lang):
	# type: (str) -> None
	"""Set the default language."""
	global _locale
	_locale = lang
	uit.set_language(lang)
def set_language(lang):
    """Set the default language."""
    global _locale
    _locale = lang
    uit.set_language(lang)
예제 #11
0
파일: __init__.py 프로젝트: B-Rich/smart
	def init(self):
		# set the language in order to return the correctly localized labels/descriptions
		uit.set_language( self.locale.language )
예제 #12
0
	def setUp(self):
		"""Create object."""
		self.obj = uit.LocalizedDictionary()
		uit.set_language('fr')
예제 #13
0
	def test_default(self):
		"""Test default set_language() setting."""
		uit.set_language('fr')
		self.assertEqual('baz', self.lval.get())
		self.assertEqual('baz', self.ldict['val'])
예제 #14
0
	def setUp(self):
		"""Create object."""
		self.obj = uit.LocalizedValue()
		uit.set_language('fr')
예제 #15
0
 def setUp(self):
     """Create object."""
     self.obj = uit.LocalizedDictionary()
     uit.set_language('fr')
예제 #16
0
 def init(self):
     # set the language in order to return the correctly localized labels/descriptions
     uit.set_language(self.locale.language)
예제 #17
0
	def test_default(self, lval, ldict):
		"""Test default set_language() setting."""
		uit.set_language('fr')
		assert 'baz' == lval.get()
		assert 'baz' == ldict['val']
 def init(self):
     uit.set_language(str(self.locale))
예제 #19
0
def set_language( lang ):
	"""Set the default language."""
	global _locale
	_locale = lang
	uit.set_language(lang)