remove fluent-webserv because either fluent sucks or i dont get it
cargo devel CI / cargo CI (push) Failing after 54s
Details
cargo devel CI / cargo CI (push) Failing after 54s
Details
This commit is contained in:
parent
8173a8da7a
commit
9ad6800327
|
@ -1,12 +0,0 @@
|
||||||
[package]
|
|
||||||
name = "fluent-webserv"
|
|
||||||
version = "0.1.0"
|
|
||||||
edition = "2021"
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
anyhow.workspace = true
|
|
||||||
fluent = "0.16.0"
|
|
||||||
rocket = "0.5.0"
|
|
||||||
unic-langid = "0.9.4"
|
|
|
@ -1,3 +0,0 @@
|
||||||
## Closing tabs
|
|
||||||
|
|
||||||
hello-msg = Willkommen im Herzen Europa!
|
|
|
@ -1,3 +0,0 @@
|
||||||
## Closing tabs
|
|
||||||
|
|
||||||
hello-msg = Hello World!
|
|
|
@ -1,29 +0,0 @@
|
||||||
use fluent::{FluentArgs, FluentBundle, FluentResource, FluentValue};
|
|
||||||
// Used to provide a locale for the bundle.
|
|
||||||
use unic_langid::LanguageIdentifier;
|
|
||||||
|
|
||||||
#[rocket::main]
|
|
||||||
async fn main() -> anyhow::Result<()> {
|
|
||||||
let source_en: FluentResource = FluentResource::try_new(
|
|
||||||
std::fs::read_to_string("../data/en-US.ftl").expect("could not read"),
|
|
||||||
)
|
|
||||||
.expect("could not parse");
|
|
||||||
let source_de: FluentResource = FluentResource::try_new(
|
|
||||||
std::fs::read_to_string("../data/de-DE.ftl").expect("could not read"),
|
|
||||||
)
|
|
||||||
.expect("could not parse");
|
|
||||||
|
|
||||||
let langid_en: LanguageIdentifier = "en-US".parse().expect("Parsing failed");
|
|
||||||
let langid_de: LanguageIdentifier = "de-DE".parse().expect("Parsing failed");
|
|
||||||
let mut bundle = FluentBundle::new(vec![langid_en, langid_de]);
|
|
||||||
bundle
|
|
||||||
.add_resource(source_en)
|
|
||||||
.expect("Failed to add FTL resources to the bundle.");
|
|
||||||
bundle
|
|
||||||
.add_resource(source_de)
|
|
||||||
.expect("Failed to add FTL resources to the bundle.");
|
|
||||||
|
|
||||||
rocket::build().launch().await?;
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
Loading…
Reference in New Issue