From c9b0e1520188ef799e7d1ec141e873255b395654 Mon Sep 17 00:00:00 2001 From: Myeongjin Date: Mon, 28 Mar 2016 16:07:44 +0900 Subject: [PATCH] add localisable strings for dialog --- boot/boot.js | 2 +- core/modules/utils/dom/modal.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index 1a41b4d07..7d3df8af6 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -136,7 +136,7 @@ $tw.utils.error = function(err) { heading = dm("h1",{text: errHeading}), prompt = dm("div",{text: promptMsg, "class": "tc-error-prompt"}), message = dm("div",{text: err}), - button = dm("button",{text: "close"}), + button = dm("button",{text: ( $tw.language == undefined ? "Close" : $tw.language.getString("Buttons/Close/Caption") )}), form = dm("form",{children: [heading,prompt,message,button], "class": "tc-error-form"}); document.body.insertBefore(form,document.body.firstChild); form.addEventListener("submit",function(event) { diff --git a/core/modules/utils/dom/modal.js b/core/modules/utils/dom/modal.js index 2a966a7db..385f7fac2 100644 --- a/core/modules/utils/dom/modal.js +++ b/core/modules/utils/dom/modal.js @@ -122,7 +122,7 @@ Modal.prototype.display = function(title,options) { attributes: { text: { type: "string", - value: "Close" + value: ( $tw.language == undefined ? "Close" : $tw.language.getString("Buttons/Close/Caption") ) }}} ]}], parentWidget: $tw.rootWidget,