File tree 1 file changed +3
-12
lines changed
1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -448,7 +448,9 @@ an<Candidate> ScriptTranslation::Peek() {
448
448
}
449
449
if (candidate_->comment ().empty ()) {
450
450
auto spelling = syllabifier_->GetOriginalSpelling (*candidate_);
451
- if (!spelling.empty () && spelling != candidate_->preedit ()) {
451
+ if (!spelling.empty () &&
452
+ (translator_->always_show_comments () ||
453
+ spelling != candidate_->preedit ())) {
452
454
candidate_->set_comment (/* quote_left + */ spelling/* + quote_right*/ );
453
455
}
454
456
}
@@ -462,17 +464,6 @@ void ScriptTranslation::PrepareCandidate() {
462
464
return ;
463
465
}
464
466
if (sentence_) {
465
- if (sentence_->preedit ().empty ()) {
466
- sentence_->set_preedit (syllabifier_->GetPreeditString (*sentence_));
467
- }
468
- if (sentence_->comment ().empty ()) {
469
- auto spelling = syllabifier_->GetOriginalSpelling (*sentence_);
470
- if (!spelling.empty () &&
471
- (translator_->always_show_comments () ||
472
- spelling != sentence_->preedit ())) {
473
- sentence_->set_comment (/* quote_left + */ spelling/* + quote_right*/ );
474
- }
475
- }
476
467
candidate_ = sentence_;
477
468
return ;
478
469
}
You can’t perform that action at this time.
0 commit comments