templatize
Turn a Django template into something that is understood by xgettext. It does so by translating the Django translation tags into standard gettext function invocations.
def templatize(
src: string,
origin: string = null
) - > string
Turn a Django template into something that is understood by xgettext. It does so by translating the Django translation tags into standard gettext function invocations.
Parameters
| Name | Type | Description |
|---|---|---|
| src | string | The raw Django template content to be processed for translation tags. |
| origin | string = null | The optional file path or identifier of the source template, used to provide context in error messages and warnings. |
Returns
| Type | Description |
|---|---|
string | A string containing Python-compatible gettext function calls and comments that can be parsed by xgettext to extract translatable messages. |