Closed reimager closed 3 months ago
@reimager - thanks, I was able to reproduce. You're seeing English labels because you're extending DefaultLocalizations
which has the English translations.
class LabelOverrides extends DefaultLocalizations {
const LabelOverrides();
@override
String get signInWithGoogleButtonText => "XXX";
}
I'll open a PR once we've landed on a solution 🙏
Is there an existing issue for this?
What plugin is this bug for?
Firebase UI Localizations
What platform(s) does this bug affect?
Android
List of dependencies used.
flutter pub deps -s list
Steps to reproduce
Setup firebase_ui_auth and use it with a non-english locale:
View the login page (or any built in page like profile) with your phone language or locale configured to something non english (pt in screenshot)
Everything looks correct.
Now add some label overrides as per docs https://github.com/firebase/FirebaseUI-Flutter/blob/main/docs/firebase-ui-localizations.md
and
The override does work as the google login button now says "XXX" but the fallback to the other FirebaseUILocalizations.delegate seem to stop working and everything reverts to english.
Am I doing something wrong?
Expected Behavior
Override just the overridden labels, all other strings remain the same.
Actual Behavior
Overrides the overridden labels correctly, but all other strings revert to english.
Additional Information
No response