diff options
Diffstat (limited to 'server/sonar-web/src/main/js/helpers/handlebars/changelog.js')
-rw-r--r-- | server/sonar-web/src/main/js/helpers/handlebars/changelog.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/helpers/handlebars/changelog.js b/server/sonar-web/src/main/js/helpers/handlebars/changelog.js new file mode 100644 index 00000000000..ca4ce7b147f --- /dev/null +++ b/server/sonar-web/src/main/js/helpers/handlebars/changelog.js @@ -0,0 +1,14 @@ +module.exports = function (diff) { + var message = ''; + if (diff.newValue != null) { + message = window.tp('issue.changelog.changed_to', window.t('issue.changelog.field', diff.key), diff.newValue); + } else { + message = window.tp('issue.changelog.removed', window.t('issue.changelog.field', diff.key)); + } + if (diff.oldValue != null) { + message += ' ('; + message += window.tp('issue.changelog.was', diff.oldValue); + message += ')'; + } + return message; +}; |