[squeak-dev] The Inbox: System-ct.1303.mcz
marcel.taeumel at hpi.de
Tue Feb 8 18:04:55 UTC 2022
Hi Christoph --
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.
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:
==================== Summary ====================
Time: 7 February 2022, 9:46:07.019465 pm
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.
=============== 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
"| message |
message := MethodReference new setStandardClass: Morph class
self new findWordsWIth: #translatedNoop in: message"
| messages keywords aParseNode |
aParseNode := aMethodReference decompile.
"Find from string literal"
messages := Set new.
keywords := OrderedCollection new.
select: [:aMessageNode | aMessageNode receiver isMemberOf: LiteralNode]
thenDo: [:aMessageNode | aMessageNode receiver key
literalStringsDo: [:literal | keywords add: literal]].
+ 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"
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev