Exemple #1
0
    def test_sourcecomments(self):
        """Tests that source comments are imported."""
        minipo = u'''#: ../PuzzleFourSided.h:45
msgid "Bézier curve"
msgstr "Bézier-kurwe"
'''
        tmx = self.po2tmx(minipo, comment='source')
        print(bytes(tmx))
        unit = tmx.findunits(u"Bézier curve")
        assert unit[0].getnotes() == u"../PuzzleFourSided.h:45"
Exemple #2
0
    def test_typecomments(self):
        """Tests that others comments are imported."""
        minipo = u'''#, csharp-format
msgid "Bézier curve"
msgstr "Bézier-kurwe"
'''
        tmx = self.po2tmx(minipo, comment='type')
        print(bytes(tmx))
        unit = tmx.findunits(u"Bézier curve")
        assert unit[0].getnotes() == u"csharp-format"
Exemple #3
0
    def test_nonecomments(self):
        """Tests that none comments are imported."""
        minipo = u'''#My comment rules
msgid "Bézier curve"
msgstr "Bézier-kurwe"
'''
        tmx = self.po2tmx(minipo)
        print(bytes(tmx))
        unit = tmx.findunits(u"Bézier curve")
        assert len(unit[0].getnotes()) == 0
Exemple #4
0
    def test_otherscomments(self):
        """Tests that others comments are imported."""
        minipo = u'''#My comment rules
msgid "Bézier curve"
msgstr "Bézier-kurwe"
'''
        tmx = self.po2tmx(minipo, comment='others')
        print(bytes(tmx))
        unit = tmx.findunits(u"Bézier curve")
        assert unit[0].getnotes() == u"My comment rules"
Exemple #5
0
    def test_sourcecomments(self):
        """Tests that source comments are imported."""
        minipo = """#: ../PuzzleFourSided.h:45
msgid "Bézier curve"
msgstr "Bézier-kurwe"
"""
        tmx = self.po2tmx(minipo, comment="source")
        print(bytes(tmx))
        unit = tmx.findunits("Bézier curve")
        assert unit[0].getnotes() == "../PuzzleFourSided.h:45"
Exemple #6
0
    def test_typecomments(self):
        """Tests that others comments are imported."""
        minipo = """#, csharp-format
msgid "Bézier curve"
msgstr "Bézier-kurwe"
"""
        tmx = self.po2tmx(minipo, comment="type")
        print(bytes(tmx))
        unit = tmx.findunits("Bézier curve")
        assert unit[0].getnotes() == "csharp-format"
Exemple #7
0
    def test_otherscomments(self):
        """Tests that others comments are imported."""
        minipo = """#My comment rules
msgid "Bézier curve"
msgstr "Bézier-kurwe"
"""
        tmx = self.po2tmx(minipo, comment="others")
        print(bytes(tmx))
        unit = tmx.findunits("Bézier curve")
        assert unit[0].getnotes() == "My comment rules"
Exemple #8
0
    def test_nonecomments(self):
        """Tests that none comments are imported."""
        minipo = """#My comment rules
msgid "Bézier curve"
msgstr "Bézier-kurwe"
"""
        tmx = self.po2tmx(minipo)
        print(bytes(tmx))
        unit = tmx.findunits("Bézier curve")
        assert len(unit[0].getnotes()) == 0
Exemple #9
0
    def test_typecomments(self):
        """Tests that others comments are imported."""
        minipo = r'''#, csharp-format
msgid "Bézier curve"
msgstr "Bézier-kurwe"
'''
        tmx = self.po2tmx(minipo, comment='type')
        print(str(tmx))
        unit = tmx.findunits(u"Bézier curve")
        assert unit[0].getnotes() == u"csharp-format"
Exemple #10
0
    def test_sourcecomments(self):
        """Tests that source comments are imported."""
        minipo = r'''#: ../PuzzleFourSided.h:45
msgid "Bézier curve"
msgstr "Bézier-kurwe"
'''
        tmx = self.po2tmx(minipo, comment='source')
        print(str(tmx))
        unit = tmx.findunits(u"Bézier curve")
        assert unit[0].getnotes() == u"../PuzzleFourSided.h:45"
Exemple #11
0
    def test_otherscomments(self):
        """Tests that others comments are imported."""
        minipo = r'''#My comment rules
msgid "Bézier curve"
msgstr "Bézier-kurwe"
'''
        tmx = self.po2tmx(minipo, comment='others')
        print(str(tmx))
        unit = tmx.findunits(u"Bézier curve")
        assert unit[0].getnotes() == u"My comment rules"