Ah,<div>very nice :-)</div><div><br></div><div>Karl<br><br><div class="gmail_quote">On Fri, Sep 2, 2011 at 5:47 PM,  <span dir="ltr">&lt;<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Bert Freudenberg uploaded a new version of Etoys to project Etoys:<br>
<a href="http://source.squeak.org/etoys/Etoys-bf.94.mcz" target="_blank">http://source.squeak.org/etoys/Etoys-bf.94.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Etoys-bf.94<br>
Author: bf<br>
Time: 2 September 2011, 5:44:45 pm<br>
UUID: b0314a42-9e43-499a-8f1b-ff014bb7d91d<br>
Ancestors: Etoys-kfr.93<br>
<br>
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 &#39;Etoys-Tiles&#39; translation domain.<br>
<br>
=============== Diff against Etoys-kfr.93 ===============<br>
<br>
Item was changed:<br>
  ----- Method: StandardViewer&gt;&gt;likelyCategoryToShow (in category &#39;categories&#39;) -----<br>
  likelyCategoryToShow<br>
        &quot;Choose a category to show based on what&#39;s already showing and on some predefined heuristics&quot;<br>
<br>
+       | possible all aCat currVocab candidate returnIfPossible |<br>
-       | possible all aCat currVocab amt |<br>
        all := (scriptedPlayer categoriesForViewer: self) asOrderedCollection.<br>
+       possible := all copy.<br>
-       possible _ all copy.<br>
<br>
        currVocab := self currentVocabulary.<br>
+       self categoryMorphs do:  [:m |<br>
+               aCat := currVocab categoryWhoseTranslatedWordingIs: m currentCategory.<br>
+               aCat ifNotNil: [possible remove: aCat wording ifAbsent: []]].<br>
-       self categoryMorphs do:<br>
-                       [:m |<br>
-                       aCat := currVocab categoryWhoseTranslatedWordingIs: m currentCategory.<br>
-                       aCat ifNotNil: [possible remove: aCat wording ifAbsent: []]].<br>
<br>
+       returnIfPossible := [:category |<br>
+               candidate := category translatedInDomain: &#39;Etoys-Tiles&#39;.<br>
+               (possible includes: candidate) ifTrue: [^ candidate]].<br>
-       (currVocab isEToyVocabulary)<br>
-               ifTrue:<br>
-                       [((possible includes: ScriptingSystem nameForInstanceVariablesCategory translated) and: [scriptedPlayer hasUserDefinedSlots])<br>
-                       ifTrue: [^ ScriptingSystem nameForInstanceVariablesCategory translated].<br>
<br>
+       scriptedPlayer hasUserDefinedSlots<br>
+               ifTrue: [returnIfPossible value: ScriptingSystem nameForInstanceVariablesCategory].<br>
+       scriptedPlayer hasUserDefinedScripts<br>
+               ifTrue: [returnIfPossible value: ScriptingSystem nameForScriptsCategory].<br>
-       ((possible includes: ScriptingSystem nameForScriptsCategory translated) and: [scriptedPlayer hasUserDefinedScripts])<br>
-               ifTrue: [^ ScriptingSystem nameForScriptsCategory translated]].<br>
<br>
+       #(kedama basic tests &#39;color &amp; border&#39; color flagging comparing motion geometry input preferences)<br>
+               do: returnIfPossible.<br>
-       {&#39;kedama&#39; translated. #basic translated}<br>
-               do: [:preferred | (possible includes: preferred) ifTrue: [^ preferred]].<br>
<br>
+       candidate := possible isEmpty ifFalse: [possible first] ifTrue: [all first].<br>
+       ^ candidate!<br>
-       scriptedPlayer isPlayerLike<br>
-               ifTrue: [(possible includes: #tests translated) ifTrue: [^ #tests translated]].<br>
-<br>
-       {#&#39;color &amp; border&#39; translated.  #color translated. #flagging translated. #comparing translated.<br>
-               &#39;motion&#39; translated.  &#39;geometry&#39; translated.<br>
-               #input.  #preferences.<br>
- }<br>
-                       do: [:preferred | (possible includes: preferred) ifTrue: [^ preferred]].<br>
-<br>
-       amt := possible isEmpty ifFalse: [possible first] ifTrue: [all first].<br>
-       ^ amt!<br>
<br>
_______________________________________________<br>
etoys-dev mailing list<br>
<a href="mailto:etoys-dev@squeakland.org">etoys-dev@squeakland.org</a><br>
<a href="http://lists.squeakland.org/mailman/listinfo/etoys-dev" target="_blank">http://lists.squeakland.org/mailman/listinfo/etoys-dev</a><br>
</blockquote></div><br></div>