[Etoys] translation issue in addTranslatedList:

Takashi Yamamiya tak at metatoys.org
Wed Sep 26 15:01:26 EDT 2007

Hi Scott,

There are a couple of ways to solve addTranslatedList: issue for
translation. http://dev.laptop.org/ticket/3447

1: Call #translated explicitly. This is most simple and easy to
maintain. If memory consumption is not so different, this is

	aMenu addList: {
		{'play sound' translated. playSound}
		{'add to sound library' translated. addToSoundLibrary}}

2: Call #translatedNoop. If you need untranslated keyword. This is an
option. But I don't think it is needed in this case.

	aMenu addTranslatedList: {
		{'play sound' translatedNoop. playSound}
		{'add to sound library' translatedNoop. addToSoundLibrary}}

3: If you really care about memory, You can even add #translatedNoop
in the array literal. You need to modify addTranslatedList: in this
case, and there is a limitation which only one literal can be detected
in a array. See #balloonTextForFlapsMenu and  #arraySearch:fromArray:addTo:

	aMenu addTranslatedList: #(
		('play sound' translatedNoop playSound)
		('add to sound library' translatedNoop addToSoundLibrary))

4: Add special case to detect literals. You don't need to change any
method dealing with addTranslatedList:. I don't like to add more
special case though, it's ok if this is the simplest way.  Korakurider
wrote a good example in GetTextExporter2>>appendVocabularies:

- Takashi

More information about the Etoys mailing list