From 6da643515573766540daaeaa2eb25af81db1a969 Mon Sep 17 00:00:00 2001 From: Jan Hovancik Date: Tue, 30 Jan 2024 19:11:38 +0100 Subject: [PATCH] Fixes Schedule options not updated after change of language --- CHANGELOG.md | 1 + app/preferences.js | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f4e4bc87..eaa66712b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - transparency issues on Windows 10 +- Schedule options not being updated after change of language ## [1.15.1] - 2023-11-19 ### Fixed diff --git a/app/preferences.js b/app/preferences.js index ce483e051..f30b186b5 100644 --- a/app/preferences.js +++ b/app/preferences.js @@ -185,6 +185,15 @@ window.onload = (e) => { document.querySelector('#language').onchange = (event) => { ipcRenderer.send('save-setting', 'language', event.target.value) htmlTranslate.translate() + document.querySelectorAll('input[type="range"]').forEach(range => { + const divisor = range.dataset.divisor + const output = range.closest('div').querySelector('output') + range.value = settings[range.name] / divisor + const unit = output.dataset.unit + output.innerHTML = formatUnitAndValue(unit, range.value) + document.querySelector('#longBreakEvery').closest('div').querySelector('output') + .innerHTML = i18next.t('utils.minutes', { count: parseInt(realBreakInterval()) }) + }) setWindowHeight() } }