AppStream.Translation

g AppStream.Translation AppStream.Translation GObject.Object GObject.Object GObject.Object->AppStream.Translation

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

get_id ()

get_kind ()

get_source_locale ()

set_id (id)

set_kind (kind)

set_source_locale (locale)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class AppStream.Translation(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

AppStream.TranslationClass

classmethod new()
Returns:

a AppStream.Translation

Return type:

AppStream.Translation

Creates a new AppStream.Translation.

get_id()
Return type:

str

The ID (e.g. Gettext translation domain) of this translation.

get_kind()
Returns:

an enum of type AppStream.TranslationKind

Return type:

AppStream.TranslationKind

The translation system type.

get_source_locale()
Returns:

The locale of the source strings for this component.

Return type:

str

The locale of the source strings for this component. If this has not been explicitly specified, en_US will be returned.

New in version 0.14.6.

set_id(id)
Parameters:

id (str) – The ID of this translation.

Set the ID (e.g. Gettext domain) of this translation.

set_kind(kind)
Parameters:

kind (AppStream.TranslationKind) – the new AppStream.TranslationKind

Set the translation system type.

set_source_locale(locale)
Parameters:

locale (str or None) – The POSIX locale that the source strings are in, or None if unknown or default.

Set the locale of the source strings for this component. In gettext, this is referred to as the C locale. It’s almost always en_US, but for some components it may not be.

New in version 0.14.6.