Example #1
0
 def test_fail_obsolete(self):
     # Obsolete translations are considered untranslated
     entry = POEntry(msgid="Source", msgstr="Translation", obsolete=True)
     status = Status()
     status.step(entry)
     self.assertFalse(untranslated_validator(status))
Example #2
0
 def test_fail_missing(self):
     entry = POEntry(msgid="Source", msgstr="")
     status = Status()
     status.step(entry)
     self.assertFalse(untranslated_validator(status))
Example #3
0
 def test_fail_fuzzy(self):
     # Fuzzy translations are considered untranslated
     entry = POEntry(msgid="Source", msgstr="Translation", flags=['fuzzy'])
     status = Status()
     status.step(entry)
     self.assertFalse(untranslated_validator(status))
Example #4
0
 def test_pass(self):
     entry = POEntry(msgid="Source", msgstr="Translation")
     status = Status()
     status.step(entry)
     self.assertTrue(untranslated_validator(status))
Example #5
0
 def test_fail_obsolete(self):
     # Obsolete translations are considered untranslated
     entry = POEntry(msgid="Source", msgstr="Translation", obsolete=True)
     status = Status()
     status.step(entry)
     self.assertFalse(untranslated_validator(status))
Example #6
0
 def test_fail_fuzzy(self):
     # Fuzzy translations are considered untranslated
     entry = POEntry(msgid="Source", msgstr="Translation", flags=['fuzzy'])
     status = Status()
     status.step(entry)
     self.assertFalse(untranslated_validator(status))
Example #7
0
 def test_fail_missing(self):
     entry = POEntry(msgid="Source", msgstr="")
     status = Status()
     status.step(entry)
     self.assertFalse(untranslated_validator(status))
Example #8
0
 def test_pass(self):
     entry = POEntry(msgid="Source", msgstr="Translation")
     status = Status()
     status.step(entry)
     self.assertTrue(untranslated_validator(status))