3 \�meo � @ s� U d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z ddl mZmZ ddl mZ d gZd dded �eed�ed�geg d�Zeee�Z eje�Zee eedd�dd�ZdS )zLocale: set system locale� N)�dedent)�util)�Cloud)�Config)� MetaSchema�get_meta_doc)�PER_INSTANCE�allZ cc_localeZLocalezSet 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�title�description�distrosZexamplesZ frequencyZactivate_by_schema_keys)r �cfg�cloud�args�returnc C sn t |�dkr|d }ntj|d|j� �}tj|�rDtjd| |� d S tjd|� tj|d�}|jj||� d S )Nr �localez0Skipping module named %s, disabled by config: %szSetting locale to %sZlocale_configfile) �lenr Zget_cfg_option_strZ get_localeZis_false�LOG�debugZdistroZapply_locale)r r r r r Zlocale_cfgfile� r �/usr/lib/python3.6/cc_locale.py�handle7 s r )�__doc__Zlogging�textwrapr Z cloudinitr Zcloudinit.cloudr Zcloudinit.configr Zcloudinit.config.schemar r Zcloudinit.settingsr r �metaZ getLogger�__name__r �str�listr r r r r �<module> s.