Package translate :: Package tools :: Module test_pogrep :: Class TestXLiffGrep

[hide private]
[frames] | no frames]

# Class TestXLiffGrep

source code

Instance Methods | [hide private]

xliff_parse(self, xliff_text) helper that parses po source without requiring files | source code

xliff_grep(self, xliff_text, searchstring, cmdlineoptions=None) helper that parses xliff text and passes it through a filter | source code

test_simplegrep(self) grep for a simple string. | source code

Class Variables | [hide private]

| xliff_skeleton = ``'``<?xml version="1.0" ?>\n<xliff version="1.1"``...``
| xliff_text = ``'``<?xml version="1.0" ?>\n<xliff version="1.1" xml``...``

Class Variable Details | [hide private]

### xliff_skeleton

Value:

      '''<?xml version="1.0" ?>
      <xliff version="1.1" xmlns="urn:oasis:names:tc:xliff:document:1.1">
        <file original="filename.po" source-language="en-US" datatype="po">
          <body>
              %s
          </body>
        </file>
      </xliff>'''

### xliff_text

Value:

      '''<?xml version="1.0" ?>
      <xliff version="1.1" xmlns="urn:oasis:names:tc:xliff:document:1.1">
        <file original="filename.po" source-language="en-US" datatype="po">
          <body>
              <trans-unit>
        <source>r\xc3\xaad</source>
        <target>rooi</target>
      </trans-unit>
      ...