From 739b3e595c65386aec3792badc942dea369d5e4c Mon Sep 17 00:00:00 2001 From: Ryoichi Obara Date: Tue, 29 Oct 2019 02:40:41 +0900 Subject: [PATCH] [ja] Support i18n 70-base64 node. (#591) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [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から文字列へ変換" --- parsers/base64/70-base64.html | 16 ++++---------- parsers/base64/70-base64.js | 10 ++++----- parsers/base64/locales/en-US/70-base64.html | 7 ++++++ parsers/base64/locales/en-US/70-base64.json | 24 +++++++++++++++++++++ parsers/base64/locales/ja/70-base64.html | 7 ++++++ parsers/base64/locales/ja/70-base64.json | 24 +++++++++++++++++++++ test/parsers/base64/70-base64_spec.js | 4 ++-- 7 files changed, 73 insertions(+), 19 deletions(-) create mode 100644 parsers/base64/locales/en-US/70-base64.html create mode 100644 parsers/base64/locales/en-US/70-base64.json create mode 100644 parsers/base64/locales/ja/70-base64.html create mode 100644 parsers/base64/locales/ja/70-base64.json diff --git a/parsers/base64/70-base64.html b/parsers/base64/70-base64.html index 780df599..a26952e3 100644 --- a/parsers/base64/70-base64.html +++ b/parsers/base64/70-base64.html @@ -1,11 +1,11 @@ - - diff --git a/parsers/base64/locales/en-US/70-base64.json b/parsers/base64/locales/en-US/70-base64.json new file mode 100644 index 00000000..42c0e300 --- /dev/null +++ b/parsers/base64/locales/en-US/70-base64.json @@ -0,0 +1,24 @@ +{ + "base64": { + "base64": "base64", + "label": { + "action": "Action" + }, + "convert": { + "buffer": "Convert Buffer <-> Base64", + "encode": "Encode as Base64", + "decode": "Convert Base64 to String" + }, + "log": { + "nonbase64encode": "Not a Base64 string - maybe we should encode it..." + }, + "warn": { + "cannothandle": "This node only handles strings or buffers.", + "noproperty": "No property found to process" + }, + "error": { + "invalid": "Invalid Base64 string", + "nonbase64": "Not a Base64 string" + } + } +} diff --git a/parsers/base64/locales/ja/70-base64.html b/parsers/base64/locales/ja/70-base64.html new file mode 100644 index 00000000..636ff3d0 --- /dev/null +++ b/parsers/base64/locales/ja/70-base64.html @@ -0,0 +1,7 @@ + diff --git a/parsers/base64/locales/ja/70-base64.json b/parsers/base64/locales/ja/70-base64.json new file mode 100644 index 00000000..6c27c340 --- /dev/null +++ b/parsers/base64/locales/ja/70-base64.json @@ -0,0 +1,24 @@ +{ + "base64": { + "base64": "base64", + "label": { + "action": "動作" + }, + "convert": { + "buffer": "バッファ <-> Base64の変換", + "encode": "Base64へエンコード", + "decode": "Base64から文字列へ変換" + }, + "log": { + "nonbase64encode": "Base64文字列ではありませんが、変換します。" + }, + "warn": { + "cannothandle": "このノードは文字列かバッファしか変換できません。", + "noproperty": "処理するためのプロパティが見つかりません。" + }, + "error": { + "invalid": "不正なBase64文字列です。", + "nonbase64": "Base64文字列ではありません。" + } + } +} diff --git a/test/parsers/base64/70-base64_spec.js b/test/parsers/base64/70-base64_spec.js index 26c24c9a..12322b68 100644 --- a/test/parsers/base64/70-base64_spec.js +++ b/test/parsers/base64/70-base64_spec.js @@ -250,7 +250,7 @@ describe('base64 node', function() { return evt[0].type == "base64"; }); logEvents[0][0].should.have.a.property('msg'); - logEvents[0][0].msg.toString().should.startWith("Invalid Base64 string"); + logEvents[0][0].msg.toString().should.startWith("base64.error.invalid"); done(); } catch (e) { done(e); @@ -275,7 +275,7 @@ describe('base64 node', function() { return evt[0].type == "base64"; }); logEvents[0][0].should.have.a.property('msg'); - logEvents[0][0].msg.toString().should.startWith("Not a Base64 string"); + logEvents[0][0].msg.toString().should.startWith("base64.error.nonbase64"); done(); } catch (e) { done(e);