Skip to content

Commit

Permalink
Is this still even any good
Browse files Browse the repository at this point in the history
  • Loading branch information
folkengine committed Aug 25, 2024
1 parent bcb3f1e commit 9ce5a1b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "cardpack"
description = "Generic Deck of Cards"
version = "0.5.1"
version = "1.0.0"
authors = ["electronicpanopticon <[email protected]>"]
repository = "https://github.com/ImperialBower/cardpack.rs.git"
homepage = "https://github.com/ImperialBower/cardpack.rs"
Expand All @@ -18,14 +18,14 @@ path = "src/lib.rs"

[dependencies]
colored = "2.1.0"
fluent-templates = "0.8.0"
fluent-templates = "0.9.2"
flume = "0.11.0"
lazy_static = "1.4.0"
log = "0.4.20"
log = "0.4.21"
rand = "0.8.5"
spin = "0.9.8"
term-table = "1.3.2"
unic-langid = { version = "0.9.4", features = ["macros"] }

[dev-dependencies]
rstest = "0.18.2"
rstest = "0.19.0"
11 changes: 2 additions & 9 deletions src/fluent/named.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use fluent_templates::{static_loader, Loader};
use log::error;
use unic_langid::{langid, LanguageIdentifier};

static_loader! {
Expand All @@ -25,15 +24,9 @@ pub trait Named {

/// This is the core method for getting fluent values. the index, long, and default weight
/// methods are all just methods simplifying the call to this method.
fn fluent_value(&self, key_section: &str, lid: &LanguageIdentifier) -> std::string::String {
fn fluent_value(&self, key_section: &str, lid: &LanguageIdentifier) -> String {
let id = format!("{}-{}", self.name(), key_section);
match LOCALES.lookup(lid, id.as_str()) {
None => {
error!("Invalid Fluent Template text_id: {}", lid);
String::from("_")
}
Some(s) => s,
}
LOCALES.lookup(lid, id.as_str())
}

/// Returns the value of the names' index in the fluent templates.
Expand Down

0 comments on commit 9ce5a1b

Please sign in to comment.