'From etoys3.0 of 28 February 2008 [latest update: #2004] on 28 May 2008 at 6:36:15 pm'! "Change Set: timesRepeatFixes-sw Date: 28 May 2008 Author: Scott Wallace, Karl Ramberg TRAC 7044: TimesRepeat tile is not translated. This update makes the Times, Repeat, and Do labels on Times/Repeat tiles translatable, but it will take a while for actual translations to catch up... Also fixes a bug that resulted in an unwanted pale green spacer on the Times tile, as well as a bug that resulted in the temporary positioning of the extension arrow before the 2 on a nascent times tile (rather than after the 2, as expected) ... thanks to Karl for both of those fixes."! !TimesRepeatTile methodsFor: 'initialization' stamp: 'sw 5/20/2008 18:52'! initialize "Fully initialize the receiver." | dummyColumn timesRepeatColumn repeatRow separator placeHolder doLabel ephemerum | submorphs _ EmptyArray. bounds _ 0@0 corner: 50@40. self color: Color orange muchLighter. self layoutPolicy: TableLayout new. self "border, and layout properties in alphabetical order..." borderColor: self color darker; borderWidth: 2; cellSpacing: #none; cellPositioning: #topLeft; hResizing: #spaceFill; layoutInset: 0; listDirection: #leftToRight; rubberBandCells: true; vResizing: #shrinkWrap; wrapCentering: #none. self setNameTo: 'Repeat Complex'. dummyColumn _ AlignmentMorph newColumn. dummyColumn cellInset: 0; layoutInset: 0. dummyColumn width: 0. dummyColumn cellPositioning: #leftCenter. dummyColumn hResizing: #shrinkWrap; vResizing: #spaceFill. self addMorph: dummyColumn. timesRepeatColumn _ AlignmentMorph newColumn. timesRepeatColumn setNameTo: 'Times Repeat'. timesRepeatColumn cellPositioning: #topLeft. timesRepeatColumn hResizing: #spaceFill. timesRepeatColumn vResizing: #shrinkWrap. timesRepeatColumn layoutInset: 0. timesRepeatColumn borderWidth: 0. timesRepeatColumn color: Color orange muchLighter. timesRow _ TimesRow newRow color: color; layoutInset: 0. timesRepeatColumn addMorphBack: timesRow. separator _ AlignmentMorph newRow color: Color transparent. separator vResizing: #rigid; hResizing: #spaceFill; height: 2. separator borderWidth: 0. timesRepeatColumn addMorphBack: separator. repeatRow _ AlignmentMorph newRow color: color; layoutInset: 0. repeatRow minCellSize: (2@16). repeatRow setNameTo: 'Repeat '. placeHolder _ Morph new. placeHolder beTransparent; extent: (8@0). repeatRow addMorphBack: placeHolder. repeatRow vResizing: #shrinkWrap. doLabel _ StringMorph contents: 'Do' translated font: Preferences standardEToysFont. repeatRow addMorphBack: doLabel. repeatRow addMorphBack: (Morph new color: color; extent: 5@5). "spacer" repeatRow addMorphBack: (whatToRepeatPart _ ScriptEditorMorph new borderWidth: 0; layoutInset: 0). whatToRepeatPart hResizing: #spaceFill. whatToRepeatPart vResizing: #shrinkWrap. whatToRepeatPart color: Color transparent. whatToRepeatPart setNameTo: 'Script to repeat' translated. whatToRepeatPart addMorphBack: (ephemerum := Morph new height: 14) beTransparent. timesRepeatColumn addMorphBack: repeatRow. self addMorphBack: timesRepeatColumn. self bounds: self fullBounds. ephemerum delete! ! !TimesRow methodsFor: 'initialization' stamp: 'sw 5/28/2008 18:05'! initialize "object initialization" | repeatLabel | super initialize. self minCellSize: (2@16). self setNameTo: 'Times'. repeatLabel _ StringMorph contents: 'Repeat' translated font: Preferences standardEToysFont. self addMorphBack: repeatLabel. self vResizing: #shrinkWrap. self addTransparentSpacerOfSize: (6@5). timesPad := TilePadMorph new setType: #Number. timesPad hResizing: #shrinkWrap; color: Color transparent. timesPad addMorphBack: (TileMorph new addArrows; setLiteral: 2; addSuffixArrow; yourself). timesPad borderWidth: 0; layoutInset: (1@0). self addMorphBack: timesPad. self addMorphBack: (StringMorph contents: (' ', ('times' translated), ' ') font: Preferences standardEToysFont). self addMorphBack: AlignmentMorph newVariableTransparentSpacer! !