[squeak-dev] The Trunk: GetText-edc.18.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Fri Mar 30 10:54:11 UTC 2012


Resent with snipped code...

Le 30 mars 2012 03:24, Nicolas Cellier
<nicolas.cellier.aka.nice at gmail.com>a écrit :

> This broke #translatedIfCorresponds at least...
>
> Nicolas
>
> Le 15 mars 2012 22:27, <commits at source.squeak.org> a écrit :
>
> Edgar J. De Cleene uploaded a new version of GetText to project The Trunk:
>> http://source.squeak.org/trunk/GetText-edc.18.mcz
>>
>> ==================== Summary ====================
>>
>> Name: GetText-edc.18
>> Author: edc
>> Time: 15 March 2012, 6:29:37.486 pm
>> UUID: 43d88f85-6e87-41fb-8dd1-883feaf3d297
>> Ancestors: GetText-edc.17
>>
>> '_' s replaced by ':='
>>
>> =============== Diff against GetText-edc.17 ===============
>>
>>
SNIP ...


> Item was changed:
>>  ----- Method: String>>translatedIfCorresponds (in category '*gettext')
>> -----
>>  translatedIfCorresponds
>>        "answer the receiver translated to the default language only if
>> +       the receiver begins and ends with an underscore (:=)"
>> +       ^ (':=*:=' match: self)
>> -       the receiver begins and ends with an underscore (_)"
>> -       ^ ('_*_' match: self)
>>                ifTrue: [(self copyFrom: 2 to: self size - 1) translated]
>>                ifFalse: [self]!
>>
>> Item was changed:
>>  ----- Method: TranslatedReceiverFinder>>stringReceiversWithContext (in
>> category 'accessing') -----
>>  stringReceiversWithContext
>>        | mrs results rr cls mn t o |
>> +       mrs := SystemNavigation default allCallsOn: #translated.
>> +       results := OrderedCollection new.
>> -       mrs _ SystemNavigation default allCallsOn: #translated.
>> -       results _ OrderedCollection new.
>>        mrs do: [:mr |
>> +               rr := OrderedCollection new.
>> +               cls := Smalltalk at: mr classSymbol.
>> -               rr _ OrderedCollection new.
>> -               cls _ Smalltalk at: mr classSymbol.
>>                rr add: cls category.
>>                rr add: mr classSymbol.
>>                rr add: mr methodSymbol.
>>                mr classIsMeta ifTrue: [
>> +                       mn :=  cls class decompile: mr methodSymbol.
>> -                       mn _  cls class decompile: mr methodSymbol.
>>                ] ifFalse: [
>> +                       mn := cls decompile: mr methodSymbol.
>> -                       mn _ cls decompile: mr methodSymbol.
>>                ].
>> +               o := OrderedCollection new.
>> +               t := Set new.
>> -               o _ OrderedCollection new.
>> -               t _ Set new.
>>                self searchMessageNode: mn addTo: t.
>>                t do: [ :te |
>>                        (te receiver isMemberOf: LiteralNode) ifTrue: [
>>                            o add: te receiver key.
>>                        ].
>>                ].
>>                o ifNotEmpty: [
>>                        rr add: o.
>>                        results add: rr.
>>                ].
>>        ].
>>        ^ results.
>>
>>  !
>>
>> Item was changed:
>>  ----- Method: TranslatedReceiverFinder>>stringReceiversWithContext: (in
>> category 'accessing') -----
>>  stringReceiversWithContext: aSymbol
>>        "Find string receivers for a symbol.
>>        Answer a collection of aMethodReference -> {keyword. keyword...}"
>>        "self new stringReceiversWithContext: #translated"
>>        | keywords methodReferences |
>> +       methodReferences := SystemNavigation default allCallsOn: aSymbol.
>> -       methodReferences _ SystemNavigation default allCallsOn: aSymbol.
>>        ^ methodReferences inject: OrderedCollection new into: [:list
>> :next |
>>                keywords := self findWordsWith: aSymbol in: next.
>>                keywords
>>                        ifNotEmpty: [list add: next -> keywords].
>>                list]
>>  !
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20120330/6103865f/attachment.htm


More information about the Squeak-dev mailing list