diff --git a/storage/mysql/68-mysql.html b/storage/mysql/68-mysql.html
index 8a12a9af..1bfaf30b 100644
--- a/storage/mysql/68-mysql.html
+++ b/storage/mysql/68-mysql.html
@@ -1,36 +1,36 @@
@@ -57,12 +57,12 @@
diff --git a/storage/mysql/68-mysql.js b/storage/mysql/68-mysql.js
index e7f006fb..039b01c0 100644
--- a/storage/mysql/68-mysql.js
+++ b/storage/mysql/68-mysql.js
@@ -22,7 +22,7 @@ module.exports = function(RED) {
node.pool.query("SELECT version();", [], function(err, rows, fields) {
if (err) {
node.error(err);
- node.status({fill:"red",shape:"ring",text:"Bad Ping"});
+ node.status({fill:"red",shape:"ring",text:RED._("mysql.status.badping")});
doConnect();
}
});
@@ -137,7 +137,7 @@ module.exports = function(RED) {
}
node.mydbConfig.pool.query(msg.topic, bind, function(err, rows) {
if (err) {
- status = {fill:"red",shape:"ring",text:"Error: "+err.code};
+ status = {fill:"red",shape:"ring",text:RED._("mysql.status.error")+": "+err.code};
node.status(status);
node.error(err,msg);
}
@@ -163,7 +163,7 @@ module.exports = function(RED) {
// else { msg.payload = rows; }
msg.payload = rows;
send(msg);
- status = {fill:"green",shape:"dot",text:"OK"};
+ status = {fill:"green",shape:"dot",text:RED._("mysql.status.ok")};
node.status(status);
}
if (done) { done(); }
@@ -173,12 +173,12 @@ module.exports = function(RED) {
});
}
else {
- if (typeof msg.topic !== 'string') { node.error("msg.topic : the query is not defined as a string"); done(); }
+ if (typeof msg.topic !== 'string') { node.error("msg.topic : "+RED._("mysql.errors.notstring")); done(); }
}
}
else {
- node.error("Database not connected",msg);
- status = {fill:"red",shape:"ring",text:"not yet connected"};
+ node.error(RED._("mysql.errors.notconnected"),msg);
+ status = {fill:"red",shape:"ring",text:RED._("mysql.status.notconnected")};
if (done) { done(); }
}
if (!busy) {
@@ -195,7 +195,7 @@ module.exports = function(RED) {
});
}
else {
- this.error("MySQL database not configured");
+ this.error(RED._("mysql.errors.notconfigured"));
}
}
RED.nodes.registerType("mysql",MysqlDBNodeIn);
diff --git a/storage/mysql/locales/en-US/68-mysql.json b/storage/mysql/locales/en-US/68-mysql.json
new file mode 100644
index 00000000..9edd17ba
--- /dev/null
+++ b/storage/mysql/locales/en-US/68-mysql.json
@@ -0,0 +1,24 @@
+{
+ "mysql": {
+ "label": {
+ "host": "Host",
+ "port": "Port",
+ "user": "User",
+ "password": "Password",
+ "database": "Database",
+ "timezone": "Timezone",
+ "charset": "Charset"
+ },
+ "status": {
+ "badping": "Bad Ping",
+ "error": "Error",
+ "ok": "OK",
+ "notconnected": "not yet connected"
+ },
+ "errors": {
+ "notstring": "the query is not defined as a string",
+ "notconnected": "Database not connected",
+ "notconfigured": "MySQL database not configured"
+ }
+ }
+}
\ No newline at end of file
diff --git a/storage/mysql/locales/ja/68-mysql.html b/storage/mysql/locales/ja/68-mysql.html
new file mode 100644
index 00000000..9954b6c3
--- /dev/null
+++ b/storage/mysql/locales/ja/68-mysql.html
@@ -0,0 +1,18 @@
+
+
+
+
diff --git a/storage/mysql/locales/ja/68-mysql.json b/storage/mysql/locales/ja/68-mysql.json
new file mode 100644
index 00000000..c2adf035
--- /dev/null
+++ b/storage/mysql/locales/ja/68-mysql.json
@@ -0,0 +1,24 @@
+{
+ "mysql": {
+ "label": {
+ "host": "ホスト",
+ "port": "ポート",
+ "user": "ユーザー",
+ "password": "パスワード",
+ "database": "データベース",
+ "timezone": "タイムゾーン",
+ "charset": "文字セット"
+ },
+ "status": {
+ "badping": "Bad Ping",
+ "error": "エラー",
+ "ok": "OK",
+ "notconnected": "未接続"
+ },
+ "errors": {
+ "notstring": "クエリが文字列として定義されていません",
+ "notconnected": "データベースに接続できません",
+ "notconfigured": "MySQLデータベース未設定"
+ }
+ }
+}
\ No newline at end of file