Update logo, move translations, update electron building.
This commit is contained in:
@@ -2,11 +2,13 @@
|
||||
import i18n from 'i18next';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||
import HttpApi from 'i18next-http-backend';
|
||||
|
||||
// Import translation files directly
|
||||
import enTranslation from '../locales/en/translation.json';
|
||||
import zhTranslation from '../locales/zh/translation.json';
|
||||
|
||||
// Initialize i18n
|
||||
i18n
|
||||
.use(HttpApi) // Load translations using http
|
||||
.use(LanguageDetector) // Detect user language
|
||||
.use(initReactI18next) // Pass i18n instance to react-i18next
|
||||
.init({
|
||||
@@ -23,9 +25,14 @@ i18n
|
||||
checkWhitelist: true,
|
||||
},
|
||||
|
||||
// Backend options
|
||||
backend: {
|
||||
loadPath: './locales/{{lng}}/translation.json',
|
||||
// Resources - load translations directly
|
||||
resources: {
|
||||
en: {
|
||||
translation: enTranslation
|
||||
},
|
||||
zh: {
|
||||
translation: zhTranslation
|
||||
}
|
||||
},
|
||||
|
||||
interpolation: {
|
||||
|
||||
1012
src/locales/en/translation.json
Normal file
1012
src/locales/en/translation.json
Normal file
File diff suppressed because it is too large
Load Diff
1031
src/locales/zh/translation.json
Normal file
1031
src/locales/zh/translation.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,10 @@
|
||||
import React, { useState, useEffect, useRef } from 'react';
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { FormControl, FormItem, FormLabel } from "@/components/ui/form";
|
||||
import { getCredentials } from '@/ui/main-axios';
|
||||
import { Button } from "@/components/ui/button.tsx";
|
||||
import { Input } from "@/components/ui/input.tsx";
|
||||
import { FormControl, FormItem, FormLabel } from "@/components/ui/form.tsx";
|
||||
import { getCredentials } from '@/ui/main-axios.ts';
|
||||
import { useTranslation } from "react-i18next";
|
||||
import type { Credential } from '../types/index.js';
|
||||
import type { Credential } from '../../../../types';
|
||||
|
||||
interface CredentialSelectorProps {
|
||||
value?: number | null;
|
||||
@@ -23,7 +23,7 @@ import {Alert, AlertDescription} from "@/components/ui/alert.tsx";
|
||||
import {toast} from "sonner";
|
||||
import {createSSHHost, updateSSHHost, getSSHHosts, getCredentials} from '@/ui/main-axios.ts';
|
||||
import {useTranslation} from "react-i18next";
|
||||
import {CredentialSelector} from "@/components/CredentialSelector.tsx";
|
||||
import {CredentialSelector} from "@/ui/Desktop/Apps/Credentials/CredentialSelector.tsx";
|
||||
|
||||
interface SSHHost {
|
||||
id: number;
|
||||
|
||||
@@ -7,7 +7,7 @@ import {PasswordInput} from "@/components/ui/password-input.tsx";
|
||||
import {Label} from "@/components/ui/label.tsx";
|
||||
import {Alert, AlertTitle, AlertDescription} from "@/components/ui/alert.tsx";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import {LanguageSwitcher} from "@/components/LanguageSwitcher.tsx";
|
||||
import {LanguageSwitcher} from "@/ui/Desktop/User/LanguageSwitcher.tsx";
|
||||
import {
|
||||
registerUser,
|
||||
loginUser,
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from '@/components/ui/select';
|
||||
} from '@/components/ui/select.tsx';
|
||||
import { Globe } from 'lucide-react';
|
||||
|
||||
const languages = [
|
||||
@@ -13,7 +13,7 @@ import {getVersionInfo} from "@/ui/main-axios.ts";
|
||||
import {toast} from "sonner";
|
||||
import {PasswordReset} from "@/ui/Desktop/User/PasswordReset.tsx";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import {LanguageSwitcher} from "@/components/LanguageSwitcher.tsx";
|
||||
import {LanguageSwitcher} from "@/ui/Desktop/User/LanguageSwitcher.tsx";
|
||||
import {useSidebar} from "@/components/ui/sidebar.tsx";
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import {Input} from "@/components/ui/input.tsx";
|
||||
import {Label} from "@/components/ui/label.tsx";
|
||||
import {Alert, AlertTitle, AlertDescription} from "@/components/ui/alert.tsx";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import {LanguageSwitcher} from "@/components/LanguageSwitcher.tsx";
|
||||
import {LanguageSwitcher} from "@/ui/Desktop/User/LanguageSwitcher.tsx";
|
||||
import {
|
||||
registerUser,
|
||||
loginUser,
|
||||
|
||||
Reference in New Issue
Block a user