From 8f984b922f5a76259ec02bd55720738fbf6ee581 Mon Sep 17 00:00:00 2001 From: Philippe Marschall Date: Sat, 20 Aug 2022 11:06:21 +0200 Subject: [PATCH 01/24] Replace senders of asMutator with greaseAsMutator Fixes #1195 --- .../JQEffectFunctionalTest.class/instance/renderContentOn..st | 2 +- .../WACollectionTag.class/instance/on.of..st | 2 +- .../Seaside-Canvas.package/WACompound.class/instance/on.of..st | 2 +- .../WAFileUploadTag.class/instance/on.of..st | 2 +- .../WAFormInputTag.class/instance/on.of..st | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/repository/JQuery-Tests-UI.package/JQEffectFunctionalTest.class/instance/renderContentOn..st b/repository/JQuery-Tests-UI.package/JQEffectFunctionalTest.class/instance/renderContentOn..st index cf7e29b48..0cd182ae2 100644 --- a/repository/JQuery-Tests-UI.package/JQEffectFunctionalTest.class/instance/renderContentOn..st +++ b/repository/JQuery-Tests-UI.package/JQEffectFunctionalTest.class/instance/renderContentOn..st @@ -4,7 +4,7 @@ renderContentOn: html #( bounce highlight pulsate shake size transfer ) do: [ :each | html anchor onClick: (self - perform: each asMutator + perform: each greaseAsMutator with: (html jQuery: '.box') effect); with: each ] ]. self renderBoxOn: html \ No newline at end of file diff --git a/repository/Seaside-Canvas.package/WACollectionTag.class/instance/on.of..st b/repository/Seaside-Canvas.package/WACollectionTag.class/instance/on.of..st index 5b6a1b70f..cf54284ae 100644 --- a/repository/Seaside-Canvas.package/WACollectionTag.class/instance/on.of..st +++ b/repository/Seaside-Canvas.package/WACollectionTag.class/instance/on.of..st @@ -3,4 +3,4 @@ on: aSelector of: anObject self selected: (anObject perform: aSelector). self callback: (GRDelayedSend receiver: anObject - selector: aSelector asMutator) \ No newline at end of file + selector: aSelector greaseAsMutator) \ No newline at end of file diff --git a/repository/Seaside-Canvas.package/WACompound.class/instance/on.of..st b/repository/Seaside-Canvas.package/WACompound.class/instance/on.of..st index 1c2db9bf4..7d60deabf 100644 --- a/repository/Seaside-Canvas.package/WACompound.class/instance/on.of..st +++ b/repository/Seaside-Canvas.package/WACompound.class/instance/on.of..st @@ -3,4 +3,4 @@ on: aSelector of: anObject self value: (anObject perform: aSelector). self callback: (GRDelayedSend receiver: anObject - selector: aSelector asMutator) \ No newline at end of file + selector: aSelector greaseAsMutator) \ No newline at end of file diff --git a/repository/Seaside-Canvas.package/WAFileUploadTag.class/instance/on.of..st b/repository/Seaside-Canvas.package/WAFileUploadTag.class/instance/on.of..st index 33e7dec36..3a7ea09b4 100644 --- a/repository/Seaside-Canvas.package/WAFileUploadTag.class/instance/on.of..st +++ b/repository/Seaside-Canvas.package/WAFileUploadTag.class/instance/on.of..st @@ -2,4 +2,4 @@ callbacks on: aSelector of: anObject self callback: (GRDelayedSend receiver: anObject - selector: aSelector asMutator) \ No newline at end of file + selector: aSelector greaseAsMutator) \ No newline at end of file diff --git a/repository/Seaside-Canvas.package/WAFormInputTag.class/instance/on.of..st b/repository/Seaside-Canvas.package/WAFormInputTag.class/instance/on.of..st index 1c2db9bf4..7d60deabf 100644 --- a/repository/Seaside-Canvas.package/WAFormInputTag.class/instance/on.of..st +++ b/repository/Seaside-Canvas.package/WAFormInputTag.class/instance/on.of..st @@ -3,4 +3,4 @@ on: aSelector of: anObject self value: (anObject perform: aSelector). self callback: (GRDelayedSend receiver: anObject - selector: aSelector asMutator) \ No newline at end of file + selector: aSelector greaseAsMutator) \ No newline at end of file From 39c410341ef9a84020ced7fad284196eabc08262 Mon Sep 17 00:00:00 2001 From: Philippe Marschall Date: Sun, 21 Aug 2022 11:26:45 +0200 Subject: [PATCH 02/24] Remove old FileLirary methods Remove old FileLirary methods used for migrations long ago. --- .../class/adjustForVisualWorks.st | 10 ---------- .../class/migrateSubclassesSeaside29.st | 6 ------ .../WAFileLibrary.class/class/migrateToSeaside29.st | 13 ------------- 3 files changed, 29 deletions(-) delete mode 100644 repository/Seaside-Core.package/WAFileLibrary.class/class/adjustForVisualWorks.st delete mode 100644 repository/Seaside-Core.package/WAFileLibrary.class/class/migrateSubclassesSeaside29.st delete mode 100644 repository/Seaside-Core.package/WAFileLibrary.class/class/migrateToSeaside29.st diff --git a/repository/Seaside-Core.package/WAFileLibrary.class/class/adjustForVisualWorks.st b/repository/Seaside-Core.package/WAFileLibrary.class/class/adjustForVisualWorks.st deleted file mode 100644 index b8a11f27b..000000000 --- a/repository/Seaside-Core.package/WAFileLibrary.class/class/adjustForVisualWorks.st +++ /dev/null @@ -1,10 +0,0 @@ -vw port-squeak -adjustForVisualWorks - | newSource oldSource badCode goodCode | - badCode := 'xxxCache := #(nil).'. - goodCode := 'xxxCache := #(nil) beMutable.'. - self selectors do: [ :selector | - oldSource := self sourceCodeAt: selector. - (oldSource indexOfSubCollection: badCode startingAt: 1) > 0 ifTrue: [ - newSource := oldSource copyReplaceAll: badCode with: goodCode. - self compile: newSource classified: self methodCategory ] ] \ No newline at end of file diff --git a/repository/Seaside-Core.package/WAFileLibrary.class/class/migrateSubclassesSeaside29.st b/repository/Seaside-Core.package/WAFileLibrary.class/class/migrateSubclassesSeaside29.st deleted file mode 100644 index c0f4f4d18..000000000 --- a/repository/Seaside-Core.package/WAFileLibrary.class/class/migrateSubclassesSeaside29.st +++ /dev/null @@ -1,6 +0,0 @@ -migrating -migrateSubclassesSeaside29 - "migrates all subclasses of the receiver to Seaside 2.9 - you should not send this message to WAFileLibrary because that will also migrate the classes in Seaside" - self allSubclassesDo: [ :each | - each migrateToSeaside29 ] \ No newline at end of file diff --git a/repository/Seaside-Core.package/WAFileLibrary.class/class/migrateToSeaside29.st b/repository/Seaside-Core.package/WAFileLibrary.class/class/migrateToSeaside29.st deleted file mode 100644 index ad4262dc1..000000000 --- a/repository/Seaside-Core.package/WAFileLibrary.class/class/migrateToSeaside29.st +++ /dev/null @@ -1,13 +0,0 @@ -migrating -migrateToSeaside29 - "migrates only the receiver to Seaside 2.9" - (self default fileSelectors intersection: self selectors) do: [ :each | - | contents | - contents := (self default perform: each). - (contents isKindOf: ByteArray) ifTrue: [ - | file | - file := WAFile new - contents: contents; - fileName: (self default asFilename: each); - yourself. - self default addFile: file ] ] \ No newline at end of file From 1bca815c627ba695002e66d9ed1c1c8a1c98ccac Mon Sep 17 00:00:00 2001 From: Philippe Marschall Date: Sun, 21 Aug 2022 11:53:43 +0200 Subject: [PATCH 03/24] Switch to #asMethodReturningString:named: Fixes #1328 --- .../class/compileText.selector..st | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/repository/Seaside-Core.package/WAAbstractFileLibrary.class/class/compileText.selector..st b/repository/Seaside-Core.package/WAAbstractFileLibrary.class/class/compileText.selector..st index 8947a7028..24216d319 100644 --- a/repository/Seaside-Core.package/WAAbstractFileLibrary.class/class/compileText.selector..st +++ b/repository/Seaside-Core.package/WAAbstractFileLibrary.class/class/compileText.selector..st @@ -1,20 +1,8 @@ private compileText: aByteArrayOrString selector: aSymbol - "Compiles aByteArrayOrString into a method named aSymbol that returns aByteArrayOrString as a string literal. - aSymbol - ^ aByteArrayOrString" + "Compiles aByteArrayOrString into a method named aSymbol that returns aByteArrayOrString as a string literal." | code | - code := String streamContents: [ :stream | - stream - nextPutAll: aSymbol; - nextPut: Character cr. - stream - tab; - nextPutAll: '^ '''. - aByteArrayOrString greaseString do: [ :each | - each = $' ifTrue: [ stream nextPut: $' ]. - stream nextPut: each ]. - stream nextPut: $' ]. + code := GRPlatform current asMethodReturningString: aByteArrayOrString named: aSymbol. GRPlatform current compile: code into: self From 80ee417445e65f73130acb74325eb669fb8b582b Mon Sep 17 00:00:00 2001 From: Philippe Marschall Date: Sun, 21 Aug 2022 15:50:31 +0200 Subject: [PATCH 04/24] Check for nil in WAUrl >> #postCopy Fixes #1330 --- .../Seaside-Core.package/WAUrl.class/instance/postCopy.st | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repository/Seaside-Core.package/WAUrl.class/instance/postCopy.st b/repository/Seaside-Core.package/WAUrl.class/instance/postCopy.st index f3f6d7fc0..3d3b7d576 100644 --- a/repository/Seaside-Core.package/WAUrl.class/instance/postCopy.st +++ b/repository/Seaside-Core.package/WAUrl.class/instance/postCopy.st @@ -1,6 +1,6 @@ copying postCopy super postCopy. - path := path copy. - queryFields := queryFields copy. - pathParameters := pathParameters copy \ No newline at end of file + path := path ifNotNil: [ :p | p copy ]. + queryFields := queryFields ifNotNil: [ :f | f copy ]. + pathParameters := pathParameters ifNotNil: [ :p | p copy ] \ No newline at end of file From f02ecf9fa9f72604dd2f4f65a2cba15c860448b6 Mon Sep 17 00:00:00 2001 From: Philippe Marschall Date: Mon, 22 Aug 2022 11:41:36 +0200 Subject: [PATCH 05/24] Comment WAFlushingRenderPhaseContinuation --- .../WAFlushingRenderPhaseContinuation.class/README.md | 3 +++ .../WAFlushingRenderPhaseContinuation.class/properties.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/repository/Seaside-RenderLoop.package/WAFlushingRenderPhaseContinuation.class/README.md b/repository/Seaside-RenderLoop.package/WAFlushingRenderPhaseContinuation.class/README.md index e69de29bb..0b642f804 100644 --- a/repository/Seaside-RenderLoop.package/WAFlushingRenderPhaseContinuation.class/README.md +++ b/repository/Seaside-RenderLoop.package/WAFlushingRenderPhaseContinuation.class/README.md @@ -0,0 +1,3 @@ +I send #flush to the HTTP response (WAResponse) after HTML element has been fully renered and closed and the HTML has been opened. This results in this part of the the HTML document being sent to the browser. This allows the browser to prefetch the resources (styles, scripts, ...) possibly resulting in faster page loads. + +This only works with a streaming server adatper, for example one using WAComboResponse. \ No newline at end of file diff --git a/repository/Seaside-RenderLoop.package/WAFlushingRenderPhaseContinuation.class/properties.json b/repository/Seaside-RenderLoop.package/WAFlushingRenderPhaseContinuation.class/properties.json index 027ccee62..8e3958063 100644 --- a/repository/Seaside-RenderLoop.package/WAFlushingRenderPhaseContinuation.class/properties.json +++ b/repository/Seaside-RenderLoop.package/WAFlushingRenderPhaseContinuation.class/properties.json @@ -1,5 +1,5 @@ { - "commentStamp" : "", + "commentStamp" : "pmm 8/22/2022 11:40", "super" : "WARenderPhaseContinuation", "category" : "Seaside-RenderLoop-Continuations", "classinstvars" : [ ], From a39ebf5588bbb53d91dec0328eba7effd4d0a7a5 Mon Sep 17 00:00:00 2001 From: Philippe Marschall Date: Tue, 23 Aug 2022 11:33:55 +0200 Subject: [PATCH 06/24] Fix WAVersionUploader --- .../WAVersionUploader.class/instance/newVersion..st | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repository/Seaside-Pharo-Tools-Web.package/WAVersionUploader.class/instance/newVersion..st b/repository/Seaside-Pharo-Tools-Web.package/WAVersionUploader.class/instance/newVersion..st index 4bdfe2a38..48c74f974 100644 --- a/repository/Seaside-Pharo-Tools-Web.package/WAVersionUploader.class/instance/newVersion..st +++ b/repository/Seaside-Pharo-Tools-Web.package/WAVersionUploader.class/instance/newVersion..st @@ -1,10 +1,10 @@ actions newVersion: aWorkingCopy | version stream | - version := [ aWorkingCopy newVersion ] + version := [ aWorkingCopy newVersionIn: aWorkingCopy repositoryGroup ] on: MCVersionNameAndMessageRequest do: [ :request | request resume: (Array with: request suggestedName with: '') ]. - stream := RWBinaryOrTextStream on: String new. + stream := GRPlatform current readWriteByteStream. version fileOutOn: stream. self requestContext respond: [ :response | response From ea5c1adc0031f7c132f833b9342a6ed6664e796c Mon Sep 17 00:00:00 2001 From: Philippe Marschall Date: Tue, 23 Aug 2022 14:36:28 +0200 Subject: [PATCH 07/24] Fix displaying screenshot of Pharo --- .../Form.extension/instance/seasideMimeDocumentType..st | 8 ++++---- .../WAScreenshot.class/instance/form.st | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/repository/Seaside-Pharo-Core.package/Form.extension/instance/seasideMimeDocumentType..st b/repository/Seaside-Pharo-Core.package/Form.extension/instance/seasideMimeDocumentType..st index ee0d73c24..faa261669 100644 --- a/repository/Seaside-Pharo-Core.package/Form.extension/instance/seasideMimeDocumentType..st +++ b/repository/Seaside-Pharo-Core.package/Form.extension/instance/seasideMimeDocumentType..st @@ -2,9 +2,9 @@ seasideMimeDocumentType: aMimeType "Converts the receiver to a WAMimeDocument. The argument should ideally be an instance for WAMimeType. For various crappy reasons Strings and nil are also allowed." - | aStream writer | - aStream := GRPlatform current readWriteByteStream. + | writer content | writer := self writerForMimeType: aMimeType seasideMimeType. writer isNil ifTrue: [ self error: 'no writer for ', aMimeType greaseString, ' found' ]. - writer putForm: (self asFormOfDepth: 32) onStream: aStream. - ^ WAMimeDocument on: aStream contents mimeType: aMimeType \ No newline at end of file + content := ByteArray streamContents: [ :stream | + writer putForm: (self asFormOfDepth: 32) onStream: stream ]. + ^ WAMimeDocument on: content mimeType: aMimeType \ No newline at end of file diff --git a/repository/Seaside-Pharo-Tools-Web.package/WAScreenshot.class/instance/form.st b/repository/Seaside-Pharo-Tools-Web.package/WAScreenshot.class/instance/form.st index fbccfba49..04cae99cd 100644 --- a/repository/Seaside-Pharo-Tools-Web.package/WAScreenshot.class/instance/form.st +++ b/repository/Seaside-Pharo-Tools-Web.package/WAScreenshot.class/instance/form.st @@ -1,5 +1,5 @@ accessing form ^ zoom - ifFalse: [ Display copy ] + ifFalse: [ UIManager default world imageForm ] ifTrue: [ self topWindow imageForm ] \ No newline at end of file From d7fdc56179f5a631c5818b211b927b47c2001f2f Mon Sep 17 00:00:00 2001 From: Philippe Marschall Date: Fri, 26 Aug 2022 09:20:15 +0200 Subject: [PATCH 08/24] Fix WAMemory on Pharo - don't index into CompiledBlocks - ignore immediate objects - sort by total size by default - replace ifs with method dispatches Fixes #1336 --- .../instance/traverseWithMemory.seen..st | 4 ++++ .../Behavior.extension/properties.json | 3 +++ .../instance/traverseWithMemory.seen..st | 4 ++++ .../Boolean.extension/properties.json | 3 +++ .../instance/traverseWithMemory.seen..st | 6 +++++ .../CompiledBlock.extension/properties.json | 3 +++ .../instance/traverseWithMemory.seen..st | 4 ++++ .../CompiledMethod.extension/properties.json | 3 +++ .../instance/traversableInstVarIndexes.st | 6 ----- .../instance/traverseWithMemory.seen..st | 7 ++++++ .../traversableIndexableVarIndexes.st | 3 --- .../instance/traversableInstVarIndexes.st | 3 --- .../instance/traverseWithMemory.seen..st | 12 +++++++--- .../instance/traverseWithMemory.seen..st | 5 ++++ .../Process.extension/properties.json | 3 +++ .../instance/traverseWithMemory.seen..st | 4 ++++ .../Symbol.extension/properties.json | 3 +++ .../instance/traverseWithMemory.seen..st | 4 ++++ .../UndefinedObject.extension/properties.json | 3 +++ .../WAMemory.class/class/initialize.st | 8 ------- .../WAMemory.class/instance/buildTable.st | 23 +++++++++++-------- .../instance/traverse.value.seen..st | 2 +- .../instance/traverseWithMemory.seen..st | 4 ++++ .../WAMemory.class/properties.json | 4 +--- .../instance/traverseWithMemory.seen..st | 4 ++++ 25 files changed, 92 insertions(+), 36 deletions(-) create mode 100644 repository/Seaside-Pharo-Development.package/Behavior.extension/instance/traverseWithMemory.seen..st create mode 100644 repository/Seaside-Pharo-Development.package/Behavior.extension/properties.json create mode 100644 repository/Seaside-Pharo-Development.package/Boolean.extension/instance/traverseWithMemory.seen..st create mode 100644 repository/Seaside-Pharo-Development.package/Boolean.extension/properties.json create mode 100644 repository/Seaside-Pharo-Development.package/CompiledBlock.extension/instance/traverseWithMemory.seen..st create mode 100644 repository/Seaside-Pharo-Development.package/CompiledBlock.extension/properties.json create mode 100644 repository/Seaside-Pharo-Development.package/CompiledMethod.extension/instance/traverseWithMemory.seen..st create mode 100644 repository/Seaside-Pharo-Development.package/CompiledMethod.extension/properties.json delete mode 100644 repository/Seaside-Pharo-Development.package/InstructionStream.extension/instance/traversableInstVarIndexes.st create mode 100644 repository/Seaside-Pharo-Development.package/InstructionStream.extension/instance/traverseWithMemory.seen..st delete mode 100644 repository/Seaside-Pharo-Development.package/Object.extension/instance/traversableIndexableVarIndexes.st delete mode 100644 repository/Seaside-Pharo-Development.package/Object.extension/instance/traversableInstVarIndexes.st create mode 100644 repository/Seaside-Pharo-Development.package/Process.extension/instance/traverseWithMemory.seen..st create mode 100644 repository/Seaside-Pharo-Development.package/Process.extension/properties.json create mode 100644 repository/Seaside-Pharo-Development.package/Symbol.extension/instance/traverseWithMemory.seen..st create mode 100644 repository/Seaside-Pharo-Development.package/Symbol.extension/properties.json create mode 100644 repository/Seaside-Pharo-Development.package/UndefinedObject.extension/instance/traverseWithMemory.seen..st create mode 100644 repository/Seaside-Pharo-Development.package/UndefinedObject.extension/properties.json delete mode 100644 repository/Seaside-Pharo-Development.package/WAMemory.class/class/initialize.st create mode 100644 repository/Seaside-Pharo-Development.package/WAMemory.class/instance/traverseWithMemory.seen..st create mode 100644 repository/Seaside-Pharo-Development.package/WAMemoryItem.class/instance/traverseWithMemory.seen..st diff --git a/repository/Seaside-Pharo-Development.package/Behavior.extension/instance/traverseWithMemory.seen..st b/repository/Seaside-Pharo-Development.package/Behavior.extension/instance/traverseWithMemory.seen..st new file mode 100644 index 000000000..8b7294bf2 --- /dev/null +++ b/repository/Seaside-Pharo-Development.package/Behavior.extension/instance/traverseWithMemory.seen..st @@ -0,0 +1,4 @@ +*Seaside-Pharo-Development +traverseWithMemory: aMemory seen: anIdentitySet + "classes are in the global pool, ignore counting them" + anIdentitySet add: self \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/Behavior.extension/properties.json b/repository/Seaside-Pharo-Development.package/Behavior.extension/properties.json new file mode 100644 index 000000000..c4116c4cb --- /dev/null +++ b/repository/Seaside-Pharo-Development.package/Behavior.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "Behavior" +} \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/Boolean.extension/instance/traverseWithMemory.seen..st b/repository/Seaside-Pharo-Development.package/Boolean.extension/instance/traverseWithMemory.seen..st new file mode 100644 index 000000000..3ec98304e --- /dev/null +++ b/repository/Seaside-Pharo-Development.package/Boolean.extension/instance/traverseWithMemory.seen..st @@ -0,0 +1,4 @@ +*Seaside-Pharo-Development +traverseWithMemory: aMemory seen: anIdentitySet + "booleans are singletons, ignore counting them" + anIdentitySet add: self \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/Boolean.extension/properties.json b/repository/Seaside-Pharo-Development.package/Boolean.extension/properties.json new file mode 100644 index 000000000..dd25360a7 --- /dev/null +++ b/repository/Seaside-Pharo-Development.package/Boolean.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "Boolean" +} \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/CompiledBlock.extension/instance/traverseWithMemory.seen..st b/repository/Seaside-Pharo-Development.package/CompiledBlock.extension/instance/traverseWithMemory.seen..st new file mode 100644 index 000000000..2ea063bbe --- /dev/null +++ b/repository/Seaside-Pharo-Development.package/CompiledBlock.extension/instance/traverseWithMemory.seen..st @@ -0,0 +1,6 @@ +*Seaside-Pharo-Development +traverseWithMemory: aMemory seen: anIdentitySet + "blocks can be stored in collections and instance variables + Report but don't intropect them. This may miss reporting catured variables." + aMemory accumulate: self. + anIdentitySet add: self \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/CompiledBlock.extension/properties.json b/repository/Seaside-Pharo-Development.package/CompiledBlock.extension/properties.json new file mode 100644 index 000000000..948ac9fc2 --- /dev/null +++ b/repository/Seaside-Pharo-Development.package/CompiledBlock.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "CompiledBlock" +} \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/CompiledMethod.extension/instance/traverseWithMemory.seen..st b/repository/Seaside-Pharo-Development.package/CompiledMethod.extension/instance/traverseWithMemory.seen..st new file mode 100644 index 000000000..edfbf586b --- /dev/null +++ b/repository/Seaside-Pharo-Development.package/CompiledMethod.extension/instance/traverseWithMemory.seen..st @@ -0,0 +1,4 @@ +*Seaside-Pharo-Development +traverseWithMemory: aMemory seen: anIdentitySet + "methods are stored in classes, ignore counting them" + anIdentitySet add: self \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/CompiledMethod.extension/properties.json b/repository/Seaside-Pharo-Development.package/CompiledMethod.extension/properties.json new file mode 100644 index 000000000..c2e466307 --- /dev/null +++ b/repository/Seaside-Pharo-Development.package/CompiledMethod.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "CompiledMethod" +} \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/InstructionStream.extension/instance/traversableInstVarIndexes.st b/repository/Seaside-Pharo-Development.package/InstructionStream.extension/instance/traversableInstVarIndexes.st deleted file mode 100644 index 80dc32e46..000000000 --- a/repository/Seaside-Pharo-Development.package/InstructionStream.extension/instance/traversableInstVarIndexes.st +++ /dev/null @@ -1,6 +0,0 @@ -*Seaside-Pharo-Development -traversableInstVarIndexes - "sender will always get niled out when the stack unwound so won't be captured but - this will not have happened yet for contexts involved in the current request." - ^ super traversableInstVarIndexes copyWithout: - (self class allInstVarNames indexOf: 'sender') \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/InstructionStream.extension/instance/traverseWithMemory.seen..st b/repository/Seaside-Pharo-Development.package/InstructionStream.extension/instance/traverseWithMemory.seen..st new file mode 100644 index 000000000..4beff43ad --- /dev/null +++ b/repository/Seaside-Pharo-Development.package/InstructionStream.extension/instance/traverseWithMemory.seen..st @@ -0,0 +1,7 @@ +*Seaside-Pharo-Development +traverseWithMemory: aMemory seen: anIdentitySet + "we only have two instance variables: + - sender which we ignore because will always get niled out when the stack unwound so won't be captured but this will not have happened yet for contexts involved in the current request + - pc with is a SmallInteger and therefore immediate" + aMemory accumulate: self. + anIdentitySet add: self \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/Object.extension/instance/traversableIndexableVarIndexes.st b/repository/Seaside-Pharo-Development.package/Object.extension/instance/traversableIndexableVarIndexes.st deleted file mode 100644 index 604a6df93..000000000 --- a/repository/Seaside-Pharo-Development.package/Object.extension/instance/traversableIndexableVarIndexes.st +++ /dev/null @@ -1,3 +0,0 @@ -*Seaside-Pharo-Development -traversableIndexableVarIndexes - ^ 1 to: self basicSize \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/Object.extension/instance/traversableInstVarIndexes.st b/repository/Seaside-Pharo-Development.package/Object.extension/instance/traversableInstVarIndexes.st deleted file mode 100644 index fc2fa7dd6..000000000 --- a/repository/Seaside-Pharo-Development.package/Object.extension/instance/traversableInstVarIndexes.st +++ /dev/null @@ -1,3 +0,0 @@ -*Seaside-Pharo-Development -traversableInstVarIndexes - ^ 1 to: self class instSize \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/Object.extension/instance/traverseWithMemory.seen..st b/repository/Seaside-Pharo-Development.package/Object.extension/instance/traverseWithMemory.seen..st index d46e082f7..212be407d 100644 --- a/repository/Seaside-Pharo-Development.package/Object.extension/instance/traverseWithMemory.seen..st +++ b/repository/Seaside-Pharo-Development.package/Object.extension/instance/traverseWithMemory.seen..st @@ -1,13 +1,19 @@ *Seaside-Pharo-Development traverseWithMemory: aMemory seen: anIdentitySet - aMemory accumulate: self. + | traversableInstVarIndexes traversableIndexableVarIndexes | anIdentitySet add: self. - self traversableInstVarIndexes do: [ :index | + self isImmediateObject ifTrue: [ + "don't report immediates" + ^ self ]. + aMemory accumulate: self. + traversableInstVarIndexes := self class instSize. + 1 to: traversableInstVarIndexes do: [ :index | aMemory traverse: self value: (self instVarAt: index) seen: anIdentitySet ]. - self traversableIndexableVarIndexes do: [ :index | + traversableIndexableVarIndexes := self basicSize. + 1 to: traversableIndexableVarIndexes do: [ :index | aMemory traverse: self value: (self basicAt: index) diff --git a/repository/Seaside-Pharo-Development.package/Process.extension/instance/traverseWithMemory.seen..st b/repository/Seaside-Pharo-Development.package/Process.extension/instance/traverseWithMemory.seen..st new file mode 100644 index 000000000..c84b9a58c --- /dev/null +++ b/repository/Seaside-Pharo-Development.package/Process.extension/instance/traverseWithMemory.seen..st @@ -0,0 +1,5 @@ +*Seaside-Pharo-Development +traverseWithMemory: aMemory seen: anIdentitySet + "Process is excluded because otherwise our Semaphores pull them in and the Process is + obviously not held onto by the Semaphore indefinitely." + anIdentitySet add: self \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/Process.extension/properties.json b/repository/Seaside-Pharo-Development.package/Process.extension/properties.json new file mode 100644 index 000000000..fa4274b72 --- /dev/null +++ b/repository/Seaside-Pharo-Development.package/Process.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "Process" +} \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/Symbol.extension/instance/traverseWithMemory.seen..st b/repository/Seaside-Pharo-Development.package/Symbol.extension/instance/traverseWithMemory.seen..st new file mode 100644 index 000000000..07e5a456e --- /dev/null +++ b/repository/Seaside-Pharo-Development.package/Symbol.extension/instance/traverseWithMemory.seen..st @@ -0,0 +1,4 @@ +*Seaside-Pharo-Development +traverseWithMemory: aMemory seen: anIdentitySet + "symbol are in the global table, ignore counting them" + anIdentitySet add: self \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/Symbol.extension/properties.json b/repository/Seaside-Pharo-Development.package/Symbol.extension/properties.json new file mode 100644 index 000000000..8c6bce810 --- /dev/null +++ b/repository/Seaside-Pharo-Development.package/Symbol.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "Symbol" +} \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/UndefinedObject.extension/instance/traverseWithMemory.seen..st b/repository/Seaside-Pharo-Development.package/UndefinedObject.extension/instance/traverseWithMemory.seen..st new file mode 100644 index 000000000..ffa7e3275 --- /dev/null +++ b/repository/Seaside-Pharo-Development.package/UndefinedObject.extension/instance/traverseWithMemory.seen..st @@ -0,0 +1,4 @@ +*Seaside-Pharo-Development +traverseWithMemory: aMemory seen: anIdentitySet + "nil is global, ignore counting it" + anIdentitySet add: self \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/UndefinedObject.extension/properties.json b/repository/Seaside-Pharo-Development.package/UndefinedObject.extension/properties.json new file mode 100644 index 000000000..b2d2e5626 --- /dev/null +++ b/repository/Seaside-Pharo-Development.package/UndefinedObject.extension/properties.json @@ -0,0 +1,3 @@ +{ + "name" : "UndefinedObject" +} \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/WAMemory.class/class/initialize.st b/repository/Seaside-Pharo-Development.package/WAMemory.class/class/initialize.st deleted file mode 100644 index 8bf5e5096..000000000 --- a/repository/Seaside-Pharo-Development.package/WAMemory.class/class/initialize.st +++ /dev/null @@ -1,8 +0,0 @@ -initialization -initialize - "We don't want to include our own data in the mix. - Process is excluded because otherwise our Semaphores pull them in and the Process is - obviously not held onto by the Semaphore indefinitely. - CompiledMethods are basically always going to be around in the image anyway so are - not really session-specific data." - IgnoredClasses := Array with: WAMemory with: WAMemoryItem with: Process with: CompiledMethod \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/WAMemory.class/instance/buildTable.st b/repository/Seaside-Pharo-Development.package/WAMemory.class/instance/buildTable.st index f79e0665e..fab8c52da 100644 --- a/repository/Seaside-Pharo-Development.package/WAMemory.class/instance/buildTable.st +++ b/repository/Seaside-Pharo-Development.package/WAMemory.class/instance/buildTable.st @@ -1,26 +1,31 @@ private buildTable - ^ WATableReport new - rows: instances values; - columns: (Array - with: (WAReportColumn new + | classColumn instanceCountColumn totalSizeColumn | + classColumn := WAReportColumn new title: 'Class'; selector: #name; sortBlock: [ :a :b | a < b ]; - yourself) - with: (WAReportColumn new + yourself. + instanceCountColumn := WAReportColumn new title: 'Instances'; selector: #count; sortBlock: [ :a :b | a > b ]; cssClass: 'right'; hasTotal: true; - yourself) - with: (WAReportColumn new + yourself. + totalSizeColumn := WAReportColumn new title: 'Total Size'; selector: #size; sortBlock: [ :a :b | a > b ]; formatBlock: [ :each | formatter print: each ]; cssClass: 'right'; hasTotal: true; - yourself)); + yourself. + ^ WATableReport new + rows: instances values; + columns: (Array + with: classColumn + with: instanceCountColumn + with: totalSizeColumn); + sortColumn: totalSizeColumn; yourself \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/WAMemory.class/instance/traverse.value.seen..st b/repository/Seaside-Pharo-Development.package/WAMemory.class/instance/traverse.value.seen..st index 0b914a3f4..47bc2d04c 100644 --- a/repository/Seaside-Pharo-Development.package/WAMemory.class/instance/traverse.value.seen..st +++ b/repository/Seaside-Pharo-Development.package/WAMemory.class/instance/traverse.value.seen..st @@ -1,5 +1,5 @@ private traverse: anObject value: aValue seen: anIdentitySet - (aValue isNil or: [ aValue isLiteral or: [ aValue isBehavior or: [ (anIdentitySet includes: aValue) or: [ IgnoredClasses anySatisfy: [ :each | aValue isKindOf: each ] ] ] ] ]) + (aValue isNil or: [ anIdentitySet includes: aValue ]) ifTrue: [ ^ self ]. aValue traverseWithMemory: self seen: anIdentitySet \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/WAMemory.class/instance/traverseWithMemory.seen..st b/repository/Seaside-Pharo-Development.package/WAMemory.class/instance/traverseWithMemory.seen..st new file mode 100644 index 000000000..2479bd491 --- /dev/null +++ b/repository/Seaside-Pharo-Development.package/WAMemory.class/instance/traverseWithMemory.seen..st @@ -0,0 +1,4 @@ +hooks +traverseWithMemory: aMemory seen: anIdentitySet + "don't report self" + anIdentitySet add: self \ No newline at end of file diff --git a/repository/Seaside-Pharo-Development.package/WAMemory.class/properties.json b/repository/Seaside-Pharo-Development.package/WAMemory.class/properties.json index 8b202e453..d109f32b3 100644 --- a/repository/Seaside-Pharo-Development.package/WAMemory.class/properties.json +++ b/repository/Seaside-Pharo-Development.package/WAMemory.class/properties.json @@ -4,9 +4,7 @@ "category" : "Seaside-Pharo-Development-Core", "classinstvars" : [ ], "pools" : [ ], - "classvars" : [ - "IgnoredClasses" - ], + "classvars" : [ ], "instvars" : [ "instances", "table", diff --git a/repository/Seaside-Pharo-Development.package/WAMemoryItem.class/instance/traverseWithMemory.seen..st b/repository/Seaside-Pharo-Development.package/WAMemoryItem.class/instance/traverseWithMemory.seen..st new file mode 100644 index 000000000..2479bd491 --- /dev/null +++ b/repository/Seaside-Pharo-Development.package/WAMemoryItem.class/instance/traverseWithMemory.seen..st @@ -0,0 +1,4 @@ +hooks +traverseWithMemory: aMemory seen: anIdentitySet + "don't report self" + anIdentitySet add: self \ No newline at end of file From d6cd817e4741204a4f05c1464bc24d6daa8c91c0 Mon Sep 17 00:00:00 2001 From: Philippe Marschall Date: Wed, 31 Aug 2022 15:13:29 +0200 Subject: [PATCH 09/24] Handle UTF-16 surrogate pairs in WAJsonParser Fixes #1340 --- .../WAJsonParser.class/README.md | 11 +++++++++-- .../WAJsonParser.class/instance/isHighSurrogate..st | 3 +++ .../WAJsonParser.class/instance/isLowSurrogate..st | 3 +++ .../instance/parseCharacterHex.st | 13 +++++++++++-- .../instance/parseCharacterHexRaw.st | 6 ++++++ .../WAJsonParser.class/properties.json | 2 +- .../instance/supportsEmoji.st | 8 ++++++++ .../instance/testNonBmpCodePoints.st | 12 ++++++++++++ 8 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/isHighSurrogate..st create mode 100644 repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/isLowSurrogate..st create mode 100644 repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/parseCharacterHexRaw.st create mode 100644 repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/supportsEmoji.st create mode 100644 repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/testNonBmpCodePoints.st diff --git a/repository/Seaside-JSON-Core.package/WAJsonParser.class/README.md b/repository/Seaside-JSON-Core.package/WAJsonParser.class/README.md index 5b666aac2..5f9e74e94 100644 --- a/repository/Seaside-JSON-Core.package/WAJsonParser.class/README.md +++ b/repository/Seaside-JSON-Core.package/WAJsonParser.class/README.md @@ -1,3 +1,10 @@ -I am a parser for JSON. It is a bit more forgiving than the standard and allows any kind of top level element except numbers, not just {} and []. See http://www.json.org/ for details. +I am a parser for JSON. I follow RFC-8259 / ECMA-404 and allow any kind of value as a root object. -I can be subclasses to create more sophisticated objects than just Arrays and Dictionaries. To do that, override the one or more methods in the creating protocol. \ No newline at end of file +I convert surrogate pairs to a single code point. + +I can be subclassed to create more sophisticated objects than just Arrays and Dictionaries. To do that, override the one or more methods in the "creating" protocol. + +See +https://datatracker.ietf.org/doc/html/rfc8259 +https://www.ecma-international.org/publications-and-standards/standards/ecma-404/ +https://datatracker.ietf.org/doc/html/rfc4627 \ No newline at end of file diff --git a/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/isHighSurrogate..st b/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/isHighSurrogate..st new file mode 100644 index 000000000..ae207453e --- /dev/null +++ b/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/isHighSurrogate..st @@ -0,0 +1,3 @@ +private +isHighSurrogate: anInteger + ^ anInteger between: 16rD800 and: 16rDBFF \ No newline at end of file diff --git a/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/isLowSurrogate..st b/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/isLowSurrogate..st new file mode 100644 index 000000000..31a195d55 --- /dev/null +++ b/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/isLowSurrogate..st @@ -0,0 +1,3 @@ +private +isLowSurrogate: anInteger + ^ anInteger between: 16rDC00 and: 16rDFFF \ No newline at end of file diff --git a/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/parseCharacterHex.st b/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/parseCharacterHex.st index c13d8034f..00f13fc13 100644 --- a/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/parseCharacterHex.st +++ b/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/parseCharacterHex.st @@ -1,6 +1,15 @@ parsing-internal parseCharacterHex | value | - value := self parseCharacterHexDigit. - 3 timesRepeat: [ value := (value << 4) + self parseCharacterHexDigit ]. + value := self parseCharacterHexRaw. + (self isHighSurrogate: value) ifTrue: [ + | lowSurrogate | + self expectChar: $\. + self expectChar: $u. + lowSurrogate := self parseCharacterHexRaw. + (self isLowSurrogate: lowSurrogate) ifFalse: [ + ^ self error: 'low surrogate expected' ]. + value := 16r10000 + + ((value - 16rD800 bitShift: 10) + bitOr: (lowSurrogate - 16rDC00)) ]. ^ Character codePoint: value \ No newline at end of file diff --git a/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/parseCharacterHexRaw.st b/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/parseCharacterHexRaw.st new file mode 100644 index 000000000..8f4361bf8 --- /dev/null +++ b/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/parseCharacterHexRaw.st @@ -0,0 +1,6 @@ +parsing-internal +parseCharacterHexRaw + | value | + value := self parseCharacterHexDigit. + 3 timesRepeat: [ value := (value << 4) + self parseCharacterHexDigit ]. + ^ value \ No newline at end of file diff --git a/repository/Seaside-JSON-Core.package/WAJsonParser.class/properties.json b/repository/Seaside-JSON-Core.package/WAJsonParser.class/properties.json index 7160d8f19..9964c018e 100644 --- a/repository/Seaside-JSON-Core.package/WAJsonParser.class/properties.json +++ b/repository/Seaside-JSON-Core.package/WAJsonParser.class/properties.json @@ -1,5 +1,5 @@ { - "commentStamp" : "lr 12/31/2009 23:56", + "commentStamp" : "pmm 8/31/2022 15:08", "super" : "WAObject", "category" : "Seaside-JSON-Core-Parser", "classinstvars" : [ ], diff --git a/repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/supportsEmoji.st b/repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/supportsEmoji.st new file mode 100644 index 000000000..ed5e3afd2 --- /dev/null +++ b/repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/supportsEmoji.st @@ -0,0 +1,8 @@ +utilities +supportsEmoji + ^ [ String + with: (Character codePoint: 16r1F1F3) "Regional Indicator Symbol Letter N" + with: (Character codePoint: 16r1F1F1). "Regional Indicator Symbol Letter L" + true ] + on: Error + do: [ :error | false ] \ No newline at end of file diff --git a/repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/testNonBmpCodePoints.st b/repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/testNonBmpCodePoints.st new file mode 100644 index 000000000..f5691a8c7 --- /dev/null +++ b/repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/testNonBmpCodePoints.st @@ -0,0 +1,12 @@ +tests-literals +testNonBmpCodePoints + | parsed | + self supportsEmoji ifFalse: [ + ^ self ]. + + "duch flag as two surrogate pairs" + parsed := self parse: '"\uD83C\uDDF3\uD83C\uDDF1"'. + + self assert: parsed size = 2. + self assert: parsed first codePoint = 16r1F1F3. "Regional Indicator Symbol Letter N" + self assert: parsed second codePoint = 16r1F1F1 "Regional Indicator Symbol Letter l" \ No newline at end of file From d9e42d8cc7ad3a78e5ab58c4967324dd44a1b9ed Mon Sep 17 00:00:00 2001 From: Philippe Marschall Date: Thu, 1 Sep 2022 12:59:30 +0200 Subject: [PATCH 10/24] Review comments --- .../WAJsonParserTest.class/instance/testNonBmpCodePoints.st | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/testNonBmpCodePoints.st b/repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/testNonBmpCodePoints.st index f5691a8c7..fd83182ac 100644 --- a/repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/testNonBmpCodePoints.st +++ b/repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/testNonBmpCodePoints.st @@ -4,9 +4,9 @@ testNonBmpCodePoints self supportsEmoji ifFalse: [ ^ self ]. - "duch flag as two surrogate pairs" + "dutch flag as two surrogate pairs" parsed := self parse: '"\uD83C\uDDF3\uD83C\uDDF1"'. self assert: parsed size = 2. self assert: parsed first codePoint = 16r1F1F3. "Regional Indicator Symbol Letter N" - self assert: parsed second codePoint = 16r1F1F1 "Regional Indicator Symbol Letter l" \ No newline at end of file + self assert: parsed second codePoint = 16r1F1F1 "Regional Indicator Symbol Letter L" \ No newline at end of file From bde8a296eba238433654d412b835810bcf01f599 Mon Sep 17 00:00:00 2001 From: Philippe Marschall Date: Thu, 1 Sep 2022 13:43:40 +0200 Subject: [PATCH 11/24] Load ToolBuilder based tools in all Squeak versions --- .../instance/baselinesqueak..st | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/repository/BaselineOfSeaside3.package/BaselineOfSeaside3.class/instance/baselinesqueak..st b/repository/BaselineOfSeaside3.package/BaselineOfSeaside3.class/instance/baselinesqueak..st index be77efe83..0bf62f509 100644 --- a/repository/BaselineOfSeaside3.package/BaselineOfSeaside3.class/instance/baselinesqueak..st +++ b/repository/BaselineOfSeaside3.package/BaselineOfSeaside3.class/instance/baselinesqueak..st @@ -19,13 +19,8 @@ baselinesqueak: spec package: 'Seaside-Tests-Core' with: [ spec includes: #('Seaside-Tests-Squeak-Core') ]; package: 'Seaside-Tests-Squeak-Core' with: [ spec requires: #('Seaside-Squeak-Core' 'Seaside-Tests-Core') ]; package: 'Seaside-Tests-Pharo-Functional' with: [ spec requires: #('Seaside-Tests-Squeak-Core') ]; - package: 'Seaside-Pharo-Email' with: [ spec requires: #('Seaside-Email' 'Seaside-Squeak-Core') ] ]. - - "ToolBuilder based tools" - spec for: #(#'squeak4.6.x' #'squeak5.x') do: [ - spec - package: 'Seaside-Tools-Core' with: [ - spec includes: #('Seaside-Squeak-Tools-Development') ]; - package: 'Seaside-Squeak-Tools-Development' with: [ - spec requires: #('Seaside-Tools-Core') ] - ]. \ No newline at end of file + package: 'Seaside-Pharo-Email' with: [ spec requires: #('Seaside-Email' 'Seaside-Squeak-Core') ]; + + "ToolBuilder based tools" + package: 'Seaside-Tools-Core' with: [ spec includes: #('Seaside-Squeak-Tools-Development') ]; + package: 'Seaside-Squeak-Tools-Development' with: [ spec requires: #('Seaside-Tools-Core') ] ] \ No newline at end of file From a4cd45b2c26a223133c0acfcd2c262667ba7fc5e Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Sun, 4 Sep 2022 15:35:22 +0200 Subject: [PATCH 12/24] Fix WAPharoEncoder following changes in https://github.com/SeasideSt/Grease/pull/144 Bump Seaside version as well (preparing for new release) --- .../GRPlatform.extension/instance/seasideVersion.st | 2 +- .../instance/greaseNext.putAll.startingAt..st | 2 +- .../WAPharoEncoder.class/instance/nextPutAll..st | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/repository/Seaside-Core.package/GRPlatform.extension/instance/seasideVersion.st b/repository/Seaside-Core.package/GRPlatform.extension/instance/seasideVersion.st index 24b35cd89..2b5cc1d1e 100644 --- a/repository/Seaside-Core.package/GRPlatform.extension/instance/seasideVersion.st +++ b/repository/Seaside-Core.package/GRPlatform.extension/instance/seasideVersion.st @@ -2,5 +2,5 @@ seasideVersion "Answer the Seaside version" - ^ (GRVersion major: 3 minor: 4 revision: 8) + ^ (GRVersion major: 3 minor: 5 revision: 0) yourself \ No newline at end of file diff --git a/repository/Seaside-Pharo-Core.package/WAPharoEncoder.class/instance/greaseNext.putAll.startingAt..st b/repository/Seaside-Pharo-Core.package/WAPharoEncoder.class/instance/greaseNext.putAll.startingAt..st index c6c4ced87..f8d7531af 100644 --- a/repository/Seaside-Pharo-Core.package/WAPharoEncoder.class/instance/greaseNext.putAll.startingAt..st +++ b/repository/Seaside-Pharo-Core.package/WAPharoEncoder.class/instance/greaseNext.putAll.startingAt..st @@ -1,5 +1,5 @@ accessing greaseNext: anInteger putAll: aCollection startingAt: startIndex - aCollection isByteString + (aCollection isString and: [ aCollection isByteString ]) ifTrue: [ self greaseNext: anInteger putAllFast: aCollection startingAt: startIndex ] ifFalse: [ delegate greaseNext: anInteger putAll: aCollection startingAt: startIndex ] \ No newline at end of file diff --git a/repository/Seaside-Pharo-Core.package/WAPharoEncoder.class/instance/nextPutAll..st b/repository/Seaside-Pharo-Core.package/WAPharoEncoder.class/instance/nextPutAll..st index 0ea70376c..74ec96e69 100644 --- a/repository/Seaside-Pharo-Core.package/WAPharoEncoder.class/instance/nextPutAll..st +++ b/repository/Seaside-Pharo-Core.package/WAPharoEncoder.class/instance/nextPutAll..st @@ -1,6 +1,6 @@ accessing nextPutAll: aString - aString isByteString + (aString isString and: [ aString isByteString ]) ifTrue: [ self nextPutAllFast: aString ] ifFalse: [ "slow fall back for WideStrings" From c1d311e963403a790592e9036568debb349da7fb Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Fri, 9 Sep 2022 17:39:03 +0200 Subject: [PATCH 13/24] Added tests for WAJsonParser surrogate pair handling and fixed case where a lowSurrogate value would be the first surrogate in the string --- .../instance/parseCharacterHex.st | 5 ++--- .../instance/testSurrogatePairs.st | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/testSurrogatePairs.st diff --git a/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/parseCharacterHex.st b/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/parseCharacterHex.st index 00f13fc13..8b621e64c 100644 --- a/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/parseCharacterHex.st +++ b/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/parseCharacterHex.st @@ -9,7 +9,6 @@ parseCharacterHex lowSurrogate := self parseCharacterHexRaw. (self isLowSurrogate: lowSurrogate) ifFalse: [ ^ self error: 'low surrogate expected' ]. - value := 16r10000 + - ((value - 16rD800 bitShift: 10) - bitOr: (lowSurrogate - 16rDC00)) ]. + value := 16r10000 + ((value - 16rD800 bitShift: 10) bitOr: (lowSurrogate - 16rDC00)) ]. + (self isLowSurrogate: value) ifTrue:[ self error: 'high surrogate expected' ]. ^ Character codePoint: value \ No newline at end of file diff --git a/repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/testSurrogatePairs.st b/repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/testSurrogatePairs.st new file mode 100644 index 000000000..9f8ed11fe --- /dev/null +++ b/repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/testSurrogatePairs.st @@ -0,0 +1,21 @@ +tests-invalid +testSurrogatePairs + "Tests JSJsonParser, in particular the handling of \uXXXX\uXXXX sequences that + form surrogate pairs (see: https://tools.ietf.org/html/rfc7159#section-7)." + + self assert: (WAJsonParser parse: '"\uD800\uDC00"') equals: (String with: (Character codePoint: 16r10000)). + self assert: (WAJsonParser parse: '"\uD834\uDD1E"') equals: (String with: (Character codePoint: 16r1D11E)). + self assert: (WAJsonParser parse: '"\uDBFF\uDFFF"') equals: (String with: (Character codePoint: 16r10FFFF)). + self assert: (WAJsonParser parse: '"\uD7FF\uD800\uDC00\uE000"') equals: + (String with: (Character codePoint: 16rD7FF) with: (Character codePoint: 16r10000) with: (Character codePoint: 16rE000)). + + self should: [ WAJsonParser parse: '"\uD800"' ] raise: WAJsonSyntaxError. + self should: [ WAJsonParser parse: '"\uDEAD"' ] raise: WAJsonSyntaxError. + self should: [ WAJsonParser parse: '"\uDBFF"' ] raise: WAJsonSyntaxError. + self should: [ WAJsonParser parse: '"\uDC00"' ] raise: WAJsonSyntaxError. + self should: [ WAJsonParser parse: '"\uDFFF"' ] raise: WAJsonSyntaxError. + self should: [ WAJsonParser parse: '"\uD800\uDBFF"' ] raise: WAJsonSyntaxError. + self should: [ WAJsonParser parse: '"\uD800\uE000"' ] raise: WAJsonSyntaxError. + self should: [ WAJsonParser parse: '"\uD800\DC00"' ] raise: WAJsonSyntaxError. + self should: [ WAJsonParser parse: '"\uD800DC00"' ] raise: WAJsonSyntaxError. + From c547682bfdcfe4aab7c06189e079c6eff3bd0ea8 Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Sat, 10 Sep 2022 10:40:12 +0200 Subject: [PATCH 14/24] update comment in test --- .../WAJsonParserTest.class/instance/testSurrogatePairs.st | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/testSurrogatePairs.st b/repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/testSurrogatePairs.st index 9f8ed11fe..c87f6f26c 100644 --- a/repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/testSurrogatePairs.st +++ b/repository/Seaside-Tests-JSON.package/WAJsonParserTest.class/instance/testSurrogatePairs.st @@ -1,7 +1,7 @@ tests-invalid testSurrogatePairs - "Tests JSJsonParser, in particular the handling of \uXXXX\uXXXX sequences that - form surrogate pairs (see: https://tools.ietf.org/html/rfc7159#section-7)." + "Tests the handling of \uXXXX\uXXXX sequences that form surrogate pairs + (see: https://www.rfc-editor.org/rfc/rfc8259#section-7)." self assert: (WAJsonParser parse: '"\uD800\uDC00"') equals: (String with: (Character codePoint: 16r10000)). self assert: (WAJsonParser parse: '"\uD834\uDD1E"') equals: (String with: (Character codePoint: 16r1D11E)). From fa919636219e367a411240628106b26d2ff2f3cc Mon Sep 17 00:00:00 2001 From: Philippe Marschall Date: Mon, 12 Sep 2022 17:10:27 +0200 Subject: [PATCH 15/24] Format code and factor out method --- .../createCodePointFromSurrogatesHigh.low..st | 3 +++ .../instance/parseCharacterHex.st | 21 +++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/createCodePointFromSurrogatesHigh.low..st diff --git a/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/createCodePointFromSurrogatesHigh.low..st b/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/createCodePointFromSurrogatesHigh.low..st new file mode 100644 index 000000000..b154c6e9b --- /dev/null +++ b/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/createCodePointFromSurrogatesHigh.low..st @@ -0,0 +1,3 @@ +parsing-internal +createCodePointFromSurrogatesHigh: aHighInteger low: aLowInteger + ^ 16r10000 + ((aHighInteger - 16rD800 bitShift: 10) bitOr: (aLowInteger - 16rDC00)) \ No newline at end of file diff --git a/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/parseCharacterHex.st b/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/parseCharacterHex.st index 8b621e64c..5dfb87810 100644 --- a/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/parseCharacterHex.st +++ b/repository/Seaside-JSON-Core.package/WAJsonParser.class/instance/parseCharacterHex.st @@ -2,13 +2,16 @@ parsing-internal parseCharacterHex | value | value := self parseCharacterHexRaw. - (self isHighSurrogate: value) ifTrue: [ - | lowSurrogate | - self expectChar: $\. - self expectChar: $u. - lowSurrogate := self parseCharacterHexRaw. - (self isLowSurrogate: lowSurrogate) ifFalse: [ - ^ self error: 'low surrogate expected' ]. - value := 16r10000 + ((value - 16rD800 bitShift: 10) bitOr: (lowSurrogate - 16rDC00)) ]. - (self isLowSurrogate: value) ifTrue:[ self error: 'high surrogate expected' ]. + (self isHighSurrogate: value) + ifTrue: [ + | lowSurrogate | + self expectChar: $\. + self expectChar: $u. + lowSurrogate := self parseCharacterHexRaw. + (self isLowSurrogate: lowSurrogate) ifFalse: [ + ^ self error: 'low surrogate expected' ]. + value := self createCodePointFromSurrogatesHigh: value low: lowSurrogate ] + ifFalse: [ + (self isLowSurrogate: value) + ifTrue: [ self error: 'unexpected low surrogate' ] ]. ^ Character codePoint: value \ No newline at end of file From 5a2cbc1a61030b5fa290785e08ffcbabf253db07 Mon Sep 17 00:00:00 2001 From: Philippe Marschall Date: Thu, 25 Aug 2022 15:28:33 +0200 Subject: [PATCH 16/24] Port Ajaxifier to modern JavaScript - Remove dependency on jQuery - Remove dedicated code in render phase continuation --- .../instance/baselinejavascript..st | 9 +- .../instance/baselinejquery..st | 2 +- .../instance/ajaxifierJs.st | 84 ------------------- .../class/initialize.st | 2 +- .../Seaside-Ajaxifier-Core.package/.filetree | 5 ++ .../WAAjaxifierLibrary.class/README.md | 1 + .../instance/ajaxifierJs.st | 80 ++++++++++++++++++ .../instance/selectorsToInclude.st | 0 .../WAAjaxifierLibrary.class}/properties.json | 6 +- .../monticello.meta/categories.st | 1 + .../monticello.meta/initializers.st} | 0 .../monticello.meta/package | 1 + .../properties.json | 1 + .../instance/addRedirectedToHeader..st | 7 -- .../instance/handleFiltered..st | 1 - 15 files changed, 100 insertions(+), 100 deletions(-) delete mode 100644 repository/JQuery-Core.package/JQAjaxifierLibrary.class/instance/ajaxifierJs.st create mode 100644 repository/Seaside-Ajaxifier-Core.package/.filetree create mode 100644 repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/README.md create mode 100644 repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/instance/ajaxifierJs.st rename repository/{JQuery-Core.package/JQAjaxifierLibrary.class => Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class}/instance/selectorsToInclude.st (100%) rename repository/{JQuery-Core.package/JQAjaxifierLibrary.class => Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class}/properties.json (53%) create mode 100644 repository/Seaside-Ajaxifier-Core.package/monticello.meta/categories.st rename repository/{JQuery-Core.package/JQAjaxifierLibrary.class/README.md => Seaside-Ajaxifier-Core.package/monticello.meta/initializers.st} (100%) create mode 100644 repository/Seaside-Ajaxifier-Core.package/monticello.meta/package create mode 100644 repository/Seaside-Ajaxifier-Core.package/properties.json delete mode 100644 repository/Seaside-RenderLoop.package/WARenderPhaseContinuation.class/instance/addRedirectedToHeader..st diff --git a/repository/BaselineOfSeaside3.package/BaselineOfSeaside3.class/instance/baselinejavascript..st b/repository/BaselineOfSeaside3.package/BaselineOfSeaside3.class/instance/baselinejavascript..st index 8de01f269..2d353935c 100644 --- a/repository/BaselineOfSeaside3.package/BaselineOfSeaside3.class/instance/baselinejavascript..st +++ b/repository/BaselineOfSeaside3.package/BaselineOfSeaside3.class/instance/baselinejavascript..st @@ -7,11 +7,14 @@ baselinejavascript: spec package: 'Javascript-Core' with: [ spec requires: #('Seaside-Core' 'Seaside-Canvas' ) ]; package: 'Javascript-Tests-Core' with: [ - spec requires: #('Javascript-Core' 'Seaside-Tests-Core' ) ]. + spec requires: #('Javascript-Core' 'Seaside-Tests-Core' ) ]; + package: 'Seaside-Ajaxifier-Core' with: [ + spec requires: #('Seaside-Core') ]. spec group: 'Javascript' with: #('Javascript-Core'); group: 'Javascript Tests' with: #('Javascript-Tests-Core' ); - group: 'Tests' with: #( 'Javascript Tests' ) ]. + group: 'Tests' with: #( 'Javascript Tests' ); + group: 'Ajaxifier' with: #( 'Seaside-Ajaxifier-Core' ) ]. spec for: #squeak do: [ spec @@ -47,4 +50,4 @@ baselinejavascript: spec package: 'Javascript-Core' with: [ spec includes: #('Javascript-GemStone-Core') ]; package: 'Javascript-GemStone-Core' - with: [ spec requires: #('Javascript-Core') ] ]. \ No newline at end of file + with: [ spec requires: #('Javascript-Core') ] ]. diff --git a/repository/BaselineOfSeaside3.package/BaselineOfSeaside3.class/instance/baselinejquery..st b/repository/BaselineOfSeaside3.package/BaselineOfSeaside3.class/instance/baselinejquery..st index ad9b9bd09..ddc8c3b40 100644 --- a/repository/BaselineOfSeaside3.package/BaselineOfSeaside3.class/instance/baselinejquery..st +++ b/repository/BaselineOfSeaside3.package/BaselineOfSeaside3.class/instance/baselinejquery..st @@ -7,7 +7,7 @@ baselinejquery: spec package: 'JQuery-Core' with: [ spec requires: #('Javascript-Core' ) ]; package: 'JQuery-Tests-Core' with: [ - spec requires: #('JQuery-Core' 'Javascript-Tests-Core' 'Seaside-Development' 'Seaside-Tests-Functional') ]; + spec requires: #('JQuery-Core' 'Javascript-Tests-Core' 'Seaside-Development' 'Seaside-Tests-Functional' 'Seaside-Ajaxifier-Core') ]; package: 'JQuery-JSON' with: [ spec requires: #('JQuery-Core' 'Seaside-JSON-Core') ]; package: 'JQuery-Tests-JSON' with: [ diff --git a/repository/JQuery-Core.package/JQAjaxifierLibrary.class/instance/ajaxifierJs.st b/repository/JQuery-Core.package/JQAjaxifierLibrary.class/instance/ajaxifierJs.st deleted file mode 100644 index d87ae7198..000000000 --- a/repository/JQuery-Core.package/JQAjaxifierLibrary.class/instance/ajaxifierJs.st +++ /dev/null @@ -1,84 +0,0 @@ -uploads -ajaxifierJs - ^ '/* jQuery based Ajaxifier - * Copyright (c) 2008 Lukas Renggli, renggli@gmail.com - * - * For additional documentation see: - * - http://www.lukas-renggli.ch/blog/ajaxification - * - http://www.lukas-renggli.ch/blog/ajaxification-faq - */ - -$(function () { - - // constants - var HEAD_EXTRACTOR = /]*>((.|\s)*?)<\/head>/im; - var BODY_EXTRACTOR = /]*>((.|\s)*?)<\/body>/im; - var SCRIPT_EXTRACTOR = //ig; - var PARAM_EXTRACTOR = /\?(.*)$/i; - - // variables - var activeHash = ""; - - // ajax action - function load(type, url, data, modifyHistory) { - $.ajax({ - type: type, url: url, data: data, - beforeSend: function (xhr) { - // WAActionCallback per default are disabled for AJAX requests - // Detection happens with X-Requested-With so we override it - xhr.setRequestHeader("X-Requested-With", "Ajaxifier"); - }, - success: function (data, textStatus, jqXHR) { - $("head").html(HEAD_EXTRACTOR - .exec(data)[1] - .replace(SCRIPT_EXTRACTOR, "")); - $("body").html(BODY_EXTRACTOR - .exec(data)[1]); - - if (modifyHistory) { - var path = jqXHR.getResponseHeader("X-RedirectedTo"); - if (typeof(window.history.pushState) == "function") { - window.history.pushState(path, null, path); - } else { - window.location.hash = activeHash = PARAM_EXTRACTOR.exec(path)[1]; - } - } - } - }); - } - - // click handler - $(document).click(function (event) { - - // links - var anchor = $(event.target).closest("a"); - if (anchor.length == 1) { - load("GET", anchor.attr("href"), null, true); - event.preventDefault(); - } - - // submit - var submit = $(event.target).closest("input[type=submit], button[type=submit]"); - if (submit.length == 1) { - var form = submit.closest("form"); - if (form.length == 1) { - load("POST", form.attr("action"), form.find(":input").serialize() + "&" + submit.attr("name"), true); - event.preventDefault(); - } - } - - }); - - // check for changes in the hash - setInterval(function () { - var currentHash = window.location.hash.substr(1); - if (currentHash != activeHash) - load("GET", "?" + (activeHash = currentHash), null, true); - }, 250); - - // We assume nobody else will override onpopstate... since we are LIKELY the only ones to use pushstate etc. - window.onpopstate = function(event) { - load("GET", event.state, null, false); - } - -});' \ No newline at end of file diff --git a/repository/JQuery-Tests-Core.package/JQAllFunctionalTests.class/class/initialize.st b/repository/JQuery-Tests-Core.package/JQAllFunctionalTests.class/class/initialize.st index c80094500..81f5dfb5f 100644 --- a/repository/JQuery-Tests-Core.package/JQAllFunctionalTests.class/class/initialize.st +++ b/repository/JQuery-Tests-Core.package/JQAllFunctionalTests.class/class/initialize.st @@ -12,4 +12,4 @@ initialize application preferenceAt: #sessionClass put: WAExpirySession; addLibrary: JQDeploymentLibrary; - addLibrary: JQAjaxifierLibrary \ No newline at end of file + addLibrary: WAAjaxifierLibrary \ No newline at end of file diff --git a/repository/Seaside-Ajaxifier-Core.package/.filetree b/repository/Seaside-Ajaxifier-Core.package/.filetree new file mode 100644 index 000000000..57a679737 --- /dev/null +++ b/repository/Seaside-Ajaxifier-Core.package/.filetree @@ -0,0 +1,5 @@ +{ + "separateMethodMetaAndSource" : false, + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/README.md b/repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/README.md new file mode 100644 index 000000000..4f43824e2 --- /dev/null +++ b/repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/README.md @@ -0,0 +1 @@ +I ajaxify a web application by turning full page requests into background AJAX requests. \ No newline at end of file diff --git a/repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/instance/ajaxifierJs.st b/repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/instance/ajaxifierJs.st new file mode 100644 index 000000000..71983e1d5 --- /dev/null +++ b/repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/instance/ajaxifierJs.st @@ -0,0 +1,80 @@ +uploads +ajaxifierJs + ^ '/* JavaScript based Ajaxifier + * Copyright (c) 2008 Lukas Renggli, renggli@gmail.com + * Copyright (c) 2022 Philippe Marschall, philippe.marschall@gmail.com + */ + +window.addEventListener("DOMContentLoaded", (loadEvent) => { + + // variables + let activeHash = ""; + + // ajax action + function load(type, url, data, modifyHistory) { + const xhr = new XMLHttpRequest(); + + xhr.responseType = "document" + xhr.addEventListener("load", (event) => { + if (xhr.status === 200) { + Array.from(xhr.response.head.children).forEach((child) => { + if (child.nodeType === Node.ELEMENT_NODE && child.nodeName === "SCRIPT") { + child.remove(); + } + }); + document.head.innerHTML = xhr.response.head; + document.body = xhr.response.body; + + if (modifyHistory) { + const path = xhr.responseURL; + window.history.pushState(path, null, path); + } + } + }); + + xhr.open(type, url); + + // WAActionCallback per default are disabled for AJAX requests + // Detection happens with X-Requested-With so we override it + xhr.setRequestHeader("X-Requested-With", "Ajaxifier"); + xhr.send(data); + } + + // click handler + document.addEventListener("click", (event) => { + + // links + const anchor = event.target.closest("a"); + if (anchor !== null) { + load("GET", anchor.getAttribute("href"), null, true); + event.preventDefault(); + return; + } + + // submit + const submit = event.target.closest("input[type=submit], button[type=submit]"); + if (submit !== null) { + const form = submit.closest("form"); + if (form !== null) { + const formData = new FormData(form); + formData.append(submit.getAttribute("name"), ""); + load("POST", form.getAttribute("action"), formData, true); + event.preventDefault(); + } + } + + }); + + // check for changes in the hash + setInterval(() => { + const currentHash = window.location.hash.substr(1); + if (currentHash !== activeHash) + load("GET", "?" + (activeHash = currentHash), null, true); + }, 250); + + // We assume nobody else will override onpopstate... since we are LIKELY the only ones to use pushstate etc. + window.onpopstate = (event) => { + load("GET", event.state, null, false); + } + +});' \ No newline at end of file diff --git a/repository/JQuery-Core.package/JQAjaxifierLibrary.class/instance/selectorsToInclude.st b/repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/instance/selectorsToInclude.st similarity index 100% rename from repository/JQuery-Core.package/JQAjaxifierLibrary.class/instance/selectorsToInclude.st rename to repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/instance/selectorsToInclude.st diff --git a/repository/JQuery-Core.package/JQAjaxifierLibrary.class/properties.json b/repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/properties.json similarity index 53% rename from repository/JQuery-Core.package/JQAjaxifierLibrary.class/properties.json rename to repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/properties.json index c0b419d27..cbcda70d0 100644 --- a/repository/JQuery-Core.package/JQAjaxifierLibrary.class/properties.json +++ b/repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/properties.json @@ -1,11 +1,11 @@ { - "commentStamp" : "", + "commentStamp" : "pmm 8/25/2022 15:03", "super" : "WAFileLibrary", - "category" : "JQuery-Core-Libraries", + "category" : "Seaside-Ajaxifier-Core", "classinstvars" : [ ], "pools" : [ ], "classvars" : [ ], "instvars" : [ ], - "name" : "JQAjaxifierLibrary", + "name" : "WAAjaxifierLibrary", "type" : "normal" } \ No newline at end of file diff --git a/repository/Seaside-Ajaxifier-Core.package/monticello.meta/categories.st b/repository/Seaside-Ajaxifier-Core.package/monticello.meta/categories.st new file mode 100644 index 000000000..2492bba15 --- /dev/null +++ b/repository/Seaside-Ajaxifier-Core.package/monticello.meta/categories.st @@ -0,0 +1 @@ +SystemOrganization addCategory: #'Seaside-Ajaxifier-Core'! diff --git a/repository/JQuery-Core.package/JQAjaxifierLibrary.class/README.md b/repository/Seaside-Ajaxifier-Core.package/monticello.meta/initializers.st similarity index 100% rename from repository/JQuery-Core.package/JQAjaxifierLibrary.class/README.md rename to repository/Seaside-Ajaxifier-Core.package/monticello.meta/initializers.st diff --git a/repository/Seaside-Ajaxifier-Core.package/monticello.meta/package b/repository/Seaside-Ajaxifier-Core.package/monticello.meta/package new file mode 100644 index 000000000..2fa226473 --- /dev/null +++ b/repository/Seaside-Ajaxifier-Core.package/monticello.meta/package @@ -0,0 +1 @@ +(name 'Seaside-Ajaxifier-Core') \ No newline at end of file diff --git a/repository/Seaside-Ajaxifier-Core.package/properties.json b/repository/Seaside-Ajaxifier-Core.package/properties.json new file mode 100644 index 000000000..6f31cf5a2 --- /dev/null +++ b/repository/Seaside-Ajaxifier-Core.package/properties.json @@ -0,0 +1 @@ +{ } \ No newline at end of file diff --git a/repository/Seaside-RenderLoop.package/WARenderPhaseContinuation.class/instance/addRedirectedToHeader..st b/repository/Seaside-RenderLoop.package/WARenderPhaseContinuation.class/instance/addRedirectedToHeader..st deleted file mode 100644 index 964d80625..000000000 --- a/repository/Seaside-RenderLoop.package/WARenderPhaseContinuation.class/instance/addRedirectedToHeader..st +++ /dev/null @@ -1,7 +0,0 @@ -processing -addRedirectedToHeader: aRequestContext - "The Ajaxifier needs to know the URL of the render continuation (in order to save it). - Unfortunately the redirect from the action to the render continuation happens totally transparently to the JavaScript. - So we add a custom header to the response so that the JavaScript can find out the URL of the render continuation." - (aRequestContext request headerAt: 'x-requested-with') = 'Ajaxifier' ifTrue: [ - aRequestContext response headerAt: 'X-RedirectedTo' put: aRequestContext request url greaseString ] \ No newline at end of file diff --git a/repository/Seaside-RenderLoop.package/WARenderPhaseContinuation.class/instance/handleFiltered..st b/repository/Seaside-RenderLoop.package/WARenderPhaseContinuation.class/instance/handleFiltered..st index 425cf16da..ce5e89436 100644 --- a/repository/Seaside-RenderLoop.package/WARenderPhaseContinuation.class/instance/handleFiltered..st +++ b/repository/Seaside-RenderLoop.package/WARenderPhaseContinuation.class/instance/handleFiltered..st @@ -1,6 +1,5 @@ handling handleFiltered: aRequestContext - self addRedirectedToHeader: aRequestContext. self respond: [ :response | self processRendering: response ]. "The render phase should have returned a response" From 85d0623c966662ec8031e8745b28ebdad058c7ff Mon Sep 17 00:00:00 2001 From: Philippe Marschall Date: Thu, 25 Aug 2022 16:42:14 +0200 Subject: [PATCH 17/24] Use strict mode --- .../WAAjaxifierLibrary.class/instance/ajaxifierJs.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/instance/ajaxifierJs.st b/repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/instance/ajaxifierJs.st index 71983e1d5..b7de2e3bf 100644 --- a/repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/instance/ajaxifierJs.st +++ b/repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/instance/ajaxifierJs.st @@ -4,7 +4,7 @@ ajaxifierJs * Copyright (c) 2008 Lukas Renggli, renggli@gmail.com * Copyright (c) 2022 Philippe Marschall, philippe.marschall@gmail.com */ - +"use strict"; window.addEventListener("DOMContentLoaded", (loadEvent) => { // variables From 262d49c013731ebcf2acb71d7e71f4ab02d74927 Mon Sep 17 00:00:00 2001 From: Philippe Marschall Date: Mon, 12 Sep 2022 17:38:00 +0200 Subject: [PATCH 18/24] Fix head rendering --- .../WAAjaxifierLibrary.class/instance/ajaxifierJs.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/instance/ajaxifierJs.st b/repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/instance/ajaxifierJs.st index b7de2e3bf..49758ebb4 100644 --- a/repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/instance/ajaxifierJs.st +++ b/repository/Seaside-Ajaxifier-Core.package/WAAjaxifierLibrary.class/instance/ajaxifierJs.st @@ -22,7 +22,7 @@ window.addEventListener("DOMContentLoaded", (loadEvent) => { child.remove(); } }); - document.head.innerHTML = xhr.response.head; + document.head.innerHTML = xhr.response.head.innerHTML; document.body = xhr.response.body; if (modifyHistory) { From 03047288c00f2ee6cd4737114c1857d3969b8d29 Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Sun, 13 Nov 2022 11:23:29 +0100 Subject: [PATCH 19/24] Gettext: fix for issue https://github.com/SeasideSt/Grease/issues/146 and some improvements for creating translators from manually created MOFile instances (cherry picked from commit 81db800a20c754bdefc0c4f7c4dbc25dbdf3e20f) --- .../Seaside-Gettext-Core.package/.filetree | 5 ++-- .../GRPackage.extension/properties.json | 3 +- .../GRPlatform.extension/properties.json | 3 +- .../properties.json | 19 ++++++------- .../properties.json | 19 ++++++------- .../properties.json | 19 ++++++------- .../String.extension/properties.json | 3 +- .../WAApplication.extension/properties.json | 3 +- .../properties.json | 19 ++++++------- .../properties.json | 19 ++++++------- .../class/addTranslator.for..st | 6 ++++ .../class/addTranslatorFor.fromFiles..st | 6 ++++ .../class/addTranslatorFor.fromFilesIn..st | 7 +++++ .../class/createTranslatorFor.fromFilesIn..st | 7 ----- .../class/newFromMOFiles..st | 7 +++++ .../instance/addMOFile.forLocaleID..st | 5 ++++ .../instance/addMOFileFromPath.forName..st | 28 +++++++++---------- .../instance/initialize.st | 4 +++ .../initializeFromMOFilesIn.forName..st | 1 - .../WAGetTextTranslator.class/properties.json | 19 +++++++------ .../properties.json | 19 ++++++------- .../properties.json | 19 ++++++------- .../properties.json | 19 ++++++------- .../instance/initializeFromFile.localeId..st | 2 +- .../initializeFromStream.localeId..st | 2 +- .../WAMOFile.class/instance/localeId.st | 3 ++ .../WAMOFile.class/properties.json | 19 +++++++------ .../WARenderer.extension/properties.json | 3 +- .../WASession.extension/properties.json | 3 +- .../properties.json | 3 +- .../class/addTranslatorForExample.st | 14 ++++++++++ .../class/importTranslations.st | 2 +- .../class/removeTranslatorForExample.st | 4 +++ .../instance/loadTranslationFilesFrom..st | 2 +- .../.filetree | 5 ++-- .../testCreateAndRemoveTextTranslator.st | 2 +- ...testTranslateIgnoringCountryUsingLocale.st | 2 +- .../instance/testTranslateUsingLocale.st | 2 +- .../properties.json | 19 ++++++------- .../README.md | 9 ++++++ .../instance/deCHMo.st | 7 +++++ .../instance/deCHMoContent.st | 3 ++ .../instance/frMo.st | 7 +++++ .../instance/frMoContent.st | 3 ++ .../instance/nlBEMo.st | 7 +++++ .../instance/nlBEMoContent.st | 3 ++ .../properties.json | 11 ++++++++ .../instance/setUp.st | 4 +-- .../properties.json | 19 ++++++------- .../WAMOFileTest.class/properties.json | 19 ++++++------- .../properties.json | 3 +- 51 files changed, 261 insertions(+), 180 deletions(-) create mode 100644 repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/addTranslator.for..st create mode 100644 repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/addTranslatorFor.fromFiles..st create mode 100644 repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/addTranslatorFor.fromFilesIn..st delete mode 100644 repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/createTranslatorFor.fromFilesIn..st create mode 100644 repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/newFromMOFiles..st create mode 100644 repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/instance/addMOFile.forLocaleID..st create mode 100644 repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/instance/initialize.st create mode 100644 repository/Seaside-Gettext-Core.package/WAMOFile.class/instance/localeId.st create mode 100644 repository/Seaside-Gettext-Examples.package/WAGettextExample.class/class/addTranslatorForExample.st create mode 100644 repository/Seaside-Gettext-Examples.package/WAGettextExample.class/class/removeTranslatorForExample.st create mode 100644 repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/README.md create mode 100644 repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/deCHMo.st create mode 100644 repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/deCHMoContent.st create mode 100644 repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/frMo.st create mode 100644 repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/frMoContent.st create mode 100644 repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/nlBEMo.st create mode 100644 repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/nlBEMoContent.st create mode 100644 repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/properties.json diff --git a/repository/Seaside-Gettext-Core.package/.filetree b/repository/Seaside-Gettext-Core.package/.filetree index 8998102c2..57a679737 100644 --- a/repository/Seaside-Gettext-Core.package/.filetree +++ b/repository/Seaside-Gettext-Core.package/.filetree @@ -1,4 +1,5 @@ { - "noMethodMetaData" : true, "separateMethodMetaAndSource" : false, - "useCypressPropertiesFile" : true } + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/GRPackage.extension/properties.json b/repository/Seaside-Gettext-Core.package/GRPackage.extension/properties.json index dd2faaf08..ae522a7e0 100644 --- a/repository/Seaside-Gettext-Core.package/GRPackage.extension/properties.json +++ b/repository/Seaside-Gettext-Core.package/GRPackage.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "GRPackage" } + "name" : "GRPackage" +} \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/GRPlatform.extension/properties.json b/repository/Seaside-Gettext-Core.package/GRPlatform.extension/properties.json index 315ae0ef4..b9c3efa28 100644 --- a/repository/Seaside-Gettext-Core.package/GRPlatform.extension/properties.json +++ b/repository/Seaside-Gettext-Core.package/GRPlatform.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "GRPlatform" } + "name" : "GRPlatform" +} \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/GetTextSucessfulTranslationResult.class/properties.json b/repository/Seaside-Gettext-Core.package/GetTextSucessfulTranslationResult.class/properties.json index 46b7a9e43..97202ffd3 100644 --- a/repository/Seaside-Gettext-Core.package/GetTextSucessfulTranslationResult.class/properties.json +++ b/repository/Seaside-Gettext-Core.package/GetTextSucessfulTranslationResult.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Seaside-Gettext-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", - "instvars" : [ - ], - "name" : "GetTextSucessfulTranslationResult", - "pools" : [ - ], "super" : "GetTextTranslationResult", - "type" : "normal" } + "category" : "Seaside-Gettext-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GetTextSucessfulTranslationResult", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/GetTextTranslationResult.class/properties.json b/repository/Seaside-Gettext-Core.package/GetTextTranslationResult.class/properties.json index 4fc0d428a..162b40f56 100644 --- a/repository/Seaside-Gettext-Core.package/GetTextTranslationResult.class/properties.json +++ b/repository/Seaside-Gettext-Core.package/GetTextTranslationResult.class/properties.json @@ -1,15 +1,14 @@ { - "category" : "Seaside-Gettext-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", + "super" : "Object", + "category" : "Seaside-Gettext-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "original", - "translation" ], + "translation" + ], "name" : "GetTextTranslationResult", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/GetTextUnsucessfulTranslationResult.class/properties.json b/repository/Seaside-Gettext-Core.package/GetTextUnsucessfulTranslationResult.class/properties.json index 5be6eaa16..c82ed1f8e 100644 --- a/repository/Seaside-Gettext-Core.package/GetTextUnsucessfulTranslationResult.class/properties.json +++ b/repository/Seaside-Gettext-Core.package/GetTextUnsucessfulTranslationResult.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Seaside-Gettext-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", - "instvars" : [ - ], - "name" : "GetTextUnsucessfulTranslationResult", - "pools" : [ - ], "super" : "GetTextTranslationResult", - "type" : "normal" } + "category" : "Seaside-Gettext-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "GetTextUnsucessfulTranslationResult", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/String.extension/properties.json b/repository/Seaside-Gettext-Core.package/String.extension/properties.json index c21385076..b20f2de3b 100644 --- a/repository/Seaside-Gettext-Core.package/String.extension/properties.json +++ b/repository/Seaside-Gettext-Core.package/String.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "String" } + "name" : "String" +} \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WAApplication.extension/properties.json b/repository/Seaside-Gettext-Core.package/WAApplication.extension/properties.json index 1f0d5c529..1ade0d06a 100644 --- a/repository/Seaside-Gettext-Core.package/WAApplication.extension/properties.json +++ b/repository/Seaside-Gettext-Core.package/WAApplication.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "WAApplication" } + "name" : "WAApplication" +} \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WACurrentLocalizationContext.class/properties.json b/repository/Seaside-Gettext-Core.package/WACurrentLocalizationContext.class/properties.json index f591d381d..d97ace314 100644 --- a/repository/Seaside-Gettext-Core.package/WACurrentLocalizationContext.class/properties.json +++ b/repository/Seaside-Gettext-Core.package/WACurrentLocalizationContext.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Seaside-Gettext-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "JohanBrichau 7/23/2022 16:35", - "instvars" : [ - ], - "name" : "WACurrentLocalizationContext", - "pools" : [ - ], "super" : "WADynamicVariable", - "type" : "normal" } + "category" : "Seaside-Gettext-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "WACurrentLocalizationContext", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WAGetTextConfiguration.class/properties.json b/repository/Seaside-Gettext-Core.package/WAGetTextConfiguration.class/properties.json index ba6b47954..d20efb180 100644 --- a/repository/Seaside-Gettext-Core.package/WAGetTextConfiguration.class/properties.json +++ b/repository/Seaside-Gettext-Core.package/WAGetTextConfiguration.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Seaside-Gettext-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", - "instvars" : [ - ], - "name" : "WAGetTextConfiguration", - "pools" : [ - ], "super" : "WASystemConfiguration", - "type" : "normal" } + "category" : "Seaside-Gettext-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "WAGetTextConfiguration", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/addTranslator.for..st b/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/addTranslator.for..st new file mode 100644 index 000000000..33375f9b3 --- /dev/null +++ b/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/addTranslator.for..st @@ -0,0 +1,6 @@ +translators registry +addTranslator: aTranslator for: anApplicationName + "Register translator for the named application" + TranslatorRegistry + at: anApplicationName + put: aTranslator \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/addTranslatorFor.fromFiles..st b/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/addTranslatorFor.fromFiles..st new file mode 100644 index 000000000..a8d567041 --- /dev/null +++ b/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/addTranslatorFor.fromFiles..st @@ -0,0 +1,6 @@ +translators registry +addTranslatorFor: anApplicationName fromFiles: aCollectionOfMOFiles + "Create and register a translator for the named application with given gettext translation files" + self + addTranslator: (self newFromMOFiles: aCollectionOfMOFiles) + for: anApplicationName \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/addTranslatorFor.fromFilesIn..st b/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/addTranslatorFor.fromFilesIn..st new file mode 100644 index 000000000..85012ae2f --- /dev/null +++ b/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/addTranslatorFor.fromFilesIn..st @@ -0,0 +1,7 @@ +translators registry +addTranslatorFor: anApplicationName fromFilesIn: aDirectoryPathString + "Create and register a translator for the named application with gettext translation files located in the given directory. + The argument directory is the top directory of the Gettext translation filestructure." + self + addTranslator: (self newFromMOFilesIn: aDirectoryPathString forName: anApplicationName) + for: anApplicationName \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/createTranslatorFor.fromFilesIn..st b/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/createTranslatorFor.fromFilesIn..st deleted file mode 100644 index 0094a38ab..000000000 --- a/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/createTranslatorFor.fromFilesIn..st +++ /dev/null @@ -1,7 +0,0 @@ -instance creation -createTranslatorFor: anApplicationName fromFilesIn: aDirectoryPathString - "Create and register a translator for the named application with gettext translation files located in the given directory. - The argument directory is the top directory of the Gettext translation filestructure." - TranslatorRegistry - at: anApplicationName - put: (self newFromMOFilesIn: aDirectoryPathString forName: anApplicationName) \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/newFromMOFiles..st b/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/newFromMOFiles..st new file mode 100644 index 000000000..30f46ef51 --- /dev/null +++ b/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/newFromMOFiles..st @@ -0,0 +1,7 @@ +instance creation +newFromMOFiles: aCollectionOfMOFiles + | translator | + translator := self new. + aCollectionOfMOFiles do:[ :moFile | + translator addMOFile: moFile forLocaleID: moFile localeId ]. + ^ translator \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/instance/addMOFile.forLocaleID..st b/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/instance/addMOFile.forLocaleID..st new file mode 100644 index 000000000..91dc1ba66 --- /dev/null +++ b/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/instance/addMOFile.forLocaleID..st @@ -0,0 +1,5 @@ +private +addMOFile: moFile forLocaleID: localeId + ^ moFilePerLocaleId + at: localeId + put: moFile \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/instance/addMOFileFromPath.forName..st b/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/instance/addMOFileFromPath.forName..st index 19bd177d1..0e24ebef9 100644 --- a/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/instance/addMOFileFromPath.forName..st +++ b/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/instance/addMOFileFromPath.forName..st @@ -1,16 +1,16 @@ private addMOFileFromPath: pathString forName: anApplicationName - | locale fileName | - locale := WALocale fromString: (GRPlatform current localNameOf: pathString). - fileName := String - streamContents: [ :str | - str - nextPutAll: pathString; - nextPutAll: GRPlatform current pathSeparator; - nextPutAll: 'LC_MESSAGES'; - nextPutAll: GRPlatform current pathSeparator; - nextPutAll: anApplicationName; - nextPutAll: '.mo' ]. - ^ moFilePerLocaleId - at: locale localeId - put: (WAMOFile new initializeFromFile: fileName localeId: locale localeId) \ No newline at end of file + + | locale fileName | + locale := WALocale fromString: (GRPlatform current localNameOf: pathString). + fileName := String streamContents: [ :str | + str + nextPutAll: pathString; + nextPutAll: GRPlatform current pathSeparator; + nextPutAll: 'LC_MESSAGES'; + nextPutAll: GRPlatform current pathSeparator; + nextPutAll: anApplicationName; + nextPutAll: '.mo' ]. + ^ self + addMOFile: (WAMOFile new initializeFromFile: fileName localeId: locale localeId) + forLocaleID: locale localeId \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/instance/initialize.st b/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/instance/initialize.st new file mode 100644 index 000000000..30ef59007 --- /dev/null +++ b/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/instance/initialize.st @@ -0,0 +1,4 @@ +initialization +initialize + super initialize. + moFilePerLocaleId := Dictionary new. \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/instance/initializeFromMOFilesIn.forName..st b/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/instance/initializeFromMOFilesIn.forName..st index 6a88dcb29..25cfb6002 100644 --- a/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/instance/initializeFromMOFilesIn.forName..st +++ b/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/instance/initializeFromMOFilesIn.forName..st @@ -1,6 +1,5 @@ initialization initializeFromMOFilesIn: aDirectoryPathString forName: anApplicationName self initialize. - moFilePerLocaleId := Dictionary new. (GRPlatform current directoriesIn: aDirectoryPathString) do: [ :dirPathString | self addMOFileFromPath: dirPathString forName: anApplicationName ] \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/properties.json b/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/properties.json index 02800685c..2506e51de 100644 --- a/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/properties.json +++ b/repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/properties.json @@ -1,14 +1,15 @@ { + "commentStamp" : "MelvinRoest 3/25/2022 14:19", + "super" : "Object", "category" : "Seaside-Gettext-Core", - "classinstvars" : [ - ], + "classinstvars" : [ ], + "pools" : [ ], "classvars" : [ - "TranslatorRegistry" ], - "commentStamp" : "MelvinRoest 3/25/2022 14:19", + "TranslatorRegistry" + ], "instvars" : [ - "moFilePerLocaleId" ], + "moFilePerLocaleId" + ], "name" : "WAGetTextTranslator", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WALazyTranslatedString.class/properties.json b/repository/Seaside-Gettext-Core.package/WALazyTranslatedString.class/properties.json index a3de120aa..e256db98f 100644 --- a/repository/Seaside-Gettext-Core.package/WALazyTranslatedString.class/properties.json +++ b/repository/Seaside-Gettext-Core.package/WALazyTranslatedString.class/properties.json @@ -1,14 +1,13 @@ { - "category" : "Seaside-Gettext-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", + "super" : "WAObject", + "category" : "Seaside-Gettext-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ - "key" ], + "key" + ], "name" : "WALazyTranslatedString", - "pools" : [ - ], - "super" : "WAObject", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WALocalizationContext.class/properties.json b/repository/Seaside-Gettext-Core.package/WALocalizationContext.class/properties.json index d2c59e27a..8cf081f41 100644 --- a/repository/Seaside-Gettext-Core.package/WALocalizationContext.class/properties.json +++ b/repository/Seaside-Gettext-Core.package/WALocalizationContext.class/properties.json @@ -1,15 +1,14 @@ { - "category" : "Seaside-Gettext-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "MelvinRoest 3/25/2022 11:23", + "super" : "WAObject", + "category" : "Seaside-Gettext-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "translator", - "locale" ], + "locale" + ], "name" : "WALocalizationContext", - "pools" : [ - ], - "super" : "WAObject", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WALocalizationContextFilter.class/properties.json b/repository/Seaside-Gettext-Core.package/WALocalizationContextFilter.class/properties.json index 0092516b3..17579656c 100644 --- a/repository/Seaside-Gettext-Core.package/WALocalizationContextFilter.class/properties.json +++ b/repository/Seaside-Gettext-Core.package/WALocalizationContextFilter.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Seaside-Gettext-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "MelvinRoest 3/25/2022 12:09", - "instvars" : [ - ], - "name" : "WALocalizationContextFilter", - "pools" : [ - ], "super" : "WARequestFilter", - "type" : "normal" } + "category" : "Seaside-Gettext-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "WALocalizationContextFilter", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WAMOFile.class/instance/initializeFromFile.localeId..st b/repository/Seaside-Gettext-Core.package/WAMOFile.class/instance/initializeFromFile.localeId..st index abd0723c3..d20214dc9 100644 --- a/repository/Seaside-Gettext-Core.package/WAMOFile.class/instance/initializeFromFile.localeId..st +++ b/repository/Seaside-Gettext-Core.package/WAMOFile.class/instance/initializeFromFile.localeId..st @@ -3,7 +3,7 @@ initializeFromFile: aFileName localeId: aLocaleString "Entry point for loading translations. All of strings are loaded. Translation strings are converted to internal string format on load time. Original string/index pairs are registerd to Dictionary on load time." self initialize. - localeString := aLocaleString. + localeId := aLocaleString. fileName := aFileName. GRPlatform current readFileStreamOn: aFileName diff --git a/repository/Seaside-Gettext-Core.package/WAMOFile.class/instance/initializeFromStream.localeId..st b/repository/Seaside-Gettext-Core.package/WAMOFile.class/instance/initializeFromStream.localeId..st index 38341928d..6993b8c39 100644 --- a/repository/Seaside-Gettext-Core.package/WAMOFile.class/instance/initializeFromStream.localeId..st +++ b/repository/Seaside-Gettext-Core.package/WAMOFile.class/instance/initializeFromStream.localeId..st @@ -1,5 +1,5 @@ initialization initializeFromStream: aStream localeId: aLocaleString self initialize. - localeString := aLocaleString. + localeId := aLocaleString. self privateLoadStream: aStream \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WAMOFile.class/instance/localeId.st b/repository/Seaside-Gettext-Core.package/WAMOFile.class/instance/localeId.st new file mode 100644 index 000000000..0de0f9af9 --- /dev/null +++ b/repository/Seaside-Gettext-Core.package/WAMOFile.class/instance/localeId.st @@ -0,0 +1,3 @@ +accessing +localeId + ^ localeId \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WAMOFile.class/properties.json b/repository/Seaside-Gettext-Core.package/WAMOFile.class/properties.json index a6e013549..bc25cb018 100644 --- a/repository/Seaside-Gettext-Core.package/WAMOFile.class/properties.json +++ b/repository/Seaside-Gettext-Core.package/WAMOFile.class/properties.json @@ -1,11 +1,13 @@ { + "commentStamp" : "JohanBrichau 7/23/2022 16:46", + "super" : "Object", "category" : "Seaside-Gettext-Core", "classinstvars" : [ "Cr", - "Lf" ], - "classvars" : [ - ], - "commentStamp" : "JohanBrichau 7/23/2022 16:46", + "Lf" + ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ "fileName", "isLittleEndian", @@ -15,9 +17,8 @@ "translatedTableOffset", "translatedStrings", "translations", - "localeString" ], + "localeId" + ], "name" : "WAMOFile", - "pools" : [ - ], - "super" : "Object", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WARenderer.extension/properties.json b/repository/Seaside-Gettext-Core.package/WARenderer.extension/properties.json index 3184638e9..acd07dda9 100644 --- a/repository/Seaside-Gettext-Core.package/WARenderer.extension/properties.json +++ b/repository/Seaside-Gettext-Core.package/WARenderer.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "WARenderer" } + "name" : "WARenderer" +} \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/WASession.extension/properties.json b/repository/Seaside-Gettext-Core.package/WASession.extension/properties.json index ce1a28320..f37f9641d 100644 --- a/repository/Seaside-Gettext-Core.package/WASession.extension/properties.json +++ b/repository/Seaside-Gettext-Core.package/WASession.extension/properties.json @@ -1,2 +1,3 @@ { - "name" : "WASession" } + "name" : "WASession" +} \ No newline at end of file diff --git a/repository/Seaside-Gettext-Core.package/properties.json b/repository/Seaside-Gettext-Core.package/properties.json index f037444a7..6f31cf5a2 100644 --- a/repository/Seaside-Gettext-Core.package/properties.json +++ b/repository/Seaside-Gettext-Core.package/properties.json @@ -1,2 +1 @@ -{ - } +{ } \ No newline at end of file diff --git a/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/class/addTranslatorForExample.st b/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/class/addTranslatorForExample.st new file mode 100644 index 000000000..303024840 --- /dev/null +++ b/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/class/addTranslatorForExample.st @@ -0,0 +1,14 @@ +localization +addTranslatorForExample + + | localeIds moFiles | + localeIds := #( #nl_BE #fr #de_CH ) collect: [ :str | (WALocale fromString: str) localeId ]. + moFiles := localeIds collect: [ :localeId | + | contents | + contents := (WAGettextTestingFileLibrary new perform: + (WAGettextTestingFileLibrary asSelector: localeId , '.mo')) contents value. + WAMOFile + fromStream: contents readStream + localeId: localeId ]. + + WAGetTextTranslator addTranslatorFor: 'seaside-gettext-example' fromFiles: moFiles \ No newline at end of file diff --git a/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/class/importTranslations.st b/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/class/importTranslations.st index a2f578817..f594dc7a6 100644 --- a/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/class/importTranslations.st +++ b/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/class/importTranslations.st @@ -1,5 +1,5 @@ localization importTranslations WAGetTextTranslator - createTranslatorFor: self getTextExampleApplicationName + addTranslatorFor: self getTextExampleApplicationName fromFilesIn: GRPlatform current seasideGettextExampleFilesDirectory \ No newline at end of file diff --git a/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/class/removeTranslatorForExample.st b/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/class/removeTranslatorForExample.st new file mode 100644 index 000000000..7e69b6d3f --- /dev/null +++ b/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/class/removeTranslatorForExample.st @@ -0,0 +1,4 @@ +localization +removeTranslatorForExample + + WAGetTextTranslator removeTranslatorFor: 'seaside-gettext-example' \ No newline at end of file diff --git a/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/instance/loadTranslationFilesFrom..st b/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/instance/loadTranslationFilesFrom..st index 64ebbf6bf..a96976576 100644 --- a/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/instance/loadTranslationFilesFrom..st +++ b/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/instance/loadTranslationFilesFrom..st @@ -1,5 +1,5 @@ private loadTranslationFilesFrom: aPathString WAGetTextTranslator - createTranslatorFor: 'seaside-gettext-example' + addTranslatorFor: 'seaside-gettext-example' fromFilesIn: aPathString \ No newline at end of file diff --git a/repository/Seaside-Tests-Gettext-Core.package/.filetree b/repository/Seaside-Tests-Gettext-Core.package/.filetree index 8998102c2..57a679737 100644 --- a/repository/Seaside-Tests-Gettext-Core.package/.filetree +++ b/repository/Seaside-Tests-Gettext-Core.package/.filetree @@ -1,4 +1,5 @@ { - "noMethodMetaData" : true, "separateMethodMetaAndSource" : false, - "useCypressPropertiesFile" : true } + "noMethodMetaData" : true, + "useCypressPropertiesFile" : true +} \ No newline at end of file diff --git a/repository/Seaside-Tests-Gettext-Core.package/WAGetTextTranslatorTest.class/instance/testCreateAndRemoveTextTranslator.st b/repository/Seaside-Tests-Gettext-Core.package/WAGetTextTranslatorTest.class/instance/testCreateAndRemoveTextTranslator.st index b5526ef9b..64ee78b83 100644 --- a/repository/Seaside-Tests-Gettext-Core.package/WAGetTextTranslatorTest.class/instance/testCreateAndRemoveTextTranslator.st +++ b/repository/Seaside-Tests-Gettext-Core.package/WAGetTextTranslatorTest.class/instance/testCreateAndRemoveTextTranslator.st @@ -6,7 +6,7 @@ testCreateAndRemoveTextTranslator [ WAGetTextTranslator removeTranslatorFor: WAGettextExample getTextExampleApplicationName ] on: Error do:[:e | ]. self assert: (WAGetTextTranslator translatorFor: WAGettextExample getTextExampleApplicationName) isNil. - WAGetTextTranslator createTranslatorFor: WAGettextExample getTextExampleApplicationName fromFilesIn: (GRPlatform current seasideGettextExampleFilesDirectory). + WAGettextExample addTranslatorForExample. translator := WAGetTextTranslator translatorFor: WAGettextExample getTextExampleApplicationName. self assert: translator supportedLocaleIds asSet equals: { 'nl-BE' . 'fr' . 'de-CH' } asSet. WAGetTextTranslator removeTranslatorFor: WAGettextExample getTextExampleApplicationName. diff --git a/repository/Seaside-Tests-Gettext-Core.package/WAGetTextTranslatorTest.class/instance/testTranslateIgnoringCountryUsingLocale.st b/repository/Seaside-Tests-Gettext-Core.package/WAGetTextTranslatorTest.class/instance/testTranslateIgnoringCountryUsingLocale.st index 79ce6f2bc..5aa1386f9 100644 --- a/repository/Seaside-Tests-Gettext-Core.package/WAGetTextTranslatorTest.class/instance/testTranslateIgnoringCountryUsingLocale.st +++ b/repository/Seaside-Tests-Gettext-Core.package/WAGetTextTranslatorTest.class/instance/testTranslateIgnoringCountryUsingLocale.st @@ -2,7 +2,7 @@ test testTranslateIgnoringCountryUsingLocale | translator | - WAGetTextTranslator createTranslatorFor: WAGettextExample getTextExampleApplicationName fromFilesIn: (GRPlatform current seasideGettextExampleFilesDirectory). + WAGettextExample addTranslatorForExample. translator := WAGetTextTranslator translatorFor: WAGettextExample getTextExampleApplicationName. self assert: (translator translateIgnoringCountry: 'fontsize' usingLocale: (WALocale fromString: 'nl-BE')) equals: 'fontsize'. diff --git a/repository/Seaside-Tests-Gettext-Core.package/WAGetTextTranslatorTest.class/instance/testTranslateUsingLocale.st b/repository/Seaside-Tests-Gettext-Core.package/WAGetTextTranslatorTest.class/instance/testTranslateUsingLocale.st index 278314bf2..817a9e5a9 100644 --- a/repository/Seaside-Tests-Gettext-Core.package/WAGetTextTranslatorTest.class/instance/testTranslateUsingLocale.st +++ b/repository/Seaside-Tests-Gettext-Core.package/WAGetTextTranslatorTest.class/instance/testTranslateUsingLocale.st @@ -2,7 +2,7 @@ test testTranslateUsingLocale | translator | - WAGetTextTranslator createTranslatorFor: WAGettextExample getTextExampleApplicationName fromFilesIn: (GRPlatform current seasideGettextExampleFilesDirectory). + WAGettextExample addTranslatorForExample. translator := WAGetTextTranslator translatorFor: WAGettextExample getTextExampleApplicationName. self assert: (translator translate: 'fontsize' usingLocale: (WALocale fromString: 'nl-BE')) equals: 'schriftgrootte'. diff --git a/repository/Seaside-Tests-Gettext-Core.package/WAGetTextTranslatorTest.class/properties.json b/repository/Seaside-Tests-Gettext-Core.package/WAGetTextTranslatorTest.class/properties.json index 93bb25863..ef51440fb 100644 --- a/repository/Seaside-Tests-Gettext-Core.package/WAGetTextTranslatorTest.class/properties.json +++ b/repository/Seaside-Tests-Gettext-Core.package/WAGetTextTranslatorTest.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Seaside-Tests-Gettext-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", - "instvars" : [ - ], - "name" : "WAGetTextTranslatorTest", - "pools" : [ - ], "super" : "TestCase", - "type" : "normal" } + "category" : "Seaside-Tests-Gettext-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "WAGetTextTranslatorTest", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/README.md b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/README.md new file mode 100644 index 000000000..c6ca0b336 --- /dev/null +++ b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/README.md @@ -0,0 +1,9 @@ +```language=Pharo +| baseDir | +"Create me from the files in the Seaside git repository" +baseDir := FileLocator workingDirectory / 'pharo-local/iceberg/SeasideSt/Seaside/seaside-gettext-example/locale'. +#(#de_CH #fr #nl_BE) do:[ :localeId | + WAGettextTestingFileLibrary + addFileNamed: localeId,'.mo' + contents: (GRPlatform current contentsOfFile: (baseDir / localeId / 'LC_MESSAGES' / 'seaside-gettext-example.mo') fullName binary: true) ]. +``` \ No newline at end of file diff --git a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/deCHMo.st b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/deCHMo.st new file mode 100644 index 000000000..7b734524f --- /dev/null +++ b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/deCHMo.st @@ -0,0 +1,7 @@ +uploaded metadata +deCHMo + ^ WAFileLibraryResource + filepath: 'de_CH.mo' + mimeType: (WAMimeType main: 'application' sub: 'octet-stream') + cacheDuration: (Duration days: 0 hours: 0 minutes: 30 seconds: 0) + contents: (GRDelayedSend receiver: self selector: #deCHMoContent) \ No newline at end of file diff --git a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/deCHMoContent.st b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/deCHMoContent.st new file mode 100644 index 000000000..cc965e38f --- /dev/null +++ b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/deCHMoContent.st @@ -0,0 +1,3 @@ +uploaded +deCHMoContent + ^ #[222 18 4 149 0 0 0 0 4 0 0 0 28 0 0 0 60 0 0 0 5 0 0 0 92 0 0 0 0 0 0 0 112 0 0 0 21 0 0 0 113 0 0 0 8 0 0 0 135 0 0 0 6 0 0 0 144 0 0 0 142 1 0 0 151 0 0 0 39 0 0 0 38 2 0 0 14 0 0 0 78 2 0 0 6 0 0 0 93 2 0 0 1 0 0 0 0 0 0 0 3 0 0 0 2 0 0 0 4 0 0 0 0 83 101 108 101 99 116 32 97 32 108 111 99 97 108 101 32 98 101 108 111 119 0 102 111 110 116 115 105 122 101 0 108 111 99 97 108 101 0 80 114 111 106 101 99 116 45 73 100 45 86 101 114 115 105 111 110 58 32 80 104 97 114 111 10 80 79 45 82 101 118 105 115 105 111 110 45 68 97 116 101 58 32 50 48 50 49 45 48 51 45 50 49 32 49 54 58 50 52 43 48 49 48 48 10 76 97 110 103 117 97 103 101 45 84 101 97 109 58 32 10 77 73 77 69 45 86 101 114 115 105 111 110 58 32 49 46 48 10 67 111 110 116 101 110 116 45 84 121 112 101 58 32 116 101 120 116 47 112 108 97 105 110 59 32 99 104 97 114 115 101 116 61 85 84 70 45 56 10 67 111 110 116 101 110 116 45 84 114 97 110 115 102 101 114 45 69 110 99 111 100 105 110 103 58 32 56 98 105 116 10 88 45 80 104 97 114 111 45 83 121 115 116 101 109 86 101 114 115 105 111 110 58 32 80 104 97 114 111 45 55 46 48 46 51 43 98 117 105 108 100 46 49 54 54 46 115 104 97 46 99 99 100 49 102 54 52 56 57 49 50 48 102 53 56 100 100 101 97 99 98 50 99 97 99 55 55 99 100 51 97 48 102 48 100 99 102 98 101 54 32 40 54 52 32 66 105 116 41 10 88 45 80 104 97 114 111 45 68 111 109 97 105 110 58 32 103 101 116 116 101 120 116 10 88 45 71 101 110 101 114 97 116 111 114 58 32 80 111 101 100 105 116 32 50 46 51 46 49 10 76 97 115 116 45 84 114 97 110 115 108 97 116 111 114 58 32 10 80 108 117 114 97 108 45 70 111 114 109 115 58 32 110 112 108 117 114 97 108 115 61 50 59 32 112 108 117 114 97 108 61 40 110 32 33 61 32 49 41 59 10 76 97 110 103 117 97 103 101 58 32 100 101 95 67 72 10 0 87 195 164 104 108 101 110 32 83 105 101 32 117 110 116 101 110 32 101 105 110 32 71 101 98 105 101 116 115 115 99 104 101 109 97 32 97 117 115 0 115 99 104 114 105 102 116 103 114 195 182 195 159 101 0 108 111 99 97 108 101 0] \ No newline at end of file diff --git a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/frMo.st b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/frMo.st new file mode 100644 index 000000000..c1df697bd --- /dev/null +++ b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/frMo.st @@ -0,0 +1,7 @@ +uploaded metadata +frMo + ^ WAFileLibraryResource + filepath: 'fr.mo' + mimeType: (WAMimeType main: 'application' sub: 'octet-stream') + cacheDuration: (Duration days: 0 hours: 0 minutes: 30 seconds: 0) + contents: (GRDelayedSend receiver: self selector: #frMoContent) \ No newline at end of file diff --git a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/frMoContent.st b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/frMoContent.st new file mode 100644 index 000000000..0684dc597 --- /dev/null +++ b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/frMoContent.st @@ -0,0 +1,3 @@ +uploaded +frMoContent + ^ #[222 18 4 149 0 0 0 0 4 0 0 0 28 0 0 0 60 0 0 0 5 0 0 0 92 0 0 0 0 0 0 0 112 0 0 0 21 0 0 0 113 0 0 0 8 0 0 0 135 0 0 0 6 0 0 0 144 0 0 0 138 1 0 0 151 0 0 0 34 0 0 0 34 2 0 0 16 0 0 0 69 2 0 0 6 0 0 0 86 2 0 0 1 0 0 0 0 0 0 0 3 0 0 0 2 0 0 0 4 0 0 0 0 83 101 108 101 99 116 32 97 32 108 111 99 97 108 101 32 98 101 108 111 119 0 102 111 110 116 115 105 122 101 0 108 111 99 97 108 101 0 80 114 111 106 101 99 116 45 73 100 45 86 101 114 115 105 111 110 58 32 80 104 97 114 111 10 80 79 45 82 101 118 105 115 105 111 110 45 68 97 116 101 58 32 50 48 50 49 45 48 51 45 50 49 32 49 53 58 52 56 43 48 49 48 48 10 76 97 110 103 117 97 103 101 45 84 101 97 109 58 32 10 77 73 77 69 45 86 101 114 115 105 111 110 58 32 49 46 48 10 67 111 110 116 101 110 116 45 84 121 112 101 58 32 116 101 120 116 47 112 108 97 105 110 59 32 99 104 97 114 115 101 116 61 85 84 70 45 56 10 67 111 110 116 101 110 116 45 84 114 97 110 115 102 101 114 45 69 110 99 111 100 105 110 103 58 32 56 98 105 116 10 88 45 80 104 97 114 111 45 83 121 115 116 101 109 86 101 114 115 105 111 110 58 32 80 104 97 114 111 45 55 46 48 46 51 43 98 117 105 108 100 46 49 54 54 46 115 104 97 46 99 99 100 49 102 54 52 56 57 49 50 48 102 53 56 100 100 101 97 99 98 50 99 97 99 55 55 99 100 51 97 48 102 48 100 99 102 98 101 54 32 40 54 52 32 66 105 116 41 10 88 45 80 104 97 114 111 45 68 111 109 97 105 110 58 32 103 101 116 116 101 120 116 10 88 45 71 101 110 101 114 97 116 111 114 58 32 80 111 101 100 105 116 32 50 46 51 46 49 10 76 97 115 116 45 84 114 97 110 115 108 97 116 111 114 58 32 10 80 108 117 114 97 108 45 70 111 114 109 115 58 32 110 112 108 117 114 97 108 115 61 50 59 32 112 108 117 114 97 108 61 40 110 32 62 32 49 41 59 10 76 97 110 103 117 97 103 101 58 32 102 114 10 0 83 195 169 108 101 99 116 105 111 110 110 101 122 32 108 97 32 108 111 99 97 108 101 32 99 105 45 100 101 115 115 111 117 115 0 116 97 105 108 108 101 32 100 101 32 112 111 108 105 99 101 0 108 111 99 97 108 101 0] \ No newline at end of file diff --git a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/nlBEMo.st b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/nlBEMo.st new file mode 100644 index 000000000..938958cbd --- /dev/null +++ b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/nlBEMo.st @@ -0,0 +1,7 @@ +uploaded metadata +nlBEMo + ^ WAFileLibraryResource + filepath: 'nl_BE.mo' + mimeType: (WAMimeType main: 'application' sub: 'octet-stream') + cacheDuration: (Duration days: 0 hours: 0 minutes: 30 seconds: 0) + contents: (GRDelayedSend receiver: self selector: #nlBEMoContent) \ No newline at end of file diff --git a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/nlBEMoContent.st b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/nlBEMoContent.st new file mode 100644 index 000000000..da3a0e2c3 --- /dev/null +++ b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/nlBEMoContent.st @@ -0,0 +1,3 @@ +uploaded +nlBEMoContent + ^ #[222 18 4 149 0 0 0 0 4 0 0 0 28 0 0 0 60 0 0 0 5 0 0 0 92 0 0 0 0 0 0 0 112 0 0 0 21 0 0 0 113 0 0 0 8 0 0 0 135 0 0 0 6 0 0 0 144 0 0 0 142 1 0 0 151 0 0 0 25 0 0 0 38 2 0 0 14 0 0 0 64 2 0 0 6 0 0 0 79 2 0 0 1 0 0 0 0 0 0 0 3 0 0 0 2 0 0 0 4 0 0 0 0 83 101 108 101 99 116 32 97 32 108 111 99 97 108 101 32 98 101 108 111 119 0 102 111 110 116 115 105 122 101 0 108 111 99 97 108 101 0 80 114 111 106 101 99 116 45 73 100 45 86 101 114 115 105 111 110 58 32 80 104 97 114 111 10 80 79 45 82 101 118 105 115 105 111 110 45 68 97 116 101 58 32 50 48 50 49 45 48 51 45 50 49 32 49 53 58 53 48 43 48 49 48 48 10 76 97 110 103 117 97 103 101 45 84 101 97 109 58 32 10 77 73 77 69 45 86 101 114 115 105 111 110 58 32 49 46 48 10 67 111 110 116 101 110 116 45 84 121 112 101 58 32 116 101 120 116 47 112 108 97 105 110 59 32 99 104 97 114 115 101 116 61 85 84 70 45 56 10 67 111 110 116 101 110 116 45 84 114 97 110 115 102 101 114 45 69 110 99 111 100 105 110 103 58 32 56 98 105 116 10 88 45 80 104 97 114 111 45 83 121 115 116 101 109 86 101 114 115 105 111 110 58 32 80 104 97 114 111 45 55 46 48 46 51 43 98 117 105 108 100 46 49 54 54 46 115 104 97 46 99 99 100 49 102 54 52 56 57 49 50 48 102 53 56 100 100 101 97 99 98 50 99 97 99 55 55 99 100 51 97 48 102 48 100 99 102 98 101 54 32 40 54 52 32 66 105 116 41 10 88 45 80 104 97 114 111 45 68 111 109 97 105 110 58 32 103 101 116 116 101 120 116 10 88 45 71 101 110 101 114 97 116 111 114 58 32 80 111 101 100 105 116 32 50 46 51 46 49 10 76 97 115 116 45 84 114 97 110 115 108 97 116 111 114 58 32 10 80 108 117 114 97 108 45 70 111 114 109 115 58 32 110 112 108 117 114 97 108 115 61 50 59 32 112 108 117 114 97 108 61 40 110 32 33 61 32 49 41 59 10 76 97 110 103 117 97 103 101 58 32 110 108 95 66 69 10 0 75 105 101 115 32 101 101 110 32 108 111 99 97 108 101 32 104 105 101 114 111 110 100 101 114 0 115 99 104 114 105 102 116 103 114 111 111 116 116 101 0 108 111 99 97 108 101 0] \ No newline at end of file diff --git a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/properties.json b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/properties.json new file mode 100644 index 000000000..288a15f51 --- /dev/null +++ b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/properties.json @@ -0,0 +1,11 @@ +{ + "commentStamp" : "JohanBrichau 11/13/2022 11:17", + "super" : "WAFileMetadataLibrary", + "category" : "Seaside-Tests-Gettext-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "WAGettextTestingFileLibrary", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Seaside-Tests-Gettext-Core.package/WALocalizationContextTest.class/instance/setUp.st b/repository/Seaside-Tests-Gettext-Core.package/WALocalizationContextTest.class/instance/setUp.st index 03f4b23fa..e5fa87f3f 100644 --- a/repository/Seaside-Tests-Gettext-Core.package/WALocalizationContextTest.class/instance/setUp.st +++ b/repository/Seaside-Tests-Gettext-Core.package/WALocalizationContextTest.class/instance/setUp.st @@ -1,5 +1,5 @@ initialization setUp super setUp. - [ WAGetTextTranslator removeTranslatorFor: WAGettextExample getTextExampleApplicationName ] on: Error do:[ :e | ]. - WAGetTextTranslator createTranslatorFor: WAGettextExample getTextExampleApplicationName fromFilesIn: (GRPlatform current seasideGettextExampleFilesDirectory). \ No newline at end of file + [ WAGettextExample removeTranslatorForExample ] on: Error do:[ :e | ]. + WAGettextExample addTranslatorForExample. \ No newline at end of file diff --git a/repository/Seaside-Tests-Gettext-Core.package/WALocalizationContextTest.class/properties.json b/repository/Seaside-Tests-Gettext-Core.package/WALocalizationContextTest.class/properties.json index 08b6adfcd..077118797 100644 --- a/repository/Seaside-Tests-Gettext-Core.package/WALocalizationContextTest.class/properties.json +++ b/repository/Seaside-Tests-Gettext-Core.package/WALocalizationContextTest.class/properties.json @@ -1,14 +1,11 @@ { - "category" : "Seaside-Tests-Gettext-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", - "instvars" : [ - ], - "name" : "WALocalizationContextTest", - "pools" : [ - ], "super" : "TestCase", - "type" : "normal" } + "category" : "Seaside-Tests-Gettext-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ ], + "name" : "WALocalizationContextTest", + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Seaside-Tests-Gettext-Core.package/WAMOFileTest.class/properties.json b/repository/Seaside-Tests-Gettext-Core.package/WAMOFileTest.class/properties.json index 2fa301d11..65ced8587 100644 --- a/repository/Seaside-Tests-Gettext-Core.package/WAMOFileTest.class/properties.json +++ b/repository/Seaside-Tests-Gettext-Core.package/WAMOFileTest.class/properties.json @@ -1,14 +1,13 @@ { - "category" : "Seaside-Tests-Gettext-Core", - "classinstvars" : [ - ], - "classvars" : [ - ], "commentStamp" : "", + "super" : "TestCase", + "category" : "Seaside-Tests-Gettext-Core", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], "instvars" : [ - "file" ], + "file" + ], "name" : "WAMOFileTest", - "pools" : [ - ], - "super" : "TestCase", - "type" : "normal" } + "type" : "normal" +} \ No newline at end of file diff --git a/repository/Seaside-Tests-Gettext-Core.package/properties.json b/repository/Seaside-Tests-Gettext-Core.package/properties.json index f037444a7..6f31cf5a2 100644 --- a/repository/Seaside-Tests-Gettext-Core.package/properties.json +++ b/repository/Seaside-Tests-Gettext-Core.package/properties.json @@ -1,2 +1 @@ -{ - } +{ } \ No newline at end of file From 4211f092e9d5ba3a0111297b3b545be02df2ce2a Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Sun, 13 Nov 2022 11:38:23 +0100 Subject: [PATCH 20/24] Update README.md --- README.md | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index d70b6dae2..3190ce321 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,19 @@ To install the latest stable version of Seaside in a [Gemstone](https://gemtalks load: #('Development' 'Examples' 'Zinc') ]. ``` +### Instructions for VAST + +Seaside is an official vendor supported framework that can be installed using VAST's feature loading tool GUI. In addition, it can be installed programmatically as shown below. VAST fork is at https://github.com/instantiations/Seaside + +#### Load Seaside +To install the latest stable version of Seaside in a [VAST Platform](https://www.instantiations.com/vast-platform/) image, execute the following code: + +```Smalltalk +(EmConfigurationMap editionsFor: 'z.ST: Server Smalltalk (SST) - Seaside') + first loadWithRequiredMaps +``` + + ### Instructions for Squeak #### Squeak >= 5.2 @@ -112,22 +125,6 @@ Metacello new ``` -### Instructions for VAST Platform - -Seaside is an official vendor supported framework that can be installed using VAST's feature loading tool GUI. In addition, it can be installed programmatically as shown below. - -#### Load Seaside -To install the latest stable version of Seaside in a [VAST Platform](https://www.instantiations.com/vast-platform/) image, execute the following code: - -```Smalltalk -(EmConfigurationMap editionsFor: 'z.ST: Server Smalltalk (SST) - Seaside') - first loadWithRequiredMaps -``` - - - - - ## Community Check out the Add-on libraries and projects related to Seaside: https://github.com/SeasideSt/Seaside/wiki/Add-On-Libraries From 679e22840ae75e351d6c24dad395a0c2a6de5c35 Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Sun, 13 Nov 2022 11:48:14 +0100 Subject: [PATCH 21/24] remove obsolete steps from github actions (solving deprecation warnings) --- .github/workflows/ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f17a787c6..ae17d1c81 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,11 +22,6 @@ jobs: continue-on-error: ${{ matrix.experimental }} name: ${{ matrix.smalltalk }} steps: - - name: Get current date - id: date - run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H:%M:%S')" - - name: Log date - run: echo "${{ steps.date.outputs.date }}" - uses: actions/checkout@v2 with: ref: ${{ github.event.workflow_dispatch.ref }} From 98821ef58cafc555cd5f5cab5e3300e545d65a07 Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Sun, 13 Nov 2022 11:54:28 +0100 Subject: [PATCH 22/24] update github actions checkout to v3 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae17d1c81..8f52459ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: continue-on-error: ${{ matrix.experimental }} name: ${{ matrix.smalltalk }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: ${{ github.event.workflow_dispatch.ref }} - uses: hpi-swa/setup-smalltalkCI@v1 From d1c7e1a69f55552c6f028ff6bd176bc987264d94 Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Sun, 13 Nov 2022 12:04:24 +0100 Subject: [PATCH 23/24] Fixes for GemStone --- .../class/addTranslatorForExample.st | 2 +- .../WAGettextTestingFileLibrary.class/instance/deCHMo.st | 8 ++------ .../instance/deCHMoContent.st | 3 --- .../WAGettextTestingFileLibrary.class/instance/frMo.st | 8 ++------ .../instance/frMoContent.st | 3 --- .../WAGettextTestingFileLibrary.class/instance/nlBEMo.st | 8 ++------ .../instance/nlBEMoContent.st | 3 --- .../WAGettextTestingFileLibrary.class/properties.json | 2 +- 8 files changed, 8 insertions(+), 29 deletions(-) delete mode 100644 repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/deCHMoContent.st delete mode 100644 repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/frMoContent.st delete mode 100644 repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/nlBEMoContent.st diff --git a/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/class/addTranslatorForExample.st b/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/class/addTranslatorForExample.st index 303024840..fe52c5d5c 100644 --- a/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/class/addTranslatorForExample.st +++ b/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/class/addTranslatorForExample.st @@ -6,7 +6,7 @@ addTranslatorForExample moFiles := localeIds collect: [ :localeId | | contents | contents := (WAGettextTestingFileLibrary new perform: - (WAGettextTestingFileLibrary asSelector: localeId , '.mo')) contents value. + (WAGettextTestingFileLibrary asSelector: localeId , '.mo')) contents. WAMOFile fromStream: contents readStream localeId: localeId ]. diff --git a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/deCHMo.st b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/deCHMo.st index 7b734524f..538fe3ede 100644 --- a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/deCHMo.st +++ b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/deCHMo.st @@ -1,7 +1,3 @@ -uploaded metadata +uploaded deCHMo - ^ WAFileLibraryResource - filepath: 'de_CH.mo' - mimeType: (WAMimeType main: 'application' sub: 'octet-stream') - cacheDuration: (Duration days: 0 hours: 0 minutes: 30 seconds: 0) - contents: (GRDelayedSend receiver: self selector: #deCHMoContent) \ No newline at end of file + ^ #(222 18 4 149 0 0 0 0 4 0 0 0 28 0 0 0 60 0 0 0 5 0 0 0 92 0 0 0 0 0 0 0 112 0 0 0 21 0 0 0 113 0 0 0 8 0 0 0 135 0 0 0 6 0 0 0 144 0 0 0 142 1 0 0 151 0 0 0 39 0 0 0 38 2 0 0 14 0 0 0 78 2 0 0 6 0 0 0 93 2 0 0 1 0 0 0 0 0 0 0 3 0 0 0 2 0 0 0 4 0 0 0 0 83 101 108 101 99 116 32 97 32 108 111 99 97 108 101 32 98 101 108 111 119 0 102 111 110 116 115 105 122 101 0 108 111 99 97 108 101 0 80 114 111 106 101 99 116 45 73 100 45 86 101 114 115 105 111 110 58 32 80 104 97 114 111 10 80 79 45 82 101 118 105 115 105 111 110 45 68 97 116 101 58 32 50 48 50 49 45 48 51 45 50 49 32 49 54 58 50 52 43 48 49 48 48 10 76 97 110 103 117 97 103 101 45 84 101 97 109 58 32 10 77 73 77 69 45 86 101 114 115 105 111 110 58 32 49 46 48 10 67 111 110 116 101 110 116 45 84 121 112 101 58 32 116 101 120 116 47 112 108 97 105 110 59 32 99 104 97 114 115 101 116 61 85 84 70 45 56 10 67 111 110 116 101 110 116 45 84 114 97 110 115 102 101 114 45 69 110 99 111 100 105 110 103 58 32 56 98 105 116 10 88 45 80 104 97 114 111 45 83 121 115 116 101 109 86 101 114 115 105 111 110 58 32 80 104 97 114 111 45 55 46 48 46 51 43 98 117 105 108 100 46 49 54 54 46 115 104 97 46 99 99 100 49 102 54 52 56 57 49 50 48 102 53 56 100 100 101 97 99 98 50 99 97 99 55 55 99 100 51 97 48 102 48 100 99 102 98 101 54 32 40 54 52 32 66 105 116 41 10 88 45 80 104 97 114 111 45 68 111 109 97 105 110 58 32 103 101 116 116 101 120 116 10 88 45 71 101 110 101 114 97 116 111 114 58 32 80 111 101 100 105 116 32 50 46 51 46 49 10 76 97 115 116 45 84 114 97 110 115 108 97 116 111 114 58 32 10 80 108 117 114 97 108 45 70 111 114 109 115 58 32 110 112 108 117 114 97 108 115 61 50 59 32 112 108 117 114 97 108 61 40 110 32 33 61 32 49 41 59 10 76 97 110 103 117 97 103 101 58 32 100 101 95 67 72 10 0 87 195 164 104 108 101 110 32 83 105 101 32 117 110 116 101 110 32 101 105 110 32 71 101 98 105 101 116 115 115 99 104 101 109 97 32 97 117 115 0 115 99 104 114 105 102 116 103 114 195 182 195 159 101 0 108 111 99 97 108 101 0) \ No newline at end of file diff --git a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/deCHMoContent.st b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/deCHMoContent.st deleted file mode 100644 index cc965e38f..000000000 --- a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/deCHMoContent.st +++ /dev/null @@ -1,3 +0,0 @@ -uploaded -deCHMoContent - ^ #[222 18 4 149 0 0 0 0 4 0 0 0 28 0 0 0 60 0 0 0 5 0 0 0 92 0 0 0 0 0 0 0 112 0 0 0 21 0 0 0 113 0 0 0 8 0 0 0 135 0 0 0 6 0 0 0 144 0 0 0 142 1 0 0 151 0 0 0 39 0 0 0 38 2 0 0 14 0 0 0 78 2 0 0 6 0 0 0 93 2 0 0 1 0 0 0 0 0 0 0 3 0 0 0 2 0 0 0 4 0 0 0 0 83 101 108 101 99 116 32 97 32 108 111 99 97 108 101 32 98 101 108 111 119 0 102 111 110 116 115 105 122 101 0 108 111 99 97 108 101 0 80 114 111 106 101 99 116 45 73 100 45 86 101 114 115 105 111 110 58 32 80 104 97 114 111 10 80 79 45 82 101 118 105 115 105 111 110 45 68 97 116 101 58 32 50 48 50 49 45 48 51 45 50 49 32 49 54 58 50 52 43 48 49 48 48 10 76 97 110 103 117 97 103 101 45 84 101 97 109 58 32 10 77 73 77 69 45 86 101 114 115 105 111 110 58 32 49 46 48 10 67 111 110 116 101 110 116 45 84 121 112 101 58 32 116 101 120 116 47 112 108 97 105 110 59 32 99 104 97 114 115 101 116 61 85 84 70 45 56 10 67 111 110 116 101 110 116 45 84 114 97 110 115 102 101 114 45 69 110 99 111 100 105 110 103 58 32 56 98 105 116 10 88 45 80 104 97 114 111 45 83 121 115 116 101 109 86 101 114 115 105 111 110 58 32 80 104 97 114 111 45 55 46 48 46 51 43 98 117 105 108 100 46 49 54 54 46 115 104 97 46 99 99 100 49 102 54 52 56 57 49 50 48 102 53 56 100 100 101 97 99 98 50 99 97 99 55 55 99 100 51 97 48 102 48 100 99 102 98 101 54 32 40 54 52 32 66 105 116 41 10 88 45 80 104 97 114 111 45 68 111 109 97 105 110 58 32 103 101 116 116 101 120 116 10 88 45 71 101 110 101 114 97 116 111 114 58 32 80 111 101 100 105 116 32 50 46 51 46 49 10 76 97 115 116 45 84 114 97 110 115 108 97 116 111 114 58 32 10 80 108 117 114 97 108 45 70 111 114 109 115 58 32 110 112 108 117 114 97 108 115 61 50 59 32 112 108 117 114 97 108 61 40 110 32 33 61 32 49 41 59 10 76 97 110 103 117 97 103 101 58 32 100 101 95 67 72 10 0 87 195 164 104 108 101 110 32 83 105 101 32 117 110 116 101 110 32 101 105 110 32 71 101 98 105 101 116 115 115 99 104 101 109 97 32 97 117 115 0 115 99 104 114 105 102 116 103 114 195 182 195 159 101 0 108 111 99 97 108 101 0] \ No newline at end of file diff --git a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/frMo.st b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/frMo.st index c1df697bd..22d964d90 100644 --- a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/frMo.st +++ b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/frMo.st @@ -1,7 +1,3 @@ -uploaded metadata +uploaded frMo - ^ WAFileLibraryResource - filepath: 'fr.mo' - mimeType: (WAMimeType main: 'application' sub: 'octet-stream') - cacheDuration: (Duration days: 0 hours: 0 minutes: 30 seconds: 0) - contents: (GRDelayedSend receiver: self selector: #frMoContent) \ No newline at end of file + ^ #(222 18 4 149 0 0 0 0 4 0 0 0 28 0 0 0 60 0 0 0 5 0 0 0 92 0 0 0 0 0 0 0 112 0 0 0 21 0 0 0 113 0 0 0 8 0 0 0 135 0 0 0 6 0 0 0 144 0 0 0 138 1 0 0 151 0 0 0 34 0 0 0 34 2 0 0 16 0 0 0 69 2 0 0 6 0 0 0 86 2 0 0 1 0 0 0 0 0 0 0 3 0 0 0 2 0 0 0 4 0 0 0 0 83 101 108 101 99 116 32 97 32 108 111 99 97 108 101 32 98 101 108 111 119 0 102 111 110 116 115 105 122 101 0 108 111 99 97 108 101 0 80 114 111 106 101 99 116 45 73 100 45 86 101 114 115 105 111 110 58 32 80 104 97 114 111 10 80 79 45 82 101 118 105 115 105 111 110 45 68 97 116 101 58 32 50 48 50 49 45 48 51 45 50 49 32 49 53 58 52 56 43 48 49 48 48 10 76 97 110 103 117 97 103 101 45 84 101 97 109 58 32 10 77 73 77 69 45 86 101 114 115 105 111 110 58 32 49 46 48 10 67 111 110 116 101 110 116 45 84 121 112 101 58 32 116 101 120 116 47 112 108 97 105 110 59 32 99 104 97 114 115 101 116 61 85 84 70 45 56 10 67 111 110 116 101 110 116 45 84 114 97 110 115 102 101 114 45 69 110 99 111 100 105 110 103 58 32 56 98 105 116 10 88 45 80 104 97 114 111 45 83 121 115 116 101 109 86 101 114 115 105 111 110 58 32 80 104 97 114 111 45 55 46 48 46 51 43 98 117 105 108 100 46 49 54 54 46 115 104 97 46 99 99 100 49 102 54 52 56 57 49 50 48 102 53 56 100 100 101 97 99 98 50 99 97 99 55 55 99 100 51 97 48 102 48 100 99 102 98 101 54 32 40 54 52 32 66 105 116 41 10 88 45 80 104 97 114 111 45 68 111 109 97 105 110 58 32 103 101 116 116 101 120 116 10 88 45 71 101 110 101 114 97 116 111 114 58 32 80 111 101 100 105 116 32 50 46 51 46 49 10 76 97 115 116 45 84 114 97 110 115 108 97 116 111 114 58 32 10 80 108 117 114 97 108 45 70 111 114 109 115 58 32 110 112 108 117 114 97 108 115 61 50 59 32 112 108 117 114 97 108 61 40 110 32 62 32 49 41 59 10 76 97 110 103 117 97 103 101 58 32 102 114 10 0 83 195 169 108 101 99 116 105 111 110 110 101 122 32 108 97 32 108 111 99 97 108 101 32 99 105 45 100 101 115 115 111 117 115 0 116 97 105 108 108 101 32 100 101 32 112 111 108 105 99 101 0 108 111 99 97 108 101 0) \ No newline at end of file diff --git a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/frMoContent.st b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/frMoContent.st deleted file mode 100644 index 0684dc597..000000000 --- a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/frMoContent.st +++ /dev/null @@ -1,3 +0,0 @@ -uploaded -frMoContent - ^ #[222 18 4 149 0 0 0 0 4 0 0 0 28 0 0 0 60 0 0 0 5 0 0 0 92 0 0 0 0 0 0 0 112 0 0 0 21 0 0 0 113 0 0 0 8 0 0 0 135 0 0 0 6 0 0 0 144 0 0 0 138 1 0 0 151 0 0 0 34 0 0 0 34 2 0 0 16 0 0 0 69 2 0 0 6 0 0 0 86 2 0 0 1 0 0 0 0 0 0 0 3 0 0 0 2 0 0 0 4 0 0 0 0 83 101 108 101 99 116 32 97 32 108 111 99 97 108 101 32 98 101 108 111 119 0 102 111 110 116 115 105 122 101 0 108 111 99 97 108 101 0 80 114 111 106 101 99 116 45 73 100 45 86 101 114 115 105 111 110 58 32 80 104 97 114 111 10 80 79 45 82 101 118 105 115 105 111 110 45 68 97 116 101 58 32 50 48 50 49 45 48 51 45 50 49 32 49 53 58 52 56 43 48 49 48 48 10 76 97 110 103 117 97 103 101 45 84 101 97 109 58 32 10 77 73 77 69 45 86 101 114 115 105 111 110 58 32 49 46 48 10 67 111 110 116 101 110 116 45 84 121 112 101 58 32 116 101 120 116 47 112 108 97 105 110 59 32 99 104 97 114 115 101 116 61 85 84 70 45 56 10 67 111 110 116 101 110 116 45 84 114 97 110 115 102 101 114 45 69 110 99 111 100 105 110 103 58 32 56 98 105 116 10 88 45 80 104 97 114 111 45 83 121 115 116 101 109 86 101 114 115 105 111 110 58 32 80 104 97 114 111 45 55 46 48 46 51 43 98 117 105 108 100 46 49 54 54 46 115 104 97 46 99 99 100 49 102 54 52 56 57 49 50 48 102 53 56 100 100 101 97 99 98 50 99 97 99 55 55 99 100 51 97 48 102 48 100 99 102 98 101 54 32 40 54 52 32 66 105 116 41 10 88 45 80 104 97 114 111 45 68 111 109 97 105 110 58 32 103 101 116 116 101 120 116 10 88 45 71 101 110 101 114 97 116 111 114 58 32 80 111 101 100 105 116 32 50 46 51 46 49 10 76 97 115 116 45 84 114 97 110 115 108 97 116 111 114 58 32 10 80 108 117 114 97 108 45 70 111 114 109 115 58 32 110 112 108 117 114 97 108 115 61 50 59 32 112 108 117 114 97 108 61 40 110 32 62 32 49 41 59 10 76 97 110 103 117 97 103 101 58 32 102 114 10 0 83 195 169 108 101 99 116 105 111 110 110 101 122 32 108 97 32 108 111 99 97 108 101 32 99 105 45 100 101 115 115 111 117 115 0 116 97 105 108 108 101 32 100 101 32 112 111 108 105 99 101 0 108 111 99 97 108 101 0] \ No newline at end of file diff --git a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/nlBEMo.st b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/nlBEMo.st index 938958cbd..9eb07355c 100644 --- a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/nlBEMo.st +++ b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/nlBEMo.st @@ -1,7 +1,3 @@ -uploaded metadata +uploaded nlBEMo - ^ WAFileLibraryResource - filepath: 'nl_BE.mo' - mimeType: (WAMimeType main: 'application' sub: 'octet-stream') - cacheDuration: (Duration days: 0 hours: 0 minutes: 30 seconds: 0) - contents: (GRDelayedSend receiver: self selector: #nlBEMoContent) \ No newline at end of file + ^ #(222 18 4 149 0 0 0 0 4 0 0 0 28 0 0 0 60 0 0 0 5 0 0 0 92 0 0 0 0 0 0 0 112 0 0 0 21 0 0 0 113 0 0 0 8 0 0 0 135 0 0 0 6 0 0 0 144 0 0 0 142 1 0 0 151 0 0 0 25 0 0 0 38 2 0 0 14 0 0 0 64 2 0 0 6 0 0 0 79 2 0 0 1 0 0 0 0 0 0 0 3 0 0 0 2 0 0 0 4 0 0 0 0 83 101 108 101 99 116 32 97 32 108 111 99 97 108 101 32 98 101 108 111 119 0 102 111 110 116 115 105 122 101 0 108 111 99 97 108 101 0 80 114 111 106 101 99 116 45 73 100 45 86 101 114 115 105 111 110 58 32 80 104 97 114 111 10 80 79 45 82 101 118 105 115 105 111 110 45 68 97 116 101 58 32 50 48 50 49 45 48 51 45 50 49 32 49 53 58 53 48 43 48 49 48 48 10 76 97 110 103 117 97 103 101 45 84 101 97 109 58 32 10 77 73 77 69 45 86 101 114 115 105 111 110 58 32 49 46 48 10 67 111 110 116 101 110 116 45 84 121 112 101 58 32 116 101 120 116 47 112 108 97 105 110 59 32 99 104 97 114 115 101 116 61 85 84 70 45 56 10 67 111 110 116 101 110 116 45 84 114 97 110 115 102 101 114 45 69 110 99 111 100 105 110 103 58 32 56 98 105 116 10 88 45 80 104 97 114 111 45 83 121 115 116 101 109 86 101 114 115 105 111 110 58 32 80 104 97 114 111 45 55 46 48 46 51 43 98 117 105 108 100 46 49 54 54 46 115 104 97 46 99 99 100 49 102 54 52 56 57 49 50 48 102 53 56 100 100 101 97 99 98 50 99 97 99 55 55 99 100 51 97 48 102 48 100 99 102 98 101 54 32 40 54 52 32 66 105 116 41 10 88 45 80 104 97 114 111 45 68 111 109 97 105 110 58 32 103 101 116 116 101 120 116 10 88 45 71 101 110 101 114 97 116 111 114 58 32 80 111 101 100 105 116 32 50 46 51 46 49 10 76 97 115 116 45 84 114 97 110 115 108 97 116 111 114 58 32 10 80 108 117 114 97 108 45 70 111 114 109 115 58 32 110 112 108 117 114 97 108 115 61 50 59 32 112 108 117 114 97 108 61 40 110 32 33 61 32 49 41 59 10 76 97 110 103 117 97 103 101 58 32 110 108 95 66 69 10 0 75 105 101 115 32 101 101 110 32 108 111 99 97 108 101 32 104 105 101 114 111 110 100 101 114 0 115 99 104 114 105 102 116 103 114 111 111 116 116 101 0 108 111 99 97 108 101 0) \ No newline at end of file diff --git a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/nlBEMoContent.st b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/nlBEMoContent.st deleted file mode 100644 index da3a0e2c3..000000000 --- a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/instance/nlBEMoContent.st +++ /dev/null @@ -1,3 +0,0 @@ -uploaded -nlBEMoContent - ^ #[222 18 4 149 0 0 0 0 4 0 0 0 28 0 0 0 60 0 0 0 5 0 0 0 92 0 0 0 0 0 0 0 112 0 0 0 21 0 0 0 113 0 0 0 8 0 0 0 135 0 0 0 6 0 0 0 144 0 0 0 142 1 0 0 151 0 0 0 25 0 0 0 38 2 0 0 14 0 0 0 64 2 0 0 6 0 0 0 79 2 0 0 1 0 0 0 0 0 0 0 3 0 0 0 2 0 0 0 4 0 0 0 0 83 101 108 101 99 116 32 97 32 108 111 99 97 108 101 32 98 101 108 111 119 0 102 111 110 116 115 105 122 101 0 108 111 99 97 108 101 0 80 114 111 106 101 99 116 45 73 100 45 86 101 114 115 105 111 110 58 32 80 104 97 114 111 10 80 79 45 82 101 118 105 115 105 111 110 45 68 97 116 101 58 32 50 48 50 49 45 48 51 45 50 49 32 49 53 58 53 48 43 48 49 48 48 10 76 97 110 103 117 97 103 101 45 84 101 97 109 58 32 10 77 73 77 69 45 86 101 114 115 105 111 110 58 32 49 46 48 10 67 111 110 116 101 110 116 45 84 121 112 101 58 32 116 101 120 116 47 112 108 97 105 110 59 32 99 104 97 114 115 101 116 61 85 84 70 45 56 10 67 111 110 116 101 110 116 45 84 114 97 110 115 102 101 114 45 69 110 99 111 100 105 110 103 58 32 56 98 105 116 10 88 45 80 104 97 114 111 45 83 121 115 116 101 109 86 101 114 115 105 111 110 58 32 80 104 97 114 111 45 55 46 48 46 51 43 98 117 105 108 100 46 49 54 54 46 115 104 97 46 99 99 100 49 102 54 52 56 57 49 50 48 102 53 56 100 100 101 97 99 98 50 99 97 99 55 55 99 100 51 97 48 102 48 100 99 102 98 101 54 32 40 54 52 32 66 105 116 41 10 88 45 80 104 97 114 111 45 68 111 109 97 105 110 58 32 103 101 116 116 101 120 116 10 88 45 71 101 110 101 114 97 116 111 114 58 32 80 111 101 100 105 116 32 50 46 51 46 49 10 76 97 115 116 45 84 114 97 110 115 108 97 116 111 114 58 32 10 80 108 117 114 97 108 45 70 111 114 109 115 58 32 110 112 108 117 114 97 108 115 61 50 59 32 112 108 117 114 97 108 61 40 110 32 33 61 32 49 41 59 10 76 97 110 103 117 97 103 101 58 32 110 108 95 66 69 10 0 75 105 101 115 32 101 101 110 32 108 111 99 97 108 101 32 104 105 101 114 111 110 100 101 114 0 115 99 104 114 105 102 116 103 114 111 111 116 116 101 0 108 111 99 97 108 101 0] \ No newline at end of file diff --git a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/properties.json b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/properties.json index 288a15f51..70f3c5247 100644 --- a/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/properties.json +++ b/repository/Seaside-Tests-Gettext-Core.package/WAGettextTestingFileLibrary.class/properties.json @@ -1,6 +1,6 @@ { "commentStamp" : "JohanBrichau 11/13/2022 11:17", - "super" : "WAFileMetadataLibrary", + "super" : "WAFileLibrary", "category" : "Seaside-Tests-Gettext-Core", "classinstvars" : [ ], "pools" : [ ], From abbf1fda15eb6d17c36546f27f3610c32d567c44 Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Sun, 13 Nov 2022 16:18:45 +0100 Subject: [PATCH 24/24] Fix for GemStone --- .../WAGettextExample.class/class/addTranslatorForExample.st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/class/addTranslatorForExample.st b/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/class/addTranslatorForExample.st index fe52c5d5c..d8078eb4b 100644 --- a/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/class/addTranslatorForExample.st +++ b/repository/Seaside-Gettext-Examples.package/WAGettextExample.class/class/addTranslatorForExample.st @@ -2,7 +2,7 @@ localization addTranslatorForExample | localeIds moFiles | - localeIds := #( #nl_BE #fr #de_CH ) collect: [ :str | (WALocale fromString: str) localeId ]. + localeIds := #( 'nl_BE' 'fr' 'de_CH' ) collect: [ :str | (WALocale fromString: str) localeId ]. moFiles := localeIds collect: [ :localeId | | contents | contents := (WAGettextTestingFileLibrary new perform: