Skip to content

Commit

Permalink
solve bwinf#3
Browse files Browse the repository at this point in the history
  • Loading branch information
bestian committed Oct 31, 2022
1 parent d3ac9ea commit 91c1301
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 1 deletion.
6 changes: 6 additions & 0 deletions de.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ Msg = {
"tooltip": "",
"helpUrl": null
},
"text_print": {
"message0": "Text %1",
},
"text": {
"message0": "Text %1",
},
"division": {
"message0": "Unterteilung %1 %2",
"tooltip": "",
Expand Down
8 changes: 7 additions & 1 deletion en.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,13 @@ Msg = {
"message0": "paragraph %1",
},
"plaintext": {
"message0": "text %1",
"message0": "Text %1",
},
"text_print": {
"message0": "Text %1",
},
"text": {
"message0": "Text %1",
},
"division": {
"message0": "division %1 %2",
Expand Down
32 changes: 32 additions & 0 deletions html_blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,38 @@ var htmlBlocks =
"tooltip": "",
"helpUrl": "http://www.w3schools.com/tags/tag_html.asp"
},
{
"type": "text_print",
"message0": "text %1",
"args0": [
{
"type": "field_input",
"name": "TEXT",
"text": ""
}
],
"previousStatement": null,
"nextStatement": null,
"colour": 330,
"tooltip": "",
"helpUrl": "http://www.w3schools.com/tags/tag_html.asp"
},
{
"type": "text",
"message0": "text %1",
"args0": [
{
"type": "field_input",
"name": "TEXT",
"text": ""
}
],
"previousStatement": null,
"nextStatement": null,
"colour": 330,
"tooltip": "",
"helpUrl": "http://www.w3schools.com/tags/tag_html.asp"
},
{
"type": "division",
"message0": "division %1 %2",
Expand Down
12 changes: 12 additions & 0 deletions html_generators.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ HtmlGenerator['plaintext'] = function(block) {
return code;
};

HtmlGenerator['text_print'] = function(block) {
var text_content = block.getFieldValue('TEXT');
var code = text_content + '\n';
return code;
};

HtmlGenerator['text'] = function(block) {
var text_content = block.getFieldValue('TEXT');
var code = text_content + '\n';
return code;
};

HtmlGenerator['division'] = function(block) {
var value_name = HtmlGenerator.valueToCode(block, 'NAME', HtmlGenerator.ORDER_ATOMIC);
var statements_content = HtmlGenerator.statementToCode(block, 'content');
Expand Down
6 changes: 6 additions & 0 deletions zh-hant.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ Msg = {
"plaintext": {
"message0": "文字 %1",
},
"text_print": {
"message0": "文字 %1",
},
"text": {
"message0": "文字 %1",
},
"division": {
"message0": "區塊 %1 %2"
},
Expand Down

0 comments on commit 91c1301

Please sign in to comment.