id_translation.offline.types#
Types used for offline translation.
Classes
|
Matrix of ID translation components returned by fetchers. |
- class PlaceholderTranslations(source, placeholders, records, id_pos=-1, placeholder_aliases=<factory>)[source]#
Bases:
Generic[SourceType]Matrix of ID translation components returned by fetchers.
- id_pos = -1#
Position if the ID placeholder in placeholders.
- classmethod make(source, data)[source]#
Try to make in instance from arbitrary input data.
- Parameters:
source – Source label for the translations.
data – Some data to convert to a
PlaceholderTranslationsinstance.
- Returns:
A new
PlaceholderTranslationsinstance.- Raises:
TypeError – If data cannot be converted.
- placeholder_aliases#
Alternative
placeholdernames.
- placeholders#
Names of placeholders in the order in which they appear in records.
- records#
Matrix of shape N x M where N is the number of IDs returned and M is the length of placeholders.
- source#
Source from which translations were retrieved.