A chapter dedicated to scripts translation, is it that important?
Yes. PlayOnMac scripts must be translated in all languages so that a maximum of people can use them.
But I do not speak russian!
Don't worry, you won't be doing all the translations, it will be the job of the Launchpad team of translators, that we gratefully thank here for all their work.
But, to make it possible for the Launchpad to translate your script, your script need some arrangements.
This is the core requirement for translations to take place (messages being translated from english to the other languages).
To lessen translators workload, messages should be as much as possible identical among scripts (because if the message has already been translated, it won't need to be translated again for the new script).
Hence, we made a list of the most common messages.
Please select the setup file to run.
Please insert the game media into your disk drive.
Please wait while $TITLE is installed.
$TITLE has been successfully installed.
Use those whenever you can. If you need some message that is not in this list, go ahead and write it in english. What you must avoid are messages that are not in this list but have the same meaning as one that does.
The command eval_gettext takes an english message as argument, and returns its translation into current user's language (as automatically determined).
eval_gettext 'Please select the setup file to run.'
The problem is, how to simply pass the return value of the eval_gettext function to, say, the POL_SetupWindow_message command? The solution is to evaluate eval_gettext inside arguments.
One can evaluate a function inside an argument? Wow, this is getting complicated!
This is achieve by inserting the function eval_gettext between the symbols: $() meaning that the code between ( and ) is to be executed.
POL_SetupWindow_message "$(eval_gettext 'Please select the setup file to run.')" "$TITLE"
That may look a bit twisted, but you'll get used to it.
That is all, the tutorial ends here, you should have enough knowledge to stand on your own feet.
An annex is available in the next chapter, that lists all the variables and all the functions that can be used in PlayOnMac scripts, because we have seen something like one quarter of existing functions. One of those may come handy in a specific script, so think about having a look to this annex at that time. Note however, that the functions used in this tutorial will be all what you need for most scripts.
If you have any question, do not hesitate to ask it in the forums.