Skip to content

Commit

Permalink
Flush storage for language change. (stream-labs#4320)
Browse files Browse the repository at this point in the history
* Flush storage for language change.

* Remove Japanese from excluded langauges.
  • Loading branch information
michelinewu authored Sep 27, 2022
1 parent b5b5aff commit d7c5603
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function SourceGrid(p: { activeTab: string }) {

const i18nService = I18nService.instance as I18nService;
const locale = i18nService.state.locale;
const excludedLanguages = ['en', 'ko', 'ja', 'zh']; // add i18n prefixes here to exclude languages from wrapping
const excludedLanguages = ['en', 'ko', 'zh']; // add i18n prefixes here to exclude languages from wrapping
const excludeWrap = excludedLanguages.includes(locale.split('-')[0]);

const { availableAppSources } = useSourceShowcaseSettings();
Expand Down
1 change: 1 addition & 0 deletions app/services/i18n/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ export class I18nService extends PersistentStatefulService<II18nState> implement

setLocale(locale: string) {
this.SET_LOCALE(locale);
remote.session.defaultSession.flushStorageData();
remote.app.relaunch({ args: [] });
remote.app.quit();
}
Expand Down

0 comments on commit d7c5603

Please sign in to comment.