Modulemd.Translation¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
The last modified time represented as a 64-bit integer (such as 201807011200) |
||
r/w/co |
The name of the module to which these translations apply. |
||
r/w/co |
The name of the module stream to which these translations apply. |
||
r/w/co |
The metadata version of this Translation object. |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Modulemd.Translation(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(version, module_name, module_stream, modified)¶
- Parameters:
version (
int
) – The metadata version of thisModulemd.Translation
.module_name (
str
) – The name of the module to which these translations apply.module_stream (
str
) – The name of the module stream to which these translations apply.modified (
int
) – The last modified time represented as a 64-bit integer (such as 201807011200).
- Returns:
A newly-allocated
Modulemd.Translation
object. This object must be freed withGObject.Object.unref
().- Return type:
New in version 2.0.
- copy()¶
- Returns:
The copied
Modulemd.Translation
object.- Return type:
Create a copy of this
Modulemd.Translation
object.New in version 2.0.
- get_locales()¶
- Returns:
An ordered #GStrv list of locales known to this
Modulemd.Translation
.- Return type:
[
str
]
New in version 2.0.
- get_translation_entry(locale)¶
- Parameters:
locale (
str
) – The locale of the translation to retrieve.- Returns:
The translation entry for the requested locale, or
None
if the locale was unknown.- Return type:
New in version 2.0.
- set_modified(modified)¶
- Parameters:
modified (
int
) – The last modified time represented as a 64-bit integer (such as 201807011200).
New in version 2.0.
- set_translation_entry(translation_entry)¶
- Parameters:
translation_entry (
Modulemd.TranslationEntry
) – A set of translations of this module stream for a particular locale.
New in version 2.0.
- validate()¶
- Raises:
- Return type:
This method ensures that the translation is internally consistent for usage or dumping to YAML. It will be run implicitly prior to emitting YAML. This is not a complete linter, merely a sanity check that the values are not impossible.
New in version 2.0.
Property Details¶
- Modulemd.Translation.props.modified¶
-
The last modified time represented as a 64-bit integer (such as 201807011200)
- Modulemd.Translation.props.module_name¶
- Name:
module-name
- Type:
- Default Value:
'__TRANSLATION_VALUE_UNSET__'
- Flags:
The name of the module to which these translations apply.
- Modulemd.Translation.props.module_stream¶
- Name:
module-stream
- Type:
- Default Value:
'__TRANSLATION_VALUE_UNSET__'
- Flags:
The name of the module stream to which these translations apply.
- Modulemd.Translation.props.version¶
- Name:
version
- Type:
- Default Value:
0
- Flags:
The metadata version of this Translation object.