[squeak-dev] The Inbox: GetText-edc.27.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Dec 18 12:14:27 UTC 2012
A new version of GetText was added to project The Inbox:
http://source.squeak.org/inbox/GetText-edc.27.mcz
==================== Summary ====================
Name: GetText-edc.27
Author: edc
Time: 18 December 2012, 9:16:38.669 am
UUID: f3c9f830-e87b-4e1c-83ae-dcc9c6e0c14b
Ancestors: GetText-edc.26
Changed all FillInTheBlank references with UIManager default
The deleted methods of TextDomainManager was for no Undeclared.
So we need two branches of GetText?
Or we need unload GetText
=============== Diff against GetText-edc.26 ===============
Item was changed:
----- Method: LanguageEditor>>addTranslation (in category 'gui methods') -----
addTranslation
"translate a phrase"
| phrase |
+ phrase := UIManager default
- phrase := FillInTheBlank
request: 'enter the original:' translated
initialAnswer: ''.
(phrase isNil
or: [phrase = ''])
ifTrue: [""
self beep.
^ self].
""
self translatePhrase: phrase!
Item was changed:
----- Method: LanguageEditor>>filterTranslations (in category 'gui methods') -----
filterTranslations
| filter |
+ filter := UIManager default request: 'filter with
- filter := FillInTheBlank request: 'filter with
(empty string means no-filtering)' translated initialAnswer: self translationsFilter.
""
self filterTranslations: filter!
Item was changed:
----- Method: LanguageEditor>>filterUntranslated (in category 'gui methods') -----
filterUntranslated
| filter |
+ filter := UIManager default request: 'filter with
- filter := FillInTheBlank request: 'filter with
(empty string means no-filtering)' translated initialAnswer: self untranslatedFilter.
""
self filterUntranslated: filter!
Item was changed:
----- Method: LanguageEditor>>newTranslations (in category 'gui methods') -----
newTranslations
"private - try to apply the translations as much as possible all
over the image"
| result newID |
+ result := UIManager default request: 'New locale ID string?' translated initialAnswer: Locale current determineLocaleID isoString.
- result := FillInTheBlank request: 'New locale ID string?' translated initialAnswer: Locale current determineLocaleID isoString.
result isEmpty
ifTrue: ["Do nothing"
^ self].
newID := LocaleID isoString: result.
InternalTranslator
newLocaleID: (LocaleID isoString: result).
self class openOn: newID!
Item was changed:
----- Method: LanguageEditor>>phraseToTranslate (in category 'gui methods') -----
phraseToTranslate
"answer a phrase to translate. use the selected untranslated phrase or ask for a new one"
^ self selectedUntranslated isZero
+ ifTrue: [UIManager default
- ifTrue: [FillInTheBlank
multiLineRequest: 'new phrase to translate' translated
centerAt: Sensor cursorPoint
initialAnswer: ''
answerHeight: 200]
ifFalse: [self untranslated at: self selectedUntranslated]!
Item was changed:
----- Method: LanguageEditor>>saveToFile (in category 'gui methods') -----
saveToFile
"save the translator to a file"
| fileName |
+ fileName := UIManager default request: 'file name' translated initialAnswer: translator localeID isoString , '.translation'.
- fileName := FillInTheBlank request: 'file name' translated initialAnswer: translator localeID isoString , '.translation'.
(fileName isNil
or: [fileName isEmpty])
ifTrue: [""
self beep.
^ self].
""
Cursor wait
showWhile: [
self translator saveToFileNamed: fileName]!
Item was changed:
----- Method: LanguageEditor>>searchTranslation (in category 'gui methods') -----
searchTranslation
| search |
+ search := UIManager default request: 'search for' translated initialAnswer: ''.
- search := FillInTheBlank request: 'search for' translated initialAnswer: ''.
(search isNil
or: [search isEmpty])
ifTrue: [""
self beep.
^ self].
""
self searchTranslation: search!
Item was changed:
----- Method: LanguageEditor>>searchUntranslated (in category 'gui methods') -----
searchUntranslated
| search |
+ search := UIManager default request: 'search for' translated initialAnswer: ''.
- search := FillInTheBlank request: 'search for' translated initialAnswer: ''.
(search isNil
or: [search isEmpty])
ifTrue: [""
self beep.
^ self].
""
self searchUntranslated: search!
Item was changed:
----- Method: LanguageEditor>>translatePhrase: (in category 'gui methods') -----
translatePhrase: aString
"translate aString"
| translation |
+ translation := UIManager default
- translation := FillInTheBlank
multiLineRequest: 'translation for: ' translated , '''' , aString , ''''
centerAt: Sensor cursorPoint
initialAnswer: aString
answerHeight: 200.
""
(translation isNil
or: [translation = ''])
ifTrue: [""
self beep.
^ self].
""
self phrase: aString translation: translation!
Item was removed:
- ----- Method: TextDomainManager class>>allMethodsWithTranslations (in category 'accessing') -----
- allMethodsWithTranslations
- "Look for #translated calls"
- | methodsWithTranslations |
- methodsWithTranslations := TranslatedReceiverFinder new stringReceiversWithContext: #translated.
- methodsWithTranslations := methodsWithTranslations ,
- (TranslatedReceiverFinder new stringReceiversWithContext: #translatedNoop).
-
- methodsWithTranslations := methodsWithTranslations collect: [:each | each key compiledMethod].
-
- "Look for Etoys tiles and vocabularies"
- methodsWithTranslations := methodsWithTranslations , (EToyVocabulary allPhrasesWithContextToTranslate collect: [:r |
- (MethodReference new setStandardClass: r second methodSymbol: r third) compiledMethod]).
-
- ^methodsWithTranslations!
Item was removed:
- ----- Method: TextDomainManager class>>updateDomainOfAllMethodsWithTranslations (in category 'private') -----
- updateDomainOfAllMethodsWithTranslations
- self allMethodsWithTranslations do: [:each |
- self updateDomainOfMethod: each]!
More information about the Squeak-dev
mailing list
|