Skip to content

Commit

Permalink
Merge pull request #52 from RedMser/fix-int-formatting
Browse files Browse the repository at this point in the history
Fix integer formatting breaking selectors
  • Loading branch information
RedMser authored Dec 21, 2024
2 parents ced4c42 + dfbe01b commit e6e3bab
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions rust/src/fluent/translation.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::borrow::Cow;
use fluent::types::{FluentNumber, FluentNumberOptions};
use fluent::types::FluentNumber;
use fluent::{FluentArgs, FluentBundle, FluentError, FluentResource, FluentValue};
use godot::prelude::*;
use godot::classes::{ITranslation, ProjectSettings, RegEx, Translation};
Expand Down Expand Up @@ -176,9 +176,7 @@ impl TranslationFluent {
},
VariantType::INT => {
let casted: i64 = input.to();
let mut options = FluentNumberOptions::default();
options.maximum_fraction_digits = Some(0);
FluentValue::Number(FluentNumber::new(casted as f64, options))
FluentValue::Number(FluentNumber::new(casted as f64, Default::default()))
}
VariantType::FLOAT => {
let casted: f64 = input.to();
Expand Down

0 comments on commit e6e3bab

Please sign in to comment.