feat: add multi-lang

This commit is contained in:
2024-01-29 09:12:44 +07:00
parent 59435ccd13
commit 25ae4f2201
19 changed files with 256 additions and 184 deletions

70
src-tauri/locales/en.json Normal file
View File

@@ -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."
}
}

View File

@@ -0,0 +1,3 @@
{
"title": "こんにちは世界"
}

View File

View File

@@ -1,108 +0,0 @@
[info]
relay_url = "<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 = "<node url>"
# LNBits api secret
#api_secret = "<ln bits api>"
# 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 = "<nostr nsec>"

View File

@@ -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",