mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Login error message is displayed in native phone locale language and not in just English. Fixes #4290 (#4389)
* Login error message is displayed in native phone locale language. * Login error message is displayed in native phone locale language.
This commit is contained in:
parent
f35d6d605b
commit
cf7583abd4
3 changed files with 22 additions and 10 deletions
|
|
@ -30,6 +30,7 @@ import androidx.core.content.ContextCompat;
|
|||
import com.google.android.material.textfield.TextInputLayout;
|
||||
|
||||
import fr.free.nrw.commons.utils.ActivityUtils;
|
||||
import java.util.Locale;
|
||||
import org.wikipedia.AppAdapter;
|
||||
import org.wikipedia.dataclient.ServiceFactory;
|
||||
import org.wikipedia.dataclient.WikiSite;
|
||||
|
|
@ -265,7 +266,7 @@ public class LoginActivity extends AccountAuthenticatorActivity {
|
|||
public void onResponse(Call<MwQueryResponse> call,
|
||||
Response<MwQueryResponse> response) {
|
||||
loginClient.login(commonsWikiSite, username, password, null, twoFactorCode,
|
||||
response.body().query().loginToken(), new LoginCallback() {
|
||||
response.body().query().loginToken(), Locale.getDefault().getLanguage(), new LoginCallback() {
|
||||
@Override
|
||||
public void success(@NonNull LoginResult result) {
|
||||
Timber.d("Login Success");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue