diff --git a/CHANGELOG.md b/CHANGELOG.md index 608b08b1c..e16e320ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed - Fix report page layout ([#4384](https://github.com/lbryio/lbry-desktop/pull/4384)) +- Fix language-change not applied to components immediately _community pr!_ ([#4437](https://github.com/lbryio/lbry-desktop/pull/4437)) ## [0.46.2] - [2020-06-10] diff --git a/ui/component/wunderbar/index.js b/ui/component/wunderbar/index.js index bcad5368c..4384effa4 100644 --- a/ui/component/wunderbar/index.js +++ b/ui/component/wunderbar/index.js @@ -6,7 +6,9 @@ import { selectSearchValue, selectSearchSuggestions, selectSearchBarFocused, + SETTINGS, } from 'lbry-redux'; +import { makeSelectClientSetting } from 'redux/selectors/settings'; import { doToast } from 'redux/actions/notifications'; import analytics from 'analytics'; import Wunderbar from './view'; @@ -17,6 +19,7 @@ const select = state => ({ suggestions: selectSearchSuggestions(state), searchQuery: selectSearchValue(state), isFocused: selectSearchBarFocused(state), + language: makeSelectClientSetting(SETTINGS.LANGUAGE)(state), }); const perform = (dispatch, ownProps) => ({ diff --git a/ui/page/settings/index.js b/ui/page/settings/index.js index d13ea8cef..6cbfac8af 100644 --- a/ui/page/settings/index.js +++ b/ui/page/settings/index.js @@ -46,6 +46,7 @@ const select = state => ({ darkModeTimes: makeSelectClientSetting(SETTINGS.DARK_MODE_TIMES)(state), ffmpegStatus: selectFfmpegStatus(state), findingFFmpeg: selectFindingFFmpeg(state), + language: makeSelectClientSetting(SETTINGS.LANGUAGE)(state), }); const perform = dispatch => ({ diff --git a/ui/page/settings/view.jsx b/ui/page/settings/view.jsx index 24c25679a..e011b633d 100644 --- a/ui/page/settings/view.jsx +++ b/ui/page/settings/view.jsx @@ -87,6 +87,7 @@ type Props = { findingFFmpeg: boolean, findFFmpeg: () => void, openModal: string => void, + language?: string, }; type State = { @@ -246,6 +247,7 @@ class SettingsPage extends React.PureComponent { clearCache, findingFFmpeg, openModal, + language, } = this.props; const { storedPassword } = this.state; const noDaemonSettings = !daemonSettings || Object.keys(daemonSettings).length === 0; @@ -277,7 +279,7 @@ class SettingsPage extends React.PureComponent { ? __("To enable this feature, check 'Save Password' the next time you start the app.") : null } - actions={} + actions={} /> { {!disableMaxKeyFee && ( { {/* @if TARGET='app' */} {/* Auto launch in a hidden state doesn't work on mac https://github.com/Teamwork/node-auto-launch/issues/81 */} - {!IS_MAC && } />} + {!IS_MAC && } />} {/* @endif */}