U
    ¯Adƒ  ã                	   @   s¶   U d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZmZ ddlmZ d	gZd
ddedƒeedƒedƒgeg dœZeed< eeƒZ ee
eeeddœdd„ZdS )zLocale: set system localeé    )ÚLogger)Údedent)Úutil)ÚCloud)ÚConfig)Ú
MetaSchemaÚget_meta_doc)ÚPER_INSTANCEÚallZ	cc_localeZLocalezSet system localez|        Configure the system locale and apply it system wide. By default use
        the locale specified by the datasource.zL            # Set the locale to ar_AE
            locale: ar_AE
            z¤            # Set the locale to fr_CA in /etc/alternate_path/locale
            locale: fr_CA
            locale_configfile: /etc/alternate_path/locale
            )ÚidÚnameÚtitleZdescriptionÚdistrosZexamplesZ	frequencyZactivate_by_schema_keysÚmetaN)r   ÚcfgÚcloudÚlogÚargsÚreturnc                 C   sn   t |ƒdkr|d }nt |d| ¡ ¡}t |¡rD| d| |¡ d S | d|¡ t |d¡}|j ||¡ d S )Nr   Úlocalez0Skipping module named %s, disabled by config: %szSetting locale to %sZlocale_configfile)Úlenr   Zget_cfg_option_strZ
get_localeZis_falseÚdebugZdistroZapply_locale)r   r   r   r   r   r   Zlocale_cfgfile© r   ú</usr/lib/python3/dist-packages/cloudinit/config/cc_locale.pyÚhandle6   s    

  ÿr   )Ú__doc__Zloggingr   Útextwrapr   Z	cloudinitr   Zcloudinit.cloudr   Zcloudinit.configr   Zcloudinit.config.schemar   r   Zcloudinit.settingsr	   r   r   Ú__annotations__ÚstrÚlistr   r   r   r   r   Ú<module>	   sB   ÿÿÿùæ    þ