From 2196299fff0a1b38d1f5cf6e9984cabcc6232fe8 Mon Sep 17 00:00:00 2001 From: mini-bomba <55105495+mini-bomba@users.noreply.github.com> Date: Thu, 11 Jun 2020 17:18:10 +0200 Subject: [PATCH] New langkeys: settings.labels.theme.themes Basically allows you to translate theme names to your language instead of them being hard-coded --- src/js/profile/application_settings.js | 2 +- translations/base-en.yaml | 3 +++ translations/base-pl.yaml | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/js/profile/application_settings.js b/src/js/profile/application_settings.js index 85d973b8..3b337b85 100644 --- a/src/js/profile/application_settings.js +++ b/src/js/profile/application_settings.js @@ -134,7 +134,7 @@ export const allApplicationSettings = [ new EnumSetting("theme", { options: Object.keys(THEMES), valueGetter: theme => theme, - textGetter: theme => theme.substr(0, 1).toUpperCase() + theme.substr(1), + textGetter: theme => T.settings.labels.theme.themes[theme], category: categoryGame, restartRequired: false, changeCb: diff --git a/translations/base-en.yaml b/translations/base-en.yaml index 96b368cb..ca36cc7f 100644 --- a/translations/base-en.yaml +++ b/translations/base-en.yaml @@ -639,6 +639,9 @@ settings: title: Game theme description: >- Choose the game theme (light / dark). + themes: + dark: Dark + light: Light refreshRate: title: Simulation Target diff --git a/translations/base-pl.yaml b/translations/base-pl.yaml index 928726d2..4ec534ef 100644 --- a/translations/base-pl.yaml +++ b/translations/base-pl.yaml @@ -650,6 +650,9 @@ settings: title: Motyw Graficzny Gry description: >- Wybierz motyw (jasny / ciemny). + themes: + dark: Ciemny + light: Jasny refreshRate: title: Częstość Odświeżania