<div dir="ltr"><div>#translatedNoop is used to mark a string for later translation using #translated being sent to a variable receiver.</div><div dir="ltr"><br></div><div dir="ltr">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.</div><div><br></div><div>Vanessa</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 3, 2022 at 9:22 AM <<a href="mailto:christoph.thiede@student.hpi.uni-potsdam.de">christoph.thiede@student.hpi.uni-potsdam.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all!<br>
<br>
I have some quick questions regarding proper use of <font color="#000080">#translated</font> & friends:<br>
<br>
1. When should you use <font color="#000080">#translatedNoop</font> rather than <font color="#000080">#translated</font>?<br>
<br>
2. Should you only use <font color="#000080">#translated</font> right after a string literal literal or it is also fine to write things such as:<br>
<br>
    <font color="#000000">(</font><font color="#FF0000">aBoolean</font><font color="#000000"> </font><font color="#000080">ifTrue:</font><font color="#000000"> </font><font color="#008000">[</font><font color="#800080">'on'</font><font color="#008000">]</font><font color="#000000"> </font><font color="#000080">ifFalse:</font><font color="#000000"> </font><font color="#008000">[</font><font color="#800080">'off'</font><font color="#008000">]</font><font color="#000000">)</font><font color="#000000"> </font><font color="#000080">translated</font><font color="#000000">.</font><font color="#000000"><br>
    </font><font color="#000080">#</font><font color="#000000">(</font><font color="#800080">'yes'</font><font color="#000000"> </font><font color="#800080">'no'</font><font color="#000000"> </font><font color="#800080">'cancel'</font><font color="#000000">)</font><font color="#000000"> </font><font color="#000080">collect:</font><font color="#000000"> </font><font color="#000080">#translated</font><font color="#000000">.</font><font color="#000000"><br>
    </font><font color="#FF0000">menu</font><font color="#000000"> </font><font color="#000080">addTranslatedList:</font><font color="#FF0000"> ...</font><br>
<br>
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.<br>
<br>
Thanks in advance!<br>
<br>
Best,<br>
Christoph<br>
<br>
<font color="#808080">---<br>
</font><font color="#808080"><i>Sent from </i></font><font color="#808080"><i><a href="https://github.com/hpi-swa-lab/squeak-inbox-talk" target="_blank"><u><font color="#808080">Squeak Inbox Talk</font></u></a></i></font><br>
</blockquote></div></div>