[squeak-dev] The Inbox: System-ct.1303.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Tue Feb 8 18:04:55 UTC 2022


Hi Christoph --

-1

Maybe after the release, we can try to think about that. I don't think this idea has a good cost-value ratio. ;-) Let's keep it simple and as-is for the moment.

Best,
Marcel
Am 07.02.2022 21:46:22 schrieb commits at source.squeak.org <commits at source.squeak.org>:
A new version of System was added to project The Inbox:
http://source.squeak.org/inbox/System-ct.1303.mcz

==================== Summary ====================

Name: System-ct.1303
Author: ct
Time: 7 February 2022, 9:46:07.019465 pm
UUID: 84c77d47-9ac2-644a-a2d0-2bf8cc5ff4d0
Ancestors: System-mt.1302

Proposal: Adds support for translations of the pattern "withCRs translated". This is a first iteration of this pattern; if the proposal is well received, the implementation by be generalized. However, we must not forget that we only should support a minimal pattern of selectors here; #translated should only be sent to literal expressions such as 'hello' or 'hello\world' withCRs.

See http://lists.squeakfoundation.org/pipermail/squeak-dev/2022-February/218959.html.

=============== Diff against System-mt.1302 ===============

Item was changed:
----- Method: TranslatedReceiverFinder>>findWordsWith:in: (in category 'accessing') -----
findWordsWith: aSymbol in: aMethodReference
"Find words for translation with the symbol in a method. See
LanguageEditorTest >>testFindTranslatedWords"
"| message |
message := MethodReference new setStandardClass: Morph class
methodSymbol: #supplementaryPartsDescriptions.
self new findWordsWIth: #translatedNoop in: message"
| messages keywords aParseNode |
aParseNode := aMethodReference decompile.
"Find from string literal"
messages := Set new.
self
search: aSymbol
messageNode: aParseNode
addTo: messages.
keywords := OrderedCollection new.
messages
select: [:aMessageNode | aMessageNode receiver isMemberOf: LiteralNode]
thenDo: [:aMessageNode | aMessageNode receiver key
literalStringsDo: [:literal | keywords add: literal]].
+ messages
+ select: [:aMessageNode | (aMessageNode receiver isMemberOf: MessageNode)
+ and: [aMessageNode receiver selector key = #withCRs]
+ and: [aMessageNode receiver receiver isMemberOf: LiteralNode]]
+ thenDo: [:aMessageNode | aMessageNode receiver receiver key
+ literalStringsDo: [:literal | keywords add: literal withCRs]].
"Find from array literal"
self
arraySearch: aSymbol
messageNode: aParseNode
addTo: keywords.
^ keywords!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220208/b00671e9/attachment.html>


More information about the Squeak-dev mailing list