Bert Freudenberg uploaded a new version of Etoys to project Etoys:
http://source.squeak.org/etoys/Etoys-bf.94.mcz ==================== Summary ==================== Name: Etoys-bf.94 Author: bf Time: 2 September 2011, 5:44:45 pm UUID: b0314a42-9e43-499a-8f1b-ff014bb7d91d Ancestors: Etoys-kfr.93 Fix SQ-983 (in Spanish, viewer does not start with basic category). This was caused by differing translations in different domains. Now we always use the 'Etoys-Tiles' translation domain. =============== Diff against Etoys-kfr.93 =============== Item was changed: ----- Method: StandardViewer>>likelyCategoryToShow (in category 'categories') ----- likelyCategoryToShow "Choose a category to show based on what's already showing and on some predefined heuristics" + | possible all aCat currVocab candidate returnIfPossible | - | possible all aCat currVocab amt | all := (scriptedPlayer categoriesForViewer: self) asOrderedCollection. + possible := all copy. - possible _ all copy. currVocab := self currentVocabulary. + self categoryMorphs do: [:m | + aCat := currVocab categoryWhoseTranslatedWordingIs: m currentCategory. + aCat ifNotNil: [possible remove: aCat wording ifAbsent: []]]. - self categoryMorphs do: - [:m | - aCat := currVocab categoryWhoseTranslatedWordingIs: m currentCategory. - aCat ifNotNil: [possible remove: aCat wording ifAbsent: []]]. + returnIfPossible := [:category | + candidate := category translatedInDomain: 'Etoys-Tiles'. + (possible includes: candidate) ifTrue: [^ candidate]]. - (currVocab isEToyVocabulary) - ifTrue: - [((possible includes: ScriptingSystem nameForInstanceVariablesCategory translated) and: [scriptedPlayer hasUserDefinedSlots]) - ifTrue: [^ ScriptingSystem nameForInstanceVariablesCategory translated]. + scriptedPlayer hasUserDefinedSlots + ifTrue: [returnIfPossible value: ScriptingSystem nameForInstanceVariablesCategory]. + scriptedPlayer hasUserDefinedScripts + ifTrue: [returnIfPossible value: ScriptingSystem nameForScriptsCategory]. - ((possible includes: ScriptingSystem nameForScriptsCategory translated) and: [scriptedPlayer hasUserDefinedScripts]) - ifTrue: [^ ScriptingSystem nameForScriptsCategory translated]]. + #(kedama basic tests 'color & border' color flagging comparing motion geometry input preferences) + do: returnIfPossible. - {'kedama' translated. #basic translated} - do: [:preferred | (possible includes: preferred) ifTrue: [^ preferred]]. + candidate := possible isEmpty ifFalse: [possible first] ifTrue: [all first]. + ^ candidate! - scriptedPlayer isPlayerLike - ifTrue: [(possible includes: #tests translated) ifTrue: [^ #tests translated]]. - - {#'color & border' translated. #color translated. #flagging translated. #comparing translated. - 'motion' translated. 'geometry' translated. - #input. #preferences. - } - do: [:preferred | (possible includes: preferred) ifTrue: [^ preferred]]. - - amt := possible isEmpty ifFalse: [possible first] ifTrue: [all first]. - ^ amt! _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
Ah,
very nice :-) Karl
On Fri, Sep 2, 2011 at 5:47 PM, <[hidden email]> wrote: Bert Freudenberg uploaded a new version of Etoys to project Etoys: _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
Free forum by Nabble | Edit this page |