[squeak-dev] The Trunk: GetText-nice.34.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Dec 25 22:02:56 UTC 2013


Nicolas Cellier uploaded a new version of GetText to project The Trunk:
http://source.squeak.org/trunk/GetText-nice.34.mcz

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

Name: GetText-nice.34
Author: nice
Time: 25 December 2013, 11:02:39.404 pm
UUID: 4d432f8e-55be-428a-9138-63dd1738035e
Ancestors: GetText-fbs.33

Change a few print:(aFloat roundTo: 0.01) into nextPutAll:(aFloat printShowingMaxDecimalPlaces: 2)

=============== Diff against GetText-fbs.33 ===============

Item was changed:
  ----- Method: LanguageEditor>>check (in category 'private') -----
  check
  	"check the translations and answer a collection with the results"
  	| results counter phrasesCount checkMethod |
  	results := OrderedCollection new.
  	untranslated := self untranslated.
  	phrasesCount := self translations size + self untranslated size.
  	counter := 0.
  	checkMethod := self class checkMethods at: self translator localeID printString ifAbsent: [^results].
  	
  	self translations
  		keysAndValuesDo: [:phrase :translation | 
  			| result | 
  			result := self perform: checkMethod with: phrase with: translation.
  			(result notNil
  					and: [result notEmpty])
  				ifTrue: [results add: {phrase. translation. result}].
  		
  			counter := counter + 1.
  			(counter isDivisibleBy: 50)
  				ifTrue: [| percent | 
+ 					percent := counter / phrasesCount * 100 printShowingMaxDecimalPlaces: 2.
- 					percent := counter / phrasesCount * 100 roundTo: 0.01.
  					Transcript
  						show: ('- checked {1} phrases of {2} ({3}%)...' translated format: {counter. phrasesCount. percent});
  						 cr]].
  
  	self untranslated
  		do: [:phrase | 
  			| result | 
  			result := self checkUntranslatedPhrase: phrase.
  			(result notNil
  					and: [result notEmpty])
  				ifTrue: [results add: {phrase. nil. result}].
  		
  			counter := counter + 1.
  			(counter isDivisibleBy: 50)
  				ifTrue: [| percent | 
+ 					percent := counter / phrasesCount * 100 printShowingMaxDecimalPlaces: 2.
- 					percent := counter / phrasesCount * 100 roundTo: 0.01.
  					Transcript
  						show: ('- checked {1} phrases of {2} ({3}%)...' translated format: {counter. phrasesCount. percent});
  						 cr]].
  
  	^ results!



More information about the Squeak-dev mailing list