1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-06-08 19:32:15 +03:00

EDMarketConnector: Final LANG comments

This commit is contained in:
Athanasius 2021-06-13 12:59:50 +01:00
parent b09a102d87
commit 7552e93f07

View File

@ -497,6 +497,7 @@ class AppWindow(object):
self.always_ontop = tk.BooleanVar(value=bool(config.get_int('always_ontop'))) self.always_ontop = tk.BooleanVar(value=bool(config.get_int('always_ontop')))
self.system_menu = tk.Menu(self.menubar, name='system', tearoff=tk.FALSE) self.system_menu = tk.Menu(self.menubar, name='system', tearoff=tk.FALSE)
self.system_menu.add_separator() self.system_menu.add_separator()
# LANG: Appearance - Label for checkbox to select if application always on top
self.system_menu.add_checkbutton(label=_('Always on top'), self.system_menu.add_checkbutton(label=_('Always on top'),
variable=self.always_ontop, variable=self.always_ontop,
command=self.ontop_changed) # Appearance setting command=self.ontop_changed) # Appearance setting
@ -749,6 +750,7 @@ class AppWindow(object):
def login(self): def login(self):
"""Initiate CAPI/Frontier login and set other necessary state.""" """Initiate CAPI/Frontier login and set other necessary state."""
if not self.status['text']: if not self.status['text']:
# LANG: Status - Attempting to get a Frontier Auth Access Token
self.status['text'] = _('Logging in...') self.status['text'] = _('Logging in...')
self.button['state'] = self.theme_button['state'] = tk.DISABLED self.button['state'] = self.theme_button['state'] = tk.DISABLED
@ -803,10 +805,12 @@ class AppWindow(object):
elif (config.get_int('output') & config.OUT_MKT_EDDN) \ elif (config.get_int('output') & config.OUT_MKT_EDDN) \
and not (data['lastStarport'].get('commodities') or data['lastStarport'].get('modules')): and not (data['lastStarport'].get('commodities') or data['lastStarport'].get('modules')):
if not self.status['text']: if not self.status['text']:
# LANG: Status - Either no station market or modules data from Frontier CAPI
self.status['text'] = _("Station doesn't have anything!") self.status['text'] = _("Station doesn't have anything!")
elif not data['lastStarport'].get('commodities'): elif not data['lastStarport'].get('commodities'):
if not self.status['text']: if not self.status['text']:
# LANG: Status - No station market data from Frontier CAPI
self.status['text'] = _("Station doesn't have a market!") self.status['text'] = _("Station doesn't have a market!")
elif config.get_int('output') & (config.OUT_MKT_CSV | config.OUT_MKT_TD): elif config.get_int('output') & (config.OUT_MKT_CSV | config.OUT_MKT_TD):
@ -851,6 +855,7 @@ class AppWindow(object):
elif play_sound: elif play_sound:
hotkeymgr.play_good() hotkeymgr.play_good()
# LANG: Status - Attempting to retrieve data from Frontier CAPI
self.status['text'] = _('Fetching data...') self.status['text'] = _('Fetching data...')
self.button['state'] = self.theme_button['state'] = tk.DISABLED self.button['state'] = self.theme_button['state'] = tk.DISABLED
self.w.update_idletasks() self.w.update_idletasks()
@ -1263,7 +1268,7 @@ class AppWindow(object):
if time() < self.holdofftime: if time() < self.holdofftime:
# Update button in main window # Update button in main window
self.button['text'] = self.theme_button['text'] \ self.button['text'] = self.theme_button['text'] \
= _('cooldown {SS}s').format(SS=int(self.holdofftime - time())) = _('cooldown {SS}s').format(SS=int(self.holdofftime - time())) # LANG: Cooldown on 'Update' button
self.w.after(1000, self.cooldown) self.w.after(1000, self.cooldown)
else: else:
@ -1311,6 +1316,7 @@ class AppWindow(object):
tk.Toplevel.__init__(self, parent) tk.Toplevel.__init__(self, parent)
self.parent = parent self.parent = parent
# LANG: Help>About - 'About app' label
self.title(_('About {APP}').format(APP=applongname)) self.title(_('About {APP}').format(APP=applongname))
if parent.winfo_viewable(): if parent.winfo_viewable():
@ -1344,6 +1350,7 @@ class AppWindow(object):
row += 1 row += 1
self.appversion_label = tk.Label(frame, text=appversion()) self.appversion_label = tk.Label(frame, text=appversion())
self.appversion_label.grid(row=row, column=0, sticky=tk.E) self.appversion_label.grid(row=row, column=0, sticky=tk.E)
# LANG: Help>About - Label on URL for release notes
self.appversion = HyperlinkLabel(frame, compound=tk.RIGHT, text=_('Release Notes'), self.appversion = HyperlinkLabel(frame, compound=tk.RIGHT, text=_('Release Notes'),
url='https://github.com/EDCD/EDMarketConnector/releases/tag/Release/' url='https://github.com/EDCD/EDMarketConnector/releases/tag/Release/'
f'{appversion_nobuild()}', f'{appversion_nobuild()}',
@ -1369,6 +1376,7 @@ class AppWindow(object):
# OK button to close the window # OK button to close the window
ttk.Label(frame).grid(row=row, column=0) # spacer ttk.Label(frame).grid(row=row, column=0) # spacer
row += 1 row += 1
# LANG: Generic 'OK' button label
button = ttk.Button(frame, text=_('OK'), command=self.apply) button = ttk.Button(frame, text=_('OK'), command=self.apply)
button.grid(row=row, column=2, sticky=tk.E) button.grid(row=row, column=2, sticky=tk.E)
button.bind("<Return>", lambda event: self.apply()) button.bind("<Return>", lambda event: self.apply())
@ -1389,6 +1397,7 @@ class AppWindow(object):
def save_raw(self) -> None: # noqa: CCR001 # Not easily broken up. def save_raw(self) -> None: # noqa: CCR001 # Not easily broken up.
"""Save newly acquired CAPI data in the configured file.""" """Save newly acquired CAPI data in the configured file."""
# LANG: Status - Attempting to retrieve data from Frontier CAPI to save to file
self.status['text'] = _('Fetching data...') self.status['text'] = _('Fetching data...')
self.w.update_idletasks() self.w.update_idletasks()
@ -1735,6 +1744,7 @@ sys.path: {sys.path}'''
"""Display message about plugins not updated for Python 3.x.""" """Display message about plugins not updated for Python 3.x."""
plugins_not_py3_last = config.get_int('plugins_not_py3_last', default=0) plugins_not_py3_last = config.get_int('plugins_not_py3_last', default=0)
if (plugins_not_py3_last + 86400) < int(time()) and len(plug.PLUGINS_not_py3): if (plugins_not_py3_last + 86400) < int(time()) and len(plug.PLUGINS_not_py3):
# LANG: Popup-text about 'active' plugins without Python 3.x support
popup_text = _( popup_text = _(
"One or more of your enabled plugins do not yet have support for Python 3.x. Please see the " "One or more of your enabled plugins do not yet have support for Python 3.x. Please see the "
"list on the '{PLUGINS}' tab of '{FILE}' > '{SETTINGS}'. You should check if there is an " "list on the '{PLUGINS}' tab of '{FILE}' > '{SETTINGS}'. You should check if there is an "
@ -1752,6 +1762,7 @@ sys.path: {sys.path}'''
popup_text = popup_text.replace('\\r', '\r') popup_text = popup_text.replace('\\r', '\r')
tk.messagebox.showinfo( tk.messagebox.showinfo(
# LANG: Popup window title for list of 'enabled' plugins that don't work with Python 3.x
_('EDMC: Plugins Without Python 3.x Support'), _('EDMC: Plugins Without Python 3.x Support'),
popup_text popup_text
) )