pyanaconda.modules.localization.localization_interface
Classes
Interface to get keyboard configuration data. |
|
DBus interface for Localization module. |
Module Contents
- class pyanaconda.modules.localization.localization_interface.KeyboardConfigurationTaskInterface[source]
Bases:
pyanaconda.modules.common.task.TaskInterfaceInterface to get keyboard configuration data.
- class pyanaconda.modules.localization.localization_interface.LocalizationInterface[source]
Bases:
pyanaconda.modules.common.base.KickstartModuleInterfaceDBus interface for Localization module.
- GetLanguages()[source]
Get languages with available translations.
For example: [“en”, “cs”]
- Returns:
a list of language ids
- Return type:
List[Str]
- GetLanguageData(language_id)[source]
Get data about the specified language.
- Param:
a language id (for example, “en”)
- Returns:
a language data
- Parameters:
language_id (Str)
- Return type:
Structure
- GetLocales(language_id)[source]
Get locales available for the specified language.
For example: [“de_DE.UTF-8”, “de_AT.UTF-8”, … ]
- Returns:
a list of locale ids
- Parameters:
language_id (Str)
- Return type:
List[Str]
- GetCommonLocales()[source]
Get a list of the most commonly used locales.
For example: [“ar_EG.UTF-8”, “en_US.UTF-8”, “en_GB.UTF-8”, …]
- Returns:
a list of common locale IDs
- Return type:
List[Str]
- GetLocaleData(locale_id)[source]
Get data about the specified locale.
- Param:
a locale id (for example, “en_US.UTF-8”)
- Returns:
a locale data
- Parameters:
locale_id (Str)
- Return type:
Structure
- GetKeyboardLayouts()[source]
Get keyboard layouts.
Returns a list of all available keyboard layouts. Each layout is represented as a KeyboardLayout structure.
- Returns:
List of KeyboardLayout structures
- Return type:
List[Structure]
- property LanguageSupport: List[Str][source]
Supported languages on the system.
- Return type:
List[Str]
- property LanguageKickstarted: Bool[source]
Was the language set in a kickstart?
- Returns:
True if it was set in a kickstart, otherwise False
- Return type:
Bool
- SetKeyboard(keyboard)[source]
Set the system keyboard type in generic way.
Can contain virtual console keyboard mapping or X layout specification. This is deprecated way of specifying keyboard, use either SetVirtualConsoleKeymap and/or SetXLayouts.
- Parameters:
keyboard (Str) – system keyboard specification
- property XLayouts: List[Str][source]
X Layouts that should be used on the system.
- Return type:
List[Str]
- property LayoutSwitchOptions: List[Str][source]
List of options for layout switching
- Return type:
List[Str]
- property KeyboardKickstarted: Bool[source]
Was keyboard command seen in kickstart?
- Returns:
True if keyboard command was seen in kickstart, otherwise False
- Return type:
Bool
- PopulateMissingKeyboardConfigurationWithTask()[source]
Pouplate missing keyboard configuration.
The configuration is populated by conversion and/or default values.
- Returns:
DBus path of the task populating the configuration
- Return type:
ObjPath
- GetKeyboardConfigurationWithTask()[source]
Get current keyboard configuration without storing it into module.
This task will give you a potential configuration to be installed at the time of task execution. The task is read only, the results are not used anywhere by the localization module.
- Return type:
ObjPath
- ApplyKeyboardWithTask()[source]
Apply keyboard configuration to the current system.
- Returns:
DBus path of the task applying the configuration
- Return type:
ObjPath
- GetCompositorSelectedLayout()[source]
Get the activated keyboard layout.
- Returns:
Current keyboard layout (e.g. “cz (qwerty)”)
- Return type:
- CompositorSelectedLayoutChanged(layout)[source]
Signal emitted when the selected keyboard layout changes.
- Parameters:
layout (Str)
- GetCompositorLayouts()[source]
Get all available keyboard layouts.
- Returns:
A list of keyboard layouts (e.g. [“cz (qwerty)”, cn (mon_todo_galik)])
- Return type:
list of strings
- SetXKeyboardDefaults()[source]
Set default keyboard settings based on the selected language.
This method sets sensible default keyboard layouts based on the currently selected language using langtable data. It will populate XLayouts with appropriate layouts for the language, including ASCII support when needed.