-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Allow to pass a country and/or a language to the register
user method
#754
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@g123k The code looks perfect, but I suggest that you add some related tests.
More specifically, I had a bad experience with fr-fr.
that was not really accepted by the server (perhaps redirected to fr.
and something was lost in the redirection).
Same for be-nl.
that may redirect to be.
too (be-fr.
being unchanged).
Mmm @teolemon, you told me it was OK for the combinations. |
Yes, true, but wouldn't it be better to also add an exhaustive list of countries/languages? |
I don't think it would be better to add tests that explore all the country/language combinations in this PR. That said, if there is such thing as a list of country-language redirections on the server (e.g. Regarding this PR, please just add |
Ok, I have duplicated some tests to specificacy (re)test cases with |
Ok for a new release ASAP. |
@g123k That said, if you can confirm that you ran successfully the new register unit tests locally, I'm ready to approve this PR. |
I understand why it fails: because error messages are translated ("Ce nom d'utilisateur existe déjà, choisissez en un autre.") |
Just put the translated error message, specifically in French. That said, perhaps it would make sense for the server to return specific error codes in addition to localized error messages, but that's another story. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@g123k Still don't understand why the register
tests are not even run, but as long as you ran them successfully locally that's good enough for me.
+1, that's weird that the GitHub Action seems inconsistent. So I merge this PR. Thanks a lot for your review! |
For the release process, actually I don't know how it works, so if you can do it, that would be nice. |
Hi everyone,
Today, all users are registered on the
world.openfoodfacts.org
subdomain.If they choose to also subscribe to the newsletter, they will receive it in English, but we have translated issues.
That's why we can now pass a country and/or a language.
It will fix #753