Skip to content

Commit d052dd5

Browse files
committed
Added more strings for UI elements for #570
1 parent b75e433 commit d052dd5

File tree

2 files changed

+29
-11
lines changed

2 files changed

+29
-11
lines changed

bundledApps/WAIL.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -816,21 +816,25 @@ def view_archive_in_browser(self, button, latest_memento=False):
816816

817817
class WAILGUIFrame_Advanced(wx.Panel):
818818
class ServicesPanel(wx.Panel, threading.Thread):
819-
def make_button(self, label):
820-
return wx.Button(
819+
def make_button(self, label, tooltip=""):
820+
# Ideally this would be abstract and in WAILConfig for reuse, but wxPython needs a reference to the
821+
# parent when creating the button, limiting this function's reuse by other panels
822+
but = wx.Button(
821823
self, wx.ID_ANY, label, style=wx.BU_EXACTFIT
822824
)
825+
but.SetToolTip(tooltip)
826+
return but
823827

824828
def __init__(self, parent):
825829
wx.Panel.__init__(self, parent)
826830

827-
self.fix_wayback = self.make_button(config.button_label_fix)
828-
self.fix_heritrix = self.make_button(config.button_label_fix)
829-
self.fix_memgator = self.make_button(config.button_label_fix)
831+
self.fix_wayback = self.make_button(config.button_label_fix, config.tooltip_fix_wayback)
832+
self.fix_heritrix = self.make_button(config.button_label_fix, config.tooltip_fix_heritrix)
833+
self.fix_memgator = self.make_button(config.button_label_fix, config.tooltip_fix_memgator)
830834

831-
self.kill_wayback = self.make_button(config.button_label_kill)
832-
self.kill_heritrix = self.make_button(config.button_label_kill)
833-
self.kill_memgator = self.make_button(config.button_label_kill)
835+
self.kill_wayback = self.make_button(config.button_label_kill, config.tooltip_kill_wayback)
836+
self.kill_heritrix = self.make_button(config.button_label_kill, config.tooltip_kill_heritrix)
837+
self.kill_memgator = self.make_button(config.button_label_kill, config.tooltip_kill_memgator)
834838

835839
self.status_wayback = wx.StaticText(self, wx.ID_ANY, config.service_enabled_label_NO)
836840
self.status_heritrix = wx.StaticText(self, wx.ID_ANY, config.service_enabled_label_NO)
@@ -1067,9 +1071,11 @@ def __init__(self, parent):
10671071
self.view_wayback_in_browser_button = wx.Button(
10681072
self, -1, config.button_label_wayback
10691073
)
1074+
self.view_wayback_in_browser_button.SetToolTip(config.tooltip_view_wayback)
10701075
self.edit_wayback_configuration = wx.Button(
10711076
self, -1, config.button_label_edit_wayback_config
10721077
)
1078+
self.edit_wayback_configuration.SetToolTip(config.tooltip_edit_wayback)
10731079
self.view_wayback_in_browser_button.Bind(
10741080
wx.EVT_BUTTON, self.open_wayback_in_browser
10751081
)
@@ -1514,11 +1520,13 @@ def __init__(self, parent):
15141520
view_archives_folder_button_button = wx.Button(
15151521
self, 1, config.button_label_view_archive_files
15161522
)
1523+
view_archives_folder_button_button.SetToolTip(config.tooltip_view_archives_folder)
15171524

15181525
view_archives_folder_button_button.Bind(wx.EVT_BUTTON,
15191526
self.open_archives_folder)
15201527
self.test_update = wx.Button(self, 1,
15211528
config.button_label_check_for_updates)
1529+
self.test_update.SetToolTip(config.tooltip_check_for_updates)
15221530

15231531
box = wx.BoxSizer(wx.VERTICAL)
15241532
box.Add(view_archives_folder_button_button, 0, wx.EXPAND | wx.ALL, 1)

bundledApps/WAILConfig.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,19 @@
124124
tooltip_check_status = (
125125
'Check the local archive to see if captures already exist'
126126
)
127-
tooltip_archive_now = (
128-
'Start a crawl using the current URL'
129-
)
127+
tooltip_archive_now = ('Start a crawl using the current URL')
128+
tooltip_fix_wayback = ('Restart the Wayback replay service')
129+
tooltip_fix_heritrix = ('Restart the Heritrix crawling service')
130+
tooltip_fix_memgator = ('Restart the MemGator aggregation service')
131+
tooltip_kill_wayback = ('Stop the Wayback replay service')
132+
tooltip_kill_heritrix = ('Stop the Heritrix crawling service')
133+
tooltip_kill_memgator = ('Stop the MemGator aggregation service')
134+
135+
tooltip_view_wayback = ('View the archive in your web browser')
136+
tooltip_edit_wayback = ('Edit the OpenWayback configuration file')
137+
138+
tooltip_view_archives_folder = ('View the directory containing the archive files in Finder') # todo: adapt for Win
139+
tooltip_check_for_updates = ('Check if a newer version of WAIL is available (disabled)')
130140

131141
text_statusbar_no_captures = 'There are no local captures for this URL.'
132142
text_statusbar_wayback_not_running = 'Wayback is not running. Click again to fix.'

0 commit comments

Comments
 (0)