Modulemd.TranslationEntry

Modulemd.TranslationEntry — Contains the translated strings of a module stream for a specific locale.

Stability Level

Stable, unless otherwise indicated

Functions

Properties

char * description Read / Write
char * locale Read / Write / Construct Only
char * summary Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── ModulemdTranslationEntry

Description

Functions

modulemd_translation_entry_new ()

ModulemdTranslationEntry *
modulemd_translation_entry_new (const gchar *locale);

Parameters

locale

The locale for this translation entry. It must correspond to the format specified by libc locale names.

[not nullable]

Returns

A newly-allocated ModulemdTranslationEntry object. This object must be freed with g_object_unref().

[transfer full]

Since: 2.0


modulemd_translation_entry_copy ()

ModulemdTranslationEntry *
modulemd_translation_entry_copy (ModulemdTranslationEntry *self);

Create a copy of this ModulemdTranslationEntry object.

Parameters

self

This ModulemdTranslationEntry object.

 

Returns

The copied ModulemdTranslationEntry object.

[transfer full]

Since: 2.0


modulemd_translation_entry_get_locale ()

const gchar *
modulemd_translation_entry_get_locale (ModulemdTranslationEntry *self);

Get the locale of this translation entry.

Parameters

self

This ModulemdTranslationEntry object.

 

Returns

The locale of this translation entry. This is a pointer to the internal memory location and must not be freed.

[transfer none]

Since: 2.0


modulemd_translation_entry_set_summary ()

void
modulemd_translation_entry_set_summary
                               (ModulemdTranslationEntry *self,
                                const gchar *summary);

Parameters

self

This ModulemdTranslationEntry object.

 

summary

The summary of this module translated appropriately for this locale.

[nullable]

Since: 2.0


modulemd_translation_entry_get_summary ()

const gchar *
modulemd_translation_entry_get_summary
                               (ModulemdTranslationEntry *self);

Get the summary of this translation entry.

Parameters

self

This ModulemdTranslationEntry object.

 

Returns

The summary of this module stream translated into the language specified by locale.

[transfer none]

Since: 2.0


modulemd_translation_entry_set_description ()

void
modulemd_translation_entry_set_description
                               (ModulemdTranslationEntry *self,
                                const char *description);

Parameters

self

This ModulemdTranslationEntry object.

 

description

The description of this module stream translated into the language specified by locale.

[nullable]

Since: 2.0


modulemd_translation_entry_get_description ()

const gchar *
modulemd_translation_entry_get_description
                               (ModulemdTranslationEntry *self);

Get the description of this translation entry.

Parameters

self

This ModulemdTranslationEntry object.

 

Returns

The description of this module stream translated into the language specified by locale.

[transfer none]

Since: 2.0


modulemd_translation_entry_get_profiles_as_strv ()

GStrv
modulemd_translation_entry_get_profiles_as_strv
                               (ModulemdTranslationEntry *self);

Get a list of profiles that have descriptions.

[rename-to modulemd_translation_entry_get_profiles]

Parameters

self

This ModulemdTranslationEntry object.

 

Returns

An ordered GStrv list of profiles for which descriptions have been translated for this locale.

[transfer full]

Since: 2.0


modulemd_translation_entry_set_profile_description ()

void
modulemd_translation_entry_set_profile_description
                               (ModulemdTranslationEntry *self,
                                const gchar *profile_name,
                                const gchar *profile_description);

Adds a profile name translation.

Parameters

self

This ModulemdTranslationEntry object.

 

profile_name

The name of the profile.

 

profile_description

The translated description of the profile.

[nullable]

Since: 2.0


modulemd_translation_entry_get_profile_description ()

const gchar *
modulemd_translation_entry_get_profile_description
                               (ModulemdTranslationEntry *self,
                                const gchar *profile_name);

Types and Values

MODULEMD_TYPE_TRANSLATION_ENTRY

#define             MODULEMD_TYPE_TRANSLATION_ENTRY

ModulemdTranslationEntry

typedef struct _ModulemdTranslationEntry ModulemdTranslationEntry;

Property Details

The “description” property

  “description”              char *

The description of this module stream translated into the language specified by locale.

Owner: ModulemdTranslationEntry

Flags: Read / Write

Default value: "__LOCALE_UNSET__"


The “locale” property

  “locale”                   char *

The locale for this translation entry. It must correspond to the format specified by libc locale names. This field may only be set on object construction and is immutable afterwards.

Owner: ModulemdTranslationEntry

Flags: Read / Write / Construct Only

Default value: "__LOCALE_UNSET__"


The “summary” property

  “summary”                  char *

The summary of this module stream translated into the language specified by locale.

Owner: ModulemdTranslationEntry

Flags: Read / Write

Default value: "__LOCALE_UNSET__"