HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/locale.cpython-310.pyc
o

�N�g�	�@s,dZddlmZdd�Zdd�Zdd�Zd	S)
aF
Management of languages/locales
===============================

Manage the available locales and the system default:

.. code-block:: yaml

    us_locale:
      locale.present:
        - name: en_US.UTF-8

    default_locale:
      locale.system:
        - name: en_US.UTF-8
        - require:
          - locale: us_locale
�)�CommandExecutionErrorcCsdtvrdSdt�d�fS)zA
    Only load if the locale module is available in __salt__
    �locale.get_localeTF)�__salt__Zmissing_fun_string�rr�F/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/locale.py�__virtual__src
Cs�|iddd�}zMtd�|krd|d<d|�d�|d	<|WStd
r-d|�d�|d	<|WStd|�rGd
|i|d<d|d<d|��|d	<|WSd|d<d|��|d	<|WStys}zd|d<d|��|d	<|WYd}~Sd}~ww)zW
    Set the locale for the system

    name
        The name of the locale to use
    N���name�changes�result�commentrTrzSystem locale z already setr
�testz needs to be setzlocale.set_locale�localerzSet system locale FzFailed to set system locale to zFailed to set system locale: )r�__opts__r)r
�ret�errrrr�system s.��rcCs�|iddd�}td|�rd|d<d|�d�|d	<|Std
r)d|�d�|d	<|Std|�rBd
|i|d<d|d<d|��|d	<|Sd|d<d|��|d	<|S)z�
    Generate a locale if it is not present

    .. versionadded:: 2014.7.0

    name
        The name of the locale to be present. Some distributions require the
        charmap to be specified as part of the locale at this point.
    Nrr	zlocale.availTrzLocale z is already presentr
rz needs to be generatedzlocale.gen_localerrzGenerated locale FzFailed to generate locale )rr)r
rrrr�present?s 
rN)�__doc__Zsalt.exceptionsrrrrrrrr�<module>s