Beta patches
by David Lehman
Broad strokes: lvm-by-default, partitioned md (fwraid), kpartx,
disk specification for new devices and improved
management of complex devices in custom storage
11 years, 6 months
[PATCH] Mark a few more important strings for translation.
by Chris Lumens
Note: When using the P_ method, the strings inside it cannot be in parens or
gettext will not pick them up.
---
pyanaconda/ui/gui/spokes/lib/accordion.py | 2 +-
pyanaconda/ui/gui/spokes/lib/cart.py | 8 ++++----
pyanaconda/ui/gui/spokes/storage.py | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/accordion.py b/pyanaconda/ui/gui/spokes/lib/accordion.py
index f29b4ee..240b5a8 100644
--- a/pyanaconda/ui/gui/spokes/lib/accordion.py
+++ b/pyanaconda/ui/gui/spokes/lib/accordion.py
@@ -241,7 +241,7 @@ class CreateNewPage(Page):
label = self._createNewButton.get_children()[0]
label.set_line_wrap(True)
label.set_use_markup(True)
- label.set_markup("""<span foreground='blue'><u>Click here to create them automatically.</u></span>""")
+ label.set_markup(_("<span foreground='blue'><u>Click here to create them automatically.</u></span>"))
self._createNewButton.set_halign(Gtk.Align.START)
self._createNewButton.connect("clicked", cb)
diff --git a/pyanaconda/ui/gui/spokes/lib/cart.py b/pyanaconda/ui/gui/spokes/lib/cart.py
index 8cc22d5..8d40a1f 100644
--- a/pyanaconda/ui/gui/spokes/lib/cart.py
+++ b/pyanaconda/ui/gui/spokes/lib/cart.py
@@ -121,10 +121,10 @@ class SelectedDisksDialog(GUIObject):
size = str(Size(bytes=long(size))).upper()
free = str(Size(bytes=long(free))).upper()
- text = P_(("<b>%d disk; %s capacity; %s free space</b> "
- "(unpartitioned and in filesystems)"),
- ("<b>%d disks; %s capacity; %s free space</b> "
- "(unpartitioned and in filesystems)"),
+ text = P_("<b>%d disk; %s capacity; %s free space</b> "
+ "(unpartitioned and in filesystems)",
+ "<b>%d disks; %s capacity; %s free space</b> "
+ "(unpartitioned and in filesystems)",
count) % (count, size, free)
self._summary_label.set_markup(text)
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 79a370e..52fe80b 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -568,8 +568,8 @@ class StorageSpoke(NormalSpoke, StorageChecker):
free += free_space[disk.name][0]
count += 1
- summary = (P_(("%d disk selected; %s capacity; %s free"),
- ("%d disks selected; %s capacity; %s free"),
+ summary = (P_("%d disk selected; %s capacity; %s free",
+ "%d disks selected; %s capacity; %s free",
count) % (count, str(Size(spec="%s MB" % capacity)), free))
summary_label = self.builder.get_object("summary_label")
summary_label.set_text(summary)
--
1.7.11.2
11 years, 6 months
[PATCH] make translations less terrible
by Chris Lumens
The following patch set makes translations less embarassingly bad. The most
useful one is #4, but they're all pretty handy to have.
This set does not completely fix translations. In particular, parts out of
the C widgets are still not being translated and certain buttons and other
strings scattered throughout are not translated. However, this probably
takes care of 95%. You can even change language with the welcome spoke
and it'll work.
I've not tested the language spoke off the hub, but my feeling on that
still is that we need to convert it into "Which languages do you want
supported post-install?" and then disable it on the live media where that
doesn't make any sense.
- Chris
11 years, 6 months
[PATCH F18Beta NTH] Network spoke: activate wifi connection after setting secrets (#871132)
by Radek Vykydal
It used to happen automatically but there was a change in NM so
we need to manage it ourselves (until we have secret agent).
---
pyanaconda/ui/gui/spokes/network.py | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index a479736..1d007e7 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -39,6 +39,7 @@ from pyanaconda.ui.gui import GUIObject
from pyanaconda.ui.gui.spokes import NormalSpoke, StandaloneSpoke
from pyanaconda.ui.gui.categories.software import SoftwareCategory
from pyanaconda.ui.gui.hubs.summary import SummaryHub
+from pyanaconda.ui.gui.utils import gtk_call_once
from pyanaconda.network import NetworkDevice, netscriptsDir, kickstartNetworkData, getActiveNetDevs
@@ -421,8 +422,8 @@ class NetworkControlBox():
return
con = self.find_active_connection_for_device(device)
+ ssid = None
if not con and configuration_of_disconnected_devices_allowed:
- ssid = None
if device.get_device_type() == NetworkManager.DeviceType.WIFI:
ssid = self.selected_ssid
con = self.find_connection_for_device(device, ssid)
@@ -432,13 +433,27 @@ class NetworkControlBox():
else:
return
+ # 871132 auto activate wireless connection after editing if it is not
+ # already activated (assume entering secrets)
+ activate = None
+ if (device.get_device_type() == NetworkManager.DeviceType.WIFI
+ and ssid and (device.get_iface(), ssid) not in self.activated_connections()):
+ activate = (con, device)
+
self.builder.get_object("button_wired_options").set_sensitive(False)
proc = subprocess.Popen(["nm-connection-editor", "--edit", "%s" % uuid])
- GLib.child_watch_add(proc.pid, self.on_nmce_exited)
+ GLib.child_watch_add(proc.pid, self.on_nmce_exited, activate)
- def on_nmce_exited(self, pid, condition):
+ def on_nmce_exited(self, pid, condition, activate):
self.builder.get_object("button_wired_options").set_sensitive(True)
+ if activate:
+ con, device = activate
+ gtk_call_once(self._activate_connection_cb, con, device)
+
+ def _activate_connection_cb(self, con, device):
+ self.client.activate_connection(con, device,
+ None, None, None)
def on_wireless_enabled(self, *args):
switch = self.builder.get_object("device_wireless_off_switch")
--
1.7.4
11 years, 6 months
[PATCH f18 would be blocker] Network spoke: don't try to call replace on None (traceback) (#869106)
by Radek Vykydal
This is a fix for stupid rush mistake that went in 18.22.
With wireless card present going to network spoke without selecting any ap
will cause traceback.
---
pyanaconda/ui/gui/spokes/network.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index aec0b3e..a479736 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -1062,8 +1062,8 @@ def getKSNetworkData(device):
if ap:
ifcfg_suffix = ap.get_ssid()
- ifcfg_suffix = ifcfg_suffix.replace(' ', '_')
if ifcfg_suffix:
+ ifcfg_suffix = ifcfg_suffix.replace(' ', '_')
device_cfg = NetworkDevice(netscriptsDir, ifcfg_suffix)
device_cfg.loadIfcfgFile()
retval = kickstartNetworkData(ifcfg=device_cfg)
--
1.7.4
11 years, 6 months