rougail-output-display/src/rougail/output_console/i18n.py

25 lines
894 B
Python
Raw Normal View History

2024-10-31 18:55:00 +01:00
"""Internationalisation utilities
2024-07-28 17:52:11 +02:00
Silique (https://www.silique.fr)
Copyright (C) 2024
2024-10-31 18:55:00 +01:00
2024-11-01 10:58:53 +01:00
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
2024-10-31 18:55:00 +01:00
2024-11-01 10:58:53 +01:00
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
2024-10-31 18:55:00 +01:00
2024-11-01 10:58:53 +01:00
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
2024-07-28 17:52:11 +02:00
"""
2024-10-31 18:55:00 +01:00
from gettext import translation
from pathlib import Path
2024-11-27 16:50:48 +01:00
t = translation("rougail_output_console", str(Path(__file__).parent / "locale"), fallback=True)
2024-07-28 17:52:11 +02:00
2024-10-31 18:55:00 +01:00
_ = t.gettext