Specify label keyword in Label constructor

This commit is contained in:
Nick Hall 2015-05-23 00:19:18 +01:00
parent 0f079c4320
commit 8fd1a93f97
6 changed files with 41 additions and 37 deletions

View File

@ -68,7 +68,7 @@ class EditPlaceName(ManagedWindow):
self.set_window(window, None, _('Place Name Editor'))
hbox = Gtk.Box()
label = Gtk.Label(_('Place Name:'))
label = Gtk.Label(label=_('Place Name:'))
self.entry = Gtk.Entry()
if index >= 0:
self.entry.set_text(data[index])

View File

@ -305,7 +305,7 @@ class ErrorReportAssistant(Gtk.Assistant):
error_details_frame.add(error_details_box)
side_label = Gtk.Label(_("This is the detailed Gramps error "
side_label = Gtk.Label(label=_("This is the detailed Gramps error "
"information, don't worry if you do not "
"understand it. You will have the opportunity "
"to add further detail about the error "
@ -335,10 +335,10 @@ class ErrorReportAssistant(Gtk.Assistant):
"""
Build the system information page.
"""
label = Gtk.Label(label=_("Please check the information below and correct "
"anything that you know to be wrong or remove "
"anything that you would rather not have included "
"in the bug report."))
label = Gtk.Label(label=_("Please check the information below and "
"correct anything that you know to be wrong or "
"remove anything that you would rather not have "
"included in the bug report."))
label.set_halign(Gtk.Align.START)
label.set_padding(0, 4)
label.set_line_wrap(True)
@ -385,9 +385,9 @@ class ErrorReportAssistant(Gtk.Assistant):
sys_information_frame.add(sys_information_box)
side_label = Gtk.Label(label=_("This is the information about your system "
"that will help the developers to fix the "
"bug."))
side_label = Gtk.Label(label=_("This is the information about your "
"system that will help the developers to fix "
"the bug."))
side_label.set_line_wrap(True)
@ -413,8 +413,8 @@ class ErrorReportAssistant(Gtk.Assistant):
"""
Build the further information page.
"""
label = Gtk.Label(label=_("Please provide as much information as you can "
"about what you were doing when the error "
label = Gtk.Label(label=_("Please provide as much information as you "
"can about what you were doing when the error "
"occured."))
label.set_halign(Gtk.Align.START)
label.set_padding(0, 4)
@ -457,8 +457,8 @@ class ErrorReportAssistant(Gtk.Assistant):
user_information_frame.add(user_information_box)
side_label = Gtk.Label(label=_("This is your opportunity to describe what "
"you were doing when the error occured."))
side_label = Gtk.Label(label=_("This is your opportunity to describe "
"what you were doing when the error occured."))
side_label.set_line_wrap(True)
@ -484,11 +484,11 @@ class ErrorReportAssistant(Gtk.Assistant):
"""
Build the bug report summary page.
"""
label = Gtk.Label(_("Please check that the information is correct, "
"do not worry if you don't understand the detail "
"of the error information. Just make sure that it "
"does not contain anything that you do not want "
"to be sent to the developers."))
label = Gtk.Label(label=_("Please check that the information is "
"correct, do not worry if you don't understand the "
"detail of the error information. Just make sure "
"that it does not contain anything that you do not "
"want to be sent to the developers."))
label.set_halign(Gtk.Align.START)
label.set_padding(0, 4)
label.set_line_wrap(True)
@ -521,10 +521,10 @@ class ErrorReportAssistant(Gtk.Assistant):
summary_frame.add(summary_box)
side_label = Gtk.Label(label=_("This is the completed bug report. The next "
"page of the assistant will help you to file "
"a bug on the Gramps bug tracking system "
"website."))
side_label = Gtk.Label(label=_("This is the completed bug report. "
"The next page of the assistant will help you "
"to file a bug on the Gramps bug tracking "
"system website."))
side_label.set_line_wrap(True)
@ -561,9 +561,9 @@ class ErrorReportAssistant(Gtk.Assistant):
label.set_use_markup(True)
url_label = Gtk.Label(label=_("Use this button to start a web browser and "
"file a bug report on the Gramps bug tracking "
"system."))
url_label = Gtk.Label(label=_("Use this button to start a web browser "
"and file a bug report on the Gramps bug "
"tracking system."))
url_label.set_halign(Gtk.Align.START)
url_label.set_padding(0, 4)
url_label.set_line_wrap(True)
@ -583,7 +583,7 @@ class ErrorReportAssistant(Gtk.Assistant):
url_frame = Gtk.Frame()
url_frame.add(url_box)
clip_label = Gtk.Label(_("Use this button "
clip_label = Gtk.Label(label=_("Use this button "
"to copy the bug report onto the clipboard. "
"Then go to the bug tracking website by using "
"the button below, paste the report and click "
@ -620,10 +620,10 @@ class ErrorReportAssistant(Gtk.Assistant):
outer_frame.add(inner_box)
side_label = Gtk.Label(label=_("This is the final step. Use the buttons on "
"this page to start a web browser and file a "
"bug report on the Gramps bug tracking "
"system."))
side_label = Gtk.Label(label=_("This is the final step. Use the "
"buttons on this page to start a web browser "
"and file a bug report on the Gramps bug "
"tracking system."))
side_label.set_line_wrap(True)

View File

@ -144,7 +144,8 @@ class WriterOptionBox(object):
widget = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
full_database_row = Gtk.Box()
full_database_row.pack_start(Gtk.Label(_("Unfiltered Family Tree:")), True, True, 0)
label = Gtk.Label(label=_("Unfiltered Family Tree:"))
full_database_row.pack_start(label, True, True, 0)
people_count = len(self.dbstate.db.get_person_handles())
# translators: leave all/any {...} untranslated
button = Gtk.Button(ngettext("{number_of} Person",

View File

@ -349,7 +349,7 @@ class StyleEditor(object):
for i in range(t.get_columns()):
hbox = Gtk.Box()
label = Gtk.Label(_('Column %d:') % (i + 1))
label = Gtk.Label(label=_('Column %d:') % (i + 1))
hbox.pack_start(label, False, False, 6)
spin = Gtk.SpinButton()
spin.set_range(0, 100)

View File

@ -336,8 +336,8 @@ class ConfirmationPage(Gtk.Box):
scrolled_window.add(tree)
self.pack_start(scrolled_window, True, True, 0)
label3 = Gtk.Label(_('Press Apply to proceed, Cancel to abort, '
'or Back to revisit your options.'))
label3 = Gtk.Label(label=_('Press Apply to proceed, Cancel to abort, '
'or Back to revisit your options.'))
self.pack_start(label3, False, True, 0)
def prepare(self, index):

View File

@ -118,19 +118,22 @@ class PatchNames(tool.BatchTool, ManagedWindow):
winprefix.vbox.set_spacing(5)
hboxpref = Gtk.Box()
hboxpref.pack_start(Gtk.Label(_('Prefixes to search for:')), False, False, 5)
label = Gtk.Label(label=_('Prefixes to search for:'))
hboxpref.pack_start(label, False, False, 5)
self.prefixbox = Gtk.Entry()
self.prefixbox.set_text(', '.join(PREFIX_LIST))
hboxpref.pack_start(self.prefixbox, True, True, 0)
winprefix.vbox.pack_start(hboxpref, True, True, 0)
hboxcon = Gtk.Box()
hboxcon.pack_start(Gtk.Label(_('Connectors splitting surnames:')), False, False, 5)
label = Gtk.Label(label=_('Connectors splitting surnames:'))
hboxcon.pack_start(label, False, False, 5)
self.conbox = Gtk.Entry()
self.conbox.set_text(', '.join(CONNECTOR_LIST))
hboxcon.pack_start(self.conbox, True, True, 0)
winprefix.vbox.pack_start(hboxcon, True, True, 0)
hboxconns = Gtk.Box()
hboxconns.pack_start(Gtk.Label(_('Connectors not splitting surnames:')), False, False, 5)
label = Gtk.Label(label=_('Connectors not splitting surnames:'))
hboxconns.pack_start(label, False, False, 5)
self.connsbox = Gtk.Entry()
self.connsbox.set_text(', '.join(CONNECTOR_LIST_NONSPLIT))
hboxconns.pack_start(self.connsbox, True, True, 0)