Exemple #1
0
 def test_parse_ingnores_untranslated(self):
     """parse should skip strings that aren't translated."""
     path = os.path.join(ROOT, 'locale/de/main.lang')
     parsed = parse(path)
     expected = {
         u'The State of Mozilla': u'Awesome Baby! YEEEAAHHHH!!'
     }
     self.assertDictEqual(parsed, expected)
Exemple #2
0
 def test_parse_utf8_error(self):
     path = os.path.join(ROOT, "test_utf8_error.lang")
     parsed = parse(path)
     eq_(len(mail.outbox), 1)
     eq_(mail.outbox[0].subject, "[Django] %s is corrupted" % path)
     expected = {u"Update now": u"Niha rojane bike", u"Supported Devices": u"C�haz�n pi�tgiriy"}
     eq_(parsed, expected)
     mail.outbox = []
Exemple #3
0
 def test_parse(self):
     path = os.path.join(ROOT, "test.lang")
     parsed = parse(path)
     expected = {
         u"Hooray! Your Firefox is up to date.": u"F\xe9licitations ! "
         u"Votre Firefox a \xe9t\xe9 mis \xe0 jour.",
         u"Your Firefox is out of date.": u"Votre Firefox ne semble pas \xe0 jour.",
     }
     eq_(parsed, expected)
Exemple #4
0
 def test_parse_utf8_error(self):
     path = os.path.join(ROOT, 'test_utf8_error.lang')
     parsed = parse(path)
     eq_(len(mail.outbox), 1)
     eq_(mail.outbox[0].subject, '[Django] %s is corrupted' % path)
     expected = {
         u'Update now': u'Niha rojane bike',
         u'Supported Devices': u'C�haz�n pi�tgiriy'
     }
     eq_(parsed, expected)
     mail.outbox = []
Exemple #5
0
 def test_parse(self):
     path = os.path.join(ROOT, 'test.lang')
     parsed = parse(path)
     expected = {
         u'Hooray! Your Firefox is up to date.':
             u'F\xe9licitations ! '
             u'Votre Firefox a \xe9t\xe9 mis \xe0 jour.',
         u'Your Firefox is out of date.':
             u'Votre Firefox ne semble pas \xe0 jour.'
     }
     eq_(parsed, expected)
Exemple #6
0
 def test_parse_utf8_error(self):
     path = os.path.join(ROOT, 'test_utf8_error.lang')
     parsed = parse(path)
     eq_(len(mail.outbox), 1)
     eq_(mail.outbox[0].subject, '[Django] %s is corrupted' % path)
     expected = {
         u'Update now': u'Niha rojane bike',
         u'Supported Devices': u'C�haz�n pi�tgiriy'
     }
     eq_(parsed, expected)
     mail.outbox = []
Exemple #7
0
 def test_parse(self):
     path = os.path.join(ROOT, 'test.lang')
     parsed = parse(path)
     expected = {
         u'Hooray! Your Firefox is up to date.':
             u'F\xe9licitations ! '
             u'Votre Firefox a \xe9t\xe9 mis \xe0 jour.',
         u'Your Firefox is out of date.':
             u'Votre Firefox ne semble pas \xe0 jour.'
     }
     eq_(parsed, expected)
Exemple #8
0
 def test_parse_ingnores_untranslated(self):
     """parse should skip strings that aren't translated."""
     path = os.path.join(ROOT, 'locale/de/main.lang')
     parsed = parse(path)
     expected = {u'The State of Mozilla': u'Awesome Baby! YEEEAAHHHH!!'}
     self.assertDictEqual(parsed, expected)