'From etoys2.1 of 26 July 2007 [latest update: #1513] on 28 July 2007 at 3:49:55 am'! "Change Set: TransExport4-KR Date: 28 July 2007 Author: Korakurider To make context information for tile wording/help better"! !EToyVocabulary class methodsFor: 'as yet unclassified' stamp: 'KR 7/28/2007 03:49'! allPhrasesWithContextToTranslate | etoyVocab results rr literals | results _ OrderedCollection new. etoyVocab := Vocabulary eToyVocabulary. etoyVocab initialize. "just to make sure that it's unfiltered." self morphClassesDeclaringViewerAdditions do: [:cl | (cl class includesSelector: #additionsToViewerCategories) ifTrue: [ literals _ OrderedCollection new. cl additionsToViewerCategories do: [:group | group second do: [:tuple | (tuple first = #slot) ifTrue: [ literals add: (tuple at: 3). "slot name" literals add: (tuple at: 3). "help string" literals add: (tuple at: 7). "getter wording"] ifFalse: [ literals add: (tuple at: 2). "wording" literals add: (tuple at: 3). "help string"]. ]. ]. literals notEmpty ifTrue: [ rr _ OrderedCollection new. rr add: cl category. rr add: cl. rr add: #additionsToViewerCategories. rr add: literals. results add: rr. ]. ]. cl class selectors do: [:aSelector | ((aSelector beginsWith: 'additionsToViewerCategory') and: [(aSelector at: 26 ifAbsent: []) ~= $:]) ifTrue: [ literals _ OrderedCollection new. (cl perform: aSelector) second do: [:tuple | (tuple first = #slot) ifTrue: [ literals add: (tuple at: 3). "help string" literals add: (tuple at: 7). "getter wording" literals add: (tuple at: 9). "setter wording"] ifFalse: [ literals add: (tuple at: 2). "wording" literals add: (tuple at: 3). "help string"]. ]. literals notEmpty ifTrue: [ rr _ OrderedCollection new. rr add: cl category. rr add: cl. rr add: #additionsToViewerCategories. rr add: literals. results add: rr. ]. ]. ]. ]. ^results.! ! !GetTextExporter2 methodsFor: 'private' stamp: 'KR 7/28/2007 03:40'! appendVocabularies: categories | literalsForCategory references aCategory | EToyVocabulary allPhrasesWithContextToTranslate do: [ :r | aCategory _ self getTextCategoryForClassCategory: r first. literalsForCategory _ categories at: aCategory ifAbsentPut: [Dictionary new]. r fourth do: [ :literal | references _ literalsForCategory at: literal ifAbsentPut: [OrderedCollection new]. references add: (MethodReference new setStandardClass: (r second) methodSymbol: (r third)). ]. ]. ! !