Part of lp.translations.utilities
Find more about this file format at: http://www.gnu.org/software/gettext/manual/html_node/PO-Files.html
Function | strip_last_newline | Return text with the final newline/carriage return stripped. |
Function | comments_text_representation | Return text representation of the comments. |
Function | wrap_text | Return a list of strings with the given text wrapped to given width. |
Function | msgid_text_representation | Return text representation of the msgids. |
Function | translation_text_representation | Return text representation of the translations. |
Function | export_translation_message | Return a text representing translation_message. |
Class | GettextPOExporterBase | Base support class to export Gettext .po files. |
Class | GettextPOExporter | Support class to export Gettext .po files. |
Class | GettextPOChangedExporter | Support class to export changed Gettext .po files. |
Parameters | translation_message | An ITranslationMessageData that will get comments exported. |
We are not using textwrap module because the .po file format has some peculiarities like:
msgid "" "a really long line."
instead of:
msgid "a really long" "line."
with a wrapping width of 21.
Parameters | text | Unicode string to wrap. |
prefix | Unicode prefix to prepend to the given text before wrapping it. | |
wrap_width | The width where the text should be wrapped. |
Parameters | translation_message | An ITranslationMessageData that will get its
msgids exported. |
wrap_width | The width where the text should be wrapped. |