<s> from django . conf import settings <EOL> from django . utils . encoding import force_text <EOL> from django . utils . safestring import mark_safe , SafeData <EOL> def ngettext ( singular , plural , number ) : <EOL> if number == <NUM_LIT:1> : return singular <EOL> return plural <EOL> ngettext_lazy = ngettext <EOL> def ungettext ( singular , plural , number ) : <EOL> return force_text ( ngettext ( singular , plural , number ) ) <EOL> def pgettext ( context , message ) : <EOL> return ugettext ( message ) <EOL> def npgettext ( context , singular , plural , number ) : <EOL> return ungettext ( singular , plural , number ) <EOL> activate = lambda x : None <EOL> deactivate = deactivate_all = lambda : None <EOL> get_language = lambda : settings . LANGUAGE_CODE <EOL> get_language_bidi = lambda : settings . LANGUAGE_CODE in settings . LANGUAGES_BIDI <EOL> check_for_language = lambda x : True <EOL> TECHNICAL_ID_MAP = { <EOL> "<STR_LIT>" : settings . DATETIME_FORMAT , <EOL> "<STR_LIT>" : settings . DATE_FORMAT , <EOL> "<STR_LIT>" : settings . DATETIME_FORMAT , <EOL> "<STR_LIT>" : settings . TIME_FORMAT , <EOL> "<STR_LIT>" : settings . YEAR_MONTH_FORMAT , <EOL> "<STR_LIT>" : settings . MONTH_DAY_FORMAT , <EOL> } <EOL> def gettext ( message ) : <EOL> result = TECHNICAL_ID_MAP . get ( message , message ) <EOL> if isinstance ( message , SafeData ) : <EOL> return mark_safe ( result ) <EOL> return result <EOL> def ugettext ( message ) : <EOL> return force_text ( gettext ( message ) ) <EOL> gettext_noop = gettext_lazy = _ = gettext <EOL> def to_locale ( language ) : <EOL> p = language . find ( '<STR_LIT:->' ) <EOL> if p >= <NUM_LIT:0> : <EOL> return language [ : p ] . lower ( ) + '<STR_LIT:_>' + language [ p + <NUM_LIT:1> : ] . upper ( ) <EOL> else : <EOL> return language . lower ( ) <EOL> def get_language_from_request ( request , check_path = False ) : <EOL> return settings . LANGUAGE_CODE <EOL> def get_language_from_path ( request ) : <EOL> return None </s>
