feat: add support for multi languages (#79)
* update backup settings description * add rust-i18n * translate * . * update translations * fix * update translate * .
This commit is contained in:
@@ -1,16 +1,18 @@
|
||||
[package]
|
||||
name = "settings"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
publish.workspace = true
|
||||
|
||||
[dependencies]
|
||||
global = { path = "../global" }
|
||||
|
||||
nostr-sdk.workspace = true
|
||||
gpui.workspace = true
|
||||
anyhow.workspace = true
|
||||
log.workspace = true
|
||||
smallvec.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
[package]
|
||||
name = "settings"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
publish.workspace = true
|
||||
|
||||
[dependencies]
|
||||
global = { path = "../global" }
|
||||
|
||||
rust-i18n.workspace = true
|
||||
i18n.workspace = true
|
||||
nostr-sdk.workspace = true
|
||||
gpui.workspace = true
|
||||
anyhow.workspace = true
|
||||
log.workspace = true
|
||||
smallvec.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
|
||||
@@ -6,6 +6,8 @@ use nostr_sdk::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
|
||||
i18n::init!();
|
||||
|
||||
pub fn init(cx: &mut App) {
|
||||
let state = cx.new(AppSettings::new);
|
||||
|
||||
@@ -25,7 +27,6 @@ pub struct Settings {
|
||||
pub media_server: Url,
|
||||
pub proxy_user_avatars: bool,
|
||||
pub hide_user_avatars: bool,
|
||||
pub only_show_trusted: bool,
|
||||
pub backup_messages: bool,
|
||||
pub auto_login: bool,
|
||||
}
|
||||
@@ -67,7 +68,6 @@ impl AppSettings {
|
||||
media_server: Url::parse("https://nostrmedia.com").expect("it's fine"),
|
||||
proxy_user_avatars: true,
|
||||
hide_user_avatars: false,
|
||||
only_show_trusted: false,
|
||||
backup_messages: true,
|
||||
auto_login: false,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user