Fix warnings rendering i18n in Wikidata extension

This commit is contained in:
Antonin Delpeuch 2018-11-27 13:56:51 +09:00
parent aea29e19d7
commit 5d51d8a781

View File

@ -46,13 +46,8 @@ WarningsRenderer._replaceIssueProperties = function(template, properties) {
} }
WarningsRenderer._renderWarning = function(warning) { WarningsRenderer._renderWarning = function(warning) {
var localized = $.i18n('warnings-messages')[warning.type]; var title = WarningsRenderer._replaceIssueProperties($.i18n('warnings-messages/'+warning.type+'/title'), warning.properties);
var title = warning.type; var body = WarningsRenderer._replaceIssueProperties($.i18n('warnings-messages/'+warning.type+'/body'), warning.properties);
var body = "";
if (localized) {
title = WarningsRenderer._replaceIssueProperties(localized.title, warning.properties);
body = WarningsRenderer._replaceIssueProperties(localized.body, warning.properties);
}
var tr = $('<tr></tr>').addClass('wb-warning'); var tr = $('<tr></tr>').addClass('wb-warning');
var severityTd = $('<td></td>') var severityTd = $('<td></td>')
.addClass('wb-warning-severity') .addClass('wb-warning-severity')