Skip to content

Commit

Permalink
add: new i18n keys
Browse files Browse the repository at this point in the history
  • Loading branch information
fperera123 committed Sep 9, 2024
1 parent 9522642 commit b57899f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
12 changes: 11 additions & 1 deletion src/renderer/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,15 @@
"SelectCountry": "Select Country",
"SelectLanguage": "Select Language",
"Theme": "Theme",
"Unit": "Unit"
"Unit": "Unit",

"SelectTheme" : "Select Theme",
"SelectUnit" : "Select Unit",
"SelectMode" : "Select Mode",
"WindowMode" : "Window Mode",

"Overlay" : "Overlay",
"Overlay (Transparent)" : "Overlay (Transparent)",
"Windowed": "Windowed"

}
12 changes: 6 additions & 6 deletions src/renderer/pages/settings/general.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function SettingsGeneralPage() {
<p className="text-foreground/30 text-xs mb-2">{t('Theme')}</p>
<Select onValueChange={setAndRefreshTheme} defaultValue={theme ?? ''}>
<SelectTrigger>
<SelectValue placeholder="Select Theme" />
<SelectValue placeholder={t("SelectTheme")} />
</SelectTrigger>
<SelectContent>
{themes.map(item => (
Expand All @@ -79,7 +79,7 @@ export default function SettingsGeneralPage() {
<p className="text-foreground/30 text-xs mb-2">{t('Country')}</p>
<Select onValueChange={setCountry} defaultValue={country ?? ''}>
<SelectTrigger>
<SelectValue placeholder="Select Country" />
<SelectValue placeholder={t("SelectCountry")} />
</SelectTrigger>
<SelectContent>
{countries.map(coun => (
Expand All @@ -94,7 +94,7 @@ export default function SettingsGeneralPage() {
<p className="text-foreground/30 text-xs mb-2">{t('Language')}</p>
<Select onValueChange={setAndRefreshLanguage} defaultValue={language ?? ''}>
<SelectTrigger>
<SelectValue placeholder="Select Language" />
<SelectValue placeholder={t("SelectLanguage")} />
</SelectTrigger>
<SelectContent>
{languages.map(lan => (
Expand All @@ -106,10 +106,10 @@ export default function SettingsGeneralPage() {
</Select>
</div>
<div>
<p className="text-foreground/30 text-xs mb-2">{t('Window Mode')}</p>
<p className="text-foreground/30 text-xs mb-2">{t('WindowMode')}</p>
<Select key={currentWindowMode} onValueChange={handleSetWindowMode} defaultValue={currentWindowMode ?? 'windowed'}>
<SelectTrigger>
<SelectValue placeholder="Select Mode" />
<SelectValue placeholder={("SelectMode")} />
</SelectTrigger>
<SelectContent>
{windowModes.map(item => (
Expand All @@ -124,7 +124,7 @@ export default function SettingsGeneralPage() {
<p className="text-foreground/30 text-xs mb-2">{t('Unit')}</p>
<Select onValueChange={handleSetResultUnit} defaultValue={resultUnit ?? 'mg/dL'}>
<SelectTrigger>
<SelectValue placeholder="Select Unit" />
<SelectValue placeholder={("SelectUnit")} />
</SelectTrigger>
<SelectContent>
{resultUnits.map(item => (
Expand Down

0 comments on commit b57899f

Please sign in to comment.