mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
41 lines
1.9 KiB
Python
41 lines
1.9 KiB
Python
# TODO(MichalPokorny): better types
|
|
|
|
from typing import Any, IO, List, Optional, Union
|
|
|
|
def bindtextdomain(domain: str, localedir: str = None) -> str: ...
|
|
def bind_textdomain_codeset(domain: str, codeset: str = None) -> str: ...
|
|
def textdomain(domain: str = None) -> str: ...
|
|
def gettext(message: str) -> str: ...
|
|
def lgettext(message: str) -> str: ...
|
|
def dgettext(domain: str, message: str) -> str: ...
|
|
def ldgettext(domain: str, message: str) -> str: ...
|
|
def ngettext(singular: str, plural: str, n: int) -> str: ...
|
|
def lngettext(singular: str, plural: str, n: int) -> str: ...
|
|
def dngettext(domain: str, singular: str, plural: str, n: int) -> str: ...
|
|
def ldngettext(domain: str, singular: str, plural: str, n: int) -> str: ...
|
|
|
|
class Translations(object):
|
|
def _parse(self, fp: IO[str]) -> None: ...
|
|
def add_fallback(self, fallback: Any) -> None: ...
|
|
def gettext(self, message: str) -> str: ...
|
|
def lgettext(self, message: str) -> str: ...
|
|
def ugettext(self, message: str) -> unicode: ...
|
|
def ngettext(self, singular: str, plural: str, n: int) -> str: ...
|
|
def lngettext(self, singular: str, plural: str, n: int) -> str: ...
|
|
def ungettext(self, singular: str, plural: str, n: int) -> str: ...
|
|
def info(self) -> Any: ...
|
|
def charset(self) -> Any: ...
|
|
def output_charset(self) -> Any: ...
|
|
def set_output_charset(self, charset: Any) -> None: ...
|
|
def install(self, unicode: bool = None, names: Any = None) -> None: ...
|
|
|
|
# TODO: NullTranslations, GNUTranslations
|
|
|
|
def find(domain: str, localedir: str = None, languages: List[str] = None,
|
|
all: Any = None) -> Optional[Union[str, List[str]]]: ...
|
|
|
|
def translation(domain: str, localedir: str = None, languages: List[str] = None,
|
|
class_: Any = None, fallback: Any = None, codeset: Any = None) -> Translations: ...
|
|
def install(domain: str, localedir: str = None, unicode: Any = None, codeset: Any = None,
|
|
names: Any = None) -> None: ...
|