help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] smalltalk-2.0.5: bugs in Locale.st


From: Bruno Haible
Subject: [Help-smalltalk] smalltalk-2.0.5: bugs in Locale.st
Date: Mon, 2 Sep 2002 13:51:21 +0200 (CEST)

1) After
     PackageLoader fileInPackage: 'I18N' !

     I18N Locale posix printNl !
works but
     I18N Locale default printNl !
gives
   error: method is responsibility of a subclass

2) You forgot to test LC_ALL, which is an override of all other LC_*
variables.

3) Environment variables values like those of LC_ALL or LANG must be
ignored if they are empty.

4) I'm also updating the table of territories and locale defaults.
For example, in territories, you had 'CS' instead of 'CZ'. I'm adding many
locale names that are in glibc-2.2.91, as well as many others that are likely
to appear on Unix sooner or later.


2002-09-01  Bruno Haible  <address@hidden>

        * i18n/Locale.st: Add more territories, languages, defaults.
        Make "I18N Locale default" work. Look at the LC_* environment
        variables in the way specified by POSIX.

*** smalltalk-2.0.5/i18n/Locale.st.bak  2002-07-14 13:46:10.000000000 +0200
--- smalltalk-2.0.5/i18n/Locale.st      2002-09-01 15:22:56.000000000 +0200
***************
*** 78,90 ****
  !LocaleData class methodsFor: 'database'!
  
  territories
!     "Valid territory codes"
      ^#( 'AF' 'AL' 'DZ' 'AS' 'AD' 'AO' 'AI' 'AQ' 'AG' 'AR' 'AM'
        'AW' 'AU' 'AT' 'AZ' 'BS' 'BH' 'BD' 'BB' 'BY' 'BE' 'BZ'
        'BJ' 'BM' 'BT' 'BO' 'BA' 'BW' 'BV' 'BR' 'IO' 'BN' 'BG'
        'BF' 'BI' 'KH' 'CM' 'CA' 'CV' 'KY' 'CF' 'TD' 'CL' 'CN'
        'CX' 'CC' 'CO' 'KM' 'CG' 'CK' 'CR' 'CI' 'HR' 'CU' 'CY'
!       'CS' 'DK' 'DJ' 'DM' 'DO' 'TP' 'EC' 'EG' 'SV' 'GQ' 'EE'
        'ET' 'FK' 'FO' 'FJ' 'FI' 'FR' 'GF' 'PF' 'TF' 'GA' 'GM'
        'GE' 'DE' 'GH' 'GI' 'GR' 'GL' 'GD' 'GP' 'GU' 'GT' 'GN'
        'GW' 'GY' 'HT' 'HM' 'HN' 'HK' 'HU' 'IS' 'IN' 'ID' 'IR'
--- 78,90 ----
  !LocaleData class methodsFor: 'database'!
  
  territories
!     "ISO3166 territory codes"
      ^#( 'AF' 'AL' 'DZ' 'AS' 'AD' 'AO' 'AI' 'AQ' 'AG' 'AR' 'AM'
        'AW' 'AU' 'AT' 'AZ' 'BS' 'BH' 'BD' 'BB' 'BY' 'BE' 'BZ'
        'BJ' 'BM' 'BT' 'BO' 'BA' 'BW' 'BV' 'BR' 'IO' 'BN' 'BG'
        'BF' 'BI' 'KH' 'CM' 'CA' 'CV' 'KY' 'CF' 'TD' 'CL' 'CN'
        'CX' 'CC' 'CO' 'KM' 'CG' 'CK' 'CR' 'CI' 'HR' 'CU' 'CY'
!       'CZ' 'DK' 'DJ' 'DM' 'DO' 'TP' 'EC' 'EG' 'SV' 'GQ' 'EE'
        'ET' 'FK' 'FO' 'FJ' 'FI' 'FR' 'GF' 'PF' 'TF' 'GA' 'GM'
        'GE' 'DE' 'GH' 'GI' 'GR' 'GL' 'GD' 'GP' 'GU' 'GT' 'GN'
        'GW' 'GY' 'HT' 'HM' 'HN' 'HK' 'HU' 'IS' 'IN' 'ID' 'IR'
***************
*** 100,182 ****
        'CH' 'SY' 'TW' 'TJ' 'TZ' 'TH' 'TG' 'TK' 'TO' 'TT' 'TN'
        'TR' 'TM' 'TC' 'TV' 'UG' 'UA' 'AE' 'GB' 'US' 'UM' 'UY'
        'UZ' 'VU' 'VA' 'VE' 'VN' 'VG' 'VI' 'WF' 'EH' 'YE' 'YU'
!       'ZR' 'ZM' 'ZW' 'SK' 'SP')!
  
  languages
      "ISO639 language codes"
!     ^#( 'aa' 'ab' 'af' 'am' 'ar' 'as' 'ay' 'az' 'ba' 'be' 'bg'
!       'bh' 'bi' 'bn' 'bo' 'br' 'ca' 'co' 'cs' 'cy' 'da' 'de'
!       'dz' 'el' 'en' 'eo' 'es' 'et' 'eu' 'fa' 'fi' 'fj' 'fo'
!       'fr' 'fy' 'ga' 'gd' 'gl' 'gn' 'gu' 'ha' 'he' 'hi' 'hr'
!       'hu' 'hy' 'ia' 'id' 'ie' 'ik' 'is' 'it' 'iu' 'ja' 'jw'
!       'ka' 'kk' 'kl' 'km' 'kn' 'ko' 'ks' 'ku' 'ky' 'la' 'ln'
!       'lo' 'lt' 'lv' 'mg' 'mi' 'mk' 'ml' 'mn' 'mo' 'mr' 'ms'
!       'mt' 'my' 'na' 'ne' 'nl' 'no' 'oc' 'om' 'or' 'pa' 'pl'
!       'ps' 'pt' 'qu' 'rm' 'rn' 'ro' 'ru' 'rw' 'sa' 'sd' 'sg'
!       'sh' 'si' 'sk' 'sl' 'sm' 'sn' 'so' 'sq' 'sr' 'ss' 'st'
!       'su' 'sv' 'sw' 'ta' 'te' 'tg' 'th' 'ti' 'tk' 'tl' 'tn'
!       'to' 'tr' 'ts' 'tt' 'tw' 'ug' 'uk' 'ur' 'uz' 'vi' 'vo'
!       'wo' 'xh' 'yi' 'yo' 'za' 'zh' 'zu')!
  
  defaults
      "Answer the default territory-language and language-charset
       associations."
      ^#(       ('POSIX' ''     #'ISO-8859-1')
        ('af' 'ZA'      #'ISO-8859-1')
        ('ar' 'SA'      #'ISO-8859-6')
!       ('bg' 'BG'      #'ISO-8859-5')
!       ('br' 'FR'      #'ISO-8859-1')
        ('ca' 'ES'      #'ISO-8859-1')
        ('cs' 'CZ'      #'ISO-8859-2')
!       ('cy' 'GB'      #'ISO-8859-1')
        ('de' 'DE'      #'ISO-8859-1')
        ('el' 'GR'      #'ISO-8859-7')
        ('en' 'US'      #'ISO-8859-1')
!       ('eo' 'XX'      #'ISO-8859-3')
        ('es' 'ES'      #'ISO-8859-1')
        ('et' 'EE'      #'ISO-8859-4')
        ('eu' 'ES'      #'ISO-8859-1')
        ('fi' 'FI'      #'ISO-8859-1')
        ('fo' 'FO'      #'ISO-8859-1')
        ('fr' 'FR'      #'ISO-8859-1')
        ('ga' 'IE'      #'ISO-8859-1')
!       ('gd' 'GB'      #'ISO-8859-1')
        ('gl' 'ES'      #'ISO-8859-1')
        ('gv' 'GB'      #'ISO-8859-1')
        ('he' 'IL'      #'ISO-8859-8')
        ('hr' 'HR'      #'ISO-8859-2')
        ('hu' 'HU'      #'ISO-8859-2')
!       "('hy' 'AM'     #'ARMSCII-8')"
        ('id' 'ID'      #'ISO-8859-1')
        ('is' 'IS'      #'ISO-8859-1')
        ('it' 'IT'      #'ISO-8859-1')
        ('ja' 'JP'      #'EUC-JP')
        ('kl' 'GL'      #'ISO-8859-1')
        ('kw' 'GB'      #'ISO-8859-1')
!       "('lo' 'LA'     #'MULELAO-1')"
!       ('lt' 'LT'      #'ISO-8859-4')
!       ('lv' 'LV'      #'ISO-8859-4')
        ('mk' 'MK'      #'ISO-8859-5')
        ('nl' 'NL'      #'ISO-8859-1')
        ('no' 'NO'      #'ISO-8859-1')
        ('oc' 'FR'      #'ISO-8859-1')
        ('pl' 'PL'      #'ISO-8859-2')
        ('pt' 'PT'      #'ISO-8859-1')
        ('ro' 'RO'      #'ISO-8859-2')
        ('ru' 'RU'      #'KOI8-R')
!       ('sh' 'YU'      #'ISO-8859-2')
        ('sk' 'SK'      #'ISO-8859-2')
        ('sl' 'SI'      #'ISO-8859-2')
!       ('sp' 'YU'      #'ISO-8859-5')
!       ('sq' 'AL'      #'ISO-8859-2')
!       ('sr' 'SP'      #'ISO-8859-2')
        ('sv' 'SE'      #'ISO-8859-1')
        ('th' 'TH'      #'TIS-620')
        ('tr' 'TR'      #'ISO-8859-9')
        ('uk' 'UA'      #'KOI8-U')
!       "('vi' 'VN'     #VISCII)"
        ('wa' 'BE'      #'ISO-8859-1')
!       ('zh' 'TW'      #'EUC-CN'))!
  
  initialize
      "Initialize the receiver's class variables."
--- 100,262 ----
        'CH' 'SY' 'TW' 'TJ' 'TZ' 'TH' 'TG' 'TK' 'TO' 'TT' 'TN'
        'TR' 'TM' 'TC' 'TV' 'UG' 'UA' 'AE' 'GB' 'US' 'UM' 'UY'
        'UZ' 'VU' 'VA' 'VE' 'VN' 'VG' 'VI' 'WF' 'EH' 'YE' 'YU'
!       'ZR' 'ZM' 'ZW' 'SK' 'SP' 'CD' 'ER' 'MK' 'YT' 'SC' 'GS')!
  
  languages
      "ISO639 language codes"
!     ^#( 'aa' 'ab' 'ae' 'af' 'am' 'ar' 'as' 'ay' 'az' 'ba' 'be'
!       'bg' 'bh' 'bi' 'bn' 'bo' 'br' 'bs' 'ca' 'ce' 'ch' 'co'
!       'cs' 'cu' 'cv' 'cy' 'da' 'de' 'dz' 'el' 'en' 'eo' 'es'
!       'et' 'eu' 'fa' 'fi' 'fj' 'fo' 'fr' 'fy' 'ga' 'gd' 'gl'
!       'gn' 'gu' 'gv' 'ha' 'he' 'hi' 'ho' 'hr' 'hu' 'hy' 'hz'
!       'ia' 'id' 'ie' 'ik' 'io' 'is' 'it' 'iu' 'ja' 'jv' 'ka'
!       'ki' 'kj' 'kk' 'kl' 'km' 'kn' 'ko' 'ks' 'ku' 'kv' 'kw'
!       'ky' 'la' 'lb' 'ln' 'lo' 'lt' 'lv' 'mg' 'mh' 'mi' 'mk'
!       'ml' 'mn' 'mo' 'mr' 'ms' 'mt' 'my' 'na' 'nb' 'nd' 'ne'
!       'ng' 'nl' 'nn' 'no' 'nr' 'nv' 'ny' 'oc' 'om' 'or' 'os'
!       'pa' 'pi' 'pl' 'ps' 'pt' 'qu' 'rm' 'rn' 'ro' 'ru' 'rw'
!       'sa' 'sc' 'sd' 'se' 'sg' 'sh' 'si' 'sk' 'sl' 'sm' 'sn'
!       'so' 'sq' 'sr' 'ss' 'st' 'su' 'sv' 'sw' 'ta' 'te' 'tg'
!       'th' 'ti' 'tk' 'tl' 'tn' 'to' 'tr' 'ts' 'tt' 'tw' 'ty'
!       'ug' 'uk' 'ur' 'uz' 'vi' 'vo' 'wa' 'wo' 'xh' 'yi' 'yo'
!       'za' 'zh' 'zu'
!       'ber' 'bin' 'bnt' 'chr' 'cpe' 'div' 'ful' 'ibo' 'kau'
!       'kok' 'mni' 'nic' 'pap' 'sit' 'syr' 'ven' 'wen')!
  
  defaults
      "Answer the default territory-language and language-charset
       associations."
      ^#(       ('POSIX' ''     #'ISO-8859-1')
        ('af' 'ZA'      #'ISO-8859-1')
+       ('am' 'ET'      #'UTF-8')       "not yet seen on Unix"
        ('ar' 'SA'      #'ISO-8859-6')
!       ('as' 'IN'      #'UTF-8')       "not yet seen on Unix"
!       ('az' 'AZ'      #'UTF-8')       "not yet seen on Unix"
!       ('be' 'BY'      #'CP1251')
!       ('ber' 'MA'     #'UTF-8')       "not yet seen on Unix"
!       ('bg' 'BG'      #'CP1251')
!       ('bin' 'NG'     #'ISO-8859-1')  "not yet seen on Unix"
!       ('bn' 'IN'      #'UTF-8')       "not yet seen on Unix"
!       ('bnt' 'TZ'     #'ISO-8859-1')  "not yet seen on Unix"
!       ('bo' 'CN'      #'UTF-8')       "not yet seen on Unix"
!       ('br' 'FR'      #'ISO-8859-1')  "not yet seen on Unix"
!       ('bs' 'BA'      #'ISO-8859-2')
        ('ca' 'ES'      #'ISO-8859-1')
+       ('chr' 'US'     #'ISO-8859-1')  "not yet seen on Unix"
+       ('cpe' 'US'     #'ISO-8859-1')  "not yet seen on Unix"
        ('cs' 'CZ'      #'ISO-8859-2')
!       ('cy' 'GB'      #'ISO-8859-14')
!       ('da' 'DK'      #'ISO-8859-1')
        ('de' 'DE'      #'ISO-8859-1')
+       ('div' 'MV'     #'ISO-8859-1')  "not yet seen on Unix"
        ('el' 'GR'      #'ISO-8859-7')
        ('en' 'US'      #'ISO-8859-1')
!       ('eo' 'XX'      #'ISO-8859-3')  "not yet seen on Unix"
        ('es' 'ES'      #'ISO-8859-1')
        ('et' 'EE'      #'ISO-8859-4')
        ('eu' 'ES'      #'ISO-8859-1')
+       ('fa' 'IR'      #'UTF-8')
        ('fi' 'FI'      #'ISO-8859-1')
        ('fo' 'FO'      #'ISO-8859-1')
        ('fr' 'FR'      #'ISO-8859-1')
+       ('ful' 'NG'     #'ISO-8859-1')  "not yet seen on Unix"
+       ('fy' 'NL'      #'ISO-8859-1')  "not yet seen on Unix"
        ('ga' 'IE'      #'ISO-8859-1')
!       ('gd' 'GB'      #'ISO-8859-1')  "not yet seen on Unix"
        ('gl' 'ES'      #'ISO-8859-1')
+       ('gn' 'PY'      #'ISO-8859-1')  "not yet seen on Unix"
+       ('gu' 'IN'      #'UTF-8')       "not yet seen on Unix"
        ('gv' 'GB'      #'ISO-8859-1')
+       ('ha' 'NG'      #'ISO-8859-1')  "not yet seen on Unix"
        ('he' 'IL'      #'ISO-8859-8')
+       ('hi' 'IN'      #'UTF-8')
        ('hr' 'HR'      #'ISO-8859-2')
        ('hu' 'HU'      #'ISO-8859-2')
!       "('hy' 'AM'     #'ARMSCII-8')"  "not yet seen on Unix"
!       ('ibo' 'NG'     #'ISO-8859-1')  "not yet seen on Unix"
        ('id' 'ID'      #'ISO-8859-1')
        ('is' 'IS'      #'ISO-8859-1')
        ('it' 'IT'      #'ISO-8859-1')
+       ('iu' 'CA'      #'UTF-8')       "not yet seen on Unix"
        ('ja' 'JP'      #'EUC-JP')
+       ('ka' 'GE'      #'GEORGIAN-PS')
+       ('kau' 'NG'     #'ISO-8859-1')  "not yet seen on Unix"
+       ('kk' 'KZ'      #'UTF-8')       "not yet seen on Unix"
        ('kl' 'GL'      #'ISO-8859-1')
+       ('km' 'KH'      #'UTF-8')       "not yet seen on Unix"
+       ('kn' 'IN'      #'UTF-8')       "not yet seen on Unix"
+       ('ko' 'KR'      #'EUC-KR')
+       ('kok' 'IN'     #'UTF-8')       "not yet seen on Unix"
+       ('ks' 'PK'      #'UTF-8')       "not yet seen on Unix"
        ('kw' 'GB'      #'ISO-8859-1')
!       ('ky' 'KG'      #'UTF-8')       "not yet seen on Unix"
!       ('la' 'VA'      #'ASCII')       "not yet seen on Unix"
!       "('lo' 'LA'     #'MULELAO-1')"  "not yet seen on Unix"
!       ('lt' 'LT'      #'ISO-8859-13')
!       ('lv' 'LV'      #'ISO-8859-13')
!       ('mi' 'NZ'      #'ISO-8859-13')
        ('mk' 'MK'      #'ISO-8859-5')
+       ('ml' 'IN'      #'UTF-8')       "not yet seen on Unix"
+       ('mn' 'MN'      #'KOI8-R')      "not yet seen on Unix"
+       ('mni' 'IN'     #'UTF-8')       "not yet seen on Unix"
+       ('mr' 'IN'      #'UTF-8')
+       ('ms' 'MY'      #'ISO-8859-1')
+       ('mt' 'MT'      #'ISO-8859-3')
+       ('my' 'MM'      #'UTF-8')       "not yet seen on Unix"
+       ('ne' 'NP'      #'UTF-8')       "not yet seen on Unix"
+       ('nic' 'NG'     #'ISO-8859-1')  "not yet seen on Unix"
        ('nl' 'NL'      #'ISO-8859-1')
+       ('nn' 'NO'      #'ISO-8859-1')
        ('no' 'NO'      #'ISO-8859-1')
        ('oc' 'FR'      #'ISO-8859-1')
+       ('om' 'ET'      #'UTF-8')       "not yet seen on Unix"
+       ('or' 'IN'      #'UTF-8')       "not yet seen on Unix"
+       ('pa' 'IN'      #'UTF-8')       "not yet seen on Unix"
+       ('pap' 'AN'     #'UTF-8')       "not yet seen on Unix"
        ('pl' 'PL'      #'ISO-8859-2')
+       ('ps' 'PK'      #'UTF-8')       "not yet seen on Unix"
        ('pt' 'PT'      #'ISO-8859-1')
+       ('rm' 'CH'      #'ISO-8859-1')  "not yet seen on Unix"
        ('ro' 'RO'      #'ISO-8859-2')
        ('ru' 'RU'      #'KOI8-R')
!       ('sa' 'IN'      #'UTF-8')       "not yet seen on Unix"
!       "('sd' ?        ?)"             "not yet seen on Unix"
!       ('se' 'NO'      #'UTF-8')
!       ('sh' 'YU'      #'ISO-8859-2')  "obsolete"
!       ('si' 'LK'      #'UTF-8')       "not yet seen on Unix"
!       ('sit' 'CN'     #'UTF-8')       "not yet seen on Unix"
        ('sk' 'SK'      #'ISO-8859-2')
        ('sl' 'SI'      #'ISO-8859-2')
!       ('so' 'SO'      #'UTF-8')       "not yet seen on Unix"
!       ('sp' 'YU'      #'ISO-8859-5')  "obsolete"
!       ('sq' 'AL'      #'ISO-8859-1')
!       ('sr' 'YU'      #'ISO-8859-2')
        ('sv' 'SE'      #'ISO-8859-1')
+       ('sw' 'KE'      #'ISO-8859-1')  "not yet seen on Unix"
+       ('syr' 'TR'     #'UTF-8')       "not yet seen on Unix"
+       ('ta' 'IN'      #'UTF-8')
+       ('te' 'IN'      #'UTF-8')
+       ('tg' 'TJ'      #'UTF-8')
        ('th' 'TH'      #'TIS-620')
+       ('ti' 'ET'      #'UTF-8')       "not yet seen on Unix"
+       ('tk' 'TM'      #'UTF-8')       "not yet seen on Unix"
+       ('tl' 'PH'      #'ISO-8859-1')
        ('tr' 'TR'      #'ISO-8859-9')
+       ('ts' 'ZA'      #'ISO-8859-1')  "not yet seen on Unix"
+       ('tt' 'RU'      #'UTF-8')       "not yet seen on Unix"
        ('uk' 'UA'      #'KOI8-U')
!       ('ur' 'PK'      #'UTF-8')
!       ('uz' 'UZ'      #'ISO-8859-1')
!       ('ven' 'ZA'     #'ISO-8859-1')  "not yet seen on Unix"
!       ('vi' 'VN'      #'UTF-8')
        ('wa' 'BE'      #'ISO-8859-1')
!       ('wen' 'DE'     #'ISO-8859-1')  "not yet seen on Unix"
!       ('xh' 'ZA'      #'ISO-8859-1')  "not yet seen on Unix"
!       ('yi' 'US'      #'CP1255')
!       ('yo' 'NG'      #'ISO-8859-1')  "not yet seen on Unix"
!       ('zh' 'CN'      #'GB2312')
!       ('zu' 'ZA'      #'ISO-8859-1')  "not yet seen on Unix"
!       )!
  
  initialize
      "Initialize the receiver's class variables."
***************
*** 201,207 ****
  !LocaleData class methodsFor: 'accessing'!
  
  category
!     self subclassResponsibility!
  
  default
      self subclassResponsibility!
--- 281,287 ----
  !LocaleData class methodsFor: 'accessing'!
  
  category
!     ^nil!
  
  default
      self subclassResponsibility!
***************
*** 242,267 ****
       string."
      | spec stream language territory charset |
      spec := string.
!     spec isNil ifTrue: [ spec := Smalltalk getenv: self class category ].
!     spec isNil ifTrue: [ spec := Smalltalk getenv: 'LANG' ].
!     spec isNil ifTrue: [ spec := #POSIX ].
! 
!     stream := spec readStream.
!     language := stream upTo: $_.
!     stream atEnd ifTrue: [ ^{
!       language.
!       DefaultTerritories at: language.
!       DefaultCharsets at: language }
!     ].
  
!     territory := stream upTo: $. .
!     stream atEnd ifTrue: [ ^{
!       language. territory.
!       DefaultCharsets at: language }
      ].
! 
!     charset := stream upToEnd.
!     ^{ language. territory. charset }! !
  
  !LocaleData methodsFor: 'accessing'!
  
--- 322,360 ----
       string."
      | spec stream language territory charset |
      spec := string.
!     (spec isNil & self class category isNil) ifFalse: [
!       spec isNil ifTrue: [
!           spec := Smalltalk getenv: 'LC_ALL'.
!           spec = '' ifTrue: [ spec := nil ]
!       ].
!       spec isNil ifTrue: [
!           spec := Smalltalk getenv: self class category.
!           spec = '' ifTrue: [ spec := nil ]
!       ].
!       spec isNil ifTrue: [
!           spec := Smalltalk getenv: 'LANG'.
!           spec = '' ifTrue: [ spec := nil ]
!       ].
!       spec isNil ifTrue: [ spec := #POSIX ].
! 
!       stream := spec readStream.
!       language := stream upTo: $_.
!       stream atEnd ifTrue: [ ^{
!           language.
!           DefaultTerritories at: language.
!           DefaultCharsets at: language }
!       ].
! 
!       territory := stream upTo: $. .
!       stream atEnd ifTrue: [ ^{
!           language. territory.
!           DefaultCharsets at: language }
!       ].
  
!       charset := stream upToEnd.
!       spec := { language. territory. charset }.
      ].
!     ^spec! !
  
  !LocaleData methodsFor: 'accessing'!
  
***************
*** 280,296 ****
  languageDirectory
      "Answer the directory where data files for the current language reside."
      ^'%1/%2'
!         bindWith: Locale rootDirectory
!         with: self language!
  
  territoryDirectory
      "Answer the directory where data files for the current language,
       specific to the territory, reside."
      self isPosixLocale ifTrue: [ ^self languageDirectory ].
      ^'%1/%2_%3'
!         bindWith: Locale rootDirectory
!         with: self language
!         with: self territory!
  
  territory
      "Return the territory supported by the receiver."
--- 373,389 ----
  languageDirectory
      "Answer the directory where data files for the current language reside."
      ^'%1/%2'
!       bindWith: Locale rootDirectory
!       with: self language!
  
  territoryDirectory
      "Answer the directory where data files for the current language,
       specific to the territory, reside."
      self isPosixLocale ifTrue: [ ^self languageDirectory ].
      ^'%1/%2_%3'
!       bindWith: Locale rootDirectory
!       with: self language
!       with: self territory!
  
  territory
      "Return the territory supported by the receiver."
***************
*** 388,402 ****
      "Create the receiver and load all of its subobjects"
      | result |
      super initialize: aString.
!     numeric := LcNumeric basicNew id: self id.
!     time := LcTime basicNew id: self id.
!     monetary := LcMonetary basicNew id: self id.
!     iso := LcMonetaryISO basicNew id: self id.
!     messages := LcMessages basicNew id: self id.
  
      (result := self load: aString) isNil
        ifTrue: [ self load: 'C' ]
!       ifFalse: [ id at: 3 put: result ].
  ! !
  
  !LocaleConventions class methodsFor: 'accessing'!
--- 481,503 ----
      "Create the receiver and load all of its subobjects"
      | result |
      super initialize: aString.
!     id isNil
!       ifFalse: [
!           numeric := LcNumeric basicNew id: self id.
!           time := LcTime basicNew id: self id.
!           monetary := LcMonetary basicNew id: self id.
!           iso := LcMonetaryISO basicNew id: self id.
!           messages := LcMessages basicNew id: self id. ]
!       ifTrue: [
!           numeric := LcNumeric basicNew initialize: nil.
!           time := LcTime basicNew initialize: nil.
!           monetary := LcMonetary basicNew initialize: nil.
!           iso := LcMonetaryISO basicNew initialize: nil.
!           messages := LcMessages basicNew initialize: nil. ].
  
      (result := self load: aString) isNil
        ifTrue: [ self load: 'C' ]
!       ifFalse: [ id isNil ifFalse: [ id at: 3 put: result ] ].
  ! !
  
  !LocaleConventions class methodsFor: 'accessing'!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]