From ecf0bc7ce0f31077f768a4d8b7da12ab6cc27e02 Mon Sep 17 00:00:00 2001 From: eraden Date: Tue, 10 May 2022 08:23:35 +0200 Subject: [PATCH] Add languages --- Cargo.lock | 8 ++ web/Cargo.toml | 5 +- web/dist/index.html | 6 +- ...14be2332599.js => web-3b4fd2c9223643ce.js} | 82 +++++++++--------- ...9_bg.wasm => web-3b4fd2c9223643ce_bg.wasm} | Bin 3159646 -> 3159693 bytes web/src/i18n.rs | 16 ++++ web/src/lib.rs | 1 + 7 files changed, 73 insertions(+), 45 deletions(-) rename web/dist/{web-cd27614be2332599.js => web-3b4fd2c9223643ce.js} (98%) rename web/dist/{web-cd27614be2332599_bg.wasm => web-3b4fd2c9223643ce_bg.wasm} (68%) create mode 100644 web/src/i18n.rs diff --git a/Cargo.lock b/Cargo.lock index db0e9bd..87c1283 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2743,6 +2743,12 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "pure-rust-locales" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45c49fc4f91f35bae654f85ebb3a44d60ac64f11b3166ffa609def390c732d8" + [[package]] name = "quick-error" version = "1.2.3" @@ -4248,7 +4254,9 @@ dependencies = [ "chrono", "gloo-timers", "indexmap", + "js-sys", "model", + "pure-rust-locales", "rusty-money", "seed", "serde", diff --git a/web/Cargo.toml b/web/Cargo.toml index c001a36..36b0acc 100644 --- a/web/Cargo.toml +++ b/web/Cargo.toml @@ -19,12 +19,15 @@ serde_json = { version = "1.0.81" } serde-wasm-bindgen = { version = "0.4.2" } wasm-bindgen = { version = "0.2.80", features = ["default"] } -web-sys = { version = "0.3.57", features = [] } +web-sys = { version = "0.3.57", features = ["Navigator"] } +js-sys = { version = "0.3.57", features = [] } indexmap = { version = "1", features = ["serde-1"] } rusty-money = { version = "0.4.1", features = ["iso"] } +pure-rust-locales = { version = "0.5.6" } + [profile.release] lto = true opt-level = 's' diff --git a/web/dist/index.html b/web/dist/index.html index 1e84542..b0a8410 100644 --- a/web/dist/index.html +++ b/web/dist/index.html @@ -6,14 +6,14 @@ - - + +
-