← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~dholbach/help-app/1435772 into lp:help-app

 

Daniel Holbach has proposed merging lp:~dholbach/help-app/1435772 into lp:help-app.

Requested reviews:
  Ubuntu Help app developers (help-app-dev)
Related bugs:
  Bug #1435772 in Ubuntu Help App: "Write test for markup in .po and .pot files"
  https://bugs.launchpad.net/help-app/+bug/1435772

For more details, see:
https://code.launchpad.net/~dholbach/help-app/1435772/+merge/253954
-- 
Your team Ubuntu Help app developers is requested to review the proposed merge of lp:~dholbach/help-app/1435772 into lp:help-app.
=== modified file 'internals/tests/test_translations.py'
--- internals/tests/test_translations.py	2015-03-20 10:40:27 +0000
+++ internals/tests/test_translations.py	2015-03-24 12:43:52 +0000
@@ -1,6 +1,7 @@
 from unittest import TestCase
 
 from translations.build import Translations
+from pelicanconf import HIDE_FROM_POT
 
 
 class HelpTestCase(TestCase):
@@ -30,3 +31,15 @@
                     self.assertEqual(1, len(link_msgstr))
                     self.assertIn(po.langs[po_fn]['gettext_code'],
                                   link_msgstr[0])
+
+    def test_markup_in_po_or_pot_files(self):
+        po = self.translations.po
+        files = [ po.pot_file_ob ]
+        for po_fn in po.langs:
+            po.load_pofile(po_fn)
+            files += [ po.langs[po_fn]['pofile'] ]
+        self.assertEqual(
+        for po_file in files:
+            for tag in HIDE_FROM_POT:
+                self.assertEqual(po_file.find_in_msgid(tag), [])
+                


Follow ups