Package translate :: Package tools :: Module test_pomerge :: Class TestPOMerge
[hide private]
[frames] | no frames]

Class TestPOMerge

source code

Instance Methods [hide private]
 
mergestore(self, templatesource, inputsource)
merges the sources of the given files and returns a new pofile object
source code
 
mergexliff(self, templatesource, inputsource)
merges the sources of the given files and returns a new xlifffile object
source code
 
countunits(self, pofile)
returns the number of non-header items
source code
 
singleunit(self, pofile)
checks that the pofile contains a single non-header unit, and returns it
source code
 
test_simplemerge(self)
checks that a simple po entry merges OK
source code
 
test_replacemerge(self)
checks that a simple po entry merges OK
source code
 
test_merging_locations(self)
check that locations on seperate lines are output in Gettext form of all on one line
source code
 
test_reflowed_source_comments(self)
ensure that we don't duplicate source comments (locations) if they have been reflowed
source code
 
test_comments_with_blank_lines(self)
ensure that we don't loose empty newlines in comments
source code
 
test_merge_dont_delete_unassociated_comments(self)
ensure that we do not delete comments in the PO file that are not assocaited with a message block
source code
 
test_preserve_format_trailing_newlines(self)
Test that we can merge messages correctly that end with a newline
source code
 
test_preserve_format_minor_start_and_end_of_sentence_changes(self)
Test that we are not too fussy about large diffs for simple changes at the start or end of a sentence
source code
 
test_preserve_format_last_entry_in_a_file(self)
The last entry in a PO file is usualy not followed by an empty line.
source code
 
xtest_escape_tabs(self)
Ensure that input tabs are escaped in the output, like gettext does.
source code
 
test_preserve_comments_layout(self)
Ensure that when we merge with new '# (poconflict)' or other comments that we don't mess formating
source code
 
test_merge_dos2unix(self)
Test that merging a comment line with dos newlines doesn't add a new line
source code
 
test_xliff_into_xliff(self) source code
 
test_po_into_xliff(self) source code
 
test_xliff_into_po(self) source code
 
test_merging_dont_merge_kde_comments_found_in_translation(self)
If we find a KDE comment in the translation (target) then do not merge it.
source code
 
test_merging_untranslated_with_kde_disambiguation(self)
test merging untranslated messages that are the same except for KDE disambiguation
source code
 
test_merging_header_entries(self)
Check that we do the right thing if we have header entries in the input PO.
source code
Class Variables [hide private]
  xliffskeleton = '<?xml version="1.0" ?>\n<xliff version="1.1" ...
Method Details [hide private]

test_preserve_format_last_entry_in_a_file(self)

source code 

The last entry in a PO file is usualy not followed by an empty line. Test that we preserve this


Class Variable Details [hide private]

xliffskeleton

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>'''