From b198db7f06d59c039754d71185933be58f0f736d Mon Sep 17 00:00:00 2001 From: Tnks2U Date: Mon, 27 Mar 2023 17:11:56 +0900 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20=ED=98=84=EC=9E=AC%=20=EB=93=9C?= =?UTF-8?q?=EB=A1=AD=EB=8B=A4=EC=9A=B4=20=EC=88=9C=EC=84=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/playground/blocks/block_calc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/playground/blocks/block_calc.js b/src/playground/blocks/block_calc.js index 61a1f603e4..30a605fcde 100644 --- a/src/playground/blocks/block_calc.js +++ b/src/playground/blocks/block_calc.js @@ -1396,10 +1396,10 @@ module.exports = { [Lang.Blocks.CALC_get_date_year, 'YEAR'], [Lang.Blocks.CALC_get_date_month, 'MONTH'], [Lang.Blocks.CALC_get_date_day, 'DAY'], + [Lang.Blocks.CALC_get_date_day_of_week, 'DAY_OF_WEEK'], [Lang.Blocks.CALC_get_date_hour, 'HOUR'], [Lang.Blocks.CALC_get_date_minute, 'MINUTE'], [Lang.Blocks.CALC_get_date_second, 'SECOND'], - [Lang.Blocks.CALC_get_date_day_of_week, 'DAY_OF_WEEK'], ], value: 'YEAR', fontSize: 10, From ed3d63a7f8781b5b3faa95d545692b356b1df71c Mon Sep 17 00:00:00 2001 From: Tnks2U Date: Mon, 27 Mar 2023 17:17:48 +0900 Subject: [PATCH 2/4] =?UTF-8?q?lang=20:=20%1=EC=9D=B4=20%2=EC=9D=B8?= =?UTF-8?q?=EA=B0=80=20=EC=98=81=EB=AC=B8=20=EB=8B=A4=EA=B5=AD=EC=96=B4?= =?UTF-8?q?=EC=97=90=20=EB=AC=BC=EC=9D=8C=ED=91=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extern/lang/en.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/lang/en.js b/extern/lang/en.js index 561ae9633f..208b6bd089 100644 --- a/extern/lang/en.js +++ b/extern/lang/en.js @@ -1116,7 +1116,7 @@ Lang.Blocks = { "arduino_lite_guide": "• connection guide", "JUDGEMENT_is_object_clicked": "Object clicked?", "JUDGEMENT_is_type_1": "is", - "JUDGEMENT_is_type_2": "", + "JUDGEMENT_is_type_2": "?", "is_type_number": "number", }; Lang.video_body_coord_params = { From 6d53bbfc94a8327c786c857d9727471fafec9b9f Mon Sep 17 00:00:00 2001 From: Tnks2U Date: Mon, 27 Mar 2023 17:36:31 +0900 Subject: [PATCH 3/4] =?UTF-8?q?fix,=20lang=20:=20%1=EC=97=90=EC=84=9C=20%2?= =?UTF-8?q?=20=EC=9D=98=20=EA=B8=80=EC=9E=90=20=EC=88=98=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 다국어, 블록메뉴 위치 수정 --- extern/lang/ebs.js | 5 ++--- extern/lang/en.js | 9 ++++----- extern/lang/ko.js | 5 ++--- extern/util/static.js | 2 +- src/playground/blocks/block_calc.js | 2 +- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/extern/lang/ebs.js b/extern/lang/ebs.js index 64325c1749..87179b6478 100644 --- a/extern/lang/ebs.js +++ b/extern/lang/ebs.js @@ -1545,7 +1545,7 @@ Lang.Blocks = { "CALC_change_string_case_sub_1": "대문자", "CALC_change_string_case_sub_2": "소문자", "CALC_count_match_string_1": "에서", - "CALC_count_match_string_2": "의 글자 개수", + "CALC_count_match_string_2": "의 글자 수", "CALC_index_of_string_1": "", "CALC_index_of_string_2": "에서", "CALC_index_of_string_3": "의 시작 위치", @@ -1590,7 +1590,6 @@ Lang.Blocks = { "entry_bot_name": "엔트리봇", "hi_entry": "", "hi_entry_en": "", - "hello_entry": "hello entry", "bark_dog": "", "walking_entryBot": "엔트리봇_걷기", "doggi_bark": "강아지 짖는 소리", @@ -5467,7 +5466,7 @@ Lang.Helper = { "char_at": "입력한 값에서 입력한 숫자 번째의 글자 값입니다. (공백을 포함합니다.)", "length_of_string": "입력한 값의 공백을 포함한 글자 수입니다.", "substring": "입력한 값에서 입력한 범위 내의 글자 값입니다. (공백을 포함합니다.)", - "count_match_string": "입력한 값에서 지정한 값의 글자 개수입니다.", + "count_match_string": "입력한 값에서 지정한 값의 글자 수이며, 영문의 경우 대문자와 소문자를 구분하여 수를 셉니다.", "replace_string": "입력한 값에서 지정한 값을 찾아 추가로 입력한 값으로 모두 바꾼 값입니다. (영문 입력 시 대소문자를 구분합니다.)", "index_of_string": "입력한 값에서 지정한 값이 처음으로 등장하는 위치 값입니다. (공백을 포함합니다.)", "change_string_case": "입력한 영문의 모든 알파벳을 대문자 또는 소문자로 바꾼 값입니다.", diff --git a/extern/lang/en.js b/extern/lang/en.js index 208b6bd089..832ca3e293 100644 --- a/extern/lang/en.js +++ b/extern/lang/en.js @@ -738,8 +738,8 @@ Lang.Blocks = { "CALC_change_string_case_3": " ", "CALC_change_string_case_sub_1": "uppercase", "CALC_change_string_case_sub_2": "lowercase", - "CALC_count_match_string_1": "'s count of", - "CALC_count_match_string_2": "", + "CALC_count_match_string_1": "count of", + "CALC_count_match_string_2": "in", "CALC_index_of_string_1": "index of", "CALC_index_of_string_2": "in", "CALC_index_of_string_3": "", @@ -784,7 +784,6 @@ Lang.Blocks = { "entry_bot_name": "Entrybot", "hi_entry": "Hello Entry!", "hi_entry_en": "Hello Entry!", - "hello_entry": "hello entry", "bark_dog": "dog barking", "walking_entryBot": "Walking Entrybot", "doggi_bark": "Doggi's Bark", @@ -4674,7 +4673,7 @@ Lang.Helper = { "char_at": "Reports the letter of the input text.", "length_of_string": "Reports the length of input text including space.", "substring": "Reports the text extracted from the input text between two specified indices. (includes space)", - "count_match_string": "Reports the number of letters in a specific text in the input text.", + "count_match_string": "Reports the number of letters in a specific text in the input text case sensitively.", "replace_string": "Reports the text that replaced all the input text with another input text. (distinguishes uppercase to lowercase)", "index_of_string": "Reports the index of first input text in second input text. (includes space)", "change_string_case": "Reports the text that converted to uppercase or lowercase.", @@ -5258,7 +5257,7 @@ Lang.template = { "substring": "%1 %2 %3 %4 %5 %6 %7", "replace_string": "%1 %2 %3 %4 %5 %6 %7", "change_string_case": "%1 %2 %3 %4 %5", - "count_match_string": "%3 %2 %1 %4", + "count_match_string": "%2 %3 %4 %1", "index_of_string": "%1 %2 %3 %4 %5", "combine_something": "%1 %2 %3 %4 %5", "get_sound_volume": "%1 %2", diff --git a/extern/lang/ko.js b/extern/lang/ko.js index ce6d9c2d17..c34ce0e1d7 100644 --- a/extern/lang/ko.js +++ b/extern/lang/ko.js @@ -1561,7 +1561,7 @@ Lang.Blocks = { CALC_change_string_case_sub_1: '대문자', CALC_change_string_case_sub_2: '소문자', CALC_count_match_string_1: '에서', - CALC_count_match_string_2: '의 글자 개수', + CALC_count_match_string_2: '의 글자 수', CALC_index_of_string_1: '', CALC_index_of_string_2: '에서', CALC_index_of_string_3: '의 시작 위치', @@ -1606,7 +1606,6 @@ Lang.Blocks = { entry_bot_name: '엔트리봇', hi_entry: '안녕 엔트리!', hi_entry_en: 'Hello Entry!', - hello_entry: 'hello entry', bark_dog: '강아지 짖는 소리', walking_entryBot: '엔트리봇_걷기', doggi_bark: '강아지 짖는 소리', @@ -6030,7 +6029,7 @@ Lang.Helper = { char_at: '입력한 값에서 입력한 숫자 번째의 글자 값입니다. (공백을 포함합니다.)', length_of_string: '입력한 값의 공백을 포함한 글자 수입니다.', substring: '입력한 값에서 입력한 범위 내의 글자 값입니다. (공백을 포함합니다.)', - count_match_string: '입력한 값에서 지정한 값의 글자 개수입니다.', + count_match_string: '입력한 값에서 지정한 값의 글자 수이며, 영문의 경우 대문자와 소문자를 구분하여 수를 셉니다.', replace_string: '입력한 값에서 지정한 값을 찾아 추가로 입력한 값으로 모두 바꾼 값입니다. (영문 입력 시 대소문자를 구분합니다.)', index_of_string: diff --git a/extern/util/static.js b/extern/util/static.js index 7d053b0d3d..3c7e597d2d 100644 --- a/extern/util/static.js +++ b/extern/util/static.js @@ -347,10 +347,10 @@ EntryStatic.getAllBlocks = function() { 'get_user_name', 'get_nickname', 'length_of_string', + 'count_match_string', 'combine_something', 'char_at', 'substring', - 'count_match_string', 'index_of_string', 'replace_string', 'reverse_of_string', diff --git a/src/playground/blocks/block_calc.js b/src/playground/blocks/block_calc.js index 30a605fcde..7626f37798 100644 --- a/src/playground/blocks/block_calc.js +++ b/src/playground/blocks/block_calc.js @@ -2154,7 +2154,7 @@ module.exports = { params: [ { type: 'text', - params: [Lang.Blocks.hello_entry], + params: [Lang.Blocks.hi_entry_en], }, null, { From 5d56afaf98b013b9f313988ec6fd18b00599f729 Mon Sep 17 00:00:00 2001 From: Tnks2U Date: Mon, 27 Mar 2023 17:38:06 +0900 Subject: [PATCH 4/4] =?UTF-8?q?refactor:=20lint=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/playground/blocks/block_calc.js | 21 ++++++++++++--------- src/playground/blocks/block_judgement.js | 4 +--- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/playground/blocks/block_calc.js b/src/playground/blocks/block_calc.js index 7626f37798..e9896d1b4b 100644 --- a/src/playground/blocks/block_calc.js +++ b/src/playground/blocks/block_calc.js @@ -1100,14 +1100,14 @@ module.exports = { ], events: { viewAdd: [ - function () { + function() { if (Entry.engine) { Entry.engine.showProjectTimer(); } }, ], viewDestroy: [ - function (block, notIncludeSelf) { + function(block, notIncludeSelf) { if (Entry.engine) { Entry.engine.hideProjectTimer(block, notIncludeSelf); } @@ -1176,7 +1176,7 @@ module.exports = { }, ], dataDestroy: [ - function (block) { + function(block) { if (Entry.engine) { Entry.engine.hideProjectTimer(block); } @@ -1307,14 +1307,14 @@ module.exports = { ], events: { viewAdd: [ - function () { + function() { if (Entry.engine) { Entry.engine.showProjectTimer(); } }, ], viewDestroy: [ - function (block, notIncludeSelf) { + function(block, notIncludeSelf) { if (Entry.engine) { Entry.engine.hideProjectTimer(block, notIncludeSelf); } @@ -1522,13 +1522,13 @@ module.exports = { const mousePos = Entry.stage.mouseCoordinate; return Math.sqrt( Math.pow(sprite.getX() - mousePos.x, 2) + - Math.pow(sprite.getY() - mousePos.y, 2) + Math.pow(sprite.getY() - mousePos.y, 2) ); } else { const targetEntity = Entry.container.getEntity(targetId); return Math.sqrt( Math.pow(sprite.getX() - targetEntity.getX(), 2) + - Math.pow(sprite.getY() - targetEntity.getY(), 2) + Math.pow(sprite.getY() - targetEntity.getY(), 2) ); } }, @@ -1781,7 +1781,10 @@ module.exports = { isNotFor: ['python_disable'], func(sprite, script) { const originStr = script.getStringValue('STRING', script); - const reversedStr = originStr.split('').reverse().join(''); + const reversedStr = originStr + .split('') + .reverse() + .join(''); return reversedStr; }, syntax: { @@ -2457,7 +2460,7 @@ module.exports = { func(sprite, script) { return script .getStringValue('STRING', script) - [script.getField('CASE', script)](); + [script.getField('CASE', script)](); }, syntax: { js: [], diff --git a/src/playground/blocks/block_judgement.js b/src/playground/blocks/block_judgement.js index fc93381d21..1090a217d8 100644 --- a/src/playground/blocks/block_judgement.js +++ b/src/playground/blocks/block_judgement.js @@ -274,9 +274,7 @@ module.exports = { }, { type: 'Dropdown', - options: [ - [Lang.Blocks.is_type_number, 'number'], - ], + options: [[Lang.Blocks.is_type_number, 'number']], value: 'number', fontSize: 10, bgColor: EntryStatic.colorSet.block.darken.JUDGE,