mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-10 17:25:34 +08:00
feat(i18n): setup page i18n support
This commit is contained in:
parent
9544d315e3
commit
07ee55d8d9
@ -4,6 +4,7 @@ import { ParentComponent, createEffect, createSignal } from 'solid-js'
|
|||||||
|
|
||||||
const dict = {
|
const dict = {
|
||||||
'en-US': {
|
'en-US': {
|
||||||
|
add: 'Add',
|
||||||
overview: 'Overview',
|
overview: 'Overview',
|
||||||
proxies: 'Proxies',
|
proxies: 'Proxies',
|
||||||
rules: 'Rules',
|
rules: 'Rules',
|
||||||
@ -37,6 +38,7 @@ const dict = {
|
|||||||
close: 'Close',
|
close: 'Close',
|
||||||
},
|
},
|
||||||
'zh-Hans': {
|
'zh-Hans': {
|
||||||
|
add: '添加',
|
||||||
overview: '概览',
|
overview: '概览',
|
||||||
proxies: '代理',
|
proxies: '代理',
|
||||||
rules: '规则',
|
rules: '规则',
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { createForm } from '@felte/solid'
|
import { createForm } from '@felte/solid'
|
||||||
import { validator } from '@felte/validator-zod'
|
import { validator } from '@felte/validator-zod'
|
||||||
|
import { useI18n } from '@solid-primitives/i18n'
|
||||||
import { useNavigate } from '@solidjs/router'
|
import { useNavigate } from '@solidjs/router'
|
||||||
import { IconX } from '@tabler/icons-solidjs'
|
import { IconX } from '@tabler/icons-solidjs'
|
||||||
import ky from 'ky'
|
import ky from 'ky'
|
||||||
@ -14,6 +15,7 @@ const schema = z.object({
|
|||||||
})
|
})
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
|
const [t] = useI18n()
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|
||||||
const onSetupSuccess = (id: string) => {
|
const onSetupSuccess = (id: string) => {
|
||||||
@ -102,7 +104,7 @@ export default () => {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary join-item uppercase">
|
<button type="submit" class="btn btn-primary join-item uppercase">
|
||||||
Add
|
{t('add')}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
Loading…
Reference in New Issue
Block a user