'From etoys3.0 of 21 February 2008 [latest update: #1931] on 13 April 2008 at 2:57:22 am'! "Change Set: translatedOperator-sw Date: 14 April 2008 Author: Scott Wallace Make isDivisibleBy: on numeric-comparator tiles appear un-camel-cased and translated. Make increase-by, etc., translatable. Install properly translated balloon-help message on operator tiles."! !TileMorph methodsFor: 'arrows' stamp: 'sw 4/3/2008 02:51'! arrowAction: delta "Do what is appropriate when an arrow on the tile is pressed; delta will be +1 or -1" | index options | (type == #literal and: [literal isNumber]) ifTrue: [self value: literal + delta] ifFalse: [options _ self options ifNil: [^ self]. index _ (options first indexOf: self value) + delta. self value: (options first atWrap: index). (options second atWrap: index) ifNotNilDo: [:bt | submorphs last setBalloonText: bt translated]]! ! !Vocabulary methodsFor: 'queries' stamp: 'sw 4/3/2008 02:43'! tileWordingForSelector: aSelector "Answer the wording to emblazon on tiles representing aSelector" | anInterface inherent | anInterface _ self methodInterfaceAt: aSelector asSymbol ifAbsent: [inherent _ Utilities inherentSelectorForGetter: aSelector. ^ self translatedWordingFor: inherent]. ^ anInterface wording! ! !Vocabulary methodsFor: 'translation' stamp: 'sw 4/3/2008 02:55'! translatedWordingFor: aSymbol "If I have a translated wording for aSymbol, return it, else return aSymbol. Caveat: at present, this mechanism is only germane for *assignment-operator wordings* and the special-case numeric comparitor #isDivisibleBy:" #(: Incr: Decr: Mult: isDivisibleBy:) with: #('' 'increase by' 'decrease by' 'multiply by' 'divisible by') translatedNoop do: [:a :b | aSymbol = a ifTrue: [^ b translated]]. ^ aSymbol fromCamelCase translated! !