mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-07-06 07:37:41 +00:00
use translation template for updatenotifications
This commit is contained in:
parent
20eec53b14
commit
505825056c
@ -58,16 +58,19 @@ Module.register("updatenotification", {
|
|||||||
icon.innerHTML = " ";
|
icon.innerHTML = " ";
|
||||||
message.appendChild(icon);
|
message.appendChild(icon);
|
||||||
|
|
||||||
var subtextHtml = this.translate("UPDATE_INFO")
|
var subtextHtml = this.translate("UPDATE_INFO", {
|
||||||
.replace("COMMIT_COUNT", this.status.behind + " " + ((this.status.behind == 1) ? "commit" : "commits"))
|
COMMIT_COUNT: this.status.behind + " " + ((this.status.behind == 1) ? "commit" : "commits"),
|
||||||
.replace("BRANCH_NAME", this.status.current);
|
BRANCH_NAME: this.status.current
|
||||||
|
});
|
||||||
|
|
||||||
var text = document.createElement("span");
|
var text = document.createElement("span");
|
||||||
if (this.status.module == "default") {
|
if (this.status.module == "default") {
|
||||||
text.innerHTML = this.translate("UPDATE_NOTIFICATION");
|
text.innerHTML = this.translate("UPDATE_NOTIFICATION");
|
||||||
subtextHtml = this.diffLink(subtextHtml);
|
subtextHtml = this.diffLink(subtextHtml);
|
||||||
} else {
|
} 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);
|
message.appendChild(text);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user