Skip to content

Commit

Permalink
fix: table_translator not making sentence if table entry is hidden by…
Browse files Browse the repository at this point in the history
… charset filter.
  • Loading branch information
lotem committed Jul 29, 2013
1 parent 1a34848 commit 77eb12e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/gear/table_translator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -248,25 +248,25 @@ shared_ptr<Translation> TableTranslator::Query(const std::string &input,
iter,
uter);
}
if (translation && translation->exhausted()) {
translation.reset(); // discard futile translation
}
if (translation) {
bool filter_by_charset = enable_charset_filter_ &&
!engine_->context()->get_option("extended_charset");
if (filter_by_charset) {
translation = make_shared<CharsetFilter>(translation);
}
}
if (enable_sentence_ && !translation) {
translation = MakeSentence(input, segment.start);
}
if (translation && translation->exhausted()) {
translation.reset(); // discard futile translation
}
if (enable_sentence_ && !translation) {
translation = MakeSentence(input, segment.start);
}
if (translation) {
translation = make_shared<UniqueFilter>(translation);
}
if (translation && translation->exhausted()) {
translation.reset(); // discard futile translation
}
return translation;
}

Expand Down

0 comments on commit 77eb12e

Please sign in to comment.