%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/babel/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/babel/__pycache__/core.cpython-312.pyc

�

ƪb�����dZddlZddlZddlmZddlmZgd�Zdaei�Z	d�Z
d�Zidd	�d
d�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d!�d"d#�d$d%�d&d'�d(d)�id*d+�d,d-�d.d/�d0d1�d2d3�d4d5�d6d7�d8d9�d:d;�d<d=�d>d?�d@dA�dBdC�dDdE�dFdG�dHdI�dJdK��dLdMdNdOdPdQ��ZGdR�dSe
�ZGdT�dU�ZdefdV�ZdWefdX�Zd[dY�Zd[dZ�Zy)\z�
    babel.core
    ~~~~~~~~~~

    Core locale representation and locale data access.

    :copyright: (c) 2013-2022 by the Babel Team.
    :license: BSD, see LICENSE for more details.
�N)�
localedata)�
PluralRule)�UnknownLocaleError�Locale�default_locale�negotiate_locale�parse_localec��td��)Nz�The babel data files are not available. This usually happens because you are using a source checkout from Babel and you did not build the data files.  Just make sure to run "python setup.py import_cldr" before installing the library.)�RuntimeError���,/usr/lib/python3/dist-packages/babel/core.py�_raise_no_data_errorrs��
�1�2�2r
c��t��tjjtjj	t
��}tjj|d�}tjj
|�s
t�t|d�5}tj|�addd�tj|i�S#1swY�xYw)a_Return the dictionary for the given key in the global data.

    The global data is stored in the ``babel/global.dat`` file and contains
    information independent of individual locales.

    >>> get_global('zone_aliases')['UTC']
    u'Etc/UTC'
    >>> get_global('zone_territories')['Europe/Berlin']
    u'DE'

    The keys available are:

    - ``all_currencies``
    - ``currency_fractions``
    - ``language_aliases``
    - ``likely_subtags``
    - ``parent_exceptions``
    - ``script_aliases``
    - ``territory_aliases``
    - ``territory_currencies``
    - ``territory_languages``
    - ``territory_zones``
    - ``variant_aliases``
    - ``windows_zone_mapping``
    - ``zone_aliases``
    - ``zone_territories``

    .. note:: The internal structure of the data may change between versions.

    .. versionadded:: 0.9

    :param key: the data key
    Nz
global.dat�rb)�_global_data�os�path�join�dirname�__file__�isfiler�open�pickle�load�get)�keyr�filename�fileobjs    r�
get_globalr "s���F���'�'�,�,�r�w�w���x�8�9���7�7�<�<���6���w�w�~�~�h�'� �"�
�(�D�
!�	0�W�!�;�;�w�/�L�	0����C��$�$�	0�	0�s�C�C�ar�ar_SY�bg�bg_BG�bs�bs_BA�ca�ca_ES�cs�cs_CZ�da�da_DK�de�de_DE�el�el_GR�en�en_US�es�es_ES�et�et_EE�fa�fa_IR�fi�fi_FI�fr�fr_FR�gl�gl_ES�he�he_IL�hu�hu_HU�id�id_ID�is�is_IS�it�it_IT�ja�ja_JP�km�km_KH�ko�ko_KR�lt�lt_LT�lv�lv_LV�mk�mk_MK�nl�nl_NL�nn�nn_NO�no�nb_NO�pl�pl_PL�pt�pt_PT�ro�ro_RO�ru�ru_RU�sk�sk_SK�sl_SI�sv_SE�th_TH�tr_TR�uk_UA)�sl�sv�th�tr�ukc��eZdZdZd�Zy)rz[Exception thrown when a locale is requested for which no locale data
    is available.
    c�D�tj|d|z�||_y)zjCreate the exception.

        :param identifier: the identifier string of the unsupported locale
        zunknown locale %rN)�	Exception�__init__�
identifier)�selfrss  rrrzUnknownLocaleError.__init__`s#��
	���4�!4�z�!A�B�%��r
N)�__name__�
__module__�__qualname__�__doc__rrrr
rrr[s���%r
rc�T�eZdZdZd=d�Zedefd��Zedefd��Zed>d��Z	d�Z
d	�Zd
�Zd�Z
d�Zed
��Zd?d�Zeed��Zd?d�Zeed��Zd?d�Zeed��Zd?d�Zeed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Z ed��Z!ed ��Z"ed!��Z#ed"��Z$ed#��Z%ed$��Z&ed%��Z'ed&��Z(ed'��Z)ed(��Z*ed)��Z+ed*��Z,ed+��Z-ed,��Z.ed-��Z/ed.��Z0ed/��Z1ed0��Z2ed1��Z3ed2��Z4ed3��Z5ed4��Z6ed5��Z7ed6��Z8ed7��Z9ed8��Z:ed9��Z;ed:��Z<ed;��Z=ed<��Z>y)@raYRepresentation of a specific locale.

    >>> locale = Locale('en', 'US')
    >>> repr(locale)
    "Locale('en', territory='US')"
    >>> locale.display_name
    u'English (United States)'

    A `Locale` object can also be instantiated from a raw locale string:

    >>> locale = Locale.parse('en-US', sep='-')
    >>> repr(locale)
    "Locale('en', territory='US')"

    `Locale` objects provide access to a collection of locale data, such as
    territory and language names, number and date format patterns, and more:

    >>> locale.number_symbols['decimal']
    u'.'

    If a locale is requested for which no locale data is available, an
    `UnknownLocaleError` is raised:

    >>> Locale.parse('en_XX')
    Traceback (most recent call last):
        ...
    UnknownLocaleError: unknown locale 'en_XX'

    For more information see :rfc:`3066`.
    Nc��||_||_||_||_d|_t|�}t
j|�st|��y)aInitialize the locale object from the given identifier components.

        >>> locale = Locale('en', 'US')
        >>> locale.language
        'en'
        >>> locale.territory
        'US'

        :param language: the language code
        :param territory: the territory (country or region) code
        :param script: the script code
        :param variant: the variant code
        :raise `UnknownLocaleError`: if no locale data is available for the
                                     requested locale
        N)	�language�	territory�script�variant�
_Locale__data�strr�existsr)rtr{r|r}r~rss      rrrzLocale.__init__�sN��"!��
�"��������������Y�
�� � ��,�$�Z�0�0�-r
c�>�t||��}|j|�S)afReturn the system default locale for the specified category.

        >>> for name in ['LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LC_MESSAGES']:
        ...     os.environ[name] = ''
        >>> os.environ['LANG'] = 'fr_FR.UTF-8'
        >>> Locale.default('LC_MESSAGES')
        Locale('fr', territory='FR')

        The following fallbacks to the variable are always considered:

        - ``LANGUAGE``
        - ``LC_ALL``
        - ``LC_CTYPE``
        - ``LANG``

        :param category: one of the ``LC_XXX`` environment variable names
        :param aliases: a dictionary of aliases for locale identifiers
        )�aliases)r�parse)�cls�categoryr��
locale_strings    r�defaultzLocale.default�s��,'�x��A�
��y�y��'�'r
�_c�T�t||||��}|rtj||��Sy)a\Find the best match between available and requested locale strings.

        >>> Locale.negotiate(['de_DE', 'en_US'], ['de_DE', 'de_AT'])
        Locale('de', territory='DE')
        >>> Locale.negotiate(['de_DE', 'en_US'], ['en', 'de'])
        Locale('de')
        >>> Locale.negotiate(['de_DE', 'de'], ['en_US'])

        You can specify the character used in the locale identifiers to separate
        the differnet components. This separator is applied to both lists. Also,
        case is ignored in the comparison:

        >>> Locale.negotiate(['de-DE', 'de'], ['en-us', 'de-de'], sep='-')
        Locale('de', territory='DE')

        :param preferred: the list of locale identifers preferred by the user
        :param available: the list of locale identifiers available
        :param aliases: a dictionary of aliases for locale identifiers
        )�sepr��r�N)rrr�)r��	preferred�	availabler�r�rss      r�	negotiatezLocale.negotiate�s2��*&�i���.5�7�
���<�<�
��<�4�4�r
c����|�yt|t�r|St|t�std|����t	||��}t|�}�fd���fd�}�|�}|�|S|st
|��|\}}	}
}td�j||�}td�j|	|	f�d}	td	�j|
|
�}
td
�j||�}|	dk(rd}	|
dk(rd}
||	|
|f}t|�}td
�j|�}
|
�|t	|
��}|�|Std
�j|�}
|
� t	|
�\}}}}|||	||f�}|�|St
|��)a6Create a `Locale` instance for the given locale identifier.

        >>> l = Locale.parse('de-DE', sep='-')
        >>> l.display_name
        u'Deutsch (Deutschland)'

        If the `identifier` parameter is not a string, but actually a `Locale`
        object, that object is returned:

        >>> Locale.parse(l)
        Locale('de', territory='DE')

        This also can perform resolving of likely subtags which it does
        by default.  This is for instance useful to figure out the most
        likely locale for a territory you can use ``'und'`` as the
        language tag:

        >>> Locale.parse('und_AT')
        Locale('de', territory='AT')

        :param identifier: the locale identifier string
        :param sep: optional component separator
        :param resolve_likely_subtags: if this is specified then a locale will
                                       have its likely subtag resolved if the
                                       locale otherwise does not exist.  For
                                       instance ``zh_TW`` by itself is not a
                                       locale that exists but Babel can
                                       automatically expand it to the full
                                       form of ``zh_hant_TW``.  Note that this
                                       expansion is only taking place if no
                                       locale exists otherwise.  For instance
                                       there is a locale ``en`` that can exist
                                       by itself.
        :raise `ValueError`: if the string does not appear to be a valid locale
                             identifier
        :raise `UnknownLocaleError`: if no locale data is available for the
                                     requested locale
        Nz!Unexpected value for identifier: r�c�.��	�|�S#t$rYywxYw�N)r)�partsr�s �r�	_try_loadzLocale.parse.<locals>._try_loads$���
��E�{�"��%�
��
�s��	�c�<���|�}|�|S�|dd�}|�|Sy)N�r)r��localer�s  �r�_try_load_reducingz(Locale.parse.<locals>._try_load_reducings:����u�%�F��!��
��u�R�a�y�)�F��!��
�"r
�language_aliases�territory_aliasesr�script_aliases�variant_aliases�ZZ�Zzzz�likely_subtags)	�
isinstancerr��	TypeErrorr	�get_locale_identifierrr r)r�rsr��resolve_likely_subtagsr��input_idr�r�r{r|r}r~�new_id�
likely_subtag�	language2r��script2�variant2r�s`                 @rr�zLocale.parse�s����P���
�
�F�
+����J��,��Z�Q�R�R��Z�S�1��(��/��	�		��5�!�����M�%�$�X�.�.�05�,��)�V�W��0�1�5�5�h��I���2�3�7�7�	�I�<�P�QR�S�	��,�-�1�1�&�&�A���.�/�3�3�G�W�E������I��V���F��)�V�W�4��'�u�-��"�#3�4�8�8��@�
��$�'��]�(C�D�F��!��
�#�#3�4�8�8��B�
��$�.:�=�.I�+�I�q�'�8�'��I�w��(Q�R�F��!��
� ��*�*r
c��dD]}t||�r�y|j|jk(xrO|j|jk(xr4|j|jk(xr|j|jk(S)N)r{r|r}r~F)�hasattrr{r|r}r~)rt�otherrs   r�__eq__z
Locale.__eq__Lsv��A�	�C��5�#�&��	��
�
����/�,�
�^�^�u���
.�,�
�[�[�E�L�L�
(�,��\�\�U�]�]�
*�	,r
c�&�|j|�Sr�)r�)rtr�s  r�__ne__z
Locale.__ne__Us���;�;�u�%�%�%r
c�p�t|j|j|j|jf�Sr�)�hashr{r|r}r~�rts r�__hash__zLocale.__hash__Xs&���T�]�]�D�N�N�D�K�K����N�O�Or
c��dg}dD]'}t||�}|��|j|�d|����)d|jzdj|�z}d|zS)N�)r|r}r~�=z%r�, z
Locale(%s))�getattr�appendr{r)rt�
parametersr�value�parameter_strings     r�__repr__zLocale.__repr__[sh���T�
�5�	:�C��D�#�&�E�� ��!�!�S�%�"8�9�	:� �$�-�-�/�$�)�)�J�2G�G���.�.�.r
c�p�t|j|j|j|jf�Sr�)r�r{r|r}r~r�s r�__str__zLocale.__str__ds0��$�d�m�m�T�^�^�&*�k�k�4�<�<�&A�B�	Br
c��|j�6tjtjt	|���|_|jSr�)rr�LocaleDataDictrr�r�s r�_datazLocale._datahs5���;�;��$�3�3�J�O�O�C��I�4N�O�D�K��{�{�r
c��|�|}tj|�}|jj|j�}|�r|j
s|js|jr�g}|jr4|j|jj|j��|j
r4|j|jj|j
��|jr4|j|jj|j��td|�}|r|ddj|�zz
}|S)aRReturn the display name of the locale using the given locale.

        The display name will include the language, territory, script, and
        variant, if those are specified.

        >>> Locale('zh', 'CN', script='Hans').get_display_name('en')
        u'Chinese (Simplified, China)'

        :param locale: the locale to use
        Nz (%s)r�)rr��	languagesrr{r|r}r~r��scripts�territories�variants�filterr)rtr��retval�detailss    r�get_display_namezLocale.get_display_namens����>��F����f�%���!�!�%�%�d�m�m�4���t�~�~��������G��{�{����v�~�~�1�1�$�+�+�>�?��~�~����v�1�1�5�5�d�n�n�E�F��|�|����v���2�2�4�<�<�@�A��T�7�+�G���'�E�J�J�w�$7�7�7���
r
a        The localized display name of the locale.

        >>> Locale('en').display_name
        u'English'
        >>> Locale('en', 'US').display_name
        u'English (United States)'
        >>> Locale('sv').display_name
        u'svenska'

        :type: `unicode`
        )�docc�~�|�|}tj|�}|jj|j�S)z�Return the language of this locale in the given locale.

        >>> Locale('zh', 'CN', script='Hans').get_language_name('de')
        u'Chinesisch'

        .. versionadded:: 1.0

        :param locale: the locale to use
        )rr�r�rr{�rtr�s  r�get_language_namezLocale.get_language_name�s7���>��F����f�%�����#�#�D�M�M�2�2r
zx        The localized language name of the locale.

        >>> Locale('en', 'US').language_name
        u'English'
    c�~�|�|}tj|�}|jj|j�S)z.Return the territory name in the given locale.)rr�r�rr|r�s  r�get_territory_namezLocale.get_territory_name�s5���>��F����f�%���!�!�%�%�d�n�n�5�5r
z�        The localized territory name of the locale if available.

        >>> Locale('de', 'DE').territory_name
        u'Deutschland'
    c�~�|�|}tj|�}|jj|j�S)z+Return the script name in the given locale.)rr�r�rr}r�s  r�get_script_namezLocale.get_script_name�s3���>��F����f�%���~�~�!�!�$�+�+�.�.r
z�        The localized script name of the locale if available.

        >>> Locale('sr', 'ME', script='Latn').script_name
        u'latinica'
    c�6�|jtd��S)z�The english display name of the locale.

        >>> Locale('de').english_name
        u'German'
        >>> Locale('de', 'DE').english_name
        u'German (Germany)'

        :type: `unicode`r1)r�rr�s r�english_namezLocale.english_name�s���$�$�V�D�\�2�2r
c� �|jdS)z�Mapping of language codes to translated language names.

        >>> Locale('de', 'DE').languages['ja']
        u'Japanisch'

        See `ISO 639 <http://www.loc.gov/standards/iso639-2/>`_ for
        more information.
        r��r�r�s rr�zLocale.languages�s���z�z�+�&�&r
c� �|jdS)z�Mapping of script codes to translated script names.

        >>> Locale('en', 'US').scripts['Hira']
        u'Hiragana'

        See `ISO 15924 <http://www.evertype.com/standards/iso15924/>`_
        for more information.
        r�r�r�s rr�zLocale.scripts�s���z�z�)�$�$r
c� �|jdS)z�Mapping of script codes to translated script names.

        >>> Locale('es', 'CO').territories['DE']
        u'Alemania'

        See `ISO 3166 <http://www.iso.org/iso/en/prods-services/iso3166ma/>`_
        for more information.
        r�r�r�s rr�zLocale.territories�s���z�z�-�(�(r
c� �|jdS)z�Mapping of script codes to translated script names.

        >>> Locale('de', 'DE').variants['1901']
        u'Alte deutsche Rechtschreibung'
        r�r�r�s rr�zLocale.variants�����z�z�*�%�%r
c� �|jdS)a�Mapping of currency codes to translated currency names.  This
        only returns the generic form of the currency name, not the count
        specific one.  If an actual number is requested use the
        :func:`babel.numbers.get_currency_name` function.

        >>> Locale('en').currencies['COP']
        u'Colombian Peso'
        >>> Locale('de', 'DE').currencies['COP']
        u'Kolumbianischer Peso'
        �currency_namesr�r�s r�
currencieszLocale.currenciess���z�z�*�+�+r
c� �|jdS)z�Mapping of currency codes to symbols.

        >>> Locale('en', 'US').currency_symbols['USD']
        u'$'
        >>> Locale('es', 'CO').currency_symbols['USD']
        u'US$'
        �currency_symbolsr�r�s rr�zLocale.currency_symbolss���z�z�,�-�-r
c� �|jdS)z�Symbols used in number formatting.

        .. note:: The format of the value returned may change between
                  Babel versions.

        >>> Locale('fr', 'FR').number_symbols['decimal']
        u','
        �number_symbolsr�r�s rr�zLocale.number_symbolss���z�z�*�+�+r
c� �|jdS)z�Locale patterns for decimal number formatting.

        .. note:: The format of the value returned may change between
                  Babel versions.

        >>> Locale('en', 'US').decimal_formats[None]
        <NumberPattern u'#,##0.###'>
        �decimal_formatsr�r�s rr�zLocale.decimal_formats+����z�z�+�,�,r
c� �|jdS)a{Locale patterns for currency number formatting.

        .. note:: The format of the value returned may change between
                  Babel versions.

        >>> Locale('en', 'US').currency_formats['standard']
        <NumberPattern u'\xa4#,##0.00'>
        >>> Locale('en', 'US').currency_formats['accounting']
        <NumberPattern u'\xa4#,##0.00;(\xa4#,##0.00)'>
        �currency_formatsr�r�s rr�zLocale.currency_formats7����z�z�,�-�-r
c� �|jdS)z�Locale patterns for percent number formatting.

        .. note:: The format of the value returned may change between
                  Babel versions.

        >>> Locale('en', 'US').percent_formats[None]
        <NumberPattern u'#,##0%'>
        �percent_formatsr�r�s rr�zLocale.percent_formatsEr�r
c� �|jdS)z�Locale patterns for scientific number formatting.

        .. note:: The format of the value returned may change between
                  Babel versions.

        >>> Locale('en', 'US').scientific_formats[None]
        <NumberPattern u'#E0'>
        �scientific_formatsr�r�s rr�zLocale.scientific_formatsQs���z�z�.�/�/r
c�P�	|jdddS#t$ricYSwxYw)zrLocale display names for day periods (AM/PM).

        >>> Locale('en', 'US').periods['am']
        u'AM'
        �day_periodszstand-alone�wide)r��KeyErrorr�s r�periodszLocale.periods_s4��	��:�:�m�,�]�;�F�C�C���	��I�	�s��%�%c� �|jdS)z�Locale display names for various day periods (not necessarily only AM/PM).

        These are not meant to be used without the relevant `day_period_rules`.
        r�r�r�s rr�zLocale.day_periodsks���z�z�-�(�(r
c�:�|jjdi�S)zCDay period rules for the locale.  Used by `get_period_id`.
        �day_period_rules)r�rr�s rr�zLocale.day_period_rulesss���z�z�~�~�0�"�5�5r
c� �|jdS)z{Locale display names for weekdays.

        >>> Locale('de', 'DE').days['format']['wide'][3]
        u'Donnerstag'
        �daysr�r�s rr�zLocale.daysys���z�z�&�!�!r
c� �|jdS)zyLocale display names for months.

        >>> Locale('de', 'DE').months['format']['wide'][10]
        u'Oktober'
        �monthsr�r�s rr�z
Locale.months�s���z�z�(�#�#r
c� �|jdS)zLocale display names for quarters.

        >>> Locale('de', 'DE').quarters['format']['wide'][1]
        u'1. Quartal'
        �quartersr�r�s rr�zLocale.quarters�r�r
c� �|jdS)aLocale display names for eras.

        .. note:: The format of the value returned may change between
                  Babel versions.

        >>> Locale('en', 'US').eras['wide'][1]
        u'Anno Domini'
        >>> Locale('en', 'US').eras['abbreviated'][0]
        u'BC'
        �erasr�r�s rr�zLocale.eras�s���z�z�&�!�!r
c� �|jdS)ucLocale display names for time zones.

        .. note:: The format of the value returned may change between
                  Babel versions.

        >>> Locale('en', 'US').time_zones['Europe/London']['long']['daylight']
        u'British Summer Time'
        >>> Locale('en', 'US').time_zones['America/St_Johns']['city']
        u'St. John’s'
        �
time_zonesr�r�s rr�zLocale.time_zones�s���z�z�,�'�'r
c� �|jdS)a�Locale display names for meta time zones.

        Meta time zones are basically groups of different Olson time zones that
        have the same GMT offset and daylight savings time.

        .. note:: The format of the value returned may change between
                  Babel versions.

        >>> Locale('en', 'US').meta_zones['Europe_Central']['long']['daylight']
        u'Central European Summer Time'

        .. versionadded:: 0.9
        �
meta_zonesr�r�s rrzLocale.meta_zones�s���z�z�,�'�'r
c� �|jdS)acPatterns related to the formatting of time zones.

        .. note:: The format of the value returned may change between
                  Babel versions.

        >>> Locale('en', 'US').zone_formats['fallback']
        u'%(1)s (%(0)s)'
        >>> Locale('pt', 'BR').zone_formats['region']
        u'Hor\xe1rio %s'

        .. versionadded:: 0.9
        �zone_formatsr�r�s rrzLocale.zone_formats�s���z�z�.�)�)r
c�&�|jddS)z�The first day of a week, with 0 being Monday.

        >>> Locale('de', 'DE').first_week_day
        0
        >>> Locale('en', 'US').first_week_day
        6
        �	week_data�	first_dayr�r�s r�first_week_dayzLocale.first_week_day�s���z�z�+�&�{�3�3r
c�&�|jddS)zqThe day the weekend starts, with 0 being Monday.

        >>> Locale('de', 'DE').weekend_start
        5
        r�
weekend_startr�r�s rrzLocale.weekend_start�s���z�z�+�&��7�7r
c�&�|jddS)zmThe day the weekend ends, with 0 being Monday.

        >>> Locale('de', 'DE').weekend_end
        6
        r�weekend_endr�r�s rr
zLocale.weekend_end�s���z�z�+�&�}�5�5r
c�&�|jddS)z�The minimum number of days in a week so that the week is counted as
        the first week of a year or month.

        >>> Locale('de', 'DE').min_week_days
        4
        r�min_daysr�r�s r�
min_week_dayszLocale.min_week_days�s���z�z�+�&�z�2�2r
c� �|jdS)aJLocale patterns for date formatting.

        .. note:: The format of the value returned may change between
                  Babel versions.

        >>> Locale('en', 'US').date_formats['short']
        <DateTimePattern u'M/d/yy'>
        >>> Locale('fr', 'FR').date_formats['long']
        <DateTimePattern u'd MMMM y'>
        �date_formatsr�r�s rrzLocale.date_formats�����z�z�.�)�)r
c� �|jdS)aLLocale patterns for time formatting.

        .. note:: The format of the value returned may change between
                  Babel versions.

        >>> Locale('en', 'US').time_formats['short']
        <DateTimePattern u'h:mm a'>
        >>> Locale('fr', 'FR').time_formats['long']
        <DateTimePattern u'HH:mm:ss z'>
        �time_formatsr�r�s rrzLocale.time_formatsrr
c� �|jdS)a,Locale patterns for datetime formatting.

        .. note:: The format of the value returned may change between
                  Babel versions.

        >>> Locale('en').datetime_formats['full']
        u"{1} 'at' {0}"
        >>> Locale('th').datetime_formats['medium']
        u'{1} {0}'
        �datetime_formatsr�r�s rrzLocale.datetime_formatsr�r
c� �|jdS)aALocale patterns for formatting parts of a datetime.

        >>> Locale('en').datetime_skeletons['MEd']
        <DateTimePattern u'E, M/d'>
        >>> Locale('fr').datetime_skeletons['MEd']
        <DateTimePattern u'E dd/MM'>
        >>> Locale('fr').datetime_skeletons['H']
        <DateTimePattern u"HH 'h'">
        �datetime_skeletonsr�r�s rrzLocale.datetime_skeletons"s���z�z�.�/�/r
c� �|jdS)uLocale patterns for interval formatting.

        .. note:: The format of the value returned may change between
                  Babel versions.

        How to format date intervals in Finnish when the day is the
        smallest changing component:

        >>> Locale('fi_FI').interval_formats['MEd']['d']
        [u'E d. – ', u'E d.M.']

        .. seealso::

           The primary API to use this data is :py:func:`babel.dates.format_interval`.


        :rtype: dict[str, dict[str, list[str]]]
        �interval_formatsr�r�s rrzLocale.interval_formats/s��(�z�z�,�-�-r
c�B�|jjdt�S)aPlural rules for the locale.

        >>> Locale('en').plural_form(1)
        'one'
        >>> Locale('en').plural_form(0)
        'other'
        >>> Locale('fr').plural_form(0)
        'one'
        >>> Locale('ru').plural_form(100)
        'many'
        �plural_form�r�r�_default_plural_ruler�s rrzLocale.plural_formEs���z�z�~�~�m�-A�B�Br
c� �|jdS)a�Patterns for generating lists

        .. note:: The format of the value returned may change between
                  Babel versions.

        >>> Locale('en').list_patterns['standard']['start']
        u'{0}, {1}'
        >>> Locale('en').list_patterns['standard']['end']
        u'{0}, and {1}'
        >>> Locale('en_GB').list_patterns['standard']['end']
        u'{0} and {1}'
        �
list_patternsr�r�s rrzLocale.list_patternsTs���z�z�/�*�*r
c�B�|jjdt�S)a?Plural rules for the locale.

        >>> Locale('en').ordinal_form(1)
        'one'
        >>> Locale('en').ordinal_form(2)
        'two'
        >>> Locale('en').ordinal_form(3)
        'few'
        >>> Locale('fr').ordinal_form(2)
        'other'
        >>> Locale('ru').ordinal_form(100)
        'other'
        �ordinal_formrr�s rr zLocale.ordinal_formds���z�z�~�~�n�.B�C�Cr
c� �|jdS)z�Localized names for various measurement systems.

        >>> Locale('fr', 'FR').measurement_systems['US']
        u'am\xe9ricain'
        >>> Locale('en', 'US').measurement_systems['US']
        u'US'

        �measurement_systemsr�r�s rr"zLocale.measurement_systemsus���z�z�/�0�0r
c� �|jdS)z�The text direction for the language.

        >>> Locale('de', 'DE').character_order
        'left-to-right'
        >>> Locale('ar', 'SA').character_order
        'right-to-left'
        �character_orderr�r�s rr$zLocale.character_order�s���z�z�+�,�,r
c�d�djd�|jjd�D��S)z�The text direction for the language in CSS short-hand form.

        >>> Locale('de', 'DE').text_direction
        'ltr'
        >>> Locale('ar', 'SA').text_direction
        'rtl'
        r�c3�&K�|]	}|d���y�w)rNr)�.0�words  r�	<genexpr>z(Locale.text_direction.<locals>.<genexpr>�s����K�4�t�A�w�K�s��-)rr$�splitr�s r�text_directionzLocale.text_direction�s*���w�w�K�4�+?�+?�+E�+E�c�+J�K�K�Kr
c� �|jdS)z�Display names for units of measurement.

        .. seealso::

           You may want to use :py:func:`babel.units.get_unit_name` instead.

        .. note:: The format of the value returned may change between
                  Babel versions.

        �unit_display_namesr�r�s rr.zLocale.unit_display_names�s���z�z�.�/�/r
)NNN)r�Tr�)?rurvrwrxrr�classmethod�LOCALE_ALIASESr�r�r�r�r�r�r�r��propertyr�r��display_namer��
language_namer��territory_namer��script_namer�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr
r
rrrrrrrr r"r$r,r.rr
rrrks����>1�<�"�N�(��(�0�14�n�5��5�2�m+��m+�^,�&�P�/�B�����
�8�,�3�
�L�
3��.�5�	�M�6��0�7�	�N�/��?�1�	�K��	3��	3��	'��	'��	%��	%��	)��	)��&��&��,��,��.��.��	,��	,��	-��	-��.��.��	-��	-��	0��	0��	��	��)��)��6��6�
�"��"��$��$��&��&��"��"��(��(��(��(� �
*��
*��4��4��8��8��6��6��3��3��*��*��*��*��.��.��
0��
0��.��.�*�C��C��
+��
+��D��D� �	1��	1��-��-��L��L��0��0r
rc�0�|ddddf}td|�D]q}tj|�}|s�|dk(rd|vr|jd�d}|jd�dd	vrd
}n|r	||vr||}	t	t|��cSy#t$rY��wxYw)a�Returns the system default locale for a given category, based on
    environment variables.

    >>> for name in ['LANGUAGE', 'LC_ALL', 'LC_CTYPE']:
    ...     os.environ[name] = ''
    >>> os.environ['LANG'] = 'fr_FR.UTF-8'
    >>> default_locale('LC_MESSAGES')
    'fr_FR'

    The "C" or "POSIX" pseudo-locales are treated as aliases for the
    "en_US_POSIX" locale:

    >>> os.environ['LC_MESSAGES'] = 'POSIX'
    >>> default_locale('LC_MESSAGES')
    'en_US_POSIX'

    The following fallbacks to the variable are always considered:

    - ``LANGUAGE``
    - ``LC_ALL``
    - ``LC_CTYPE``
    - ``LANG``

    :param category: one of the ``LC_XXX`` environment variable names
    :param aliases: a dictionary of aliases for locale identifiers
    �LANGUAGE�LC_ALL�LC_CTYPE�LANGN�:r�.)�C�POSIX�en_US_POSIX)r�r�getenvr+r�r	�
ValueError)r�r��varnames�namer�s     rrr�s���6�*�h�
�F�C�H��t�X�&������4�����z�!�c�V�m� ���c�*�1�-���|�|�C� ��#�~�5�&���V�w�.� ����
�,�\�&�-A�B�B����
��
�s�1B	�		B�Br�c�~�|D�cgc]}|s�|j���}}|D]�}|j�}||vr|cS|r;|j|�}|r(|jd|�}|j�|vr|cS|j|�}t	|�dkDs�x|dj�|vs��|dcSycc}w)ulFind the best match between available and requested locale strings.

    >>> negotiate_locale(['de_DE', 'en_US'], ['de_DE', 'de_AT'])
    'de_DE'
    >>> negotiate_locale(['de_DE', 'en_US'], ['en', 'de'])
    'de'

    Case is ignored by the algorithm, the result uses the case of the preferred
    locale identifier:

    >>> negotiate_locale(['de_DE', 'en_US'], ['de_de', 'de_at'])
    'de_DE'

    >>> negotiate_locale(['de_DE', 'en_US'], ['de_de', 'de_at'])
    'de_DE'

    By default, some web browsers unfortunately do not include the territory
    in the locale identifier for many locales, and some don't even allow the
    user to easily add the territory. So while you may prefer using qualified
    locale identifiers in your web-application, they would not normally match
    the language-only locale sent by such browsers. To workaround that, this
    function uses a default mapping of commonly used language-only locale
    identifiers to identifiers including the territory:

    >>> negotiate_locale(['ja', 'en_US'], ['ja_JP', 'en_US'])
    'ja_JP'

    Some browsers even use an incorrect or outdated language code, such as "no"
    for Norwegian, where the correct locale identifier would actually be "nb_NO"
    (Bokmål) or "nn_NO" (Nynorsk). The aliases are intended to take care of
    such cases, too:

    >>> negotiate_locale(['no', 'sv'], ['nb_NO', 'sv_SE'])
    'nb_NO'

    You can override this default mapping by passing a different `aliases`
    dictionary to this function, or you can bypass the behavior althogher by
    setting the `aliases` parameter to `None`.

    :param preferred: the list of locale strings preferred by the user
    :param available: the list of locale strings available
    :param sep: character that separates the different parts of the locale
                strings
    :param aliases: a dictionary of aliases for locale identifiers
    r��rN)�lowerr�replacer+�len)	r�r�r�r��ar��ll�aliasr�s	         rrr�s���\%.�3�q������3�I�3����
�\�\�^��
��?��M���K�K��O�E���
�
�c�3�/���;�;�=�I�-� �L����S�!���u�:��>�e�A�h�n�n�.�)�;���8�O����4s
�B:�B:c��d|vr|jdd�d}d|vr|jdd�d}|j|�}|jd�j�}|j�st	d|z��dx}x}}|rCt|d�dk(r2|dj�r|jd�j
�}|ryt|d�dk(r3|dj�r |jd�j�}n5t|d�d	k(r$|dj�r|jd�}|rlt|d�dk(r|ddj�s't|d�d
k\r4|ddj�r|j�j�}|rt	d|z��||||fS)a�Parse a locale identifier into a tuple of the form ``(language,
    territory, script, variant)``.

    >>> parse_locale('zh_CN')
    ('zh', 'CN', None, None)
    >>> parse_locale('zh_Hans_CN')
    ('zh', 'CN', 'Hans', None)
    >>> parse_locale('ca_es_valencia')
    ('ca', 'ES', None, 'VALENCIA')
    >>> parse_locale('en_150')
    ('en', '150', None, None)
    >>> parse_locale('en_us_posix')
    ('en', 'US', None, 'POSIX')

    The default component separator is "_", but a different separator can be
    specified using the `sep` parameter:

    >>> parse_locale('zh-CN', sep='-')
    ('zh', 'CN', None, None)

    If the identifier cannot be parsed into a locale, a `ValueError` exception
    is raised:

    >>> parse_locale('not_a_LOCALE_String')
    Traceback (most recent call last):
      ...
    ValueError: 'not_a_LOCALE_String' is not a valid locale identifier

    Encoding information and locale modifiers are removed from the identifier:

    >>> parse_locale('it_IT@euro')
    ('it', 'IT', None, None)
    >>> parse_locale('en_US.UTF-8')
    ('en', 'US', None, None)
    >>> parse_locale('de_DE.iso885915@euro')
    ('de', 'DE', None, None)

    See :rfc:`4646` for more information.

    :param identifier: the locale identifier string
    :param sep: character that separates the different components of the locale
                identifier
    :raise `ValueError`: if the string does not appear to be a valid locale
                         identifier
    r<rEr�@zexpected only letters, got %rN�r���z#%r is not a valid locale identifier)	r+�poprF�isalpharArH�title�upper�isdigit)rsr�r��langr}r|r~s       rr	r	s���\�j���%�%�c�1�-�a�0�
�
�j�� �%�%�c�1�-�a�0�
����S�!�E��9�9�Q�<����D��<�<�>��8�4�?�@�@�#'�'�F�'�Y����u�Q�x�=�A��%��(�"2�"2�"4��Y�Y�q�\�'�'�)�F���u�Q�x�=�A��%��(�"2�"2�"4��	�	�!��*�*�,�I�
��q��]�a�
�E�!�H�$4�$4�$6��	�	�!��I���u�Q�x�=�A��%��(�1�+�"5�"5�"7��E�!�H�
��"�u�Q�x��{�':�':�'<��i�i�k�'�'�)�G���>��K�L�L���F�G�+�+r
c	��t|dd�}|ddt|�z
zz\}}}}|jtd||||f��S)a�The reverse of :func:`parse_locale`.  It creates a locale identifier out
    of a ``(language, territory, script, variant)`` tuple.  Items can be set to
    ``None`` and trailing ``None``\s can also be left out of the tuple.

    >>> get_locale_identifier(('de', 'DE', None, '1999'))
    'de_DE_1999'

    .. versionadded:: 1.0

    :param tup: the tuple as returned by :func:`parse_locale`.
    :param sep: the separator for the identifier.
    NrNr�)�tuplerHrr�)�tupr�rVr|r}r~s      rr�r�csR����B�Q��.�C�'*�W��C��H��-E�'E�$�D�)�V�W��8�8�F�4�$��	�7�!C�D�E�Er
)r�)rxrr�babelr�babel.pluralr�__all__rrrr r0rqrrrrr	r�rr
r�<module>r]s#����	��#�����!�"�~��2�*%�Z	��'�	���	�"&��	�15�w�	�@D�g�	��'�	���	�"&��	�15�w�	�@D�g�	�	�'�	���	�#'��	�26�w�	�AE�g�	�	�'�		���		�#'��		�26�w�		�AE�g�		�
	�'�	�
��	�
#'��	�
26�w�	�
AE�g�	�	�'�
	���
	�#'��
	�26�w�
	�AE�g�
	�	�'�	���	�#'��	�26�w�	�GN�
���w�	��
%��
%� x0�x0�v!�.�*�Z03�N�<�~N,�bFr

Zerion Mini Shell 1.0