Skip to content

Commit 3034122

Browse files
committed
new instructions for unfinished translate scripts
1 parent ac634a4 commit 3034122

7 files changed

Lines changed: 69 additions & 23749 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,14 @@ python_compressed.js
3131
!/msg/json/en.json
3232
/blockly_compressed_horizontal.js
3333
/blockly_compressed_vertical.js
34+
/blockly_compressed_vertical.js.config
3435
/blockly_uncompressed_horizontal.js
3536
/blockly_uncompressed_vertical.js
3637
/blocks_compressed_horizontal.js
3738
/blocks_compressed_vertical.js
39+
/blocks_compressed_vertical.js.config
3840
/blocks_compressed.js
41+
/blocks_compressed.js.config
3942
/gh-pages/main.js
4043
/gh-pages/playgrounds
4144
/gh-pages/Gemfile.lock

comment-pin.svg

Lines changed: 13 additions & 0 deletions
Loading

msg/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
input/
2+
output/

msg/messages.js

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,48 @@
2424
*
2525
* PENGUINMOD SCRIPT INSTRUCTIONS
2626
* All message strings must use single quotes for the build scripts to work properly.
27-
* Lines starting with "Blockly.Msg" will be evaluated as JS. This likely doesn't apply in the build scripts.
27+
* Don't use JS only methods to define these messages.
2828
* Make sure to import the translations from the google sheet before running any scripts!
29+
*
30+
* READ COMMENT BELOW THIS ONE TO GET COPY & PASTE COMMANDS FOR THESE!
31+
* How to import translations:
32+
* 1. Download the Google Sheet as an xlsx file under msg/input/sheet.xlsx
33+
* 2. Run the i18n/sync_xlsx script with the xlsx sheet as the input
34+
* 3. Match any changes to the English sheet into this file (en.js and en.json have the values imported from the sheet)
2935
* After modifying this file:
30-
* 1. Run the i18n/create_en_msgs script and replace msg/js/en.js and msg/json/en.json with the output
31-
* 2. Run the i18n/messages_fillout script for sheet creation (make sure you imported the translations from the google sheet first)
32-
* 2.5. If you modified the text of a translation key, run i18n/messages_override with the generated filled_scratch_msgs.js from step 2 as an argument to the script & then specify the changed keys as arguments after.
33-
* 3. Generate an XLSX file with i18n/create_base_xlsx for translation
34-
* 4. Please update the Google Sheets if you have access (otherwise, someone with access needs to update it later)
36+
* 1. Run the i18n/create_en_msgs script and replace msg/js/en.js and msg/json/en.json with the output
37+
* 2. Run the i18n/messages_fillout script for sheet creation (make sure you imported the translations from the google sheet first)
38+
* 2.5:
39+
* If you modified the text of a translation key,
40+
* run i18n/messages_override with the generated filled_scratch_msgs.js from step 2 as an argument to the script
41+
* and then specify the changed keys as arguments after.
42+
* This will pull from the **imported** en translations, so make sure you edited the English translations from the Google Sheet and *then* imported the sheet.
43+
* 3. Generate an XLSX file with i18n/create_base_xlsx for translation
44+
* 4. Please update the Google Sheets (click Replace spreadsheet when importing) if you have access (otherwise, someone with access needs to update it later)
45+
*/
46+
/*
47+
48+
BEFORE ANYTHING:
49+
cd i18n
50+
51+
How to import translations:
52+
node sync_xlsx ../msg/input/sheet.xlsx
53+
54+
After modifying this file (DOES NOT INCLUDE STEP 2.5):
55+
node create_en_msgs
56+
cp ../msg/output/en.js ../msg/js/en.js
57+
cp ../msg/output/en.json ../msg/json/en.json
58+
node messages_fillout
59+
node create_base_xlsx ../msg/output/filled_scratch_msgs.js
60+
61+
After modifying this file (INCLUDES STEP 2.5 BUT YOU NEED TO CHANGE COMMAND 5):
62+
node create_en_msgs
63+
cp ../msg/output/en.js ../msg/js/en.js
64+
cp ../msg/output/en.json ../msg/json/en.json
65+
node messages_fillout
66+
node messages_override (PATH TO msg/output/filled_scratch_msgs.js) (List the keys you changed in the Google sheet, split by spaces)
67+
node create_base_xlsx ../msg/output/override_scratch_msgs.js
68+
3569
*/
3670

3771
// SCRATCH SCRIPT INSTRUCTIONS (NOT REQUIRED IN PM)
@@ -300,6 +334,12 @@ Blockly.Msg.SOUND_SETVOLUMETO = 'set volume to %1%';
300334
Blockly.Msg.SOUND_VOLUME = 'volume';
301335
Blockly.Msg.SOUND_RECORD = 'record...';
302336

337+
// Data category labels
338+
Blockly.Msg.DATA_VARIABLE_LIST_ALLSPRITES = 'Variables for all sprites';
339+
Blockly.Msg.DATA_VARIABLE_LIST_THISSPRITE = 'Variables for this sprite';
340+
Blockly.Msg.DATA_LIST_LIST_ALLSPRITES = 'Lists for all sprites';
341+
Blockly.Msg.DATA_LIST_LIST_THISSPRITE = 'Lists for this sprite';
342+
303343
// Category labels
304344
Blockly.Msg.CATEGORY_MOTION = 'Motion';
305345
Blockly.Msg.CATEGORY_LOOKS = 'Looks';
@@ -373,3 +413,8 @@ Blockly.Msg.NEW_BROADCAST_MESSAGE = 'New message';
373413
Blockly.Msg.NEW_BROADCAST_MESSAGE_TITLE = 'New message name:';
374414
Blockly.Msg.BROADCAST_MODAL_TITLE = 'New Message';
375415
Blockly.Msg.DEFAULT_BROADCAST_MESSAGE_NAME = 'message1';
416+
417+
// Extension/Extra Stuff
418+
Blockly.Msg.OPEN_DOCUMENTATION = 'Open Documentation';
419+
Blockly.Msg.HELP_MANUAL = 'Help Manual';
420+
Blockly.Msg.YOUR_MOM = 'your mom';

0 commit comments

Comments
 (0)