From 505825056c76a0f8326d6d2a5d9fa872c8f6287b Mon Sep 17 00:00:00 2001 From: fewieden Date: Sat, 17 Feb 2018 10:10:57 +0100 Subject: [PATCH] use translation template for updatenotifications --- .../default/updatenotification/updatenotification.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/default/updatenotification/updatenotification.js b/modules/default/updatenotification/updatenotification.js index 306ac6ae..26d0d9f0 100644 --- a/modules/default/updatenotification/updatenotification.js +++ b/modules/default/updatenotification/updatenotification.js @@ -58,16 +58,19 @@ Module.register("updatenotification", { icon.innerHTML = " "; message.appendChild(icon); - var subtextHtml = this.translate("UPDATE_INFO") - .replace("COMMIT_COUNT", this.status.behind + " " + ((this.status.behind == 1) ? "commit" : "commits")) - .replace("BRANCH_NAME", this.status.current); + var subtextHtml = this.translate("UPDATE_INFO", { + COMMIT_COUNT: this.status.behind + " " + ((this.status.behind == 1) ? "commit" : "commits"), + BRANCH_NAME: this.status.current + }); var text = document.createElement("span"); if (this.status.module == "default") { text.innerHTML = this.translate("UPDATE_NOTIFICATION"); subtextHtml = this.diffLink(subtextHtml); } else { - text.innerHTML = this.translate("UPDATE_NOTIFICATION_MODULE").replace("MODULE_NAME", this.status.module); + text.innerHTML = this.translate("UPDATE_NOTIFICATION_MODULE", { + MODULE_NAME: this.status.module + }); } message.appendChild(text);