launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #00657
[Merge] lp:~jtv/launchpad/pd-bug-617431 into lp:~launchpad-pqm/launchpad/production-devel
Jeroen T. Vermeulen has proposed merging lp:~jtv/launchpad/pd-bug-617431 into lp:~launchpad-pqm/launchpad/production-devel.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers): code
Related bugs:
#617431 Can't download all .mo files as a single tarball
https://bugs.launchpad.net/bugs/617431
= Bug 617431 =
I'm hoping to get this cherry-picked, so proposing for production-devel.
Fixes breakage in the MO translations format exporter. The formater is supposed to convert translations (PO files) to MO format using /usr/bin/msgfmt, but pass through templates (POT files) in their original form. A silly mis-spelled attrivute in the latter bit of code, tragically untested, broke this. For the interested: "mime_type" vs. "content_type."
I'm adding a test for the template case, as well as what I hope is some proper verification of the MO output. There's also a doctest, but I didn't want to add to that.
No lint introduced. To test:
{{{
/bin/test -vvc -m lp.translations.utilities.tests -t export
}}}
To Q/A: request a full translations export of Gufw trunk, in MO format, and wait for the email to come in.
Jeroen
--
https://code.launchpad.net/~jtv/launchpad/pd-bug-617431/+merge/32991
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jtv/launchpad/pd-bug-617431 into lp:~launchpad-pqm/launchpad/production-devel.
=== modified file 'lib/lp/translations/utilities/gettext_mo_exporter.py'
--- lib/lp/translations/utilities/gettext_mo_exporter.py 2010-07-23 15:26:56 +0000
+++ lib/lp/translations/utilities/gettext_mo_exporter.py 2010-08-18 11:49:43 +0000
@@ -88,7 +88,7 @@
# include those as .pot files stored in a templates/
# directory.
file_path = 'templates/%s' % os.path.basename(po_export.path)
- content_type = gettext_po_exporter.content_type
+ content_type = gettext_po_exporter.mime_type
file_extension = po_export.file_extension
else:
file_extension = 'mo'
=== modified file 'lib/lp/translations/utilities/tests/test_gettext_po_exporter.py'
--- lib/lp/translations/utilities/tests/test_gettext_po_exporter.py 2010-08-16 10:27:36 +0000
+++ lib/lp/translations/utilities/tests/test_gettext_po_exporter.py 2010-08-18 11:49:43 +0000
@@ -16,8 +16,7 @@
comments_text_representation, strip_last_newline)
from lp.translations.utilities.gettext_po_exporter import (
GettextPOExporter)
-from lp.translations.utilities.gettext_po_parser import (
- POParser)
+from lp.translations.utilities.gettext_po_parser import POParser
from lp.translations.utilities.translation_common_format import (
TranslationMessageData)
from lp.translations.utilities.translation_export import ExportFileStorage