summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2008-11-06 16:16:44 -1000
committerDavid Cantrell <dcantrell@redhat.com>2008-12-02 08:30:03 -1000
commit10c7e7f649061fa15eeaaa9e49c99e5d877a044f (patch)
tree9c7d4aaeea5ec994d420ee4f9026046dac07f079
parentc608e8a70de5ff2ee151abff399ce4928cdfc0c1 (diff)
downloadanaconda-10c7e7f649061fa15eeaaa9e49c99e5d877a044f.tar.gz
anaconda-10c7e7f649061fa15eeaaa9e49c99e5d877a044f.tar.xz
anaconda-10c7e7f649061fa15eeaaa9e49c99e5d877a044f.zip
Match textw/network_text.py strings to iw/network_gui.py (#470145)
Match up the strings and dialog windows in the text mode interface.
-rw-r--r--textw/network_text.py42
1 files changed, 16 insertions, 26 deletions
diff --git a/textw/network_text.py b/textw/network_text.py
index 0d9f4fa5b..0b904055b 100644
--- a/textw/network_text.py
+++ b/textw/network_text.py
@@ -37,22 +37,10 @@ log = logging.getLogger("anaconda")
class HostnameWindow:
def __call__(self, screen, anaconda):
- # XXX: currently string frozen for F10, but change the dialog
- # title to just 'Hostname' after F10 is released
- toplevel = GridFormHelp(screen, _("Hostname Configuration"),
- "hostname", 1, 3)
-
- # XXX: currently string frozen for F10, but change this text
- # to 'Please name this computer. The hostname identifies the
- # computer on a network.' after F10 is released. This will
- # have the text interface match the iw interface.
+ toplevel = GridFormHelp(screen, _("Hostname"), "hostname", 1, 3)
text = TextboxReflowed(55,
- _("If your system is part of a larger network "
- "where hostnames are assigned by DHCP, "
- "select automatically via DHCP. Otherwise, "
- "select manually and enter a hostname for "
- "your system. If you do not, your system "
- "will be known as 'localhost.'"))
+ _("Please name this computer. The hostname "
+ "identifies the computer on a network."))
toplevel.add(text, 0, 0, (0, 0, 0, 1))
hostEntry = Entry(55)
@@ -70,23 +58,25 @@ class HostnameWindow:
screen.popWindow()
return INSTALL_BACK
- hname = string.strip(hostEntry.value())
- if len(hname) == 0:
- ButtonChoiceWindow(screen, _("Invalid Hostname"),
- _("You have not specified a hostname."),
+ hostname = string.strip(hostEntry.value())
+ neterrors = network.sanityCheckHostname(hostname)
+
+ if not hostname:
+ ButtonChoiceWindow(_("Error with Hostname"),
+ _("You must enter a valid hostname for this "
+ "computer."),
buttons = [ _("OK") ])
continue
- neterrors = network.sanityCheckHostname(hname)
if neterrors is not None:
- ButtonChoiceWindow(screen, _("Invalid Hostname"),
- _("The hostname \"%s\" is not valid "
- "for the following reason:\n\n%s")
- %(hname, neterrors),
- buttons = [ _("OK") ])
+ ButtonChoiceWindow(_("Error with Hostname"),
+ _("The hostname \"%s\" is not valid for the "
+ "following reason:\n\n%s")
+ % (hostname, herrors,),
+ buttons = [ _("OK") ])
continue
- anaconda.id.network.hostname = hname
+ anaconda.id.network.hostname = hostname
break
screen.popWindow()