예제 #1
0
 def test_xx_YY_locale(self):
     """Falls back to English for unknown Django locales"""
     translation.activate('xx-YY')
     # Note: this activation does not make Django attempt to use xx-YY
     eq_('en-us', translation.get_language())
     num = _format_decimal(1234.567)
     eq_('1,234.567', num)
예제 #2
0
 def test_xx_YY_locale(self):
     """Falls back to English for unknown Django locales"""
     translation.activate('xx-YY')
     # Note: this activation does not make Django attempt to use xx-YY
     eq_('en-us', translation.get_language())
     num = _format_decimal(1234.567)
     eq_('1,234.567', num)
예제 #3
0
 def test_fy_NL_locale(self):
     """Falls back to English for unknown babel locales"""
     # Note: if this starts to fail for no apparent reason, it's probably
     # because babel learned about fy-NL since this test was written.
     translation.activate('fy-NL')
     eq_('fy-nl', translation.get_language())
     num = _format_decimal(1234.567)
     eq_('1,234.567', num)
예제 #4
0
 def test_fy_NL_locale(self):
     """Falls back to English for unknown babel locales"""
     # Note: if this starts to fail for no apparent reason, it's probably
     # because babel learned about fy-NL since this test was written.
     translation.activate('fy-NL')
     eq_('fy-nl', translation.get_language())
     num = _format_decimal(1234.567)
     eq_('1,234.567', num)
예제 #5
0
 def test_fr_locale(self):
     """French locale returns french format"""
     translation.activate('fr')
     num = _format_decimal(1234.567)
     eq_(u'1\xa0234,567', num)
예제 #6
0
 def test_default_locale(self):
     """Default locale just works"""
     num = _format_decimal(1234.567)
     eq_('1,234.567', num)
예제 #7
0
 def test_xx_YY_locale(self):
     """Falls back to English-like formatting for unknown locales"""
     translation.activate("xx-YY")
     num = _format_decimal(1234.567)
     eq_("1,234.567", num)
예제 #8
0
 def test_fr_locale(self):
     """French locale returns french format"""
     translation.activate('fr')
     num = _format_decimal(1234.567)
     eq_(u'1\xa0234,567', num)
예제 #9
0
 def test_default_locale(self):
     """Default locale just works"""
     num = _format_decimal(1234.567)
     eq_('1,234.567', num)
예제 #10
0
 def test_xx_YY_locale(self):
     """Falls back to English-like formatting for unknown locales"""
     translation.activate('xx-YY')
     num = _format_decimal(1234.567)
     eq_('1,234.567', num)