[dracut] [fstab] Translate module names and error messages

This commit is contained in:
Adriaan de Groot 2019-04-19 17:08:53 +02:00
parent ff6a3608a6
commit c364e4fc38
2 changed files with 25 additions and 2 deletions

View File

@ -6,6 +6,7 @@
# Copyright 2014-2015, Philip Müller <philm@manjaro.org>
# Copyright 2014, Teo Mrnjavac <teo@kde.org>
# Copyright 2017, Alf Gaida <agaid@siduction.org>
# Copyright 2019, Adriaan de Groot <groot@kde.org>
#
# Calamares is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -24,6 +25,17 @@ import libcalamares
from libcalamares.utils import target_env_call
import gettext
_ = gettext.translation("calamares-python",
localedir=libcalamares.utils.gettext_path(),
languages=libcalamares.utils.gettext_languages(),
fallback=True).gettext
def pretty_name():
return _("Creating initramfs with dracut.")
def run_dracut():
"""
Creates initramfs, even when initramfs already exists.
@ -43,5 +55,5 @@ def run():
return_code = run_dracut()
if return_code != 0:
return ("Failed to run dracut on the target",
"The exit code was {}".format(return_code))
return ( _("Failed to run dracut on the target"),
_("The exit code was {}").format(return_code) )

View File

@ -6,6 +6,7 @@
# Copyright 2014, Aurélien Gâteau <agateau@kde.org>
# Copyright 2016, Teo Mrnjavac <teo@kde.org>
# Copyright 2017, Alf Gaida <agaida@siduction.org>
# Copyright 2019, Adriaan de Groot <groot@kde.org>
#
# Calamares is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -26,6 +27,16 @@ import subprocess
import libcalamares
import gettext
_ = gettext.translation("calamares-python",
localedir=libcalamares.utils.gettext_path(),
languages=libcalamares.utils.gettext_languages(),
fallback=True).gettext
def pretty_name():
return _("Writing fstab.")
FSTAB_HEADER = """# /etc/fstab: static file system information.
#