Docs for T.translate.im_class
Description
<type 'type'> extends (<type 'object'>,)
|
Attributes
T.translate.im_class.M |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
Gets cached translated markmin-message with inserted parametes if lazy==True lazyT object is returned |
T.translate.im_class.__call__ |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
get cached translated plain text message with inserted parameters(symbols) if lazy==True lazyT object is returned |
T.translate.im_class.__class__ |
<type 'type'> extends (<type 'object'>,)
belongs to class <type 'type'>
type(object) -> the object's type type(name, bases, dict) -> a new type |
T.translate.im_class.__delattr__ |
<type 'wrapper_descriptor'>
belongs to class <type 'wrapper_descriptor'>
x.__delattr__('name') <==> del x.name |
T.translate.im_class.__dict__ |
<type 'dictproxy'>
belongs to class <type 'dictproxy'>
|
T.translate.im_class.__doc__ |
<type 'str'>
belongs to class <type 'str'>
str(object='') -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object. |
T.translate.im_class.__format__ |
<type 'method_descriptor'>
belongs to class <type 'method_descriptor'>
default object formatter |
T.translate.im_class.__get_otherT__ |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
T.translate.im_class.__getattribute__ |
<type 'wrapper_descriptor'>
belongs to class <type 'wrapper_descriptor'>
x.__getattribute__('name') <==> x.name |
T.translate.im_class.__hash__ |
<type 'wrapper_descriptor'>
belongs to class <type 'wrapper_descriptor'>
x.__hash__() <==> hash(x) |
T.translate.im_class.__init__ |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
T.translate.im_class.__module__ |
<type 'str'>
belongs to class <type 'str'>
str(object='') -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object. |
T.translate.im_class.__new__ |
<type 'builtin_function_or_method'>
belongs to class <type 'builtin_function_or_method'>
T.__new__(S, ...) -> a new object with type S, a subtype of T |
T.translate.im_class.__reduce__ |
<type 'method_descriptor'>
belongs to class <type 'method_descriptor'>
helper for pickle |
T.translate.im_class.__reduce_ex__ |
<type 'method_descriptor'>
belongs to class <type 'method_descriptor'>
helper for pickle |
T.translate.im_class.__repr__ |
<type 'wrapper_descriptor'>
belongs to class <type 'wrapper_descriptor'>
x.__repr__() <==> repr(x) |
T.translate.im_class.__setattr__ |
<type 'wrapper_descriptor'>
belongs to class <type 'wrapper_descriptor'>
x.__setattr__('name', value) <==> x.name = value |
T.translate.im_class.__sizeof__ |
<type 'method_descriptor'>
belongs to class <type 'method_descriptor'>
__sizeof__() -> int size of object in memory, in bytes |
T.translate.im_class.__str__ |
<type 'wrapper_descriptor'>
belongs to class <type 'wrapper_descriptor'>
x.__str__() <==> str(x) |
T.translate.im_class.__subclasshook__ |
<type 'builtin_function_or_method'>
belongs to class <type 'builtin_function_or_method'>
Abstract classes can override this to customize issubclass(). This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached). |
T.translate.im_class.__weakref__ |
<type 'getset_descriptor'>
belongs to class <type 'getset_descriptor'>
list of weak references to the object (if defined) |
T.translate.im_class.apply_filter |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
|
T.translate.im_class.force |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
Selects language(s) for translation if a list of languages is passed as a parameter, the first language from this list that matches the ones from the possible_languages dictionary will be selected default language will be selected if none of them matches possible_languages. |
T.translate.im_class.get_possible_languages |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
Gets list of all possible languages for current application |
T.translate.im_class.get_possible_languages_info |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
Returns info for selected language or dictionary with all possible languages info from `APP/languages/*.py` It Returns: - a tuple containing:: langcode, langname, langfile_mtime, pluraldict_fname, pluraldict_mtime, prules_langcode, nplurals, get_plural_id, construct_plural_form or None - if *lang* is NOT defined a dictionary with all possible languages:: { langcode(from filename): ( langcode, # language code from !langcode! langname, # language name in national spelling from !langname! langfile_mtime, # m_time of language file pluraldict_fname,# name of plural dictionary file or None (when default.py is not exist) pluraldict_mtime,# m_time of plural dictionary file or 0 if file is not exist prules_langcode, # code of plural rules language or 'default' nplurals, # nplurals for current language get_plural_id, # get_plural_id() for current language construct_plural_form) # construct_plural_form() for current language } Args: lang (str): language |
T.translate.im_class.get_t |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
Use ## to add a comment into a translation string the comment can be useful do discriminate different possible translations for the same string (for example different locations):: T(' hello world ') -> ' hello world ' T(' hello world ## token') -> ' hello world ' T('hello ## world## token') -> 'hello ## world' the ## notation is ignored in multiline strings and strings that start with ##. This is needed to allow markmin syntax to be translated |
T.translate.im_class.params_substitution |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
Substitutes parameters from symbols into message using %. also parse `%%{}` placeholders for plural-forms processing. Returns: string with parameters Note: *symbols* MUST BE OR tuple OR dict of parameters! |
T.translate.im_class.plural |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
Gets plural form of word for number *n* invoked from T()/T.M() in `%%{}` tag Note: "word" MUST be defined in current language (T.accepted_language) Args: word (str): word in singular n (numeric): number plural form created for Returns: word (str): word in appropriate singular/plural form |
T.translate.im_class.set_current_languages |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
Sets current AKA "default" languages Setting one of this languages makes the force() function to turn translation off |
T.translate.im_class.translate |
<type 'instancemethod'>
belongs to class <type 'instancemethod'>
Gets cached translated message with inserted parameters(symbols) |