fixup the JS context access; added some tests for translation.dart