mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-01-15 13:51:37 -08:00
fix: system preference not translated
This commit is contained in:
parent
f2276f2aa2
commit
d79b9867a4
1 changed files with 5 additions and 3 deletions
|
|
@ -1,5 +1,7 @@
|
|||
import { useObservable } from 'beautiful-react-hooks';
|
||||
import { useState } from 'react';
|
||||
import i18n from 'i18next';
|
||||
|
||||
import { IUsedElectionSettings } from './interface';
|
||||
|
||||
export function useSystemPreferenceObservable(): IUsedElectionSettings | undefined {
|
||||
|
|
@ -9,7 +11,7 @@ export function useSystemPreferenceObservable(): IUsedElectionSettings | undefin
|
|||
}
|
||||
|
||||
export function getOpenAtLoginString(openAtLogin: IUsedElectionSettings['openAtLogin']): string {
|
||||
if (openAtLogin === 'yes-hidden') return 'Yes, but minimized';
|
||||
if (openAtLogin === 'yes') return 'Yes';
|
||||
return 'No';
|
||||
if (openAtLogin === 'yes-hidden') return i18n.t('Preference.OpenAtLoginMinimized');
|
||||
if (openAtLogin === 'yes') return i18n.t('Yes');
|
||||
return i18n.t('No');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue