aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-04-09 10:16:57 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-04-09 10:43:34 +0200
commit250faa1bb66176cd8833ee248976e64c5b54977d (patch)
tree66f2a00285e3d135efdf8e99ab86f962220388f5
parent3a373942029e49b2c4b6a2e717f909a5a4e7b72b (diff)
downloadsonarqube-250faa1bb66176cd8833ee248976e64c5b54977d.tar.gz
sonarqube-250faa1bb66176cd8833ee248976e64c5b54977d.zip
SONAR-6401 Bulk rule (de)activation confirmation should show language
-rw-r--r--server/sonar-web/src/main/js/coding-rules/bulk-change-modal-view.js5
-rw-r--r--server/sonar-web/src/test/js/coding-rules-page-bulk-change.js2
-rw-r--r--sonar-core/src/main/resources/org/sonar/l10n/core.properties4
3 files changed, 7 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/coding-rules/bulk-change-modal-view.js b/server/sonar-web/src/main/js/coding-rules/bulk-change-modal-view.js
index b1bddfecdca..08a2cdadf90 100644
--- a/server/sonar-web/src/main/js/coding-rules/bulk-change-modal-view.js
+++ b/server/sonar-web/src/main/js/coding-rules/bulk-change-modal-view.js
@@ -36,14 +36,15 @@ define([
showSuccessMessage: function (profile, succeeded) {
var profileBase = _.findWhere(this.options.app.qualityProfiles, { key: profile }),
profileName = profileBase != null ? profileBase.name : profile,
- message = tp('coding_rules.bulk_change.success', profileName, succeeded);
+ message = tp('coding_rules.bulk_change.success', profileName, profileBase.language, succeeded);
+ console.log(profileBase);
this.ui.messagesContainer.append('<div class="alert alert-success">' + message + '</div>');
},
showWarnMessage: function (profile, succeeded, failed) {
var profileBase = _.findWhere(this.options.app.qualityProfiles, { key: profile }),
profileName = profileBase != null ? profileBase.name : profile,
- message = tp('coding_rules.bulk_change.warning', profileName, succeeded, failed);
+ message = tp('coding_rules.bulk_change.warning', profileName, profileBase.language, succeeded, failed);
this.ui.messagesContainer.append('<div class="alert alert-warning">' + message + '</div>');
},
diff --git a/server/sonar-web/src/test/js/coding-rules-page-bulk-change.js b/server/sonar-web/src/test/js/coding-rules-page-bulk-change.js
index 9d455734b08..1bb77b479fb 100644
--- a/server/sonar-web/src/test/js/coding-rules-page-bulk-change.js
+++ b/server/sonar-web/src/test/js/coding-rules-page-bulk-change.js
@@ -78,6 +78,8 @@ casper.test.begin(testName('Activate', 'Success'), function (test) {
})
.then(function () {
+ test.assertSelectorContains('.modal', 'Default - Maven Conventions');
+ test.assertSelectorContains('.modal', 'Java');
test.assertSelectorContains('.modal', '225');
})
diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
index 076bb28d8e7..df64240ed83 100644
--- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties
+++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
@@ -1859,8 +1859,8 @@ coding_rules.add_note=Add Note
coding_rules.add_tags=Add Tags
coding_rules.available_since=Available Since
coding_rules.bulk_change=Bulk Change
-coding_rules.bulk_change.success={1} rule(s) changed in profile {0}
-coding_rules.bulk_change.warning={1} rule(s) changed, {2} rule(s) ignored in profile {0}
+coding_rules.bulk_change.success={2} rule(s) changed in profile {0} - {1}
+coding_rules.bulk_change.warning={2} rule(s) changed, {3} rule(s) ignored in profile {0} - {1}
coding_rules.change_severity=Change Severity
coding_rules.change_severity_in=Change Severity In
coding_rules.change_details=Change Details of Quality Profile