MDL-41808 JavaScript: Correct localisation of all dialogues

Some of the dialogues were already localisable as a result of MDL-43635,
but I'd done so in a slightly less desirable fashion which caused
M.util.get_string() to be called regardless of whether it was used or not.
I also missed outfixing the alert dialogue type.

This commit addresses the alert dialogue, and brings the others all into
line with this. It also reverts a change to the glossary autofilter which
causes it to override the default string to fix the localisation issue for
the Glossary only.