'From etoys2.2 of 24 September 2007 [latest update: #1685] on 4 October 2007 at 10:45:15 pm'! "Change Set: addTranslatedList-sw Date: 4 October 2007 Author: Scott Wallace Append #translatedNoop calls to literal arguments provided to #addTranslatedList: calls in a host of places."! !Morph methodsFor: 'menus' stamp: 'sw 10/4/2007 21:55'! addPaintingItemsTo: aMenu hand: aHandMorph "Add items relating to the painting subsystem to the given menu" | subMenu movies | subMenu _ MenuMorph new defaultTarget: self. subMenu addTranslatedList: #( ('repaint' editDrawing) " ('set form by grabbing from screen' setFormByGrabbingFromScreen)" - ('set rotation center' setRotationCenter) ('reset forward-direction' resetForwardDirection) ('set rotation style' setRotationStyle) - ('erase pixels of color' erasePixelsOfColor:) ('recolor pixels of color' recolorPixelsOfColor:) ('reduce color palette' reduceColorPalette:) - ('add a border around this shape...' addBorderToShape:) ('restore original aspect ratio' restoreOriginalAspectRatio)) translatedNoop. movies _ (self world rootMorphsAt: aHandMorph targetOffset) select: [:m | (m isKindOf: MovieMorph) or: [m isSketchMorph]]. (movies size > 1) ifTrue: [subMenu add: 'insert into movie' translatedNoop action: #insertIntoMovie:]. aMenu add: 'painting...' translatedNoop subMenu: subMenu! ! !AnonymousSoundMorph methodsFor: 'menu' stamp: 'sw 10/4/2007 22:02'! addCustomMenuItems: aMenu hand: aHandMorph "Add morph-specific items to the given menu which was invoked by the given hand. This method provides is invoked both from the halo-menu and from the control-menu regimes." super addCustomMenuItems: aMenu hand: aHandMorph. aMenu addTranslatedList: #( - ('play sound' playSound) ('add to sound library' addToSoundLibrary)) translatedNoop! ! !BookMorph methodsFor: 'menu' stamp: 'sw 10/4/2007 21:56'! addAdvancedItemsTo: aMenu "Add advanced items to a menu which allow the user to affect all the pages of the book. NB balloon help msgs still pending." | subMenu | subMenu := MenuMorph new defaultTarget: self. subMenu addTranslatedList: #( ('make all pages the same size as this page' makeUniformPageSize 'Make all the pages of this book be the same size as the page currently showing.') ('set background color for all pages' #setPageColor 'Choose a color to assign as the background color for all of this book''s pages') - ('uncache page sorter' uncachePageSorter) ('make a thread of projects in this book' buildThreadOfProjects) - ('make this the template for new pages' setNewPagePrototype)) translatedNoop. "NB The following 2 items do not get auto-updated in a persistent menu." newPagePrototype ifNotNil: [subMenu add: 'clear new-page template' translated action: #clearNewPagePrototype]. self isInFullScreenMode ifTrue: [subMenu add: 'exit full screen' translated action: #exitFullScreen] ifFalse: [subMenu add: 'show full screen' translated action: #goFullScreen]. (ActiveHand pasteBuffer isKindOf: PasteUpMorph) ifTrue: [subMenu addLine. subMenu add: 'paste book page' translated action: #pasteBookPage]. aMenu add: 'advanced...' translated subMenu: subMenu ! ! !BookMorph methodsFor: 'menu' stamp: 'sw 10/4/2007 21:56'! addSaveAndRevertItemsTo: aMenu "Add items relating to use of revertable page-prototypes " | subMenu | subMenu := MenuMorph new defaultTarget: self. subMenu addTranslatedList: #( ('save page for later revert' saveForRevert) ('save entire book for later revert' saveBookForRevert)) translatedNoop. aMenu add: 'save for later revert...' translated subMenu: subMenu! ! !BookMorph methodsFor: 'menu' stamp: 'sw 10/4/2007 21:56'! addTransitionItemsTo: aMenu "Add transition items to a menu which allow the user to affect all the pages of the book. " | subMenu | subMenu := MenuMorph new defaultTarget: self. subMenu addTranslatedList: #( ('set sound effect for this page' menuPageSoundForThisPage:) ('set visual effect for this page' menuPageVisualForThisPage:) - ('set sound effect for all pages' menuPageSoundForAll: 'Establish a sound-effect that should be used whenever there is a transition between any two pages of this book.') ('set visual effect for all pages' menuPageVisualForAll:. 'Establish a visual -effect that should be used for all transitions between pages of this book')) translatedNoop. aMenu add: 'visual and sound effects...' translated subMenu: subMenu ! ! !BookMorph methodsFor: 'menu' stamp: 'sw 10/4/2007 21:56'! invokeShortBookMenu "Invoke the shorter version of the book's control panel menu." | aMenu | self class == BookMorph ifFalse: [^ self invokeBookMenu]. aMenu _ MenuMorph new defaultTarget: self. aMenu addTitle: 'Book' translated. aMenu addStayUpItem. aMenu addTranslatedList: #( ('find...' textSearch) ('go to page...' goToPage) - ('show more controls' showMoreControls) - ('revert this page' revertPage) ('revert entire book' revertAllPages)) translatedNoop. aMenu popUpInWorld ! ! !EventRecordingSpace methodsFor: 'menu' stamp: 'sw 10/4/2007 22:00'! addMenuButtonItemsTo: aMenu "Build the contents of the menu to be presented when the menu button in my tool-bar is clicked." "CAUTION: Debugging items still present." aMenu addTitle: 'Recording Options'. aMenu addTranslatedList: #( ('set balloon help' setBalloonHelp 'Allows you to provide a message to be presented to a user as balloon-help when the mouse lingers over buttons that trigger playback of the tape of this event theatre') ('shrink event tape' shrinkTape) "('save on file...' saveSequenceOnFile)" - ('revert to version...' offerVersions) ('delete old versions' deleteOldVersions) -) translatedNoop. Preferences sugarNavigator ifTrue: [aMenu addTranslatedList: (self sugarNavigatorFlapOrNil ifNil: [#(('add sugar navigator flap' addSugarNavigatorFlap)) translatedNoop] ifNotNil: [#(('remove sugar navigatorFlap' removeSugarNavigatorFlap)) translatedNoop])] ifFalse: [aMenu addTranslatedList: (self navigatorFlapOrNil ifNil: [#(('add navigator flap' addNavigatorFlap)) translatedNoop] ifNotNil: [#(('remove navigatorFlap' removeNavigatorFlap)) translatedNoop]). aMenu addTranslatedList: (self suppliesFlapOrNil ifNil: [#(('add supplies flap' addSuppliesFlap)) translatedNoop] ifNotNil: [#(('remove suppliesFlap' removeSuppliesFlap)) translatedNoop])]. aMenu addTranslatedList: #( - ('event roll' makeHorizontalRoll 'open a horizontal piano-roll-like tool for the viewing and editing the events of this event theatre.') ('remove event-roll' removeEventRoll 'abandon any event-roll that may be associated with this theatre.') -) translatedNoop. self addMoreSubMenuTo: aMenu! ! !EventRecordingSpace methodsFor: 'menu' stamp: 'sw 10/4/2007 22:01'! addMoreSubMenuTo: aMenu "Add the 'more...' submenu to a menu." | submenu | submenu := MenuMorph new defaultTarget: self. submenu addTitle: 'More options' translated. submenu addTranslatedList: #( ('inspect event theatre' inspect) ('inspect event recorder' inspectEventRecorder) ('inspect sound recorder' inspectSoundRecorder) ('inspect event tape' inspectEventTape) ('inspect event roll' inspectEventRoll) ('inspect nav bar' inspectNavBar) - ('parse event tape' parseEventTape) ('convert to canonical coordinates (broken)' convertToCanonicalForm) ('movie-clip player' addMovieClipPlayer)) translatedNoop. aMenu add: 'more...' translated subMenu: submenu! ! !EventRecordingSpace methodsFor: 'processing' stamp: 'sw 10/4/2007 21:58'! publishButtonHit "Hand the user a button which, when hit, will open a playback window on the content of the receiver as currently constituted." | aMenu | aMenu := MenuMorph new defaultTarget: self. aMenu addTranslatedList: #( ('Iconic button' openUnhintedPlaybackButton) ('Textual button' openTextualPlaybackButton)) translatedNoop. aMenu center: publishButton center; openInWorld! ! !EventPlaybackSpace methodsFor: 'menu' stamp: 'sw 10/4/2007 22:01'! addCustomMenuItems: aCustomMenu hand: aHandMorph "Add morph-specific items to the given menu which was invoked by the given hand. This method is invoked both from the halo-menu and from the control-menu regimes." super addCustomMenuItems: aCustomMenu hand: aHandMorph. aCustomMenu addTranslatedList: #( ( 'open for score-editing' openForScoreEditing 'Display this event-movie in a form such that its score can be viewed and edited.')) translatedNoop ! ! !EventPlaybackSpace methodsFor: 'menu' stamp: 'sw 10/4/2007 22:01'! addMenuButtonItemsTo: aMenu "Subclasses wishing to partake of generic menuButton support should reimplement this, and *not* call super ;-)" aMenu addTranslatedList: #( ('rewind' rewind) ('play again' play) - ('inspect' inspect) ('edit this menu' editMenuButtonDefinition)) translatedNoop! ! !EventRollMorph methodsFor: 'display' stamp: 'sw 10/4/2007 21:58'! addMenuButtonItemsTo: aMenu "Add menu items to the menu obtained by clicking on the menu icon" "CAUTION: Debugging items still present." aMenu addTitle: 'Event-Roll Options' translated. aMenu addTranslatedList: #( ('revert to version...' offerVersions 'allows you to back up to any earlier version of the event tape.') - " ('change scale...' changeScale 'allows you to supply a precise scale-factor manualliy.') ('retrofit to event-theatre' pushChangesBackToEventTheatre 'normally not necessary, but if you suspect that edits you have made in this event roll have not been fully appreciated by the event theatre, choose this to force the event theatre to reflect what you see in the event roll.' ) - ('restore original event theatre' restoreOriginalEventTheatre 'Restore the event theatre, and hence this event roll, to how they were when you first made this roll.') -" ('inspect event roll' inspect 'debugging -- open an Inspector on this event roll') ('update cursor' updateCursorFromRecordingSpace 'debugging -- update the red roll cursor') ('update scrollbar' updateScrollbar 'debugging -- update the scrollbar') - ('edit this menu' editMenuButtonDefinition 'debugging -- change the definition of this menu.')) translatedNoop! ! !EventRollMorph methodsFor: 'menus' stamp: 'sw 10/4/2007 21:58'! addCustomMenuItems: aMenu hand: aHandMorph "Add morph-specific items to the halo menu." super addCustomMenuItems: aMenu hand: aHandMorph. aMenu addTranslatedList: #( ('change scale...' changeScale 'allows you to supply a precise scale-factor manually.') ('retrofit to event-theatre' pushChangesBackToEventTheatre 'normally not necessary, but if you suspect that edits you have made in this event roll have not been fully appreciated by the event theatre, choose this to force the event theatre to reflect what you see in the event roll.' )) translatedNoop! ! !FunctionNameTile methodsFor: 'choice of function' stamp: 'sw 10/4/2007 22:03'! showOptions "Put up a pop-up menu of options for the operator tile within me." | aMenu aTable | aMenu := MenuMorph new defaultTarget: self. aTable := ScriptingSystem tableOfNumericFunctions. aTable do: [:triplet | aMenu add: triplet first target: self selector: #setOperator: argument: triplet second. triplet second = operatorOrExpression ifTrue: [aMenu lastItem color: Color red]. aMenu balloonTextForLastItem: triplet third]. aMenu addTranslatedList: #(- (grouped grouped 'enclose within parentheses')) translatedNoop. operatorOrExpression = #grouped ifTrue: [aMenu lastItem color: Color red]. (owner owner isKindOf: TilePadMorph) ifTrue: [aMenu addTranslatedList: #(- ('remove function' removeFunction 'strip away the function call, leaving just its former argument in its place')) translatedNoop]. aMenu position: self position. aMenu invokeModal ! ! !MediaEventMorph methodsFor: 'menus' stamp: 'sw 10/4/2007 22:03'! addCustomMenuItems: aCustomMenu hand: aHandMorph "Add morph-specific items to the given menu which was invoked by the given hand. This method provides is invoked both from the halo-menu and from the control-menu regimes." super addCustomMenuItems: aCustomMenu hand: aHandMorph. aCustomMenu addTranslatedList: #(( 'play' play 'play the event in isolation.')) translatedNoop! ! !MouseEventSequenceMorph methodsFor: 'menu' stamp: 'sw 10/4/2007 22:03'! addCustomMenuItems: aMenu hand: aHand "Add morph-specific items to the given menu which was invoked by the given hand." super addCustomMenuItems: aMenu hand: aHand. aMenu addLine. aMenu addTranslatedList: #( ( 'graphical view' openExpandedView 'Lets you visualize all the individual events that constitute this sequence in an onionskin overlay to the event theatre.') ('textual view' openTextualView 'Presents the constituent events of this sequence in a scrolling list for your inspection.')) translatedNoop! ! !NCArrowDictionaryMenu methodsFor: 'menu commands' stamp: 'sw 10/4/2007 21:55'! showMenu "Show the receiver's menu" | aMenu | aMenu _ MenuMorph new defaultTarget: self. aMenu addTranslatedList: #( ('remove' removeEntry 'Remove this arrow from the dictionary') ('rename' renameEntry 'Rename this arrow') - ('copy name' copyName 'Copy the name of this graphic to the clipboard') - ('find...' findEntry 'Find an entry by name')) translatedNoop. Smalltalk at: #NCGlyphEditor ifPresent: [ :ncge | aMenu addLine; add: 'make new arrow' translated target: self selector: #openGlyphEditor. aMenu balloonTextForLastItem: 'Open an Arrow editor' translated. ]. aMenu popUpInWorld ! ! !PlaybackInvoker methodsFor: 'menu ' stamp: 'sw 10/4/2007 22:03'! addCustomMenuItems: aMenu hand: aHandMorph "Add custom menu items to the menu" super addCustomMenuItems: aMenu hand: aHandMorph. aMenu addLine. aMenu addUpdating: #autoStartString target: self action: #toggleAutoStart. aMenu addUpdating: #autoDismissString target: self action: #toggleAutoDismiss. aMenu addUpdating: #postPlaybackImageFeatureString target: self action: #togglePostPlaybackImageFeature. aMenu addLine. aMenu addUpdating: #appearAtScreenCenterString target: self action: #appearAtScreenCenter. aMenu addUpdating: #appearAtContainerOriginString target: self action: #appearAtContainerOrigin. aMenu addUpdating: #appearAtButtonPositionString target: self action: #appearAtButtonPosition. aMenu addTranslatedList: #( - ('imprint HINT' imprintHintOnForm) - ('show initial picture' adoptInitialPicture ) ('show final picture' adoptFinalPicture ) ('show caption' adoptTextualAppearance) - ('change caption' changeCaption) ('open for editing' openInRecordingSpace)) translatedNoop! ! !PlayerSurrogate methodsFor: 'menu' stamp: 'sw 10/4/2007 21:57'! playerButtonHit "The user clicked on the menu icon." | aMenu aString | aMenu := MenuMorph new defaultTarget: self. aString := playerRepresented uniqueNameForReference. aMenu addTitle: aString. aMenu addTranslatedList: #( ('where is this object?' revealThisObject) ('open viewer for this object' viewerForThisObject) ('tile for this object' handMeATile) - ('destroy this object' destroyThisObject) - ('rename object' renamePlayer) ('forcibly rename object' forciblyRenamePlayer 'If you want to give this object a name which conflicts with the name of some other object in the project, use this command. The other object with the same name will in the process be given a different name.') - ('copy object''s name to clipboard' copyName) ('inspect object' inspectPlayer) ) translatedNoop. aMenu popUpInWorld! ! !RecordingControls methodsFor: 'initialization' stamp: 'sw 10/4/2007 22:02'! addMenuButtonItemsTo: aMenu "The menu button was hit, and aMenu will be put up in response. Populated the menu with the appropriate items." aMenu title: 'Sound Recorder Options' translated. aMenu addStayUpItem. aMenu addUpdating: #durationString target: self selector: #yourself argumentList: #(). aMenu addTranslatedList: #( - ('help' putUpAndOpenHelpFlap 'opens a flap which contains instructions') - ('hand me a sound token' makeSoundMorph 'hands you a lozenge representing the current sound, which you can drop into a piano-roll or an event-roll, or later add to the sound library. Double-click on it to hear the sound') -) translatedNoop. Preferences eToyFriendly ifFalse: [aMenu addTranslatedList: #( ('trim' trim 'remove any blanks space at the beginning and/or end of the recording. Caution -- this feature seems to be broken, at least on some platforms, so use at your own risk. For safety, save this sound in its untrimmed form before venturing to trim.')) translatedNoop]. aMenu addTranslatedList: #( ('choose compression...' chooseCodec 'choose which data-compression scheme should be used to encode the recording.') ('wave editor' show 'open up the wave-editor tool to visualize and to edit the sound recorded')) translatedNoop! ! !ScriptEditorMorph methodsFor: 'other' stamp: 'sw 10/4/2007 21:57'! addGoldBoxItemsTo: aMenu "Add gold-box-related submenu to the scriptor menu" | subMenu | subMenu _ MenuMorph new defaultTarget: self. subMenu addTitle: 'gold box' translated. subMenu addTranslatedList: #( ('hand me a test-yest-no tile' addYesNoToHand) ('hand me a "repeat..times" tile' handUserTimesRepeatTile) ('hand me a "random number" tile' handUserRandomTile) ('hand me a "function" tile' handUserFunctionTile) ('hand me a "button up?" tile' handUserButtonUpTile) ('hand me a "button down?" tile' handUserButtonDownTile) ('hand me a tile for self ' handUserTileForSelf) ('hand me a numeric-constant tile' handUserNumericConstantTile) ) translatedNoop. aMenu add: 'gold box items' translated subMenu: subMenu! ! !ScriptEditorMorph methodsFor: 'other' stamp: 'sw 10/4/2007 21:58'! offerSimplerScriptorMenu "Put up a menu in response to the user's clicking in the menu-request area of the scriptor's heaer. This variant is used when eToyFriendly preference is true." | aMenu count | ActiveHand showTemporaryCursor: nil. aMenu _ MenuMorph new defaultTarget: self. aMenu addTitle: scriptName asString. aMenu addList: (self hasParameter ifTrue: [{ {'remove parameter' translated. #ceaseHavingAParameter}}] ifFalse: [{ {'add parameter' translated. #addParameter}}]). self hasParameter ifFalse: [aMenu addTranslatedList: #( ('button to fire this script' tearOfButtonToFireScript) -) translatedNoop]. aMenu addUpdating: #showingCaretsString target: self action: #toggleShowingCarets. aMenu addLine. aMenu addList: { {'edit balloon help for this script' translated. #editMethodDescription}. {'explain status alternatives' translated. #explainStatusAlternatives}. #- }. Preferences universalTiles ifFalse: [count _ self savedTileVersionsCount. self showingMethodPane ifFalse: "currently showing tiles" [aMenu add: 'show code textually' translated action: #toggleWhetherShowingTiles. count > 0 ifTrue: [aMenu add: 'revert to tile version...' translated action: #revertScriptVersion]. aMenu add: 'save this version' translated action: #saveScriptVersion] ifTrue: "current showing textual source" [count >= 1 ifTrue: [aMenu add: 'revert to tile version' translated action: #toggleWhetherShowingTiles]]]. aMenu addLine. aMenu addTranslatedList: #( ('reveal my object' findObject 'This script belongs to some object. Show me where that object is on the screen') ('open viewer' openObjectsViewer 'open the viewer of the object to which this script belongs') - ('destroy this script' destroyScript)) translatedNoop. aMenu popUpInWorld: self currentWorld. ! !