~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/translations/utilities/tests/test_xpi_po_exporter.py

  • Committer: Guilherme Salgado
  • Date: 2010-07-23 08:50:49 UTC
  • mfrom: (11206 launchpad)
  • mto: This revision was merged to the branch mainline in revision 11220.
  • Revision ID: salgado@canonical.com-20100723085049-4m2tmvujxsw2ns40
mergeĀ mainline

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
 
4
4
__metaclass__ = type
68
68
    def setUpTranslationImportQueueForTemplate(self):
69
69
        """Return an ITranslationImportQueueEntry for testing purposes."""
70
70
        # Get the file to import.
71
 
        en_US_xpi =  get_en_US_xpi_file_to_import('en-US')
 
71
        en_US_xpi = get_en_US_xpi_file_to_import('en-US')
72
72
 
73
73
        # Attach it to the import queue.
74
74
        translation_import_queue = getUtility(ITranslationImportQueue)
137
137
            "  </Description>\n"
138
138
            "</RDF>\n"
139
139
 
140
 
            #.  This is a DTD file inside a subdirectory 
 
140
            #.  This is a DTD file inside a subdirectory
141
141
            #: jar:chrome/en-US.jar!/subdir/test2.dtd(foozilla.menu.title)
142
142
            msgctxt "main/subdir/test2.dtd"
143
143
            msgid "MENU"
180
180
            msgid "FooZilla!"
181
181
            msgstr ""
182
182
 
183
 
            #.  Translators, don't play with fire! 
 
183
            #.  Translators, don't play with fire!
184
184
            #: jar:chrome/en-US.jar!/test1.dtd(foozilla.play.fire)
185
185
            msgctxt "main/test1.dtd"
186
186
            msgid "Do you want to play with fire?"
187
187
            msgstr ""
188
188
 
189
 
            #.  This is just a comment, not a comment for translators 
 
189
            #.  This is just a comment, not a comment for translators
190
190
            #: jar:chrome/en-US.jar!/test1.dtd(foozilla.play.ice)
191
191
            msgctxt "main/test1.dtd"
192
192
            msgid "Play with ice?"
217
217
 
218
218
        output = exported_template.read().decode("utf-8")
219
219
        self._compareExpectedAndExported(expected_template, output)
220
 
 
221
 
def test_suite():
222
 
    return unittest.defaultTestLoader.loadTestsFromName(__name__)