Skip to content

Commit

Permalink
Add Iranian language support (#507)
Browse files Browse the repository at this point in the history
* Add Iranian language support

* Add Iranian language support

* Add Iranian language support

* Add Iranian language support

* Update template.ts

* Update template.ts
  • Loading branch information
yiteei authored Feb 11, 2025
1 parent 502c089 commit eb12f13
Show file tree
Hide file tree
Showing 5 changed files with 508 additions and 12 deletions.
13 changes: 3 additions & 10 deletions src/main/utils/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ export const defaultConfig: IAppConfig = {
core: 'mihomo',
silentStart: false,
appTheme: 'system',
disableLoopbackDetector: false,
skipSafePathCheck: false,
disableEmbedCA: false,
disableSystemCA: false,
useWindowFrame: false,
proxyInTray: true,
maxLogDays: 7,
Expand Down Expand Up @@ -66,7 +62,7 @@ export const defaultControledMihomoConfig: Partial<IMihomoConfig> = {
'auto-route': true,
'auto-redirect': false,
'auto-detect-interface': true,
'dns-hijack': ['any:53', 'tcp://any:53'],
'dns-hijack': ['any:53'],
'route-exclude-address': [],
mtu: 1500
},
Expand All @@ -89,14 +85,11 @@ export const defaultControledMihomoConfig: Partial<IMihomoConfig> = {
'override-destination': false,
sniff: {
HTTP: {
ports: [80, '8080-8880'],
ports: [80, 443],
'override-destination': false
},
TLS: {
ports: [443, 8443]
},
QUIC: {
ports: [443, 8443]
ports: [443]
}
},
'skip-domain': ['+.push.apple.com'],
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/src/components/settings/general-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,15 @@ const GeneralConfig: React.FC = () => {
selectedKeys={[language]}
aria-label={t('settings.language')}
onSelectionChange={async (v) => {
const newLang = Array.from(v)[0] as 'zh-CN' | 'en-US' | 'ru-RU'
const newLang = Array.from(v)[0] as 'zh-CN' | 'en-US' | 'ru-RU' | 'fa-IR'
await patchAppConfig({ language: newLang })
i18n.changeLanguage(newLang)
}}
>
<SelectItem key="zh-CN">中文简体</SelectItem>
<SelectItem key="en-US">English</SelectItem>
<SelectItem key="ru-RU">Русский</SelectItem>
<SelectItem key="fa-IR">فارسی</SelectItem>
</Select>
</SettingItem>
<SettingItem title={t('settings.autoStart')} divider>
Expand Down
Loading

0 comments on commit eb12f13

Please sign in to comment.