[PATCH 02/13] Move translated_new_install_name to the right place
Vratislav Podzimek
vpodzime at redhat.com
Mon Mar 10 13:22:08 UTC 2014
This function belongs to the product.py module.
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
pyanaconda/product.py | 4 ++++
pyanaconda/ui/gui/spokes/custom.py | 4 ++--
pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py | 7 +------
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/pyanaconda/product.py b/pyanaconda/product.py
index 1bf1c43..bc6b617 100644
--- a/pyanaconda/product.py
+++ b/pyanaconda/product.py
@@ -52,3 +52,7 @@ if productVersion == "development":
def distributionText():
return _("%(productName)s %(productVersion)s INSTALLATION") % \
{"productName": productName, "productVersion": productVersion}
+
+def translated_new_install_name():
+ return _("New %(name)s %(version)s Installation") % \
+ {"name" : productName, "version" : productVersion}
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index e8795c1..44f0c4d 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -32,7 +32,7 @@
from pykickstart.constants import CLEARPART_TYPE_NONE, AUTOPART_TYPE_PLAIN, AUTOPART_TYPE_BTRFS, AUTOPART_TYPE_LVM, AUTOPART_TYPE_LVM_THINP
from pyanaconda.i18n import _, N_, CP_
-from pyanaconda.product import productName, productVersion
+from pyanaconda.product import productName, productVersion, translated_new_install_name
from pyanaconda.threads import AnacondaThread, threadMgr
from pyanaconda.constants import THREAD_EXECUTE_STORAGE, THREAD_STORAGE, THREAD_CUSTOM_STORAGE_INIT
from pyanaconda.iutil import lowerASCII
@@ -74,7 +74,7 @@ from pyanaconda.ui.gui.spokes.lib.summary import ActionSummaryDialog
from pyanaconda.ui.gui.spokes.lib.custom_storage_helpers import size_from_entry, ui_storage_logger
from pyanaconda.ui.gui.spokes.lib.custom_storage_helpers import validate_label, validate_mountpoint, selectedRaidLevel
-from pyanaconda.ui.gui.spokes.lib.custom_storage_helpers import container_type_names, translated_new_install_name
+from pyanaconda.ui.gui.spokes.lib.custom_storage_helpers import container_type_names
from pyanaconda.ui.gui.spokes.lib.custom_storage_helpers import label_validation_msgs, mountpoint_validation_msgs, raid_level_not_enough_disks_msg, LABEL_OK # will go away soon
from pyanaconda.ui.gui.spokes.lib.custom_storage_helpers import AddDialog, ConfirmDeleteDialog, DisksDialog, ContainerDialog, HelpDialog
diff --git a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
index f1886b6..1608fa9 100644
--- a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
+++ b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
@@ -26,9 +26,8 @@
from contextlib import contextmanager
import re
-import locale
-from pyanaconda.product import productName, productVersion
+from pyanaconda.product import productName
from pyanaconda.iutil import lowerASCII
from pyanaconda.ui.gui import GUIObject
from pyanaconda.ui.gui.utils import fancy_set_sensitive, really_hide, really_show
@@ -82,7 +81,6 @@ mountpoint_validation_msgs = {MOUNTPOINT_OK: "",
MOUNTPOINT_IN_USE: mountpoint_in_use_msg,
MOUNTPOINT_EMPTY: empty_mountpoint_msg}
-new_install_name = N_("New %(name)s %(version)s Installation")
container_dialog_title = N_("CONFIGURE %(container_type)s")
container_dialog_text = N_("Please create a name for this %(container_type)s "
"and select at least one disk below.")
@@ -93,9 +91,6 @@ container_type_names = {DEVICE_TYPE_LVM: lvm_container_name,
DEVICE_TYPE_LVM_THINP: lvm_container_name,
DEVICE_TYPE_BTRFS: btrfs_container_name}
-def translated_new_install_name():
- return _(new_install_name) % {"name" : productName, "version" : productVersion}
-
def size_from_entry(entry):
size_text = entry.get_text().decode("utf-8").strip()
--
1.8.5.3
More information about the anaconda-patches
mailing list