The Trunk: System-cmm.276.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: System-cmm.276.mcz

commits-2
Chris Muller uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-cmm.276.mcz

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

Name: System-cmm.276
Author: cmm
Time: 5 March 2010, 4:10:48.265 pm
UUID: fe6572ff-7ad4-4395-a5a8-dc0af1948e14
Ancestors: System-cmm.275

Added ability to resetKnownLocales.  Otherwise, once the image is started, there is no API for doing this.  Also applied a fix of an apparent bug in NaturalLanguageTranslator class>>#loadAvailableExternalLocales.

=============== Diff against System-cmm.275 ===============

Item was added:
+ ----- Method: NaturalLanguageTranslator class>>loadAvailableLocales (in category 'private loading') -----
+ loadAvailableLocales
+ "This loads the default locale and all external locales"
+
+ | defaultID |
+ defaultID := LocaleID current.
+ self cachedTranslations at: defaultID ifAbsent: [self localeID: defaultID].
+ self loadAvailableExternalLocales.!

Item was added:
+ ----- Method: Locale class>>resetKnownLocales (in category 'private') -----
+ resetKnownLocales
+
+ KnownLocales := nil
+ !

Item was changed:
  ----- Method: NaturalLanguageTranslator class>>startUp: (in category 'class initialization') -----
  startUp: resuming
+
+ resuming ifTrue: [ self loadAvailableLocales ]!
- | defaultID |
- resuming
- ifFalse: [^ self].
- ""
- defaultID := LocaleID current.
- self cachedTranslations
- at: defaultID
- ifAbsent: [self localeID: defaultID].
- ""
- self loadAvailableExternalLocales!

Item was changed:
  ----- Method: NaturalLanguageTranslator class>>loadAvailableExternalLocales (in category 'private loading') -----
  loadAvailableExternalLocales
  "private - register locales IDs based on the content of the <prefs>/locale/ directory"
  | localeDir |
  localeDir := self localeDirCreate: false.
  localeDir ifNil: [^ #()].
-
  localeDir directoryNames
  do: [:langDirName |
  | langDir |
  langDir := localeDir directoryNamed: langDirName.
-
  (langDir fileNamesMatching: '*.' , self translationSuffix)
  ifNotEmpty: [self loadTranslatorForIsoLanguage: langDirName isoCountry: nil].
-
  langDir directoryNames
  do: [:countryDirName |
  | countryDir |
+ countryDir := langDir directoryNamed: countryDirName.
- countryDir := langDirName directoryNamed: countryDirName.
  (countryDir fileNamesMatching: '*.' , self translationSuffix)
  ifNotEmpty: [self loadTranslatorForIsoLanguage: langDirName isoCountry: countryDirName]
  ]
  ].
  !