%PDF- %PDF-
Direktori : /lib/python3/dist-packages/LanguageSelector/__pycache__/ |
Current File : //lib/python3/dist-packages/LanguageSelector/__pycache__/LanguageSelector.cpython-312.pyc |
� k�!f� � �H � d dl mZ d dl mZ d dlZ ej dde� d dlZd dlZd dlZd dl Z d dl mZ d dlZ d dl� d dl mZ G d � d e� Zedk( rI ed� � Zej) ej* j- � � eej1 � � yy)� )�print_function)�absolute_importN�ignorezapt API not stable yet)� LocaleInfo)�*)�macrosc �B � e Zd ZdZdd�Zd� Zd� Zd� Zd� Zd� Z d� Z d � Zy )�LanguageSelectorBasez' base class for language-selector code c �V � || _ t d| j � | _ d | _ y )N�languagelist)�_datadirr �_localeinfo�_cache)�self�datadirs �C/usr/lib/python3/dist-packages/LanguageSelector/LanguageSelector.py�__init__zLanguageSelectorBase.__init__ s# � ��� �%�n�d�m�m�D������ c �b � t j j | j |� | _ y )N)�LanguageSelector� LangCache�LanguageSelectorPkgCacher r )r �progresss r � openCachezLanguageSelectorBase.openCache s# � �&�0�0�I�I�$�JZ�JZ�\d�e��r c �@ � | j rJt j | j t j j | j dd� � }nt j | j � }g }|j � D ] }|j |� � |S )zh return a list of language packs that are not installed but should be installed �data�pkg_depends) r �language_support_pkgs�LanguageSupportr �os�path�join�missing�append)r �lsr# �packs r �getMissingLangPacksz(LanguageSelectorBase.getMissingLangPacks# s{ � � �=�=�&�6�6�t�{�{��G�G�L�L����� �F�H�B� '�6�6�t�{�{�C�B����J�J�L� !�D��N�N�4� � !��r c � � t j � }|j dd� }t j |d�� }|j |� y)�1 write various LC_* variables (e.g. de_DE.UTF-8) �com.ubuntu.LanguageSelector�/��dbus_interfaceN)�dbus� SystemBus� get_object� Interface�SetSystemDefaultFormatsEnv)r � sysFormats�bus�obj�ifaces r �writeSysFormatsSettingz+LanguageSelectorBase.writeSysFormatsSetting2 s>