I observe strange behavior for some users logged by FirebaseAuth.instance.currentUser using NetworkFileTranslationLoader.
For the first 3 launchs, the behavior is correct, in this case app language set to French by default and FlutterI18n.currentLocale(context)?.languageCode returns fr as well.
But, when this logged user closes and reopens exactly 3 times his app, the app language is changing in English despite FlutterI18n.currentLocale(context)?.languageCode is still returning fr in the language menu.
The forcedLocale is also setted on fr on his launch (thanks to debugs logs I putted) so there is no reason that the app language is suddenly setted to English.
If this user use app version with FileTranslationLoader despite of NetworkFileTranslationLoader (so in local) OR if the user isn't logged in FirebaseAuth, the behavior is always excellent !
Only 2 users are concerned (we have more than 20k active users) and even with cache clearing and resinstalls, this strange behavior is always present, when they are logged, after the third app restarting..
The users doesn't call refresh method before the issue comes.
This is my code implementation, where in this case Platform.localeName.split('_')[0] is returning fr (thanks to debugs logs and when we debug FlutterI18n.currentLocale(context)?.languageCode is setted to fr):
As I said before, for the most part of users, everything is working well, the problem is only present when the user is logged in FirebaseAuth and using NetworkFileTranslationLoader.
If he's logged but using FileTranslationLoader, everything works well.
If he's not logged but using NetworkFileTranslationLoader, everythin works well also.
I don't know how could I get more informations to help you to understand this issue better, but not hesitate to ask me something !
Hello,
I observe strange behavior for some users logged by
FirebaseAuth.instance.currentUser
usingNetworkFileTranslationLoader
. For the first 3 launchs, the behavior is correct, in this case app language set to French by default andFlutterI18n.currentLocale(context)?.languageCode
returnsfr
as well.But, when this logged user closes and reopens exactly 3 times his app, the app language is changing in English despite
FlutterI18n.currentLocale(context)?.languageCode
is still returningfr
in the language menu.The
forcedLocale
is also setted onfr
on his launch (thanks to debugs logs I putted) so there is no reason that the app language is suddenly setted to English.If this user use app version with FileTranslationLoader despite of
NetworkFileTranslationLoader
(so in local) OR if the user isn't logged inFirebaseAuth
, the behavior is always excellent ! Only 2 users are concerned (we have more than 20k active users) and even with cache clearing and resinstalls, this strange behavior is always present, when they are logged, after the third app restarting.. The users doesn't callrefresh
method before the issue comes.This is my code implementation, where in this case
Platform.localeName.split('_')[0]
is returningfr
(thanks to debugs logs and when we debugFlutterI18n.currentLocale(context)?.languageCode
is setted tofr
):Then,
flutterI18nDelegate
is used inMaterialApp.localizationsDelegates
like this:As I said before, for the most part of users, everything is working well, the problem is only present when the user is logged in
FirebaseAuth
and usingNetworkFileTranslationLoader
. If he's logged but usingFileTranslationLoader
, everything works well. If he's not logged but usingNetworkFileTranslationLoader
, everythin works well also.I don't know how could I get more informations to help you to understand this issue better, but not hesitate to ask me something !
Thanks a lot for your plugin and all your work !