Summary:
My phone's system language is Portuguese but when I try to login with an incorrect username/password in the login screen I get an error in English.
Looking at the code I can see that the error shown in this situation is a string returned from the login API and not a string in the strings file so it doesn't look like a missing translation (actually tested in Spanish and French and got the same result).
Steps to reproduce:
Device and Android version:
Samsung Galaxy S8 with Android 10
Commons app version:
2.13.2
Screen-shots:

Would you like to work on the issue?
Yes
Thanks for noticing this!
What do you think is a good way to fix it?
The API has parameters for localization (ex.: 'uselang' and 'errorlang'). I've actually tried them and I was able to retrieve these error messages in Portuguese.
The problem in the login case is that we still don't have the user account settings to get the account language but maybe, just for the login, we can use the device language?
Wonderful!
Yes, device language is fine, I guess it is the language used to display the UI of the login screen?
Hi again,
I started looking at the code and thinking about how to solve this issue, and I ended up having to make changes to the wikimedia data client library. This is a library that is available to be used by other apps right? This means that I should be concerned not to make changes to the public API that can break other apps using this library. How are changes to this library being managed?
Taking this into account, my idea was to create new postLogIn() methods in the Retrofit Service interface with a new language field, instead of changing the currently existing ones. Then I can (A) get the device language in the LoginClient and pass it in the postLogIn() request, or (B) I can create a new login method in the LoginClient (also to not break the library public API) which also accepts the language and it is the LoginActivity's responsibility to get the device language and pass it to the service layer.
What do you think about this? :)
The data client library which is present in the app is not used by other apps, so don't worry too much about modifying it :-)
Sounds good to me!
Hey @marcosliberal , thanks a lot for your interest. There is one open PR which is reviewed and waiting action from you. Could you please sort it out (either do/respond the review or close the PR if you don't think you are interested anymore so that others can claim the issue) before starting to work on this issue?
Can I work on this @nicolas-raoul ?
@marcosliberal Are you working on this?
I will not have time for this in the next couple of days, so if @Arnold2381 wants to solve this it's ok by me.
@nicolas-raoul can you guide me? I tried solving the bug but couldn't do it. I was working in Service.java but nothing worked.
@Arnold2381 Please put a breakpoint at the instruction that sends the login request to the server.
Then please post here the HTTPS request URL (and data) that goes out, first before your change, then after your change.
@nicolas-raoul Thank you for that suggestion, but It worked. I was changing the wrong param value will make a PR now.