https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /proc/self/root/lib/python2.7/site-packages/timeago/locales/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/lib/python2.7/site-packages/timeago/locales/__init__.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Created on 2016-5-26

@author: hustcc
'''
from __future__ import absolute_import

from timeago import setting


def locale_module(mod, locale):
    try:
        return getattr(getattr(getattr(mod, 'locales'), locale), 'LOCALE')
    except:
        raise


def timeago_template(locale, index, ago_in):
    '''
    simple locale implement
    '''
    try:
        LOCALE = __import__('timeago.locales.' + locale)
        LOCALE = locale_module(LOCALE, locale)
    except:
        locale = setting.DEFAULT_LOCALE
        LOCALE = __import__('timeago.locales.' + locale)
        LOCALE = locale_module(LOCALE, locale)

    if isinstance(LOCALE, list):
        return LOCALE[index][ago_in]
    else:
        return LOCALE(index, ago_in)

https://t.me/AnonymousX5 - 2025