mercurial/i18n.py
changeset 46808 2c0e35f6957a
parent 46681 b9f40b743627
child 46819 d4ba4d51f85f
equal deleted inserted replaced
46807:9ff4672c8c26 46808:2c0e35f6957a
    21 
    21 
    22 if pycompat.TYPE_CHECKING:
    22 if pycompat.TYPE_CHECKING:
    23     from typing import (
    23     from typing import (
    24         Callable,
    24         Callable,
    25         List,
    25         List,
    26         Optional,
       
    27     )
    26     )
    28 
    27 
    29 
    28 
    30 # modelled after templater.templatepath:
    29 # modelled after templater.templatepath:
    31 if getattr(sys, 'frozen', None) is not None:
    30 if getattr(sys, 'frozen', None) is not None:
    69 
    68 
    70 _msgcache = {}  # encoding: {message: translation}
    69 _msgcache = {}  # encoding: {message: translation}
    71 
    70 
    72 
    71 
    73 def gettext(message):
    72 def gettext(message):
    74     # type: (Optional[bytes]) -> Optional[bytes]
    73     # type: (bytes) -> bytes
    75     """Translate message.
    74     """Translate message.
    76 
    75 
    77     The message is looked up in the catalog to get a Unicode string,
    76     The message is looked up in the catalog to get a Unicode string,
    78     which is encoded in the local encoding before being returned.
    77     which is encoded in the local encoding before being returned.
    79 
    78