~j-mullins/enchanting/lego_color_sensor

« back to all changes in this revision

Viewing changes to FrontEnd/Classes/2-ScriptableScratchMorph.st

  • Committer: Clinton Blackmore
  • Date: 2011-07-01 21:25:42 UTC
  • Revision ID: clinton.blackmore@gmail.com-20110701212542-u3ph3j8fswc23ans
Added menu item Shift+File->Update translation files; translation files now include block specifications from Enchanting.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4381
4381
        ^ currentSpecs
4382
4382
! !
4383
4383
 
4384
 
!ScriptableScratchMorph class methodsFor: 'translation support' stamp: 'jm 11/29/2007 13:20'!
 
4384
!ScriptableScratchMorph class methodsFor: 'translation support' stamp: 'CWB 7/1/2011 13:49'!
4385
4385
blockSpecsForTranslation
4386
4386
        "Answer a collection blocks for translation. Obsolete blocks are removed."
4387
4387
 
4388
4388
        | allSpecs |
4389
4389
        allSpecs _ Set new.
 
4390
 
 
4391
        "Add in all specs that existed in Scratch"
 
4392
 
4390
4393
        (ScriptableScratchMorph blockSpecs,
4391
4394
         ScratchSpriteMorph blockSpecs,
4392
4395
         ScratchStageMorph blockSpecs) do: [:el |
4401
4404
                add: 'variables';
4402
4405
                add: 'set %v to %n';
4403
4406
                add: 'change %v by %n'.
 
4407
 
 
4408
        "Add specs that are new to Enchanting"
 
4409
 
 
4410
        EnchantingDeviceConfiguration allSubclassesDo: [:s | 
 
4411
                allSpecs addAll: s blockSpecsForTranslation
 
4412
        ].
 
4413
 
4404
4414
        ^ allSpecs asArray sort
4405
4415
! !
4406
4416