Fix positioning of the language change popup when sidebar is on the right

Authored by matmarex on Fri, May 19, 7:02 PM.

Description

Fix positioning of the language change popup when sidebar is on the right

This fixes the same issue as 1d395d49660e340df6ecd120b91bbb55947c4419,
but for the little language change popup (shown after you change the
language) instead of the main interface.

Also fixed a minor bug for the main interface - we were measuring the
wrong $window, which happened to work right most of the time but
wasn't correct.

Change-Id: I28d3e8baeebf4619f4f810869c8a2a3fb60496d9