diff --git a/L10n/en.template b/L10n/en.template index d350bfd4..d50854a8 100644 --- a/L10n/en.template +++ b/L10n/en.template @@ -109,6 +109,9 @@ /* Status text displayed when auto-update is suppressed - https://github.com/Marginal/EDMarketConnector/issues/92. [EDMarketConnector.py] */ "Didn't update: Carrying Rares" = "Didn't update: Carrying Rares"; +/* List of plugins in settings. [prefs.py] */ +"Disabled Plugins" = "Disabled Plugins"; + /* Help menu item. [EDMarketConnector.py] */ "Documentation" = "Documentation"; @@ -133,6 +136,9 @@ /* Ranking. [stats.py] */ "Empire" = "Empire"; +/* List of plugins in settings. [prefs.py] */ +"Enabled Plugins" = "Enabled Plugins"; + /* Federation rank. [stats.py] */ "Ensign" = "Ensign"; @@ -286,6 +292,9 @@ /* Hotkey/Shortcut setting. [prefs.py] */ "Only when Elite: Dangerous is the active app" = "Only when Elite: Dangerous is the active app"; +/* Button that opens a folder in Explorer/Finder. [prefs.py] */ +"Open" = "Open"; + /* Shortcut settings button on OSX. [prefs.py] */ "Open System Preferences" = "Open System Preferences"; @@ -325,6 +334,12 @@ /* Use same text as E:D Launcher's login dialog. [prefs.py] */ "Please log in with your Elite: Dangerous account details" = "Please log in with your Elite: Dangerous account details"; +/* Tab heading in settings. [prefs.py] */ +"Plugins" = "Plugins"; + +/* Section heading in settings. [prefs.py] */ +"Plugins folder" = "Plugins folder"; + /* Federation rank. [stats.py] */ "Post Captain" = "Post Captain"; @@ -445,6 +460,9 @@ /* Appearance setting. [prefs.py] */ "Theme" = "Theme"; +/* Help text in settings. [prefs.py] */ +"Tip: You can disable a plugin by{CR}adding '{EXT}' to it's folder name" = "Tip: You can disable a plugin by{CR}adding '{EXT}' to it's folder name"; + /* Ranking. [stats.py] */ "Trade" = "Trade"; diff --git a/prefs.py b/prefs.py index f44b1b95..6fd21d7c 100644 --- a/prefs.py +++ b/prefs.py @@ -308,37 +308,37 @@ class PreferencesDialog(tk.Toplevel): # Plugin settings and info plugsframe = nb.Frame(notebook) - plugsframe.columnconfigure(1, weight=1) - plugdir = config.plugin_dir + plugsframe.columnconfigure(0, weight=1) + plugdir = tk.StringVar() + plugdir.set(config.plugin_dir) plugnames, disabled_plugins = plug.find_plugins() - nb.Label(plugsframe, text=_('Plugins Folder:')).grid(padx=PADX, sticky=tk.W) + nb.Label(plugsframe, text=_('Plugins folder')+':').grid(padx=PADX, sticky=tk.W) # Section heading in settings plugdirentry = nb.Entry(plugsframe, justify=tk.LEFT) - plugdirentry.insert(0, plugdir) - plugdirentry.grid(padx=PADX, columnspan=2, sticky=tk.EW) + self.displaypath(plugdir, plugdirentry) + plugdirentry.grid(row=10, padx=PADX, sticky=tk.EW) - if platform == "win32": - nb.Button(plugsframe, text="Open", - command=lambda: os.startfile(plugdir)).grid(padx=PADX-1, sticky=tk.W) + if platform == 'win32': + nb.Button(plugsframe, text=_('Open'), # Button that opens a folder in Explorer/Finder + command=lambda: os.startfile(plugdir.get())).grid(row=10, column=1, padx=(0,PADX), sticky=tk.NSEW) - nb.Label(plugsframe, text=_("Tip: You can disable a plugin by\nadding '.disabled' to it's folder name")).grid( - columnspan=2, - padx=PADX, pady=10, sticky=tk.NSEW) + nb.Label(plugsframe, text=_("Tip: You can disable a plugin by{CR}adding '{EXT}' to it's folder name").format(EXT='.disabled')).grid( # Help text in settings + columnspan=2, padx=PADX, pady=10, sticky=tk.NSEW) if len(plugnames): ttk.Separator(plugsframe, orient=tk.HORIZONTAL).grid(columnspan=3, padx=PADX, pady=PADY * 8, sticky=tk.EW) - nb.Label(plugsframe, text=_('Enabled Plugins:')).grid(padx=PADX, sticky=tk.W) + nb.Label(plugsframe, text=_('Enabled Plugins')+':').grid(padx=PADX, sticky=tk.W) # List of plugins in settings for plugname in plugnames: - nb.Label(plugsframe, text=plugname).grid(padx=PADX + 5, sticky=tk.W) + nb.Label(plugsframe, text=plugname).grid(columnspan=2, padx=PADX*2, sticky=tk.W) if len(disabled_plugins): ttk.Separator(plugsframe, orient=tk.HORIZONTAL).grid(columnspan=3, padx=PADX, pady=PADY * 8, sticky=tk.EW) - nb.Label(plugsframe, text=_('Disabled Plugins:')).grid(padx=PADX, sticky=tk.W) + nb.Label(plugsframe, text=_('Disabled Plugins')+':').grid(padx=PADX, sticky=tk.W) # List of plugins in settings for plugname in disabled_plugins: - nb.Label(plugsframe, text=plugname).grid(padx=PADX + 5, sticky=tk.W) + nb.Label(plugsframe, text=plugname).grid(columnspan=2, padx=PADX*2, sticky=tk.W) - notebook.add(plugsframe, text=_('Plugins')) + notebook.add(plugsframe, text=_('Plugins')) # Tab heading in settings if platform=='darwin':