Part of lp.translations.interfaces.translationimporter View In Hierarchy
| List | supported_file_extensions | Undocumented |
| TextLine | template_suffixes | Undocumented |
| Method | isTemplateName | Based on filename, is this a template file? |
| Method | isTranslationName | Based on filename, is this file a translation? |
| Method | isHidden | Based on filename, is this a hidden file? |
| Method | getTranslationFileFormat | Return the translation file format for the given file extension. |
| Method | getTranslationFormatImporter | Return the translation format importer for the given file format. |
| Method | importFile | Import an ITranslationImportQueueEntry file into the system. |
| Parameters | path | file name, possibly including directory component. |
| Returns | Boolean: True if path identifies this file as a template. | |
| Parameters | path | file name, possibly including directory component. |
| Returns | Boolean: True if path identifies this file as a
translation. A template, or a file with an unknown filename
extension, is not considered a translation. | |
| Parameters | path | file name, possibly including directory component. |
| Returns | Boolean: True if path contains either a hidden file
or a hidden directory. | |
| Parameters | file_extension | File extension including the dot. |
| file_contents | File contents (a seekable file object). | |
| Returns | A TranslationFileFormat for the given file extension
and file contents or None if it's not supported format. | |
| Parameters | file_format | A TranslationFileFormat entry. |
| Returns | An ITranslationFormatImporter or None if there is no
handler for the given file format. | |
Import an `ITranslationImportQueueEntry` file into the system.
:param translation_import_queue_entry: An
`ITranslationImportQueueEntry` entry.
:raise OutdatedTranslationError: If the entry is older than the
previously imported file.
:raise NotExportedFromLaunchpad: If the entry imported is not
from upstream and doesn't have the tag added by Launchpad on
export time.
:return: a tuple of two lists: error descriptors, and warnings.
The errors list contains dictionaries describing messages that
couldn't be imported. Each of those has three keys:
- 'pomsgset': An `IPOMsgSet` associated with this error.
- 'pomessage': The original message text in its native format.
- 'error-message': The error message text.
The warnings list is simply a list of warning strings.