Skip to content
Snippets Groups Projects
Commit 9de7fbd9 authored by srosse's avatar srosse
Browse files

OO-1218: translator is not critical, hardened the code to prevent red screen

parent 0cb9c4c5
No related branches found
No related tags found
No related merge requests found
...@@ -68,7 +68,11 @@ public class RatingRenderer extends DefaultComponentRenderer { ...@@ -68,7 +68,11 @@ public class RatingRenderer extends DefaultComponentRenderer {
if (title != null) { if (title != null) {
sb.append("<div class='o_rating_title'>"); sb.append("<div class='o_rating_title'>");
if (rating.isTranslateTitle()) { if (rating.isTranslateTitle()) {
title = translator.translate(title); if(translator != null) {
title = translator.translate(title);
} else {
title = "";
}
} }
sb.append(title); sb.append(title);
sb.append("</div>"); //o_rating_title sb.append("</div>"); //o_rating_title
...@@ -149,7 +153,11 @@ public class RatingRenderer extends DefaultComponentRenderer { ...@@ -149,7 +153,11 @@ public class RatingRenderer extends DefaultComponentRenderer {
if (expl != null) { if (expl != null) {
sb.append("<div class='o_rating_explanation'>"); sb.append("<div class='o_rating_explanation'>");
if (rating.isTranslateExplanation()) { if (rating.isTranslateExplanation()) {
expl = translator.translate(expl); if(translator != null) {
expl = translator.translate(expl);
} else {
expl = "";
}
} }
sb.append(expl); sb.append(expl);
sb.append("</div>"); //o_rating_explanation sb.append("</div>"); //o_rating_explanation
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment