[etoys-dev] Etoys: System-kfr.4.mcz

commits at source.squeak.org commits at source.squeak.org
Sun May 2 07:43:12 EDT 2010

Karl Ramberg uploaded a new version of System to project Etoys:

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

Name: System-kfr.4
Author: kfr
Time: 2 May 2010, 1:42:52 pm
UUID: da25f7c9-3411-2341-adc0-d99de92c51e2
Ancestors: System-kfr.3

Add preference useLocale to language menu when noviceMode is off. I prefer to use english language and it was a little painful to set this...

=============== Diff against System-bf.2 ===============

Item was changed:
  ----- Method: Project>>chooseNaturalLanguage (in category 'language') -----
  	"Put up a menu allowing the user to choose the natural language for the project"
  	| aMenu availableLanguages item |
  Cursor wait showWhile: [
  	aMenu _ MenuMorph new defaultTarget: self.
  	aMenu addTitle: 'choose language' translated.
  	aMenu lastItem setBalloonText: 'This controls the human language in which tiles should be viewed.  It is potentially extensible to be a true localization mechanism, but initially it only works in the classic tile scripting system.  Each project has its own private language choice' translated.
  	Preferences noviceMode
+ 		ifFalse:[aMenu addStayUpItem.
+ 					aMenu addUpdating: #useLocaleString action: #toggleUseLocale.
+ 					aMenu addLine].
- 		ifFalse:[aMenu addStayUpItem].
  	availableLanguages := NaturalLanguageTranslator availableLanguageLocaleIDs
  										asSortedCollection:[:x :y | x displayName < y displayName].
  	availableLanguages do:
  		[:localeID |
  			item _ aMenu addUpdating: #stringForLanguageNameIs: target: Locale selector:  #switchAndInstallFontToID:gently: argumentList: {localeID. true} extraIcon: (Locale localeID: localeID) iconForNativeLanguage.
  			item wordingArgument: localeID.].
  	aMenu popUpInWorld
  "Project current chooseNaturalLanguage"!

Item was added:
+ ----- Method: Project>>useLocaleString (in category 'language') -----
+ useLocaleString
+ 	"Answer a string characterizing whether the receiver is currently using localized language."
+ 	^ (Preferences useLocale == true ifTrue: ['<yes>'] ifFalse: ['<no>']), ('use localized language' translated)!

Item was added:
+ ----- Method: Project>>toggleUseLocale (in category 'language') -----
+ toggleUseLocale
+ ^ Preferences setPreference: #useLocale toValue:  ((Preferences useLocale == true) not)
+ !

More information about the etoys-dev mailing list