Replies: 1 comment
-
@A-Jawad That's a good point, in any production application you need to use the "official" localized version of "Sign In with Apple" (else you can get rejected, happened to us already…). I don't have time to immediately add a PR for this, but here are all the known locales which we should just support (as there is really no point for the outside to provide the text, as it will just lead to trouble): String signInWithAppleTranslation(Locale locale) {
// Retrieved from https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js
// (Replace `en_US` with the locale)
// Suggested translations: https://appleid.apple.com/signinwithapple/button
/// `switch` doesn't work for classes (like `Locale`) which implement `==`
if (locale == const Locale('de', 'DE') ||
locale == const Locale('de', 'AT') ||
locale == const Locale('de', 'CH')) {
return 'Mit Apple anmelden';
} else if (locale == const Locale('fr', 'BE') ||
locale == const Locale('fr', 'CH') ||
locale == const Locale('fr', 'FR')) {
return 'Connexion avec Apple';
} else if (locale == const Locale('cs', 'CZ')) {
return 'Přihlásit se přes Apple';
} else if (locale == const Locale('pl', 'PL')) {
return 'Zaloguj się, używając konta Apple';
} else if (locale == const Locale('en', 'IE') ||
locale == const Locale('en', 'DE')) {
return 'Sign in with Apple';
} else if (locale == const Locale('da', 'DK')) {
return 'Log ind med Apple';
} else if (locale == const Locale('et', 'EE')) {
return 'Logi sisse Apple\'iga'; // no official Apple translation
} else if (locale == const Locale('hr', 'HR')) {
return 'Prijava s Appleom';
} else if (locale == const Locale('lv', 'LV')) {
return 'Piesakies ar Apple'; // no official Apple translation
} else if (locale == const Locale('nl', 'NL') ||
locale == const Locale('nl', 'BE')) {
return 'Log in met Apple';
} else if (locale == const Locale('ro', 'RO')) {
return 'Autentificați‑vă cu Apple';
} else if (locale == const Locale('fi', 'FI')) {
return 'Kirjaudu sisään Applella';
} else if (locale == const Locale('sv', 'SE')) {
return 'Logga in med Apple';
} else if (locale == const Locale('sl', 'SI')) {
return 'Prijavi se z Applom'; // no official Apple translation
} else if (locale == const Locale('sk', 'SK')) {
return 'Prihlásiť sa cez Apple';
} else if (locale == const Locale('bg', 'BG')) {
return 'Влез с Apple'; // no official Apple translation
} else if (locale == const Locale('lt', 'LT')) {
return 'Prisijungti su Apple'; // no official Apple translation
} else if (locale == const Locale('hu', 'HU')) {
return 'Bejelentkezés az Apple‑lel';
} else if (locale == const Locale('es', 'ES')) {
return 'Iniciar sesión con Apple';
} else if (locale == const Locale('it', 'IT')) {
return 'Accedi con Apple';
} else if (locale == const Locale('el', 'GR')) {
return 'Σύνδεση μέσω Apple';
} else if (locale == const Locale('pt', 'PT')) {
return 'Iniciar sessão com a Apple';
} else if (locale == const Locale('no', 'NO')) {
return 'Logg på med Apple';
}
assert(false);
return 'Sign in with Apple';
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wonder how to change the text:
this.text = 'Sign in with Apple',
in SignInWithAppleButton
or at least to make it variable to pass it from the caller code.
and same with the other Style settings:
this.height = 44,
this.style = SignInWithAppleButtonStyle.black,
this.borderRadius = const BorderRadius.all(Radius.circular(8.0)),
this.iconAlignment = IconAlignment.center,
:)
Beta Was this translation helpful? Give feedback.
All reactions