Nicolas Cellier uploaded a new version of GetText to project The Trunk: http://source.squeak.org/trunk/GetText-nice.36.mcz
==================== Summary ====================
Name: GetText-nice.36 Author: nice Time: 1 May 2015, 1:40:18.364 am UUID: 4b76e586-b5fb-4611-a82a-56ac5461f57d Ancestors: GetText-kfr.35
Though it can't really be tested in current trunk image state (InternalTranslator is not initialized) , modernize the way to utf8+gzip+base64 encode...
This how how simpler the world could be without those Multi RW Binary or Text things, no need to send those reset/ascii/binary incantations.
=============== Diff against GetText-kfr.35 ===============
Item was changed: ----- Method: LanguageEditor>>codeSelectedTranslationAsMimeString (in category 'gui methods') ----- codeSelectedTranslationAsMimeString + | keys code cont | - | keys code tmpStream s2 gzs cont | keys := selectedTranslations collect: [:key | self translations at: key]. code := String streamContents: [:aStream | self translator fileOutOn: aStream keys: keys withBOM: false].
- tmpStream := MultiByteBinaryOrTextStream on: ''. - tmpStream converter: UTF8TextConverter new. - tmpStream nextPutAll: code. - s2 := RWBinaryOrTextStream on: ''. - gzs := GZipWriteStream on: s2. - tmpStream reset. - gzs nextPutAll: (tmpStream binary contentsOfEntireFile asString) contents. - gzs close. - s2 reset. - cont := String streamContents: [:strm | + strm nextPutAll: '"UTF8+Gzip+Base64 encoded translation for;'; cr. - strm nextPutAll: '"Gzip+Base64 encoded translation for;'; cr. strm nextPutAll: '#('. keys do: [:each | strm nextPutAll: '''', each, ''' '.]. strm nextPutAll: ')"'; cr; cr. strm nextPutAll: 'NaturalLanguageTranslator loadForLocaleIsoString: '. strm nextPut: $'. strm nextPutAll: translator localeID isoString. strm nextPut: $'. strm nextPutAll: ' fromGzippedMimeLiteral: '. strm nextPut: $'. + strm nextPutAll: code squeakToUtf8 asByteArray zipped base64Encoded. - strm nextPutAll: (Base64MimeConverter mimeEncode: s2) contents. strm nextPutAll: '''.'. strm cr. ]. (StringHolder new contents: cont) + openLabel: 'exported codes in UTF8+Gzip+Base64 encoding' translated! - openLabel: 'exported codes in Gzip+Base64 encoding' translated!
packages@lists.squeakfoundation.org