[squeak-dev] The Inbox: System-ct.1161.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jun 6 18:19:27 UTC 2020

Christoph Thiede uploaded a new version of System to project The Inbox:

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

Name: System-ct.1161
Author: ct
Time: 6 June 2020, 8:19:13.480392 pm
UUID: 173a90f3-4bb8-fc46-b5a6-6e4ab74e63ca
Ancestors: System-mt.1160

Catch all InvalidDirectoryErrors in GetTextTranslator availableLanguageLocaleIDs. Those exceptions are an implementation detail and may not confuse the caller. Such a confusion happened in connection with Morphic-ct.1638.

=============== Diff against System-mt.1160 ===============

Item was changed:
  ----- Method: GetTextTranslator class>>availableLanguageLocaleIDs (in category 'accessing') -----
  	"GetTextTranslator availableLanguageLocaleIDs"
  	| ids dirs localeDirForLang directoryNames |
  	ids := Set new.
  	dirs := Set new.
  	dirs addAll: LocaleDirsForDomain values.
  	dirs addAll: self defaultLocaleDirs.
+ 	[dirs do: [:dir |
- 	dirs do: [:dir |
  		| localesDir |
  		localesDir := FileDirectory on: dir. 
+ 		directoryNames := localesDir directoryNames.
- 		directoryNames := [localesDir directoryNames] on: InvalidDirectoryError do: [:e | #()].
  				do: [:langDirName | 
  					| localeID  |
  					localeID := LocaleID posixName: langDirName.
  					localeDirForLang := localesDir directoryNamed: (self langDirNameForLocaleID: localeID).
  					localeDirForLang ifNotNil: [
  						(localeDirForLang fileNamesMatching: '*.mo') ifNotEmpty: [ids add: localeID]].
  					localeID hasParent ifTrue: [
  						localeDirForLang := localesDir directoryNamed: (self langDirNameForLocaleID: localeID parent).
  						localeDirForLang ifNotNil: [
  							(localeDirForLang fileNamesMatching: '*.mo') ifNotEmpty: [ids add: localeID parent]]].
+ 	]] on: InvalidDirectoryError do: [:error | error resumeUnchecked: error defaultAction].
- 	].

More information about the Squeak-dev mailing list