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

feat: [Magic Link Login] add placeholder to invalidEmail to return user email. #1145

Merged
merged 31 commits into from
Jul 25, 2024

Conversation

warcooft
Copy link
Contributor

@warcooft warcooft commented Jul 17, 2024

Description
This pull request improves existing translations by returning the user's email if the corresponding email is not found. This update aims to make communication more engaging and user-friendly. By returning the email value in the error message, it will help users to confirm and correct the email sent because in general users often make typos.

Preview

Screenshot 2024-07-17 at 14 41 47

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added tests needed Pull requests that need tests enhancement New feature or request labels Jul 17, 2024
@kenjis
Copy link
Member

kenjis commented Jul 17, 2024

Please fix errors in GitHub Action checks, and add test code.
Reference: https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md

@warcooft
Copy link
Contributor Author

@kenjis all language files need to be updated but I don't understand other languages. Should I use english for other files as default language to be translated later by respective authors?

@kenjis
Copy link
Member

kenjis commented Jul 18, 2024

@kenjis kenjis removed the tests needed Pull requests that need tests label Jul 18, 2024
@warcooft
Copy link
Contributor Author

Ahh, OK. I will update later.

@warcooft warcooft requested a review from kenjis July 18, 2024 08:08
src/Language/en/Auth.php Outdated Show resolved Hide resolved
@kenjis kenjis changed the title feat: add placeholder to invalidEmail to return user email. feat: [Magic Link Login] add placeholder to invalidEmail to return user email. Jul 19, 2024
@kenjis
Copy link
Member

kenjis commented Jul 19, 2024

Escape this:

<?= session('errors') ?>

@warcooft
Copy link
Contributor Author

I'm in a meeting now, I'll update again later.

Copy link
Member

@kenjis kenjis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Escape this, too.

<?= session('errors') ?>

@warcooft warcooft requested a review from kenjis July 20, 2024 03:44
@kenjis
Copy link
Member

kenjis commented Jul 22, 2024

@warcooft We don't use merge commits in PR branches. See GitHub Actions.
Can you remove it?
How to update your PR branch: https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/workflow.md#updating-your-branch

@warcooft
Copy link
Contributor Author

ups, my bad, okay I'll rebase.

@warcooft
Copy link
Contributor Author

It seems to be fine now, please check it.

composer.json Outdated Show resolved Hide resolved
@warcooft
Copy link
Contributor Author

Where can I find that key in the test case?

19) Tests\Language\UkrainianTranslationTest::testAllIncludedLanguageKeysAreTranslated with data set "uk" ('uk')
Failed asserting that the translated language key "Auth.invalidEmail" in "uk" locale differs from the original keys in the main repository.
Failed asserting that an array is empty.

@kenjis
Copy link
Member

kenjis commented Jul 23, 2024

Where can I find that key in the test case?

See https://github.com/codeigniter4/shield/pull/1145/files#diff-12beddb17619112c65bd21202ce1fe8bcd291beb594aa101c90f09b174289fc7R28

Failed asserting that the translated language key "Auth.invalidEmail" in "uk" locale differs from the original keys in the main repository.

It is difficult to understand, but it tells "Auth.invalidEmail" in "uk" must be different from en.

@warcooft
Copy link
Contributor Author

I see, I forgot to add something.

Copy link
Contributor Author

@warcooft warcooft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@warcooft warcooft requested a review from kenjis July 23, 2024 06:17
Copy link
Member

@kenjis kenjis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Collaborator

@datamweb datamweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@warcooft thank you!

Sorry for the delay.

@datamweb datamweb merged commit 032dad9 into codeigniter4:develop Jul 25, 2024
35 checks passed
@warcooft warcooft deleted the patch-1 branch July 25, 2024 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants