Skip to content

Commit

Permalink
Version 2.7 Spanish Translation
Browse files Browse the repository at this point in the history
  • Loading branch information
MrYsLab authored and MrYsLab committed Apr 17, 2018
1 parent fb7d0cb commit 39fcde3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ __MAJOR FEATURES__

* English, [Brazilian-Portuguese](https://mryslab.github.io/s2m/blocks/#the-brazilian-portuguese-blocks),
[Japanese](https://mryslab.github.io/s2m/blocks/#the-japanese-blocks),
[Korean](https://mryslab.github.io/s2m/blocks/#the-korean-blocks), and
[Korean](https://mryslab.github.io/s2m/blocks/#the-korean-blocks),
[Spanish](https://mryslab.github.io/s2m/blocks/#the-spanish-blocks) and
[Traditional (tw) Chinese](https://mryslab.github.io/s2m/blocks/#the-traditional-chinese-tw-blocks)
blocks are available for use.

Expand Down
1 change: 1 addition & 0 deletions long_desc.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Scratch blocks are provided for the following languages:
* Brazilian-Portuguese
* Japanese
* Korean
* Spanish
* Traditional Chinese (Taiwanese)


13 changes: 9 additions & 4 deletions s2m/s2m.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def __init__(self, client=None, com_port=None,
"32": "ARROW_W",
"33": "ARROW_NW"}

print('\ns2m version 2.6 Copyright(C) 2018 Alan Yorinks All rights reserved.')
print('\ns2m version 2.7 Copyright(C) 2018 Alan Yorinks All rights reserved.')
print("\nPython Version %s" % sys.version)

# When control C is entered, Scratch will close if auto-launched
Expand Down Expand Up @@ -321,6 +321,10 @@ def auto_load_scratch(self):
self.scratch_project = self.base_path + "/scratch_files/projects/motion_ptbr.sb2"
elif self.language == 'ptbrs':
self.scratch_project = self.base_path + "/scratch_files/projects/motion_ptbr.sb2"
elif self.language == '7':
self.scratch_project = self.base_path + "/scratch_files/projects/s2m_es.sb2"
elif self.language == 'es':
self.scratch_project = self.base_path + "/scratch_files/projects/s2m_es.sb2"

exec_string = self.scratch_executable + ' ' + self.scratch_project

Expand Down Expand Up @@ -560,8 +564,9 @@ def main():
help="Select Language: \n0 = English(default)\n1 or ja = Japanese\n" \
"2 or ko = Korean\n3 or tw = Traditional Chinese" \
"\n4 or tws = Traditional Chinese Sample Project" \
"\n5 or ptbr = Brazilian Portuguese"
"\n6 or ptbrs = Brazilian Portugues Sample Project")
"\n5 or ptbr = Brazilian Portuguese" \
"\n6 or ptbrs = Brazilian Portugues Sample Project" \
"\n7 or es = Spanish")
parser.add_argument("-p", dest="comport", default="None", help="micro:bit COM port - e.g. /dev/ttyACMO or COM3")
parser.add_argument("-r", dest="rpi", default="None", help="Set to TRUE to run on a Raspberry Pi")
parser.add_argument("-s", dest="scratch_exec", default="default", help="Full path to Scratch executable")
Expand All @@ -584,7 +589,7 @@ def main():
else:
comport = args.comport

valid_languages = ['0', '1', 'ja', '2', 'ko', '3', 'tw', '4', 'tws', '5', 'ptbr', '6', 'ptbrs']
valid_languages = ['0', '1', 'ja', '2', 'ko', '3', 'tw', '4', 'tws', '5', 'ptbr', '6', 'ptbrs', '7', 'es']
lang = args.language

if lang not in valid_languages:
Expand Down
Binary file added s2m/scratch_files/projects/s2m_es.sb2
Binary file not shown.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='s2m',
version='2.6',
version='2.7',
packages=['s2m'],
install_requires=['pyserial>=2.7',
'psutil'],
Expand Down

0 comments on commit 39fcde3

Please sign in to comment.