Part of lp.translations.scripts.po_export_queue View In Hierarchy
The results of a translation export request.
This class has three main attributes:
- person: The person requesting this export.
- url: The Librarian URL for any successfully exported files.
- failure: Failure gotten while exporting.
| Method | __init__ | Undocumented |
| Method | setExportFile | Attach an exported file to the result, for upload to the Librarian. |
| Method | upload | Upload exported file as set with setExportFile to the Librarian. |
| Method | notify | Send a notification email to the given person about the export. |
| Method | addFailure | Store an exception that broke the export. |
| Method | _getShortRequestName | Return a short request name for use in email subjects. |
| Method | _getExportRequestOrigin | Figure out where an export request was made. |
| Method | _getRequestedExportsNames | Return a list of display names for requested exports. |
| Method | _getFailureEmailBody | Send an email notification about the export failing. |
| Method | _getFailedRequestsDescription | Return a printable description of failed export requests. |
| Method | _getAdminFailureNotificationEmailBody | Send an email notification about failed export to admins. |
| Method | _getUnicodeDecodeErrorEmailBody | Send an email notification to admins about UnicodeDecodeError. |
| Method | _getSuccessEmailBody | Send an email notification about the export working. |
After this is set, upload will perform the actual upload. The two
actions are separated so as to isolate write access to the database.
| Parameters | exported_file | An IExportedTranslationFile containing the
exported data. |
setExportFile to the Librarian.
If no file has been set, do nothing.