[squeak-dev] Questions regarding translations

Vanessa Freudenberg vanessa at codefrau.net
Mon Jan 3 20:45:07 UTC 2022


#translatedNoop is used to mark a string for later translation
using #translated being sent to a variable receiver.

A good example is Partsbin class>>translatedQuads: which sends #translated
to a variable, with the actual string being marked for translation using
#translatedNoop in all the #descriptionForPartsBin methods. This is so the
actual description is stored untranslated, and only translated in the UI,
using the language active at that point in time.

Vanessa

On Mon, Jan 3, 2022 at 9:22 AM <christoph.thiede at student.hpi.uni-potsdam.de>
wrote:

> Hi all!
>
> I have some quick questions regarding proper use of #translated & friends:
>
> 1. When should you use #translatedNoop rather than #translated?
>
> 2. Should you only use #translated right after a string literal literal
> or it is also fine to write things such as:
>
>     (aBoolean ifTrue: ['on'] ifFalse: ['off']) translated.
>     #('yes' 'no' 'cancel') collect: #translated.
>     menu addTranslatedList: ...
>
> Some examples like the above are already in the Trunk, but on the other
> hand, I do not know how the translator engine should find the locale
> strings in this case.
>
> Thanks in advance!
>
> Best,
> Christoph
>
> ---
> *Sent from **Squeak Inbox Talk
> <https://github.com/hpi-swa-lab/squeak-inbox-talk>*
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220103/85f19cd4/attachment.html>


More information about the Squeak-dev mailing list