HyperScript 1.7.47
Scripts can be written with the words of French, Spanish, Portuguese or German, and text can be read as a time.
Added
- Scripts in another language.
language:inconfig.ymlchooses the language scripts are written in:english(the default),french,spanish,portugueseorgerman. Withfrench, a script can say:
quand un joueur rejoint:
envoyer "&aBienvenue, %joueur%!" au joueur
si le joueur a la permission "vip.join":
donner 1 diamond au joueur
Not everything is translated, and not every translation is correct. It is a list of about 165 words and phrases for each language, not a grammar, so the words of a line stay in the order English has them. What has no translation is written in English: the names of items, blocks, creatures and sounds, and the syntax the list does not name.
- English keeps working in every script whatever language is chosen, also mixed into a line. With
englishnothing else is looked for. - Text in quotes, comments and the names of variables, commands, options and functions are never changed.
- A word is also known without its accents.
/hyperscript reloadreads the setting again, so no restart is needed. The log says which language is in use, with the warning above.- A file such as
plugins/HyperScript/languages/french.txtadds words of your own, or says one differently:send = envoyer | balancer. - Errors, commands and the docs stay in English.
The docs list every word, under *Writing scripts → Scripts in another language*.
parse <text> as timereads text such as"1h 30m","90 seconds"or"2 days and 4 hours"as a duration, and is unset if the text is not one. Also writtenas duration,<text> parsed as timeandtry parse <text> as time.
set {_long} to parse arg.2 as time
if {_long} is not set:
send "&cSay how long, such as 1h 30m."