diff --git a/apps/desktop/package.json b/apps/desktop/package.json
index 785f5cfd..f5db5003 100644
--- a/apps/desktop/package.json
+++ b/apps/desktop/package.json
@@ -36,6 +36,7 @@
"@radix-ui/react-tooltip": "^1.0.7",
"@tanstack/react-query": "^5.17.19",
"framer-motion": "^10.18.0",
+ "i18next": "^23.8.0",
"jotai": "^2.6.3",
"minidenticons": "^4.2.0",
"nanoid": "^5.0.4",
@@ -45,6 +46,7 @@
"react-currency-input-field": "^3.6.14",
"react-dom": "^18.2.0",
"react-hook-form": "^7.49.3",
+ "react-i18next": "^14.0.1",
"react-router-dom": "^6.21.3",
"smol-toml": "^1.1.4",
"sonner": "^1.3.1",
diff --git a/apps/desktop/src/app.tsx b/apps/desktop/src/app.tsx
index 64a7f3c3..4cb8af63 100644
--- a/apps/desktop/src/app.tsx
+++ b/apps/desktop/src/app.tsx
@@ -1,7 +1,9 @@
import { ColumnProvider, LumeProvider } from "@lume/ark";
import { StorageProvider } from "@lume/storage";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
+import { I18nextProvider } from "react-i18next";
import { Toaster } from "sonner";
+import i18n from "./i18n";
import Router from "./router";
const queryClient = new QueryClient({
@@ -14,15 +16,17 @@ const queryClient = new QueryClient({
export default function App() {
return (
-
- Keep your key in safe place. If you lose this key, you will lose - access to your account. + {t("signupWithSelfManage.subtitle")}
- Choose one of methods below to create your account + {t("signup.subtitle")}
Self-Managed
+{t("signup.selfManageMethod")}
- You create your keys and keep them safe. + {t("signup.selfManageMethodDescription")}
) : ( - "Continue" + t("global.continue") )}- Lume will put your private key to{" "} +
Lume will put your Private Key in{" "} diff --git a/apps/desktop/src/routes/auth/onboarding.tsx b/apps/desktop/src/routes/auth/onboarding.tsx index e771f621..d6e8ca00 100644 --- a/apps/desktop/src/routes/auth/onboarding.tsx +++ b/apps/desktop/src/routes/auth/onboarding.tsx @@ -8,6 +8,7 @@ import { requestPermission, } from "@tauri-apps/plugin-notification"; import { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import { toast } from "sonner"; @@ -16,6 +17,7 @@ export function OnboardingScreen() { const storage = useStorage(); const navigate = useNavigate(); + const [t] = useTranslation(); const [loading, setLoading] = useState(false); const [apiKey, setAPIKey] = useState(""); const [settings, setSettings] = useState({ @@ -91,10 +93,10 @@ export function OnboardingScreen() {
- Let's start personalizing your experience. + {t("onboardingSettings.subtitle")}
- Enabling push notifications will allow you to receive - notifications from Lume. + {t("onboardingSettings.notification.subtitle")}
- Limited relay connection and hide all media, sustainable for low - network environment. + {t("onboardingSettings.lowPower.subtitle")}
- Translate text to your preferred language, powered by Nostr - Wine. + {t("onboardingSettings.translation.subtitle")}
- There are many more settings you can configure from the - "Settings" screen. Be sure to visit it later. -
+{t("onboardingSettings.footer")}
- Lume is a magnificent client for Nostr to meet, explore
-
- and freely share your thoughts with everyone.
+
+ {t("welcome.title")}
- Before joining Nostr, you can take time to learn more about Nostr{" "}
+ {t("welcome.footer")}{" "}
=16.17.0'}
dev: false
+ /i18next@23.8.0:
+ resolution: {integrity: sha512-1H+39doU9dQZrRprpnZ2aZetbX9I1N3bM/YGHN/ZkMJ//wJqrxDEqgI5mmSsh/rglsFBiNxI6UtFZfUO2A6XbA==}
+ dependencies:
+ '@babel/runtime': 7.23.9
+ dev: false
+
/iconv-lite@0.4.23:
resolution: {integrity: sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==}
engines: {node: '>=0.10.0'}
@@ -6970,6 +6988,26 @@ packages:
react-dom: 18.2.0(react@18.2.0)
dev: false
+ /react-i18next@14.0.1(i18next@23.8.0)(react-dom@18.2.0)(react@18.2.0):
+ resolution: {integrity: sha512-TMV8hFismBmpMdIehoFHin/okfvgjFhp723RYgIqB4XyhDobVMyukyM3Z8wtTRmajyFMZrBl/OaaXF2P6WjUAw==}
+ peerDependencies:
+ i18next: '>= 23.2.3'
+ react: '>= 16.8.0'
+ react-dom: '*'
+ react-native: '*'
+ peerDependenciesMeta:
+ react-dom:
+ optional: true
+ react-native:
+ optional: true
+ dependencies:
+ '@babel/runtime': 7.23.9
+ html-parse-stringify: 3.0.1
+ i18next: 23.8.0
+ react: 18.2.0
+ react-dom: 18.2.0(react@18.2.0)
+ dev: false
+
/react-remove-scroll-bar@2.3.4(@types/react@18.2.48)(react@18.2.0):
resolution: {integrity: sha512-63C4YQBUt0m6ALadE9XV56hV8BgJWDmmTPY758iIJjfQKt2nYwoUrPk0LXRXcB/yIj82T1/Ixfdpdk68LwIB0A==}
engines: {node: '>=10'}
@@ -8594,6 +8632,11 @@ packages:
vite: 5.0.12(@types/node@20.11.8)
dev: false
+ /void-elements@3.1.0:
+ resolution: {integrity: sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==}
+ engines: {node: '>=0.10.0'}
+ dev: false
+
/volar-service-css@0.0.17(@volar/language-service@1.11.1):
resolution: {integrity: sha512-bEDJykygMzn2+a9ud6KwZZLli9eqarxApAXZuf2CqJJh6Trw1elmbBCo9SlPfqMrIhpFnwV0Sa+Xoc9x5WPeGw==}
peerDependencies:
diff --git a/src-tauri/locales/en.json b/src-tauri/locales/en.json
new file mode 100644
index 00000000..61b32f5e
--- /dev/null
+++ b/src-tauri/locales/en.json
@@ -0,0 +1,70 @@
+{
+ "global": {
+ "continue": "Continue",
+ "loading": "Loading"
+ },
+ "welcome": {
+ "title": "Lume is a magnificent client for Nostr to meet, explore\nand freely share your thoughts with everyone.",
+ "signup": "Join Nostr",
+ "login": "Login",
+ "footer": "Before joining Nostr, you can take time to learn more about Nostr"
+ },
+ "login": {
+ "title": "Welcome back, anon!",
+ "loginWithAddress": "Login with Nostr Address",
+ "loginWithBunker": "Login with nsecBunker",
+ "or": "Or continue with",
+ "loginWithPrivkey": "Login with Private Key"
+ },
+ "loginWithAddress": {
+ "title": "Enter your Nostr Address"
+ },
+ "loginWithBunker": {
+ "title": "Enter your nsecbunker token"
+ },
+ "loginWithPrivkey": {
+ "title": "Enter your Private Key",
+ "subtitle": "Lume will put your private key to <1>{{service}}1>.\nIt will be secured by your OS."
+ },
+ "signup": {
+ "title": "Let's Get Started",
+ "subtitle": "Choose one of methods below to create your account",
+ "selfManageMethod": "Self-Managed",
+ "selfManageMethodDescription": "You create your keys and keep them safe.",
+ "providerMethod": "Managed by Provider",
+ "providerMethodDescription": "A 3rd party provider will handle your sign in keys for you."
+ },
+ "signupWithSelfManage": {
+ "title": "This is your new Account Key",
+ "subtitle": "Keep your key in safe place. If you lose this key, you will lose access to your account.",
+ "confirm1": "I understand the risk of lost private key.",
+ "confirm2": "I will make sure keep it safe and not sharing with anyone.",
+ "confirm3": "I understand I cannot recover private key.",
+ "button": "Save key & Continue"
+ },
+ "signupWithProvider": {
+ "title": "Let's set up your account on Nostr",
+ "username": "Username *",
+ "chooseProvider": "Choose a Provider",
+ "usernameFooter": "Use to login to Lume and other Nostr apps. You can choose provider you trust to manage your account",
+ "email": "Backup Email (optional)",
+ "emailFooter": "Use for recover your account if you lose your password"
+ },
+ "onboardingSettings": {
+ "title": "You're almost ready to use Lume.",
+ "subtitle": "Let's start personalizing your experience.",
+ "notification": {
+ "title": "Push notification",
+ "subtitle": "Enabling push notifications will allow you to receive notifications from Lume."
+ },
+ "lowPower": {
+ "title": "Low Power Mode",
+ "subtitle": "Limited relay connection and hide all media, sustainable for low network environment."
+ },
+ "translation": {
+ "title": "Translation (nostr.wine)",
+ "subtitle": "Translate text to your preferred language, powered by Nostr Wine."
+ },
+ "footer": "There are many more settings you can configure from the 'Settings' Screen. Be sure to visit it later."
+ }
+}
diff --git a/src-tauri/locales/ja.json b/src-tauri/locales/ja.json
new file mode 100644
index 00000000..1ab7f45d
--- /dev/null
+++ b/src-tauri/locales/ja.json
@@ -0,0 +1,3 @@
+{
+ "title": "こんにちは世界"
+}
diff --git a/src-tauri/resources/.keep b/src-tauri/resources/.keep
new file mode 100644
index 00000000..e69de29b
diff --git a/src-tauri/resources/config.toml b/src-tauri/resources/config.toml
deleted file mode 100644
index 8cf06f1d..00000000
--- a/src-tauri/resources/config.toml
+++ /dev/null
@@ -1,108 +0,0 @@
-[info]
-relay_url = "