aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-core-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/sonar-core-plugin')
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb19
1 files changed, 13 insertions, 6 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb
index 0a28f86c05c..9e0797f8005 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb
@@ -49,8 +49,12 @@
%>
<tr>
<td>
- <% language = languages.find { |l| l.getKey()==language_key.to_s } -%>
- <%= language ? language.getName() : language_key -%>
+ <% if language_key.eql? '<null>' %>
+ <%= message('other') -%>
+ <% else %>
+ <% language = languages.find { |l| l.getKey()==language_key.to_s } -%>
+ <%= language ? language.getName() : language_key -%>
+ <% end %>
</td>
<td class="thin right nowrap">
<%= ncloc.format_numeric_value(language_ncloc) %>
@@ -73,11 +77,14 @@
});
</script>
<% else %>
- <%
+ <%
language_key = ncloc_language_dist_hash.first[0]
- language = languages.find { |l| l.getKey()==language_key.to_s }
- -%>
- <%= language ? language.getName() : language_key -%>
+ if language_key.eql? '<null>' %>
+ <%= message('other') -%>
+ <% else %>
+ <% language = languages.find { |l| l.getKey()==language_key.to_s } -%>
+ <%= language ? language.getName() : language_key -%>
+ <% end %>
<% end %>
<% end %>
<% else %>