Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Static Protected Attributes | List of all members
babel.support.NullTranslations Class Reference
Inheritance diagram for babel.support.NullTranslations:
Inheritance graph
[legend]
Collaboration diagram for babel.support.NullTranslations:
Collaboration graph
[legend]

Public Member Functions

None __init__ (self, gettext._TranslationsReader|None fp=None)
 
str dgettext (self, str domain, str message)
 
str ldgettext (self, str domain, str message)
 
str udgettext (self, str domain, str message)
 
str dngettext (self, str domain, str singular, str plural, int num)
 
str ldngettext (self, str domain, str singular, str plural, int num)
 
str udngettext (self, str domain, str singular, str plural, int num)
 
str|object pgettext (self, str context, str message)
 
str|bytes|object lpgettext (self, str context, str message)
 
str npgettext (self, str context, str singular, str plural, int num)
 
str|bytes lnpgettext (self, str context, str singular, str plural, int num)
 
str upgettext (self, str context, str message)
 
str unpgettext (self, str context, str singular, str plural, int num)
 
str|object dpgettext (self, str domain, str context, str message)
 
str udpgettext (self, str domain, str context, str message)
 
str|bytes|object ldpgettext (self, str domain, str context, str message)
 
str dnpgettext (self, str domain, str context, str singular, str plural, int num)
 
str udnpgettext (self, str domain, str context, str singular, str plural, int num)
 
str|bytes ldnpgettext (self, str domain, str context, str singular, str plural, int num)
 

Public Attributes

 files
 
 domain
 

Static Public Attributes

 DEFAULT_DOMAIN = None
 
str dugettext = udgettext
 
str dungettext = udngettext
 
str CONTEXT_ENCODING = '%s\x04%s'
 
str dupgettext = udpgettext
 
str dunpgettext = udnpgettext
 
 ugettext = gettext.NullTranslations.gettext
 
 ungettext = gettext.NullTranslations.ngettext
 

Static Protected Attributes

dict _info [str, str]
 
NullTranslations _fallback | None
 

Constructor & Destructor Documentation

◆ __init__()

None babel.support.NullTranslations.__init__ (   self,
gettext._TranslationsReader | None   fp = None 
)
Initialize a simple translations class which is not backed by a
real catalog. Behaves similar to gettext.NullTranslations but also
offers Babel's on *gettext methods (e.g. 'dgettext()').

:param fp: a file-like object (ignored in this class)

Reimplemented in babel.support.Translations.

Member Function Documentation

◆ dgettext()

str babel.support.NullTranslations.dgettext (   self,
str  domain,
str  message 
)
Like ``gettext()``, but look the message up in the specified
domain.

◆ dngettext()

str babel.support.NullTranslations.dngettext (   self,
str  domain,
str  singular,
str  plural,
int  num 
)
Like ``ngettext()``, but look the message up in the specified
domain.

◆ dnpgettext()

str babel.support.NullTranslations.dnpgettext (   self,
str  domain,
str  context,
str  singular,
str  plural,
int  num 
)
Like ``npgettext``, but look the message up in the specified
`domain`.

◆ dpgettext()

str | object babel.support.NullTranslations.dpgettext (   self,
str  domain,
str  context,
str  message 
)
Like `pgettext()`, but look the message up in the specified
`domain`.

◆ ldgettext()

str babel.support.NullTranslations.ldgettext (   self,
str  domain,
str  message 
)
Like ``lgettext()``, but look the message up in the specified
domain.

◆ ldngettext()

str babel.support.NullTranslations.ldngettext (   self,
str  domain,
str  singular,
str  plural,
int  num 
)
Like ``lngettext()``, but look the message up in the specified
domain.

◆ ldnpgettext()

str | bytes babel.support.NullTranslations.ldnpgettext (   self,
str  domain,
str  context,
str  singular,
str  plural,
int  num 
)
Equivalent to ``dnpgettext()``, but the translation is returned in
the preferred system encoding, if no other encoding was explicitly set
with ``bind_textdomain_codeset()``.

◆ ldpgettext()

str | bytes | object babel.support.NullTranslations.ldpgettext (   self,
str  domain,
str  context,
str  message 
)
Equivalent to ``dpgettext()``, but the translation is returned in the
preferred system encoding, if no other encoding was explicitly set with
``bind_textdomain_codeset()``.

◆ lnpgettext()

str | bytes babel.support.NullTranslations.lnpgettext (   self,
str  context,
str  singular,
str  plural,
int  num 
)
Equivalent to ``npgettext()``, but the translation is returned in the
preferred system encoding, if no other encoding was explicitly set with
``bind_textdomain_codeset()``.

◆ lpgettext()

str | bytes | object babel.support.NullTranslations.lpgettext (   self,
str  context,
str  message 
)
Equivalent to ``pgettext()``, but the translation is returned in the
preferred system encoding, if no other encoding was explicitly set with
``bind_textdomain_codeset()``.

◆ npgettext()

str babel.support.NullTranslations.npgettext (   self,
str  context,
str  singular,
str  plural,
int  num 
)
Do a plural-forms lookup of a message id.  `singular` is used as the
message id for purposes of lookup in the catalog, while `num` is used to
determine which plural form to use.  The returned message string is an
8-bit string encoded with the catalog's charset encoding, if known.

If the message id for `context` is not found in the catalog, and a
fallback is specified, the request is forwarded to the fallback's
``npgettext()`` method.  Otherwise, when ``num`` is 1 ``singular`` is
returned, and ``plural`` is returned in all other cases.

◆ pgettext()

str | object babel.support.NullTranslations.pgettext (   self,
str  context,
str  message 
)
Look up the `context` and `message` id in the catalog and return the
corresponding message string, as an 8-bit string encoded with the
catalog's charset encoding, if known.  If there is no entry in the
catalog for the `message` id and `context` , and a fallback has been
set, the look up is forwarded to the fallback's ``pgettext()``
method. Otherwise, the `message` id is returned.

◆ udgettext()

str babel.support.NullTranslations.udgettext (   self,
str  domain,
str  message 
)
Like ``ugettext()``, but look the message up in the specified
domain.

◆ udngettext()

str babel.support.NullTranslations.udngettext (   self,
str  domain,
str  singular,
str  plural,
int  num 
)
Like ``ungettext()`` but look the message up in the specified
domain.

◆ udnpgettext()

str babel.support.NullTranslations.udnpgettext (   self,
str  domain,
str  context,
str  singular,
str  plural,
int  num 
)
Like ``unpgettext``, but look the message up in the specified
`domain`.

◆ udpgettext()

str babel.support.NullTranslations.udpgettext (   self,
str  domain,
str  context,
str  message 
)
Like `upgettext()`, but look the message up in the specified
`domain`.

◆ unpgettext()

str babel.support.NullTranslations.unpgettext (   self,
str  context,
str  singular,
str  plural,
int  num 
)
Do a plural-forms lookup of a message id.  `singular` is used as the
message id for purposes of lookup in the catalog, while `num` is used to
determine which plural form to use.  The returned message string is a
Unicode string.

If the message id for `context` is not found in the catalog, and a
fallback is specified, the request is forwarded to the fallback's
``unpgettext()`` method.  Otherwise, when `num` is 1 `singular` is
returned, and `plural` is returned in all other cases.

◆ upgettext()

str babel.support.NullTranslations.upgettext (   self,
str  context,
str  message 
)
Look up the `context` and `message` id in the catalog and return the
corresponding message string, as a Unicode string.  If there is no entry
in the catalog for the `message` id and `context`, and a fallback has
been set, the look up is forwarded to the fallback's ``upgettext()``
method.  Otherwise, the `message` id is returned.

The documentation for this class was generated from the following file: