Skip to content
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

"Invalid Login or password." is grammatically incorrect #4095

Closed
connorshea opened this issue May 8, 2016 · 8 comments
Closed

"Invalid Login or password." is grammatically incorrect #4095

connorshea opened this issue May 8, 2016 · 8 comments

Comments

@connorshea
Copy link
Contributor

This was changed in PR #4014 and released with 4.1.0.

With an incorrect password the user sees "Invalid Login or password." "Login" shouldn't be capitalized in this case, as it's not a proper noun and isn't at the beginning of the sentence.

This is because of the following i18n string:

invalid: "Invalid %{authentication_keys} or password."

#4014 "humanized" the authentication_keys variable, thus causing this issue.

@connorshea
Copy link
Contributor Author

I'm not sure how this should be resolved, different languages will have different requirements with regards to capitalization.

@ulissesalmeida
Copy link
Contributor

Before 4.1 the keys was not "humanized", and we have something like email or password.
With the humanized version we have now something like E-mail or password.
If we keep this way, the password is not consistent with E-mail.
I think we should provide a nice default for the english language.

For other idioms, they can simply change the entire message of the yml file of the specific language with their specific rules. Without rely on authentication_keys.

invalid: "The idiom custom message here"

@connorshea
Copy link
Contributor Author

@ulissesalmeida I think I'm not following, are you saying we should not humanize them for English, or we should replace it with our own message that doesn't include authentication_keys?

@ulissesalmeida
Copy link
Contributor

ulissesalmeida commented May 21, 2016

@connorshea I think we should humanize them for English since it is the Devise default(downcasing the keys). For other languages that do not follow this default, I think the developers needs to change in their applications for a proper translation that's doesn't include the authentication_keys.

dzaporozhets pushed a commit to gitlabhq/gitlabhq that referenced this issue Jun 2, 2016
Temporary fix until Devise 4 fixes this grammar issue:
heartcombo/devise#4095
@crawfoal
Copy link

@ulissesalmeida Are there still plans to change this back to using all lowercase (but keeping the humanize change)?

@bernEsp
Copy link

bernEsp commented Dec 5, 2017

I think to humanize authentication keys is good for English but why password is not part of the auth keys?
The error message looks very weird Invalid Email or password when it could look like Invalid email or password

@tegon tegon added Needs PR and removed Discussion labels Feb 23, 2018
@tegon
Copy link
Member

tegon commented Feb 23, 2018

@crawfoal @bernardogalindo We can follow with the downcase solution (keeping the humazine attribute). If someone is willing to open a PR for this, I'd be happy to accept it.

@tegon
Copy link
Member

tegon commented Jan 2, 2019

Closed via #4834

@tegon tegon closed this as completed Jan 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants