Skip to content

Commit 1d7b88f

Browse files
committed
Simplify filtering translated messages
This just calls a library function instead of doing the test by hand.
1 parent a551c69 commit 1d7b88f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

i18n-helpers/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,9 +535,8 @@ pub fn translate_events<'a>(
535535
let (msgid, new_state) = reconstruct_markdown(events, state.clone());
536536
let translated = catalog
537537
.find_message(None, &msgid, None)
538-
.filter(|msg| !msg.flags().is_fuzzy())
539-
.and_then(|msg| msg.msgstr().ok())
540-
.filter(|msgstr| !msgstr.is_empty());
538+
.filter(|msg| !msg.flags().is_fuzzy() && msg.is_translated())
539+
.and_then(|msg| msg.msgstr().ok());
541540
match translated {
542541
Some(msgstr) => {
543542
// Generate new events for `msgstr`, taking

0 commit comments

Comments
 (0)