mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-12-26 23:16:47 +01:00
[ja] Support i18n 70-base64 node. (#591)
* [ja] Translate 70-base64 node. * Fix PR review #591 "Buffer" -> "バッファ". We have used Japanese katakana words of "buffer" in http-request and file-out nodes. * Fix PR review #591 "Base64" -> "base64" * Fix PR review #591 "Base64から文字列へデコード" -> "Base64から文字列へ変換"
This commit is contained in:
committed by
Dave Conway-Jones
parent
0f46364a55
commit
739b3e595c
@@ -24,9 +24,9 @@ module.exports = function(RED) {
|
||||
RED.util.setMessageProperty(msg,node.property,value);
|
||||
node.send(msg);
|
||||
}
|
||||
else { node.error("Invalid Base64 string",msg); }
|
||||
else { node.error(RED._("base64.error.invalid"),msg); }
|
||||
}
|
||||
else { node.error("Not a Base64 string",msg); }
|
||||
else { node.error(RED._("base64.error.nonbase64"),msg); }
|
||||
}
|
||||
else {
|
||||
if (Buffer.isBuffer(value)) {
|
||||
@@ -46,18 +46,18 @@ module.exports = function(RED) {
|
||||
node.send(msg);
|
||||
}
|
||||
else {
|
||||
node.log("Not a Base64 string - maybe we should encode it...");
|
||||
node.log(RED._("base64.log.nonbase64encode"));
|
||||
value = Buffer.from(value).toString('base64');
|
||||
RED.util.setMessageProperty(msg,node.property,value);
|
||||
node.send(msg);
|
||||
}
|
||||
}
|
||||
else {
|
||||
node.warn("This node only handles strings or buffers.");
|
||||
node.warn(RED._("base64.warn.cannothandle"));
|
||||
}
|
||||
}
|
||||
}
|
||||
else { node.warn("No property found to process"); }
|
||||
else { node.warn(RED._("base64.warn.noproperty")); }
|
||||
});
|
||||
}
|
||||
RED.nodes.registerType("base64",Base64Node);
|
||||
|
||||
Reference in New Issue
Block a user