%PDF- %PDF-
Direktori : /lib/python3/dist-packages/LanguageSelector/__pycache__/ |
Current File : //lib/python3/dist-packages/LanguageSelector/__pycache__/xkb.cpython-312.pyc |
� k�!f � � � d dl mZ d dlZ G d� d� Z G d� d� Zd� Zd� Zd � Zed k( r* ed� D ] Z e e � � e� D ] Z e e � � yy)� )�print_functionNc � � e Zd Zd� Zd� Zy)�Variantc �. � || _ || _ || _ y �N��name�desc�raw_desc)�selfr r r s �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�Kr N��__name__� __module__�__qualname__r r � r r r r s � � )� Lr r c � � e Zd Zd� Zd� Zy)�Layoutc �X � || _ || _ || _ || _ || _ || _ y r �r r r � short_desc�raw_short_desc�variants)r r r r r r r s r r zLayout.__init__ s- � � �� � �� � (�� �",���&4��#� (�� r c �� � | j �d| j �d| j �d| j �d| j �d| j D �cg c] }d|z �� c}��S c c}w )Nr r z; z;; z%sr )r �xs r r zLayout.__str__ sv � �48�I�I�d�i�i�� � �VZ�Ve�Ve�fj�fy�fy� NR� N[� N[� {\� IJ�{� CD� |D� {\� ]� ]�� {\s �A!Nr r r r r r s � � )� ]r r c �� � t � } t j d� }|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_possibilitiesr0 s^ � ��6�� ��� =�>���"�"�$����� ]�^� 3�A� �'�'�� � �2� 3� �r c �F � t � }| j d� }|D ]� }t |j d|z � � dkD r|j d|z � d }nd}t |j ||j d� d j � }|j |� �� |S )Nz3../../../variantList/variant/configItem/name/text()�../description[@xml:lang='%s']r � �../../description[position()=1])r% r) �lenr r+ r* )�layout_node�lang�variant_list� variant_nodesr/ �trans�vs r �get_variantsr<