*** GetText.st.bak3 2002-09-07 02:19:49.000000000 +0200 --- GetText.st 2002-09-07 13:33:11.000000000 +0200 *************** *** 144,157 **** !LcMessages methodsFor: 'accessing'! territoryDirectory "Answer the directory holding MO files for the language, specific to the territory" ! ^super territoryDirectory, '/LC_MESSAGES'! languageDirectory "Answer the directory holding MO files for the language" ! ^super languageDirectory, '/LC_MESSAGES'! ! !LcMessages methodsFor: 'opening MO files'! --- 144,167 ---- !LcMessages methodsFor: 'accessing'! + territoryDirectory: rootDirectory + "Answer the directory holding MO files for the language, specific to + the territory, given the root directory of the locale data." + ^(super territoryDirectory: rootDirectory), '/LC_MESSAGES'! + territoryDirectory "Answer the directory holding MO files for the language, specific to the territory" ! ^self territoryDirectory: Locale rootDirectory! ! ! languageDirectory: rootDirectory ! "Answer the directory holding MO files for the language, given the ! root directory of the locale data." ! ^(super languageDirectory: rootDirectory), '/LC_MESSAGES'! languageDirectory "Answer the directory holding MO files for the language" ! ^self languageDirectory: Locale rootDirectory! ! !LcMessages methodsFor: 'opening MO files'! *************** *** 165,176 **** "Answer an object for the aString domain, querying both the language catalog (e.g. pt) and the territory catalog (e.g. pt_BR or pt_PT)." | primary secondary | self isPosixLocale ifTrue: [ ^self dummyDomain ]. ! primary := self domain: aString directory: self territoryDirectory. ! secondary := self domain: aString directory: self languageDirectory. "If we got only one catalog, just use it. If we got more than one catalog, combine them through a LcMessagesTerritoryDomain." --- 175,194 ---- "Answer an object for the aString domain, querying both the language catalog (e.g. pt) and the territory catalog (e.g. pt_BR or pt_PT)." + ^self domain: aString localeDirectory: Locale rootDirectory! + + domain: aString localeDirectory: rootDirectory + "Answer an object for the aString domain, querying both the + language catalog (e.g. pt) and the territory catalog (e.g. pt_BR + or pt_PT). The localeDirectory is usually '/share/locale'." | primary secondary | self isPosixLocale ifTrue: [ ^self dummyDomain ]. ! primary := self domain: aString ! directory: (self territoryDirectory: rootDirectory). ! secondary := self domain: aString ! directory: (self languageDirectory: rootDirectory). "If we got only one catalog, just use it. If we got more than one catalog, combine them through a LcMessagesTerritoryDomain." *************** *** 179,185 **** secondary isNil ifFalse: [ ^secondary ]. ^self dummyDomain ]. ! secondary isNil ifFalse: [ ^secondary ]. ^LcMessagesTerritoryDomain basicNew id: self id; --- 197,203 ---- secondary isNil ifFalse: [ ^secondary ]. ^self dummyDomain ]. ! secondary isNil ifTrue: [ ^primary ]. ^LcMessagesTerritoryDomain basicNew id: self id; *************** *** 270,278 **** to: self charset) contents ] ]. ! ]. ! messageCache isNil ifFalse: [ ! messageCache at: aString put: translation. ]. lastCache := translation. ]. --- 288,296 ---- to: self charset) contents ] ]. ! messageCache isNil ifFalse: [ ! messageCache at: aString put: translation. ! ]. ]. lastCache := translation. ]. *************** *** 302,315 **** "Check whether we must transliterate the translation. Note that if we go through the transliteration we ! automatically build a cache." sourceCharset notNil ifTrue: [ ! translit := (EncodedStream ! on: translation ! from: sourceCharset ! to: self charset) contents. ! ! pluralCache at: translation put: translit. translation := translit. ]. --- 320,335 ---- "Check whether we must transliterate the translation. Note that if we go through the transliteration we ! automatically build a cache." sourceCharset notNil ifTrue: [ ! translit := pluralCache at: translation ifAbsent: [ nil ]. ! translit isNil ifTrue: [ ! translit := (EncodedStream ! on: translation ! from: sourceCharset ! to: self charset) contents. ! pluralCache at: translation put: translit. ! ]. translation := translit. ].