Commit b2fa1397 authored by Nikos Skalkotos's avatar Nikos Skalkotos

Rephrase various messages

parent 7094b43e
...@@ -395,8 +395,8 @@ class BundleVolume(object): ...@@ -395,8 +395,8 @@ class BundleVolume(object):
# Create the file systems # Create the file systems
for i, dev in mapped.iteritems(): for i, dev in mapped.iteritems():
fs = filesystem[i].fs fs = filesystem[i].fs
self.out.output('Creating %s filesystem on partition %d ... ' % self.out.output('Creating %s file system on partition %d ... '
(fs, i), False) % (fs, i), False)
get_command('mkfs.%s' % fs)(*(MKFS_OPTS[fs] + [dev])) get_command('mkfs.%s' % fs)(*(MKFS_OPTS[fs] + [dev]))
# For ext[234] enable the default mount options # For ext[234] enable the default mount options
......
...@@ -111,11 +111,11 @@ def create_image(d, media, out, tmp): ...@@ -111,11 +111,11 @@ def create_image(d, media, out, tmp):
msg = "snf-image-creator detected a %s system on the input media. " \ msg = "snf-image-creator detected a %s system on the input media. " \
"Would you like to run a wizard to assist you through the " \ "Would you like to run a wizard to assist you through the " \
"image creation process?\n\nChoose <Wizard> to run the wizard," \ "image creation process?\n\nChoose <Wizard> to run the wizard," \
" <Expert> to run the snf-image-creator in expert mode or " \ " <Expert> to run snf-image-creator in expert mode or press " \
"press ESC to quit the program." \ "ESC to quit the program." \
% (image.ostype if image.ostype == image.distro or % (image.ostype.capitalize() if image.ostype == image.distro or
image.distro == "unknown" else "%s (%s)" % image.distro == "unknown" else "%s (%s)" %
(image.ostype, image.distro)) (image.ostype.capitalize(), image.distro.capitalize()))
update_background_title(session) update_background_title(session)
......
...@@ -369,13 +369,14 @@ def kamaki_menu(session): ...@@ -369,13 +369,14 @@ def kamaki_menu(session):
if 'account' not in session and 'cloud' in session: if 'account' not in session and 'cloud' in session:
cloud += " <invalid>" cloud += " <invalid>"
upload = session["upload"] if "upload" in session else "<none>"
choices = [("Add/Edit", "Add/Edit cloud accounts"), choices = [("Add/Edit", "Add/Edit cloud accounts"),
("Delete", "Delete existing cloud accounts"), ("Delete", "Delete existing cloud accounts"),
("Cloud", "Select cloud account to use: %s" % cloud), ("Cloud", "Select cloud account to use: %s" % cloud),
("Upload", "Upload image to the cloud"), ("Upload", "Upload image to the cloud")]
("Register", "Register image with the cloud: %s" % upload)]
if 'upload' in session:
choices.append(("Register", "Register image with the cloud: %s"
% session['upload']))
(code, choice) = d.menu( (code, choice) = d.menu(
text="Choose one of the following or press <Back> to go back.", text="Choose one of the following or press <Back> to go back.",
...@@ -893,7 +894,7 @@ def customization_menu(session): ...@@ -893,7 +894,7 @@ def customization_menu(session):
choices = [] choices = []
if hasattr(image.os, "install_virtio_drivers"): if hasattr(image.os, "install_virtio_drivers"):
choices.append(("Virtio", "Install or update the VirtIO drivers")) choices.append(("VirtIO", "Install or update the VirtIO drivers"))
choices.extend( choices.extend(
[("Sysprep", "Run various image preparation tasks"), [("Sysprep", "Run various image preparation tasks"),
("Properties", "View & Modify image properties"), ("Properties", "View & Modify image properties"),
...@@ -901,7 +902,7 @@ def customization_menu(session): ...@@ -901,7 +902,7 @@ def customization_menu(session):
default_item = 0 default_item = 0
actions = {"Virtio": virtio, actions = {"VirtIO": virtio,
"Sysprep": sysprep, "Sysprep": sysprep,
"Properties": modify_properties, "Properties": modify_properties,
"Exclude": exclude_tasks} "Exclude": exclude_tasks}
......
...@@ -111,8 +111,8 @@ def update_background_title(session): ...@@ -111,8 +111,8 @@ def update_background_title(session):
postfix = " (shrinked)" if image.os.shrinked else '' postfix = " (shrinked)" if image.os.shrinked else ''
title = "OS: %s, Distro: %s, Size: %dMB%s, Source: %s" % \ title = "OS: %s, Distro: %s, Size: %dMB%s, Source: %s" % \
(image.ostype, image.distro, size, postfix, (image.ostype.capitalize(), image.distro.capitalize(), size,
os.path.abspath(disk.source)) postfix, os.path.abspath(disk.source))
d.setBackgroundTitle(title) d.setBackgroundTitle(title)
...@@ -379,8 +379,7 @@ def update_sysprep_param(session, name, title=None): ...@@ -379,8 +379,7 @@ def update_sysprep_param(session, name, title=None):
value = answer.strip() value = answer.strip()
if param.set_value(value) is False: if param.set_value(value) is False:
d.msgbox("Unable to update the value. Reason: %s" % param.error, d.msgbox("Error: %s" % param.error, width=WIDTH)
width=WIDTH)
param.error = None param.error = None
continue continue
break break
......
...@@ -337,7 +337,7 @@ def start_wizard(session): ...@@ -337,7 +337,7 @@ def start_wizard(session):
# Create VirtIO Installation Page # Create VirtIO Installation Page
def display_installed_drivers(): def display_installed_drivers():
"""Returnes the installed virtio drivers""" """Returns the installed VirtIO drivers"""
image = session['image'] image = session['image']
versions = virtio_versions(image.os.virtio_state) versions = virtio_versions(image.os.virtio_state)
...@@ -378,10 +378,11 @@ def start_wizard(session): ...@@ -378,10 +378,11 @@ def start_wizard(session):
return drv_dir return drv_dir
title = "Please select a directory that hosts VirtIO drivers."
virtio = WizardInfoPage( virtio = WizardInfoPage(
"virtio", "Press <New> to install new VirtIO drivers.", "virtio", "Press <New> to install new VirtIO drivers.",
display_installed_drivers, title="VirtIO Drivers", extra_label='New', display_installed_drivers, title="VirtIO Drivers", extra_label='New',
extra=lambda: update_sysprep_param(session, 'virtio'), extra=lambda: update_sysprep_param(session, 'virtio',title=title),
validate=validate_virtio, print_name="VirtIO Drivers Path") validate=validate_virtio, print_name="VirtIO Drivers Path")
# Create Image Registration Wizard Page # Create Image Registration Wizard Page
......
...@@ -132,8 +132,9 @@ class Image(object): ...@@ -132,8 +132,9 @@ class Image(object):
# process has opened pipes. Since the recovery process is an optional # process has opened pipes. Since the recovery process is an optional
# feature of libguestfs, it's better to disable it. # feature of libguestfs, it's better to disable it.
if self.check_guestfs_version(1, 17, 14) >= 0: if self.check_guestfs_version(1, 17, 14) >= 0:
self.out.output("Enabling recovery proc") self.out.output("Enabling recovery process ...", False)
self.g.set_recovery_proc(1) self.g.set_recovery_proc(1)
self.out.success('done')
else: else:
self.g.set_recovery_proc(0) self.g.set_recovery_proc(0)
......
...@@ -208,7 +208,8 @@ def virtio_dir_check(dirname): ...@@ -208,7 +208,8 @@ def virtio_dir_check(dirname):
if driver: if driver:
return dirname return dirname
raise ValueError("Invalid VirtIO directory. No VirtIO driver found") raise ValueError("Could not find any VirtIO driver in this directory. "
"Please select another one.")
DESCR = { DESCR = {
...@@ -383,9 +384,11 @@ class Windows(OSBase): ...@@ -383,9 +384,11 @@ class Windows(OSBase):
self.vm.rexec( self.vm.rexec(
r"cscript \Windows\system32\slmgr.vbs /ipk %s" % setup_key) r"cscript \Windows\system32\slmgr.vbs /ipk %s" % setup_key)
@sysprep('Shrinking the last filesystem') @sysprep('Shrinking file system on the last partition')
def _shrink(self): def _shrink(self):
"""Shrink the last filesystem. Make sure the filesystem is defragged""" """Shrink the last file system. Please make sure the file system is
defragged.
"""
# Query for the maximum number of reclaimable bytes # Query for the maximum number of reclaimable bytes
cmd = ( cmd = (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment