1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-19 04:20:22 +01:00

Moved translations out of translations.py, re-designed l10n system a bit

This commit is contained in:
David Paleino
2011-10-18 23:33:23 +02:00
parent 278f20a264
commit 4928f9c683
15 changed files with 414 additions and 519 deletions

View File

@@ -189,28 +189,32 @@ if options.connect:
wireless.ConnectWireless(options.network)
check = lambda: wireless.CheckIfWirelessConnecting()
status = lambda: wireless.CheckWirelessConnectingStatus()[1]
message = lambda: wireless.CheckWirelessConnectingMessage()[1]
elif options.wired:
print "Connecting to wired connection on %s" % wired.DetectWiredInterface()
wired.ConnectWired()
check = lambda: wired.CheckIfWiredConnecting()
status = lambda: wired.CheckWiredConnectingStatus()
message = lambda: wired.CheckWiredConnectingMessage()
else:
check = lambda: False
status = lambda: False
message = lambda: False
# update user on what the daemon is doing
last = None
if check:
while check():
next = message()
next = status()
if next != last:
# avoid a race condition where status is updated to "done" after the
# loop check
# FIXME
if next == "done":
break
print "%s..." % next.replace("_", " ")
print message()
last = next
print "done!"
op_performed = True