This is related to the discussion of non-accurate tick rates:
http://tracker.squeakland.org/browse/SQ-708
There currently is no good way to measure real time in Etoys. The Clock object is only accurate to one second.
So I'm proposing to have a global timer, in seconds, but with milli-second resolution. There would be a tile for accessing it in the world's "playfield" category (actually any playfield / holder).
This would allow to do animations etc to proceed in real time, independent of the actual tick rate of a script.
I just posted a proposed implementation to the inbox (Etoys-bf.31). Also, find attached an example project.
Would that be generally useful?
- Bert -
I just uploaded a new developer version to
http://etoys.squeak.org/download/
It contains just one new changeset (#2379), but as you can see below, that's quite something :)
So this has DrGeo for the first time, and lots (lots!) of fixes. Also, the zip has the new splitted translations, and a compressed sources file.
I also committed all of that to subversion:
http://etoys.squeak.org/svn/trunk/
We're getting close to an alpha release. Thanks to everyone!
- Bert -
=======================================================
Change Set: repo1237-bf
Date: 27 June 2010
Author: Bert Freudenberg
Update packages to repository version 1237.
Changes from v1117 of 24 May 2010 to v1237 of 26 June 2010:
--------------------
Added packages: DrGeoII-Core DrGeoII-Etoys
--------------------
System-Richo.17
* Fixed LocaleID>>#displayName
System-Richo.18
* Reverted Project>>#chooseNaturalLanguage to old version. The source is the same, I just want to preserve the version info.
System-Richo.19
* Simple fix for a bug that broke the trash can and saving projects.
System-Richo.20
* Revert my last commit.
System-bf.21
- fix from Squeak Trunk: move compiled preferences to *autogenerated category so that the package does not get dirty
System-bf.22
- store list of languages used in a project in the project manifest (SQ-513)
System-bf.23
- reset hands when loading project (fix for SQ-401)
--------------------
GetText-Richo.4
* Removed unused classes: GetTextExporter and LanguageEditor.
* Renamed GetTextExporter2 to GetTextExported.
GetText-Richo.5
* Fixed #appendStringReceivers:into: to correctly use the default domain when a method doesn't belong to any package.
* Removed all extra information except 'Language-Name' and 'Language-Direction' (both are only exported to default domain po file).
GetText-Richo.6
* Changed String>>#translated to look in all domains if the translation wasn't found.
GetText-Richo.7
* Fixed formatting in two methods.
* Changed #= for #== in String>>translated
GetText-KR.8
+ Fix class comment of GetTextExporter.
+ To modify structure of POs/PO that GetTextExporter creates to:
po/
<lang>/
<domain>.po
templates/
<domain>.pot
GetText-Richo.9
* Changed #translated to return self if the current locale is English.
GetText-Richo.10
* Fixed a stupid mistake in my last commit :P
GetText-Richo.11
* Removed #translated 'optimization' for english locale
GetText-kfr.12
Comment out printing to Transcript
--------------------
Compiler-kfr.3
Fixes jira bug SQ-710
Removal of variable used in a script caused a walkback
--------------------
Etoys-Richo.11
* Textual scripts wasn't working because CompiledMethod>>#decompileString is broken for some cases (I don't know why). Now #decompileString is still broken but textual scripts work.
Etoys-kfr.12
Compute up/down arrow increments in NumberTiles from decimal places
Etoys-kfr.13
Fix the overlap logic in Morph>>overlapsShadowForm:bounds:
Fix for not including self in testing for overlaps i Player>>overlapsAny:
Refactor Player>>overlaps: to use Morph>>overlapsShadowForm:bounds:
Etoys-kfr.14
We must keep a reference to the sound we are playing so we can stop it later...
Etoys-kfr.16
Makes a read only category 'world geometry' that is only visible to the world.
Etoys-kfr.17
Try to fix a problem caused in Etoys-kfr.12 with arrow deltas. All player gettermethods got categorized as variables
Etoys-kfr.18
Try once again to get to changes right. Do not add info to slotInfo, just change it if it's there....
Etoys-kfr.19
Fix again, wrong merge applied ...
Etoys-kfr.20
Fix for http://tracker.squeakland.org/browse/SQ-500
Scriptor layout not updated
Etoys-kfr.21
Use ScriptEditorMorph>>fixLayout
Etoys-kfr.22
SQ-667
The description states:
scrolledIntoView -- (Morph) when I am scrolled into view in a GeeMailMorph
scrolledOutOfView -- (Morph) when I am scrolled out of view in a GeeMailMorph
Etoys-kfr.23
Trying to solve http://tracker.squeakland.org/browse/SQ-660
Change Variable Type to 'Patch' throws 'Message Not Understood' error
This fix removes the #Patch slot type for all but KedamaMorphs.
I guess Yoshiki must look at this error for a real fix.
Etoys-kfr.24
SQ-485 Function tile not translated
trnFuncHelp-KR is the proposed patch for translating balloon help
Etoys-kfr.25
SQ-94 Flip operations broken on Etoys
Etoys-kfr.26
empty log message
Etoys-kfr.27
empty log message
Etoys-kfr.28
Flipping fixing
Etoys-kfr.29
Move SketchMorph>>additionsToViewerCategories to Etoys package
Etoys-bf.30
- fix color component accessing (SQ-627)
- move them from WS-Sound package to Etoys package
--------------------
Graphics-Richo.3
* Integrating true type font support by Andreas Raab.
Graphics-Richo.4
* Integrating true type font support by Andreas Raab
Graphics-kfr.5
SQ-597 Animated Gif has several basic bugs
Fix by Jerome Peace
--------------------
Morphic-KR.9
SQ-297: localized QuickGuides contents could be placed in '<imagePath>/locale/<lang>/QuickGuides'. if the directory doesn't exist, fallback to default one '<imagePath>/QuickGuides'
Morphic-KR.10
For SQ-562:
Introduce catalog for QuickGuides to translate display of index and control display order.
+ the catalog file 'catalog.txt' is placed to where QG contents reside
Format is like this:
:NavBar/Navigator <--- categoryName/title of category
PaintBrushes/Brushes <--- guideName/title of guide
PaintColorPalette/Color Palette
Order of guides in some category can be specified in this file.
Titles for categories and guides can be translated.
The file has to be UTF8 encoded.
File name for each guide contents is assumed as <guideName>.sexp.data.gz.
<guideName> should be named only with ascii characters
for portability among various filename encodings.
+ Template of catalog file can be generated by evaluating this:
QuickGuideMorph buildDefaultCatalog.
QuickGuideMorph saveCatalog.
TODO:
+wiki/html/sexp generation functionalities haven't been adopted to this change.
+Buttons on index page are hard coded so aren't affected by translation in catalog.
Morphic-KR.14
For SQ-562:
Introduce index for QuickGuides to translate and control order of guide title in index page.
+ the index file 'index.txt' is placed to where QG contents reside
Format is like this:
:NavBar|Navigator <--- categoryName/title of category
PaintBrushes|Brushes <--- guideName/title of guide
PaintColorPalette|Color Palette
Order of guides in some category can be specified in this file.
Titles for categories and guides can be translated.
The file has to be UTF8 encoded.
File name for each guide contents is assumed as <guideName>.sexp.data.gz.
<guideName> should be named only with ascii characters
for portability among various filename encodings.
+ Template of index file can be generated by evaluating this:
QuickGuideMorph buildDefaultIndex.
QuickGuideMorph saveIndex.
TODO:
+wiki/html/sexp generation functionalities haven't been adopted to this change.
+Buttons on index page are hard coded so aren't affected by translation.
Changes from Morphic-KR.10:
+ teminology change: catalog->index. name of the file was also changed.
+separator in index file.
Morphic-KR.15
For SQ-562:
Introduce index file for QuickGuides to translate and and control order of display of guide titles in index page.
+ the file 'index.txt' is placed to where QG contents reside
Format is like this:
:NavBar|Navigator <--- categoryName|title of category
PaintBrushes|Brushes <--- guideName|title of guide
PaintColorPalette|Color Palette
Order of guides in some category can be specified in this file.
Titles for categories and guides can be translated.
The file has to be UTF8 encoded.
File name for each guide contents is assumed as <guideName>.sexp.data.gz.
<guideName> should be named only with ascii characters
for portability among various filename encodings.
+ Template of the index file can be generated by evaluating this:
QuickGuideMorph buildDefaultIndex.
QuickGuideMorph saveIndex.
TODO:
+wiki/html/sexp generation functionalities haven't been adopted to this change.
+Buttons on index page are hard coded so aren't affected by translation.
Changes from Morphic-KR.10;
+ terminology change: catalog->index; also name of file and related methods were changed
+ separator character is now '|'
Morphic-kfr.16
Adds a Color Palette to the Objects Tool Graphics category. Can be used interactively for picking colors or for random color picking via scripting. The color palette is hard to get hold of as a object otherwise
Morphic-kfr.17
test
Morphic-kfr.18
Display keystroke space as <space> in lastKeystroke
Morphic-kfr.19
When a Holders indicate cursor is true and it's resize to fit is false the cursor will indicate stuff in the Holder outside the bounds of the Holder.
Morphic-kfr.20
SQ-94 Flip operations broken on Etoys
Morphic-kfr.21
Move SketchMorph>>additionsToViewerCategories to Etoys package
Morphic-Richo.22
* Fix for bug: (SQ-719) Can only change a circles diameter to a value less than the current value using width or length tiles
Morphic-Richo.23
* Fixed the comments in Circle>>#width: and #height:
Morphic-bf.24
- like dragging with the right mousebutton, resize if the control key is pressed
Morphic-bf.25
- grow equally in all directions on control-halo-drag
Morphic-bf.26
- fix copying text from lists (SQ-691)
Morphic-bf.27
- fix an ambiguous translation in abandonUnsituatedPlayers (SQ-649)
Morphic-bf.28
- prevent deleting paint palette (SQ-687, fix by Karl Ramberg)
Morphic-bf.29
- clear keyboard interpreter when re-initializing hand (SQ-401)
--------------------
Connectors-kfr.188
Fix the overlap logic in Morph>>overlapsShadowForm:bounds:
Fix for not including self in testing for overlaps i Player>>overlapsAny:
Refactor Player>>overlaps: to use Morph>>overlapsShadowForm:bounds:
Connectors-bf.189
- move overlapsShadowForm:bounds: back to Morphic package
--------------------
Multilingual-KR.6
fix SQ-539 'Cannot copy & paste Japanese external texts on Windows platform'
Multilingual-Richo.7
* Integrating true type font support by Andreas Raab
Multilingual-Richo.8
* Fixed a bug in TTCFont>>#textStyle
Multilingual-Richo.9
* Integrating true type font support by Andreas Raab
Multilingual-Richo.10
* Allows defining new sizes for TrueType fonts.
Multilingual-Richo.11
* Changing to korean locale wasn't installing the font because #isFontAvailable used to return true.
The problem was that 'TextStyle defaultFont fallbackFont fontArray' contained nil at korean's location.
* I believe this was a problem of my image (I don't know how I got into that state) but I think this may be useful anyway.
Multilingual-Richo.12
* Fixed an error in TTCFont. It used to throw an error in #displayString:on:from:to:at:kern:baselineY: when ascent wasn't properly initialized.
Multilingual-bf.13
- use UTF8 clipboard in Latin1 locale on all platforms (fix for SQ-725)
--------------------
MorphicExtras-Richo.4
* The unregister flaps quads error appeared again.
(see http://lists.squeakland.org/pipermail/etoys-dev/2010-May/004658.html).
This is not the best fix but at least it lets you finish the update.
MorphicExtras-kfr.5
Magnifyer, Add a test for flexing (changing heading). Increase stepTime to 100 mSec
MorphicExtras-kfr.6
SQ-634
In Book object advanced menu under 'save for later revert' option:
Mark this page to be revertable - change spelling of revertable to revertible.
Mark this entire book to be revertable - change spelling of revertable to revertible.
MorphicExtras-kfr.7
SQ-597 Animated Gif has several basic bugs
Some fixes harvested of Mantis made by Jerome Peace
MorphicExtras-kfr.8
SQ-679 MagnifierMorph menu round is broken
MorphicExtras-bf.9
- prevent deleting paint palette (SQ-687, fix by Karl Ramberg)
--------------------
ReleaseBuilder-Richo.2
* Changed a reference to GetTextExporter2 to GetTextExporter
--------------------
Sound-kfr.2
We must keep a reference to the sound we are playing so we can stop it later...
Sound-kfr.3
Added possibility to compress sounds in the SoundLibrary. Menu option to show compression format of sounds in library.
Sound-kfr.4
Bug fix in SoundLibraryMorph>>soundName
Sound-kfr.5
SQ-698
- Deleting the morph does not stop the process
- If deleted while recording it carries on recording (in the trash-can)
Sound-kfr.6
RecordingControls stop stepping and recording on delete
Bert,
This is a good idea too.
kh
---- Original message ----
>Date: Sat, 26 Jun 2010 15:30:29.458 0000
>From: commits(a)source.squeak.org
>Subject: [etoys-dev] Etoys: Morphic-kfr.16.mcz
>To: etoys-dev(a)squeakland.org
>
>Bert Freudenberg uploaded a new version of Morphic to project Etoys:
>http://source.squeak.org/etoys/Morphic-kfr.16.mcz
>
>==================== Summary ====================
>
>Name: Morphic-kfr.16
>Author: kfr
>Time: 14 June 2010, 12:04:14 am
>UUID: dce814a2-a2fc-6742-ad86-9c10e120ef9e
>Ancestors: Morphic-KR.15
>
>Adds a Color Palette to the Objects Tool Graphics category. Can be used interactively for picking colors or for random color picking via scripting. The color palette is hard to get hold of as a object otherwise
>
>=============== Diff against Morphic-KR.15 ===============
>
>Item was added:
>+ ----- Method: SketchMorph class>>newStandAlone (in category 'new-morph participation') -----
>+ newStandAlone
>+ ^self asColorPalette:320@240 depth:16!
>
>Item was added:
>+ ----- Method: SketchMorph class>>asColorPalette:depth: (in category 'instance creation') -----
>+ asColorPalette: anExtent depth: aDepth
>+ | form |
>+ form := Color colorPaletteForDepth: aDepth extent: anExtent.
>+ form := form
>+ copy: (0 @ 21 corner: anExtent x - 20 @ anExtent y).
>+ ^ self withForm: form!
>
>Item was added:
>+ ----- Method: SketchMorph class>>descriptionForPartsBin (in category 'new-morph participation') -----
>+ descriptionForPartsBin
>+ ^ self partName: 'Color Palette' translatedNoop
>+ categories: {'Graphics' translatedNoop}
>+ documentation: 'Display a palette of colors' translatedNoop!
>
>_______________________________________________
>etoys-dev mailing list
>etoys-dev(a)squeakland.org
>http://lists.squeakland.org/mailman/listinfo/etoys-dev
On 26.06.2010, at 15:30, commits(a)source.squeak.org wrote:
> Bert Freudenberg uploaded a new version of Morphic to project Etoys:
> http://source.squeak.org/etoys/Morphic-kfr.16.mcz
>
> ==================== Summary ====================
>
> Name: Morphic-kfr.16
> Author: kfr
> Time: 14 June 2010, 12:04:14 am
> UUID: dce814a2-a2fc-6742-ad86-9c10e120ef9e
> Ancestors: Morphic-KR.15
>
> Adds a Color Palette to the Objects Tool Graphics category. Can be used interactively for picking colors or for random color picking via scripting. The color palette is hard to get hold of as a object otherwise
This was already merged, I just moved it to the main repo.
- Bert -
Bert Freudenberg uploaded a new version of Etoys to project Etoys Inbox:
http://source.squeak.org/etoysinbox/Etoys-bf.31.mcz
==================== Summary ====================
Name: Etoys-bf.31
Author: bf
Time: 26 June 2010, 5:31:53 pm
UUID: 2d4c0080-e486-4dfc-afff-d24389b71845
Ancestors: Etoys-bf.30
- add a "timer" tile to the "playfield" category
=============== Diff against Etoys-bf.30 ===============
Item was added:
+ ----- Method: Player>>setTimer: (in category 'slot getters/setters') -----
+ setTimer: seconds
+ costume renderedMorph
+ setProperty: #timerStart
+ toValue: Time millisecondClockValue - (seconds * 1000) asInteger!
Item was added:
+ ----- Method: Player>>getTimer (in category 'slot getters/setters') -----
+ getTimer
+ | last |
+ last := costume renderedMorph
+ valueOfProperty: #timerStart
+ ifAbsentPut: [Time millisecondClockValue].
+ ^(Time millisecondsSince: last) / 1000.0
+ !
Item was changed:
----- Method: PasteUpMorph class>>additionsToViewerCategories (in category '*eToys-scripting') -----
additionsToViewerCategories
"Answer a list of (<categoryName> <list of category specs>) pairs that characterize the phrases this kind of morph wishes to add to various Viewer categories."
^ # (
(playfield (
(command initiatePainting 'Initiate painting of a new object in the standard playfield.')
(slot mouseX 'The x coordinate of the mouse pointer' Number readWrite Player getMouseX unused unused)
(slot mouseY 'The y coordinate of the mouse pointer' Number readWrite Player getMouseY unused unused)
+ (slot timer 'The elapsed time in seconds' Number readWrite Player getTimer Player setTimer:)
(command roundUpStrays 'Bring all out-of-container subparts back into view.')
(slot graphic 'The graphic shown in the background of this object' Graphic readWrite Player getPasteUpGraphic Player setGraphic:)
(command unhideHiddenObjects 'Unhide all hidden objects.')))
(scripting (
(command tellAllContents: 'Send a message to all the objects inside the playfield' ScriptName)))
(collections (
(slot cursor 'The index of the chosen element' Number readWrite Player getPasteUpCursor Player setCursorWrapped:)
(slot count 'How many elements are within me' Number readOnly Player getCount unused unused)
(slot stringContents 'The characters of the objects inside me, laid end to end' String readOnly Player getStringContents unused unused)
(slot playerAtCursor 'the object currently at the cursor' Player readWrite Player getValueAtCursor unused unused)
(slot firstElement 'The first object in my contents' Player readWrite Player getFirstElement Player setFirstElement:)
(slot numberAtCursor 'the number at the cursor' Number readWrite Player getNumberAtCursor Player setNumberAtCursor: )
(slot graphicAtCursor 'the graphic worn by the object at the cursor' Graphic readOnly Player getGraphicAtCursor unused unused)
(command tellAllContents: 'Send a message to all the objects inside the playfield' ScriptName)
(command removeAll 'Remove all elements from the playfield')
(command shuffleContents 'Shuffle the contents of the playfield')
(command append: 'Add the object to the end of my contents list.' Player)
(command prepend: 'Add the object at the beginning of my contents list.' Player)
(command includeAtCursor: 'Add the object to my contents at my current cursor position' Player)
(command include: 'Add the object to my contents' Player)
))
"
(#'stack navigation' (
(command goToNextCardInStack 'Go to the next card')
(command goToPreviousCardInStack 'Go to the previous card')
(command goToFirstCardInBackground 'Go to the first card of the current background')
(command goToFirstCardOfStack 'Go to the first card of the entire stack')
(command goToLastCardInBackground 'Go to the last card of the current background')
(command goToLastCardOfStack 'Go to the last card of the entire stack')
(command deleteCard 'Delete the current card')
(command insertCard 'Create a new card')))"
"(viewing (
(slot viewingNormally 'whether contents are viewed normally' Boolean readWrite Player getViewingByIcon Player setViewingByIcon: )))"
(#'pen trails' (
(command liftAllPens 'Lift the pens on all the objects in my interior.')
(command lowerAllPens 'Lower the pens on all the objects in my interior.')
(command trailStyleForAllPens: 'Set the trail style for pens of all objects within' TrailStyle)
(command clearTurtleTrails 'Clear all the pen trails in the interior.')
(slot batchPenTrails 'Whether pen trails should reflect small movements within the same tick or only should integrate all movement between ticks' Boolean readWrite Player getBatchPenTrails Player setBatchPenTrails:)
))
(#sound (
(slot soundPitch 'pitch of sound' Number readOnly Player getPitch unused unused)
(slot soundLevel 'level of sound' Number readOnly Player getLevel unused unused)
(slot dialNumber 'dial number of sound' String readOnly Player getDialNumber unused unused)
(slot soundListening 'whether the stethoscope is listening' Boolean readWrite Player getListening Player setListening:)))
)!
Bert Freudenberg uploaded a new version of Morphic to project Etoys:
http://source.squeak.org/etoys/Morphic-kfr.16.mcz
==================== Summary ====================
Name: Morphic-kfr.16
Author: kfr
Time: 14 June 2010, 12:04:14 am
UUID: dce814a2-a2fc-6742-ad86-9c10e120ef9e
Ancestors: Morphic-KR.15
Adds a Color Palette to the Objects Tool Graphics category. Can be used interactively for picking colors or for random color picking via scripting. The color palette is hard to get hold of as a object otherwise
=============== Diff against Morphic-KR.15 ===============
Item was added:
+ ----- Method: SketchMorph class>>newStandAlone (in category 'new-morph participation') -----
+ newStandAlone
+ ^self asColorPalette:320@240 depth:16!
Item was added:
+ ----- Method: SketchMorph class>>asColorPalette:depth: (in category 'instance creation') -----
+ asColorPalette: anExtent depth: aDepth
+ | form |
+ form := Color colorPaletteForDepth: aDepth extent: anExtent.
+ form := form
+ copy: (0 @ 21 corner: anExtent x - 20 @ anExtent y).
+ ^ self withForm: form!
Item was added:
+ ----- Method: SketchMorph class>>descriptionForPartsBin (in category 'new-morph participation') -----
+ descriptionForPartsBin
+ ^ self partName: 'Color Palette' translatedNoop
+ categories: {'Graphics' translatedNoop}
+ documentation: 'Display a palette of colors' translatedNoop!
Bert Freudenberg uploaded a new version of System to project Etoys:
http://source.squeak.org/etoys/System-bf.22.mcz
==================== Summary ====================
Name: System-bf.22
Author: bf
Time: 26 June 2010, 3:14:06 pm
UUID: 25c8a8c1-a006-4431-8fa3-3d08528779d2
Ancestors: System-bf.21
- store list of languages used in a project in the project manifest (SQ-513)
=============== Diff against System-bf.21 ===============
Item was changed:
----- Method: Project>>storeAttributesOn: (in category 'file in/out') -----
storeAttributesOn: aStream
"For the manifest: write a series of cr-delimited records of the form <key>: <value> to a stream."
| details loggedInAs incomingUser existingUri uri uriPrefix |
self storeAttributeKey: 'Squeak-Version' value: SystemVersion current version on: aStream.
self storeAttributeKey: 'Squeak-LatestUpdate' value: SystemVersion current highestUpdate printString on: aStream.
self storeAttributeKey: 'File-Name-Encoding' value: LanguageEnvironment defaultFileNameConverter class encodingNames first on: aStream.
self storeAttributeKey: 'Project-Language' value: Locale current localeID printString on: aStream.
+ self localesString ifNotEmptyDo: [:localesString |
+ self storeAttributeKey: 'Project-Languages' value: localesString on: aStream].
loggedInAs := 'unknown'.
Utilities loggedIn ifTrue:
[ServerDirectory servers at: 'My Squeakland' ifPresent:
[:server | loggedInAs := server userPerSe ifNil: ['unknown']]].
incomingUser := self projectParameterAt: #user ifAbsent: ['unknown'].
"If the project was loaded from outside, this will be the user associated with that outside version"
existingUri := self projectParameterAt: #URI ifAbsent: [nil].
uriPrefix := 'http://squeakland.org/etoys/'.
uri := uriPrefix, loggedInAs, '-', Time totalSeconds printString.
existingUri ifNotNil:
[incomingUser = loggedInAs
ifTrue:
[uri := existingUri.
(self projectParameterAt: #'prev-URI') ifNotNilDo:
[:prior | self storeAttributeKey: #'prev-URI' value: prior on: aStream]]
ifFalse:
[incomingUser = 'unknown' ifTrue: "saved as unknown user, now publishing as registered user; teefal wants new uri but using original epoch in this case."
[uri := String streamContents:
[:str |
str nextPutAll: uriPrefix.
str nextPutAll: loggedInAs, '-'.
str nextPutAll: (existingUri copyAfterLast: $-)]].
self storeAttributeKey: 'prev-URI' value: existingUri on: aStream]].
self storeAttributeKey: 'URI' value: uri on: aStream.
self storeAttributeKey: 'user' value: loggedInAs on: aStream.
details _ self world valueOfProperty: #ProjectDetails ifAbsent: [Dictionary new].
Project publishInSexp ifTrue: [
self storeAttributeKey: 'Project-Format' value: 'S-Expression' on: aStream.
self storeAttributeKey: 'Project-Format-Version' value: '1.0' on: aStream.
] ifFalse: [
self storeAttributeKey: 'Project-Format' value: 'ImageSegment' on: aStream.
].
details associationsDo: [:assoc |
self storeAttributeKey: assoc key asString value: assoc value asString on: aStream.]!
Item was added:
+ ----- Method: Project>>locales (in category 'language') -----
+ locales
+ "Answer list of all locales found in translatable objects"
+ | locales |
+ locales := Set new.
+ world allMorphsDo: [:m |
+ ((m isKindOf: TextMorph) and: [m translatable]) ifTrue: [
+ m valueOfProperty: #translations ifPresentDo: [:translations |
+ translations keysDo: [:locale | locales add: locale]]]].
+ ^locales!
Item was added:
+ ----- Method: Project>>localesString (in category 'language') -----
+ localesString
+ "Answer comma-separated string of all locales found in translatable objects"
+ ^String streamContents: [:stream |
+ self locales
+ do: [:locale | stream print: locale]
+ separatedBy: [stream nextPut: $,]]!