Skip to content

Commit

Permalink
merits
Browse files Browse the repository at this point in the history
  • Loading branch information
m00nwtchr committed Apr 7, 2023
1 parent 824e5d0 commit 70041b3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
4 changes: 2 additions & 2 deletions cofd/app/src/component/merits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use cofd::{prelude::*, splat::Merit};

use crate::{
fl,
i18n::Translated,
i18n::{flt, Translated},
widget::dots::{Shape, SheetDots},
Element, H3_SIZE, INPUT_PADDING, TITLE_SPACING,
};
Expand Down Expand Up @@ -77,7 +77,7 @@ impl<Message> Component<Message, iced::Renderer> for MeritComponent<Message> {

vec.push(Merit::_Custom(format!(
"--- {} Merits ---",
character.splat.name()
flt(character.splat.name(), None).unwrap()
)));
vec.extend(character.splat.merits());

Expand Down
9 changes: 0 additions & 9 deletions cofd/app/src/i18n.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,6 @@ pub fn flt(message_id: &str, attribute: Option<&str>) -> Option<String> {
message.take()
}

pub fn fll(key: &str) -> Option<String> {
let mut iter = key.split('.');

let message_id = iter.next().unwrap();
let attribute = iter.next();

flt(message_id, attribute)
}

// #[derive(Debug, Clone, PartialEq, Eq)]
// pub enum Locale {
// System,
Expand Down
4 changes: 3 additions & 1 deletion cofd/app/src/view/overview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ where
flag = true;
}

character.merits.insert(i, (ability, val));
if !ability.name().is_empty() {
character.merits.insert(i, (ability, val));
}
}

if flag {
Expand Down

0 comments on commit 70041b3

Please sign in to comment.