When guest language is set different from English everything is translated fine except JS files having Liferay.Language.get(key) inside.
When user with non-English locale is logged in – all js translations work fine.
Debugging shows that LanguageFilter tries to extract Locale from HTTP session however at some point new session is created for guest (phishing protection?) and this causes the LanguageFilter to fail to extract locale from session thus using English locale by default.
Temporarily workaround we found:
When main.js is being loaded it has a few parameters that come with the get request.
One of these parameters is "languageId".
When loading other scripts from main.js you can add this parameter in order to make sure LanguageFilter translates the keys correctly.
This workaround is far from being perfect though. I'd prefer a solution which is based directly on the default user (portal) locale