OXIESEC PANEL
- Current Dir:
/
/
snap
/
core20
/
2582
/
usr
/
share
/
subiquity
/
subiquitycore
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
04/29/2025 04:07:53 PM
rwxr-xr-x
📄
__init__.py
710 bytes
04/20/2020 02:31:39 PM
rw-r--r--
📁
__pycache__
-
04/29/2025 04:07:53 PM
rwxr-xr-x
📄
async_helpers.py
2.27 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
context.py
4.31 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
controller.py
4.52 KB
04/20/2020 02:31:39 PM
rw-r--r--
📁
controllers
-
04/29/2025 04:07:53 PM
rwxr-xr-x
📄
controllerset.py
1.85 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
core.py
16.35 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
file_util.py
832 bytes
04/20/2020 02:31:39 PM
rw-r--r--
📄
gettext38.py
26.92 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
i18n.py
1.74 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
log.py
1.48 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
lsb_release.py
734 bytes
04/20/2020 02:31:39 PM
rw-r--r--
📁
models
-
04/29/2025 04:07:53 PM
rwxr-xr-x
📄
netplan.py
5.34 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
palette.py
4.53 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
prober.py
2 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
screen.py
4.9 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
signals.py
1.97 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
snapd.py
5.79 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
ssh.py
2.99 KB
04/20/2020 02:31:39 PM
rw-r--r--
📁
testing
-
04/29/2025 04:07:53 PM
rwxr-xr-x
📁
tests
-
04/29/2025 04:07:53 PM
rwxr-xr-x
📁
ui
-
04/29/2025 04:07:53 PM
rwxr-xr-x
📄
utils.py
5.24 KB
04/20/2020 02:31:39 PM
rw-r--r--
📄
view.py
3.35 KB
04/20/2020 02:31:39 PM
rw-r--r--
Editing: i18n.py
Close
# Copyright 2017 Canonical, Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3. # # 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 General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. from . import gettext38 import os import syslog syslog.syslog('i18n file is ' + __file__) localedir = '/usr/share/locale' if __file__.startswith('/snap/'): localedir = os.path.realpath(__file__ + '/../../../../../share/locale') build_mo = os.path.realpath(__file__ + '/../../build/mo/') if os.path.isdir(build_mo): localedir = build_mo syslog.syslog('Final localedir is ' + localedir) def switch_language(code='en_US'): syslog.syslog('switch_language ' + code) fake_trans = os.environ.get("FAKE_TRANSLATE", "0") if code != 'en_US' and fake_trans == "mangle": def my_gettext(message): return "_(%s)" % message elif fake_trans not in ("0", ""): def my_gettext(message): return message elif code: translation = gettext38.translation('subiquity', localedir=localedir, languages=[code], fallback=True) def my_gettext(message): if not message: return message return translation.gettext(message) import builtins builtins.__dict__['_'] = my_gettext switch_language() __all__ = ['switch_language']