summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-07-04 10:33:43 +0200
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-07-04 10:44:36 +0200
commit564e06f06197cb3faecc4e705bf4bbddd54f29a9 (patch)
tree79e685dd5a624f8ded78196ea202ec3126b0e990
parent87a4d8544e68cba6e15ea83ae4140257202d7139 (diff)
downloadsonarqube-564e06f06197cb3faecc4e705bf4bbddd54f29a9.tar.gz
sonarqube-564e06f06197cb3faecc4e705bf4bbddd54f29a9.zip
SONAR-5334 Fix l10n cache issue (304 passing as done)
-rw-r--r--sonar-server/src/main/js/translate.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/sonar-server/src/main/js/translate.js b/sonar-server/src/main/js/translate.js
index b185c0c447c..207b93363e4 100644
--- a/sonar-server/src/main/js/translate.js
+++ b/sonar-server/src/main/js/translate.js
@@ -81,7 +81,7 @@
window.messages = JSON.parse(localStorage.getItem('l10n.bundle'));
}
}
- }).done(function(bundle) {
+ }).done(function(bundle, textStatus, jqXHR) {
if(bundle !== undefined) {
bundleTimestamp = new Date().toISOString();
bundleTimestamp = bundleTimestamp.substr(0, bundleTimestamp.indexOf('.')) + '+0000';
@@ -90,6 +90,8 @@
window.messages = bundle;
localStorage.setItem('l10n.bundle', JSON.stringify(bundle));
+ } else if (jqXHR.status == 304) {
+ window.messages = JSON.parse(localStorage.getItem('l10n.bundle'));
}
});
};