mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-22 13:34:07 +03:00
i18n: improve title of connection dialog
Instead of using the title of the dialog and prepending the connection label, create a new title as a single string. This way it is possible to translate this title as single sentence. Signed-off-by: Pino Toscano <ptoscano@redhat.com>
This commit is contained in:
parent
519d409718
commit
8fbb985a8c
@ -53,7 +53,7 @@ class VMMDogtailApp(object):
|
||||
self.root.find_fuzzy("Edit", "menu").click()
|
||||
self.root.find_fuzzy("Connection Details", "menu item").click()
|
||||
win = self.root.find_fuzzy(
|
||||
"%s Connection Details" % conn_label, "frame")
|
||||
"%s - Connection Details" % conn_label, "frame")
|
||||
win.find_fuzzy(tab, "page tab").click()
|
||||
return win
|
||||
|
||||
|
@ -24,7 +24,7 @@ class VMMCLI(lib.testcase.UITestCase):
|
||||
def testShowHost(self):
|
||||
self.app.open(extra_opts=["--show-host-summary"])
|
||||
|
||||
lib.utils.check(lambda: self.app.topwin.name == "test testdriver.xml Connection Details")
|
||||
lib.utils.check(lambda: self.app.topwin.name == "test testdriver.xml - Connection Details")
|
||||
nametext = self.app.topwin.find_fuzzy("Name:", "text")
|
||||
lib.utils.check(lambda: nametext.text == "test testdriver.xml")
|
||||
self.app.topwin.keyCombo("<alt>F4")
|
||||
|
@ -166,7 +166,7 @@ class Host(lib.testcase.UITestCase):
|
||||
|
||||
# Change the name, verify that title bar changed
|
||||
win.find("Name:", "text").set_text("FOOBAR")
|
||||
self.app.root.find("FOOBAR Connection Details", "frame")
|
||||
self.app.root.find("FOOBAR - Connection Details", "frame")
|
||||
|
||||
# Open the manager window
|
||||
win.find("File", "menu").click()
|
||||
|
@ -7,7 +7,7 @@
|
||||
<property name="width_request">800</property>
|
||||
<property name="height_request">600</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">Connection Details</property>
|
||||
<property name="title" translatable="no">Connection Details</property>
|
||||
<property name="default_width">750</property>
|
||||
<property name="default_height">500</property>
|
||||
<accel-groups>
|
||||
|
@ -35,8 +35,6 @@ class vmmHost(vmmGObjectUI):
|
||||
vmmGObjectUI.__init__(self, "host.ui", "vmm-host")
|
||||
self.conn = conn
|
||||
|
||||
self._orig_title = self.topwin.get_title()
|
||||
|
||||
# Set default window size
|
||||
w, h = self.conn.get_details_window_size()
|
||||
if w <= 0:
|
||||
@ -177,7 +175,8 @@ class vmmHost(vmmGObjectUI):
|
||||
conn_active = self.conn.is_active()
|
||||
|
||||
self.topwin.set_title(
|
||||
self.conn.get_pretty_desc() + " " + self._orig_title)
|
||||
_("%(connection)s - Connection Details") %
|
||||
{"connection": self.conn.get_pretty_desc()})
|
||||
if not self.widget("overview-name").has_focus():
|
||||
self.widget("overview-name").set_text(self.conn.get_pretty_desc())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user