From 0258d881ea8f12edc1bcce5c8b850707b02a54d7 Mon Sep 17 00:00:00 2001 From: A_D Date: Fri, 6 Nov 2020 02:48:17 +0200 Subject: [PATCH] Localised options --- L10n/en.template | 6 ++++++ prefs.py | 12 ++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/L10n/en.template b/L10n/en.template index ef8f7399..b92ccc26 100644 --- a/L10n/en.template +++ b/L10n/en.template @@ -1,3 +1,9 @@ +/* Label for 'UI Transparency' option in [prefs.py]*/ +"Main window transparency" = "Main window transparency"; + +/* Warning next to 'UI Transparency' slider */ +"100 means fully opaque.{CR}Window is updated in real time{CR}do NOT use this with the transparent theme on windows" = "100 means fully opaque.{CR}Window is updated in real time{CR}do NOT use this with the transparent theme on windows"; + /* Label for 'UI Scaling' option [prefs.py] */ "UI Scale Percentage" = "UI Scale Percentage"; diff --git a/prefs.py b/prefs.py index 1004a993..bf7955ba 100644 --- a/prefs.py +++ b/prefs.py @@ -745,14 +745,14 @@ class PreferencesDialog(tk.Toplevel): ) with row as cur_row: - nb.Label(appearance_frame, text="Main window transparency").grid( + nb.Label(appearance_frame, text=_("Main window transparency")).grid( padx=self.PADX, pady=self.PADY*2, sticky=tk.W, row=cur_row ) self.transparency = tk.IntVar() self.transparency.set(config.getint('ui_transparency') or 100) # Default to 100 for users self.transparency_bar = tk.Scale( appearance_frame, - variable=self.transparency, + variable=self.transparency, # type: ignore # Its accepted as an intvar orient=tk.HORIZONTAL, length=300 * (float(theme.startup_ui_scale) / 100.0 * theme.default_ui_scale), # type: ignore # runtime from_=100, @@ -764,11 +764,11 @@ class PreferencesDialog(tk.Toplevel): nb.Label( appearance_frame, - text=( - "100 means fully opaque.\n" - "Window is updated in real time\n" + text=_( + "100 means fully opaque.{CR}" + "Window is updated in real time{CR}" "do NOT use this with the transparent theme on windows" - ) + ).format(CR='\n') ).grid( column=3, padx=self.PADX,