コード例 #1
0
ファイル: test_po2tmx.py プロジェクト: diorcety/translate
    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"
コード例 #2
0
ファイル: test_po2tmx.py プロジェクト: diorcety/translate
    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"
コード例 #3
0
ファイル: test_po2tmx.py プロジェクト: diorcety/translate
    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
コード例 #4
0
ファイル: test_po2tmx.py プロジェクト: diorcety/translate
    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"
コード例 #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"
コード例 #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"
コード例 #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"
コード例 #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
コード例 #9
0
ファイル: test_po2tmx.py プロジェクト: alexbriski/pootleDev
    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"
コード例 #10
0
ファイル: test_po2tmx.py プロジェクト: alexbriski/pootleDev
    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"
コード例 #11
0
ファイル: test_po2tmx.py プロジェクト: alexbriski/pootleDev
    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"