Simplify the logic of variables. "Simplicity is the biggest sophistication" - Leonardo da Vinci.

This commit is contained in:
Govindas 2020-08-13 16:34:10 +03:00
parent c25c0b0018
commit e447ea1167

View File

@ -77,10 +77,7 @@ function translate(m: text, p: object, variables: strings = "null") :: text:
if {_variables::1} is not "null":
set {_msg} to {langmsg::%{_lang}%::%{_m}%}
loop {_variables::*}:
{_msg} contains "$%loop-index%$":
replace "$%loop-index%$" with loop-value in {_msg}
else:
exit loop
return {_msg}
#Translation Mode 1, return the message (MOST USEFUL!)