Skip to content

Commit

Permalink
Remove optional for translate output string
Browse files Browse the repository at this point in the history
  • Loading branch information
Zokhoi committed Nov 4, 2023
1 parent 04c63b0 commit 4e17019
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deepwell/src/endpoints/locale.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub struct TranslateInput {
messages: HashMap<String, MessageArguments<'static>>,
}

type TranslateOutput = HashMap<String, Option<String>>;
type TranslateOutput = HashMap<String, String>;

pub async fn locale_info(
_ctx: &ServiceContext<'_>,
Expand Down Expand Up @@ -93,7 +93,7 @@ pub async fn translate_strings(
ctx.localization()
.translate(&locales, &message_key, &arguments)?;

output.insert(message_key, Some(translation.to_string()));
output.insert(message_key, translation.to_string());
}

Ok(output)
Expand Down

0 comments on commit 4e17019

Please sign in to comment.