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

27 lines
905 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)
2025-02-10 09:54:59 +01:00
Copyright (C) 2024-2025
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
2025-05-11 19:13:56 +02:00
t = translation(
2025-12-02 13:59:33 +01:00
"rougail_output_display", str(Path(__file__).parent / "locale"), fallback=True
2025-05-11 19:13:56 +02:00
)
2024-07-28 17:52:11 +02:00
2024-10-31 18:55:00 +01:00
_ = t.gettext