From 25ae4f22012d1eda0f40a3c4b9c52d697cbb8a3e Mon Sep 17 00:00:00 2001 From: reya Date: Mon, 29 Jan 2024 09:12:44 +0700 Subject: [PATCH] feat: add multi-lang --- apps/desktop/package.json | 2 + apps/desktop/src/app.tsx | 24 ++-- apps/desktop/src/i18n.ts | 33 ++++++ .../src/routes/auth/create-address.tsx | 17 +-- apps/desktop/src/routes/auth/create-keys.tsx | 15 +-- apps/desktop/src/routes/auth/create.tsx | 18 +-- apps/desktop/src/routes/auth/login-key.tsx | 21 ++-- .../src/routes/auth/login-nsecbunker.tsx | 6 +- apps/desktop/src/routes/auth/login-oauth.tsx | 8 +- apps/desktop/src/routes/auth/login.tsx | 13 ++- apps/desktop/src/routes/auth/onboarding.tsx | 32 +++--- apps/desktop/src/routes/auth/welcome.tsx | 15 +-- packages/utils/src/constants.ts | 8 +- pnpm-lock.yaml | 43 +++++++ src-tauri/locales/en.json | 70 ++++++++++++ src-tauri/locales/ja.json | 3 + src-tauri/resources/.keep | 0 src-tauri/resources/config.toml | 108 ------------------ src-tauri/tauri.conf.json | 4 +- 19 files changed, 256 insertions(+), 184 deletions(-) create mode 100644 apps/desktop/src/i18n.ts create mode 100644 src-tauri/locales/en.json create mode 100644 src-tauri/locales/ja.json create mode 100644 src-tauri/resources/.keep delete mode 100644 src-tauri/resources/config.toml 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 ( - - - - - - - - - - + + + + + + + + + + + + ); } diff --git a/apps/desktop/src/i18n.ts b/apps/desktop/src/i18n.ts new file mode 100644 index 00000000..61c6f437 --- /dev/null +++ b/apps/desktop/src/i18n.ts @@ -0,0 +1,33 @@ +import { resolveResource } from "@tauri-apps/api/path"; +import { readTextFile } from "@tauri-apps/plugin-fs"; +import { locale } from "@tauri-apps/plugin-os"; +import i18n from "i18next"; +import { initReactI18next } from "react-i18next"; + +const enFilePath = await resolveResource("locales/en.json"); +const jaFilePath = await resolveResource("locales/ja.json"); + +const enLocale = JSON.parse(await readTextFile(enFilePath)); +const jaLocale = JSON.parse(await readTextFile(jaFilePath)); + +const osLocale = (await locale()).slice(0, 2); + +const resources = { + en: { + translation: enLocale, + }, + ja: { + translation: jaLocale, + }, +}; + +i18n.use(initReactI18next).init({ + lng: osLocale, + fallbackLng: "en", + interpolation: { + escapeValue: false, + }, + resources, +}); + +export default i18n; diff --git a/apps/desktop/src/routes/auth/create-address.tsx b/apps/desktop/src/routes/auth/create-address.tsx index c99ac938..dcf8833a 100644 --- a/apps/desktop/src/routes/auth/create-address.tsx +++ b/apps/desktop/src/routes/auth/create-address.tsx @@ -14,6 +14,7 @@ import { Window } from "@tauri-apps/api/window"; import { useSetAtom } from "jotai"; import { useState } from "react"; import { useForm } from "react-hook-form"; +import { useTranslation } from "react-i18next"; import { useLoaderData, useNavigate } from "react-router-dom"; import { toast } from "sonner"; @@ -43,6 +44,7 @@ export function CreateAccountAddress() { const [serviceId, setServiceId] = useState(services?.[0]?.id); const [loading, setIsLoading] = useState(false); + const { t } = useTranslation(); const { register, handleSubmit, @@ -156,7 +158,7 @@ export function CreateAccountAddress() {

- Let's set up your account on Nostr + {t("signupWithProvider.title")}

{!services ? ( @@ -174,7 +176,7 @@ export function CreateAccountAddress() { htmlFor="username" className="text-sm font-semibold uppercase text-neutral-600" > - Username * + {t("signupWithProvider.username")}
@@ -203,7 +205,7 @@ export function CreateAccountAddress() { - Choose a Provider + {t("signupWithProvider.chooseProvider")} {services.map((service) => ( @@ -215,8 +217,7 @@ export function CreateAccountAddress() {
- Use to login to Lume and other Nostr apps. You can choose - provider you trust to manage your account + {t("signupWithProvider.usernameFooter")}
@@ -226,7 +227,7 @@ export function CreateAccountAddress() { htmlFor="email" className="text-sm font-semibold uppercase text-neutral-600" > - Backup Email (optional) + {t("signupWithProvider.email")} - Use for recover your account if you lose your password + {t("signupWithProvider.emailFooter")} @@ -251,7 +252,7 @@ export function CreateAccountAddress() { {loading ? ( ) : ( - "Continue" + t("global.continue") )} diff --git a/apps/desktop/src/routes/auth/create-keys.tsx b/apps/desktop/src/routes/auth/create-keys.tsx index 46cb4347..b0bd4358 100644 --- a/apps/desktop/src/routes/auth/create-keys.tsx +++ b/apps/desktop/src/routes/auth/create-keys.tsx @@ -11,6 +11,7 @@ import { useSetAtom } from "jotai"; import { nanoid } from "nanoid"; import { getPublicKey, nip19 } from "nostr-tools"; import { useEffect, useState } from "react"; +import { useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import { toast } from "sonner"; @@ -20,6 +21,7 @@ export function CreateAccountKeys() { const setOnboarding = useSetAtom(onboardingAtom); const navigate = useNavigate(); + const [t] = useTranslation(); const [key, setKey] = useState(""); const [loading, setLoading] = useState(false); const [showKey, setShowKey] = useState(false); @@ -76,11 +78,10 @@ export function CreateAccountKeys() {

- This is your new Account Key + {t("signupWithSelfManage.title")}

- Keep your key in safe place. If you lose this key, you will lose - access to your account. + {t("signupWithSelfManage.subtitle")}

@@ -122,7 +123,7 @@ export function CreateAccountKeys() { className="text-sm leading-none text-neutral-500" htmlFor="confirm1" > - I understand the risk of lost private key. + {t("signupWithSelfManage.confirm1")}
@@ -142,7 +143,7 @@ export function CreateAccountKeys() { className="text-sm leading-none text-neutral-500" htmlFor="confirm2" > - I will make sure keep it safe and not sharing with anyone. + {t("signupWithSelfManage.confirm2")}
@@ -162,7 +163,7 @@ export function CreateAccountKeys() { className="text-sm leading-none text-neutral-500" htmlFor="confirm3" > - I understand I cannot recover private key. + {t("signupWithSelfManage.confirm3")}
@@ -176,7 +177,7 @@ export function CreateAccountKeys() { {loading ? ( ) : ( - "Save key & Continue" + t("signupWithSelfManage.button") )} diff --git a/apps/desktop/src/routes/auth/create.tsx b/apps/desktop/src/routes/auth/create.tsx index c0b5a301..c982c3bb 100644 --- a/apps/desktop/src/routes/auth/create.tsx +++ b/apps/desktop/src/routes/auth/create.tsx @@ -1,11 +1,13 @@ import { LoaderIcon } from "@lume/icons"; import { cn } from "@lume/utils"; import { useState } from "react"; -import { Link, useNavigate } from "react-router-dom"; +import { useTranslation } from "react-i18next"; +import { useNavigate } from "react-router-dom"; export function CreateAccountScreen() { const navigate = useNavigate(); + const [t] = useTranslation(); const [method, setMethod] = useState<"self" | "managed">("self"); const [loading, setLoading] = useState(false); @@ -23,9 +25,9 @@ export function CreateAccountScreen() {
-

Let's Get Started

+

{t("signup.title")}

- Choose one of methods below to create your account + {t("signup.subtitle")}

@@ -37,9 +39,9 @@ export function CreateAccountScreen() { method === "self" ? "ring-1 ring-teal-500" : "", )} > -

Self-Managed

+

{t("signup.selfManageMethod")}

- You create your keys and keep them safe. + {t("signup.selfManageMethodDescription")}

diff --git a/apps/desktop/src/routes/auth/login-key.tsx b/apps/desktop/src/routes/auth/login-key.tsx index 871d26de..7e90e3e8 100644 --- a/apps/desktop/src/routes/auth/login-key.tsx +++ b/apps/desktop/src/routes/auth/login-key.tsx @@ -4,6 +4,7 @@ import { useStorage } from "@lume/storage"; import { getPublicKey, nip19 } from "nostr-tools"; import { useState } from "react"; import { useForm } from "react-hook-form"; +import { Trans, useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import { toast } from "sonner"; @@ -15,6 +16,7 @@ export function LoginWithKey() { const [showKey, setShowKey] = useState(false); const [loading, setLoading] = useState(false); + const { t } = useTranslation("loginWithPrivkey.subtitle"); const { register, handleSubmit, @@ -52,9 +54,14 @@ export function LoginWithKey() {
-

Enter your Private Key

-

- Lume will put your private key to{" "} +

+ {t("loginWithPrivkey.title")} +

+ + Lume will put your private key to {storage.platform === "macos" ? "Apple Keychain" @@ -62,10 +69,8 @@ export function LoginWithKey() { ? "Credential Manager" : "Secret Service"} - . -
- It will be secured by your OS. -

+ . It will be secured by your OS. +
) : ( - "Continue" + t("global.continue") )}
diff --git a/apps/desktop/src/routes/auth/login-nsecbunker.tsx b/apps/desktop/src/routes/auth/login-nsecbunker.tsx index 4679ab76..fb38b39d 100644 --- a/apps/desktop/src/routes/auth/login-nsecbunker.tsx +++ b/apps/desktop/src/routes/auth/login-nsecbunker.tsx @@ -5,6 +5,7 @@ import NDK, { NDKNip46Signer, NDKPrivateKeySigner } from "@nostr-dev-kit/ndk"; import { nip19 } from "nostr-tools"; import { useState } from "react"; import { useForm } from "react-hook-form"; +import { useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import { toast } from "sonner"; @@ -15,6 +16,7 @@ export function LoginWithNsecbunker() { const [loading, setLoading] = useState(false); + const { t } = useTranslation(); const { register, handleSubmit, @@ -69,7 +71,7 @@ export function LoginWithNsecbunker() {

- Enter your nsecbunker token + {t("loginWithBunker.title")}

@@ -101,7 +103,7 @@ export function LoginWithNsecbunker() { {loading ? ( ) : ( - "Continue" + t("global.continue") )} diff --git a/apps/desktop/src/routes/auth/login-oauth.tsx b/apps/desktop/src/routes/auth/login-oauth.tsx index 84591e7d..60981a82 100644 --- a/apps/desktop/src/routes/auth/login-oauth.tsx +++ b/apps/desktop/src/routes/auth/login-oauth.tsx @@ -7,6 +7,7 @@ import { Window } from "@tauri-apps/api/window"; import { fetch } from "@tauri-apps/plugin-http"; import { useState } from "react"; import { useForm } from "react-hook-form"; +import { useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import { toast } from "sonner"; @@ -19,6 +20,7 @@ export function LoginWithOAuth() { const [loading, setLoading] = useState(false); + const { t } = useTranslation(); const { register, handleSubmit, @@ -130,7 +132,9 @@ export function LoginWithOAuth() {
-

Enter your Nostr Address

+

+ {t("loginWithAddress.title")} +

) : ( - "Continue" + t("global.continue") )}
diff --git a/apps/desktop/src/routes/auth/login.tsx b/apps/desktop/src/routes/auth/login.tsx index 63a6ca3d..016c5249 100644 --- a/apps/desktop/src/routes/auth/login.tsx +++ b/apps/desktop/src/routes/auth/login.tsx @@ -1,11 +1,14 @@ +import { useTranslation } from "react-i18next"; import { Link } from "react-router-dom"; export function LoginScreen() { + const { t } = useTranslation(); + return (
-

Welcome back, anon!

+

{t("login.title")}

@@ -13,13 +16,13 @@ export function LoginScreen() { to="/auth/login-oauth" className="inline-flex items-center justify-center w-full h-12 text-lg font-medium text-white bg-blue-500 rounded-xl hover:bg-blue-600" > - Login with Nostr Address + {t("login.loginWithAddress")} - Login with nsecBunker + {t("login.loginWithBunker")}
@@ -29,7 +32,7 @@ export function LoginScreen() {
- Or continue with + {t("login.or")}
@@ -38,7 +41,7 @@ export function LoginScreen() { to="/auth/login-key" className="mb-2 inline-flex items-center justify-center w-full h-12 text-lg font-medium text-neutral-50 rounded-xl bg-neutral-950 hover:bg-neutral-900" > - Login with Private Key + {t("login.loginWithPrivkey")}

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() {

- You're almost ready to use Lume. + {t("onboardingSettings.title")}

- Let's start personalizing your experience. + {t("onboardingSettings.subtitle")}

@@ -107,10 +109,11 @@ export function OnboardingScreen() {
-

Push notification

+

+ {t("onboardingSettings.notification.title")} +

- Enabling push notifications will allow you to receive - notifications from Lume. + {t("onboardingSettings.notification.subtitle")}

@@ -123,10 +126,11 @@ export function OnboardingScreen() {
-

Low Power Mode

+

+ {t("onboardingSettings.lowPower.title")} +

- Limited relay connection and hide all media, sustainable for low - network environment. + {t("onboardingSettings.lowPower.subtitle")}

@@ -140,11 +144,10 @@ export function OnboardingScreen() {

- Translation (nostr.wine) + {t("onboardingSettings.translation.title")}

- Translate text to your preferred language, powered by Nostr - Wine. + {t("onboardingSettings.translation.subtitle")}

@@ -175,10 +178,7 @@ export function OnboardingScreen() { ) : null}
-

- There are many more settings you can configure from the - "Settings" screen. Be sure to visit it later. -

+

{t("onboardingSettings.footer")}

diff --git a/apps/desktop/src/routes/auth/welcome.tsx b/apps/desktop/src/routes/auth/welcome.tsx index 83789082..2ca0437a 100644 --- a/apps/desktop/src/routes/auth/welcome.tsx +++ b/apps/desktop/src/routes/auth/welcome.tsx @@ -1,6 +1,9 @@ +import { useTranslation } from "react-i18next"; import { Link } from "react-router-dom"; export function WelcomeScreen() { + const { t } = useTranslation(); + return (
@@ -12,10 +15,8 @@ export function WelcomeScreen() { alt="lume" className="w-2/3" /> -

- Lume is a magnificent client for Nostr to meet, explore -
- and freely share your thoughts with everyone. +

+ {t("welcome.title")}

@@ -23,19 +24,19 @@ export function WelcomeScreen() { to="/auth/create" className="inline-flex items-center justify-center w-full h-12 text-lg font-medium text-white bg-blue-500 rounded-xl hover:bg-blue-600" > - Join Nostr + {t("welcome.signup")} - Login + {t("welcome.login")}

- 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}}.\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 = "" -name = "depot" -description = "Nostr Relay inside Lume. Powered by nostr-rs-relay" -pubkey = "" -favicon = "favicon.ico" -relay_icon = "https://example.test/img.png" -#contact = "mailto:contact@example.com" - -[diagnostics] -#tracing = false - -[database] -engine = "sqlite" -data_directory = "." -max_conn = 8 -min_conn = 0 - -[logging] -#folder_path = "./log" -#file_prefix = "nostr-relay" - -[network] -address = "0.0.0.0" -port = 6090 -#remote_ip_header = "x-forwarded-for" -#remote_ip_header = "cf-connecting-ip" -#ping_interval = 300 - -[options] -reject_future_seconds = 1800 - -[limits] -messages_per_sec = 10 -subscriptions_per_min = 10 -limit_scrapers = false - -[authorization] -pubkey_whitelist = [] -nip42_auth = true -nip42_dms = true - -[verified_users] -mode = "passive" -#domain_blacklist = ["wellorder.net"] -#domain_whitelist = ["example.com"] -verify_expiration = "1 week" -#verify_update_frequency = "24 hours" -max_consecutive_failures = 3 - -[grpc] -# gRPC interfaces for externalized decisions and other extensions to -# functionality. -# -# Events can be authorized through an external service, by providing -# the URL below. In the event the server is not accessible, events -# will be permitted. The protobuf3 schema used is available in -# `proto/nauthz.proto`. -# event_admission_server = "http://[::1]:50051" - -# If the event admission server denies writes -# in any case (excluding spam filtering). -# This is reflected in the relay information document. -# restricts_write = true - -[pay_to_relay] -# Enable pay to relay -#enabled = false - -# The cost to be admitted to relay -#admission_cost = 4200 - -# The cost in sats per post -#cost_per_event = 0 - -# Url of lnbits api -#node_url = "" - -# LNBits api secret -#api_secret = "" - -# Nostr direct message on signup -#direct_message=false - -# Terms of service -#terms_message = """ -#This service (and supporting services) are provided "as is", without warranty of any kind, express or implied. -# -#By using this service, you agree: -#* Not to engage in spam or abuse the relay service -#* Not to disseminate illegal content -#* That requests to delete content cannot be guaranteed -#* To use the service in compliance with all applicable laws -#* To grant necessary rights to your content for unlimited time -#* To be of legal age and have capacity to use this service -#* That the service may be terminated at any time without notice -#* That the content you publish may be removed at any time without notice -#* To have your IP address collected to detect abuse or misuse -#* To cooperate with the relay to combat abuse or misuse -#* You may be exposed to content that you might find triggering or distasteful -#* The relay operator is not liable for content produced by users of the relay -#""" - -# Whether or not new sign ups should be allowed -#sign_ups = false - -# optional if `direct_message=false` -#secret_key = "" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index bc04f7e0..7aa50cfa 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -34,7 +34,7 @@ }, "shell": { "open": true, - "scope": [{ "name": "bin/depot", "sidecar": true, "args": true }] + "scope": [] }, "updater": { "endpoints": [ @@ -51,7 +51,7 @@ "depends": [] }, "externalBin": [], - "resources": ["resources/*"], + "resources": ["resources/*", "./locales/*"], "icon": [ "icons/32x32.png", "icons/128x128.png",