U
    L¬÷d†  ã                	   @   sº   U d Z ddl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¡Zee	eeddœdd„ZdS )zLocale: set system localeé    N)Ú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Úmeta)r   ÚcfgÚcloudÚargsÚreturnc                 C   sn   t |ƒdkr|d }nt |d| ¡ ¡}t |¡rDt d| |¡ d S t 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ÚLOGÚdebugZdistroZapply_locale)r   r   r   r   r   Zlocale_cfgfile© r   ú</usr/lib/python3/dist-packages/cloudinit/config/cc_locale.pyÚhandle7   s    

  ÿr   )Ú__doc__ZloggingÚtextwrapr   Z	cloudinitr   Zcloudinit.cloudr   Zcloudinit.configr   Zcloudinit.config.schemar   r   Zcloudinit.settingsr   r   r   Ú__annotations__Z	getLoggerÚ__name__r   ÚstrÚlistr   r   r   r   r   Ú<module>	   s8   ÿÿÿùæ
