mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-20 16:42:51 -06:00
a small fix to avoid showing * in some translations
This commit is contained in:
@@ -200,17 +200,17 @@ public class AlternativesActivity extends ListActivity {
|
|||||||
phrase = phrase.substring(2);
|
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
|
// parse by chunks, marked by *, red color
|
||||||
else if (phrase.charAt(0) == '*') {
|
else if (phrase.charAt(0) == '*') {
|
||||||
descView.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_chunk_utterance_bg));
|
descView.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_chunk_utterance_bg));
|
||||||
phrase = phrase.substring(2);
|
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
|
// parse by domain grammar, marked by +, green color
|
||||||
else if (phrase.charAt(0) == '+') {
|
else if (phrase.charAt(0) == '+') {
|
||||||
descView.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_best_utterance_bg));
|
descView.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_best_utterance_bg));
|
||||||
|
|||||||
@@ -132,17 +132,17 @@ public class ConversationView extends ScrollView {
|
|||||||
target = target.subSequence(2, target.length()) ;
|
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
|
// parse by chunks, marked by *, red color
|
||||||
else if (target.charAt(0) == '*') {
|
else if (target.charAt(0) == '*') {
|
||||||
view.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_chunk_utterance_bg));
|
view.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_chunk_utterance_bg));
|
||||||
target = target.subSequence(2, target.length()) ;
|
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
|
// parse by domain grammar, marked by +, green color
|
||||||
else if (target.charAt(0) == '+') {
|
else if (target.charAt(0) == '+') {
|
||||||
view.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_best_utterance_bg));
|
view.setBackgroundDrawable(getResources().getDrawable(R.drawable.second_person_best_utterance_bg));
|
||||||
|
|||||||
Reference in New Issue
Block a user