Mercurial > libervia-backend
comparison sat/core/i18n.py @ 3877:00212260f659
plugin XEP-0420: Implementation of Stanza Content Encryption:
Includes implementation of XEP-0082 (XMPP date and time profiles) and tests for both new plugins.
Everything is type checked, linted, format checked and unit tested.
Adds new dependency xmlschema.
fix 377
author | Syndace <me@syndace.dev> |
---|---|
date | Tue, 23 Aug 2022 12:04:11 +0200 |
parents | be6d91572633 |
children | 524856bd7b19 |
comparison
equal
deleted
inserted
replaced
3876:e3c1f4736ab2 | 3877:00212260f659 |
---|---|
15 # GNU Affero General Public License for more details. | 15 # GNU Affero General Public License for more details. |
16 | 16 |
17 # You should have received a copy of the GNU Affero General Public License | 17 # You should have received a copy of the GNU Affero General Public License |
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | 19 |
20 from typing import Callable, cast | |
20 | 21 |
21 from sat.core.log import getLogger | 22 from sat.core.log import getLogger |
22 | 23 |
23 log = getLogger(__name__) | 24 log = getLogger(__name__) |
24 | 25 |
38 | 39 |
39 | 40 |
40 except ImportError: | 41 except ImportError: |
41 | 42 |
42 log.warning("gettext support disabled") | 43 log.warning("gettext support disabled") |
43 _ = lambda msg: msg # Libervia doesn't support gettext | 44 _ = cast(Callable[[str], str], lambda msg: msg) # Libervia doesn't support gettext |
44 | 45 |
45 def languageSwitch(lang=None): | 46 def languageSwitch(lang=None): |
46 pass | 47 pass |
47 | 48 |
48 | 49 |
49 D_ = lambda msg: msg # used for deferred translations | 50 D_ = cast(Callable[[str], str], lambda msg: msg) # used for deferred translations |