Enable translation in Python modules

- covers all the remaining Python modules
 - most only get a translatable pretty name, some also return
   error messages
This commit is contained in:
Adriaan de Groot 2019-04-20 11:22:32 +02:00
parent c364e4fc38
commit e326b658ef
8 changed files with 101 additions and 13 deletions

View file

@ -8,7 +8,7 @@
# Copyright 2016, David McKinney <mckinney@subgraph.com>
# Copyright 2016, Kevin Kofler <kevin.kofler@chello.at>
# Copyright 2017, Alf Gaida <agaida@siduction.org>
# Copyright 2017, Adriaan de Groot <groot@kde.org>
# Copyright 2017, 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
@ -30,6 +30,17 @@ import os
import shutil
import gettext
_ = gettext.translation("calamares-python",
localedir=libcalamares.utils.gettext_path(),
languages=libcalamares.utils.gettext_languages(),
fallback=True).gettext
def pretty_name():
return _("Configuring initramfs.")
def copy_initramfs_hooks(partitions, root_mount_point):
"""
Copies initramfs hooks so they are picked up by update-initramfs