Simplify the logic of variables. "Simplicity is the biggest sophistication" - Leonardo da Vinci.
This commit is contained in:
parent
c25c0b0018
commit
e447ea1167
@ -77,10 +77,7 @@ function translate(m: text, p: object, variables: strings = "null") :: text:
|
|||||||
if {_variables::1} is not "null":
|
if {_variables::1} is not "null":
|
||||||
set {_msg} to {langmsg::%{_lang}%::%{_m}%}
|
set {_msg} to {langmsg::%{_lang}%::%{_m}%}
|
||||||
loop {_variables::*}:
|
loop {_variables::*}:
|
||||||
{_msg} contains "$%loop-index%$":
|
|
||||||
replace "$%loop-index%$" with loop-value in {_msg}
|
replace "$%loop-index%$" with loop-value in {_msg}
|
||||||
else:
|
|
||||||
exit loop
|
|
||||||
return {_msg}
|
return {_msg}
|
||||||
|
|
||||||
#Translation Mode 1, return the message (MOST USEFUL!)
|
#Translation Mode 1, return the message (MOST USEFUL!)
|
||||||
|
Loading…
Reference in New Issue
Block a user