[etoys-dev] Etoys: Morphic-bf.42.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Aug 29 12:40:38 EDT 2010


Bert Freudenberg uploaded a new version of Morphic to project Etoys:
http://source.squeak.org/etoys/Morphic-bf.42.mcz

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

Name: Morphic-bf.42
Author: bf
Time: 29 August 2010, 6:39:25 pm
UUID: 27eb981c-9ea1-4ee7-afff-d40682dfcd9c
Ancestors: Morphic-bf.41

Fix for SQ-764: Guides not translated in Brasilian Portuguese
- pt_BR falls back to pt now
- if no localized guide found, look for any
- English guides moved to locale folder just as the others

=============== Diff against Morphic-bf.41 ===============

Item was changed:
  ----- Method: QuickGuideMorph classSide>>guidePath (in category 'defaults') -----
  guidePath
+ 	| sepa localesPath langPath countryPath |
- 	| sepa defaultPath langPath|
  	sepa  := FileDirectory slash.
+ 	localesPath := Smalltalk imagePath, sepa, 'locale'.
+ 
+ 	"Look for current locale first"
+ 	langPath := localesPath, sepa, LocaleID current isoLanguage.
+ 	LocaleID current isoCountry ifNotNil: [
+ 		countryPath := langPath, '_', LocaleID current isoCountry. 
+ 		((FileDirectory on: countryPath ) directoryExists: 'QuickGuides') 
+ 			ifTrue: [^ countryPath, sepa, 'QuickGuides' ]].
+ 	((FileDirectory on: langPath) directoryExists: 'QuickGuides') 
+ 		ifTrue: [^ langPath, sepa, 'QuickGuides' ].
+ 
+ 	"Try English next"
+ 	((FileDirectory on: localesPath, sepa, 'en') directoryExists: 'QuickGuides') 
+ 		ifTrue: [^ localesPath, sepa, 'en', sepa, 'QuickGuides' ].
+ 
+ 	"Old location"
+ 	((FileDirectory on: Smalltalk imagePath) directoryExists: 'QuickGuides') 
+ 		ifTrue: [^ Smalltalk imagePath, sepa, 'QuickGuides' ].
+ 
+ 	"Any language"
+ 	(FileDirectory on: localesPath) directoryNames do: [:dir |
+ 		((FileDirectory on: localesPath, sepa, dir) directoryExists: 'QuickGuides')
+ 			ifTrue: [^ localesPath, sepa, dir, sepa, 'QuickGuides']].
+ 
+ 	"Give up"
+ 	^ nil!
- 	defaultPath := Smalltalk imagePath, sepa, 'QuickGuides'.
-      langPath := Smalltalk imagePath, sepa, 'locale', sepa, (LocaleID current posixName).
- 	((FileDirectory on: langPath ) directoryExists: 'QuickGuides') 
- 		ifTrue: [^ langPath, sepa, 'QuickGuides' ]
- 		ifFalse: [^defaultPath].
- !



More information about the etoys-dev mailing list