1
0
forked from GitHub/gf-core

a small fix to avoid showing * in some translations

This commit is contained in:
kr.angelov
2014-04-24 08:03:29 +00:00
parent 81c2184923
commit 6808c3c982
2 changed files with 10 additions and 10 deletions

View File

@@ -200,17 +200,17 @@ public class AlternativesActivity extends ListActivity {
phrase = phrase.substring(2);
}
// parse error or unknown translations (in []) present, darkest red color
else if (phrase.contains("parse error:") || phrase.contains("[")) {
descView.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_worst_utterance_bg));
}
// parse by chunks, marked by *, red color
else if (phrase.charAt(0) == '*') {
descView.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_chunk_utterance_bg));
phrase = phrase.substring(2);
}
// parse error or unknown translations (in []) present, darkest red color
else if (phrase.contains("parse error:") || phrase.contains("[")) {
descView.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_worst_utterance_bg));
}
// parse by domain grammar, marked by +, green color
else if (phrase.charAt(0) == '+') {
descView.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_best_utterance_bg));

View File

@@ -132,17 +132,17 @@ public class ConversationView extends ScrollView {
target = target.subSequence(2, target.length()) ;
}
// parse error or unknown translations (in []) present, darkest red color
else if (target.toString().contains("parse error:") || target.toString().contains("[")) {
view.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_worst_utterance_bg));
}
// parse by chunks, marked by *, red color
else if (target.charAt(0) == '*') {
view.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_chunk_utterance_bg));
target = target.subSequence(2, target.length()) ;
}
// parse error or unknown translations (in []) present, darkest red color
else if (target.toString().contains("parse error:") || target.toString().contains("[")) {
view.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_worst_utterance_bg));
}
// parse by domain grammar, marked by +, green color
else if (target.charAt(0) == '+') {
view.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_best_utterance_bg));