[ermine][dart][l10n] Clean up intl connection
Added a bit more detailed error message when ermine shell can not
connect to the service fuchsia.intl.PropertyProvider. It is important
to emphasize that the issue is not fatal.
Change-Id: Id32cbe63aee56f2c4738bde971952a35f4597d92
diff --git a/session_shells/ermine/internationalization/lib/profile_provider.dart b/session_shells/ermine/internationalization/lib/profile_provider.dart
index ae4b464..d5e3f8d 100644
--- a/session_shells/ermine/internationalization/lib/profile_provider.dart
+++ b/session_shells/ermine/internationalization/lib/profile_provider.dart
@@ -34,8 +34,9 @@
return _fromProfile(await _stub.getProfile());
} on FidlError catch (e, s) {
log.warning(
- 'Could not get locale from fuchsia.intl.ProfileProvider: $e: $s');
- // In case of an error, use the default locale and proceed.
+ 'Could not get locale from fuchsia.intl.ProfileProvider for the shell. '
+ 'This is nonfatal, but the shell will not support any locale '
+ 'except for the system default: $e: $s');
return _defaultLocale;
}
}
diff --git a/session_shells/ermine/internationalization/test/profile_provider_test.dart b/session_shells/ermine/internationalization/test/profile_provider_test.dart
index b154c43..60872de 100644
--- a/session_shells/ermine/internationalization/test/profile_provider_test.dart
+++ b/session_shells/ermine/internationalization/test/profile_provider_test.dart
@@ -76,8 +76,6 @@
expect((await source.initial()).toString(), equals('sr_RS'));
expect(await source.stream().join(','), equals('ru_RU,nl_NL'));
});
-
- log.info('this is over folks, thank you');
}
class MockPropertyProvider extends Mock implements fidl_intl.PropertyProvider {}