Skip to content

feat: support i18n in the 'delete my account' operation #7635

Merged
LucasXu0 merged 2 commits intoAppFlowy-IO:mainfrom
LucasXu0:delete_my_account
Mar 31, 2025
Merged

feat: support i18n in the 'delete my account' operation #7635
LucasXu0 merged 2 commits intoAppFlowy-IO:mainfrom
LucasXu0:delete_my_account

Conversation

@LucasXu0
Copy link
Copy Markdown
Collaborator

@LucasXu0 LucasXu0 commented Mar 27, 2025

Feature Preview

  • support i18n in the 'delete my account' operation

PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

Summary by Sourcery

Add internationalization (i18n) support for the account deletion confirmation text

New Features:

  • Implement localized confirmation text for account deletion dialog

Enhancements:

  • Update account deletion confirmation text validation to support localized text

Documentation:

  • Update translation files for multiple languages to support account deletion localization

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Mar 27, 2025

Reviewer's Guide by Sourcery

This pull request introduces i18n support for the delete my account operation. It replaces the hardcoded confirmation text in the account deletion dialog with a translation key and provides translations for multiple languages. The confirmation text validation logic is also updated to accept the translated text.

Sequence diagram for account deletion with i18n

sequenceDiagram
    participant User
    participant AccountDeletionDialog
    participant FlowyTextField

    User->>AccountDeletionDialog: Opens account deletion dialog
    AccountDeletionDialog->>FlowyTextField: Displays translated confirmation hint
    User->>FlowyTextField: Enters confirmation text
    AccountDeletionDialog->>AccountDeletionDialog: Validates confirmation text against translated value
    alt Text is valid
        AccountDeletionDialog->>AccountDeletionDialog: Initiates account deletion
    else Text is invalid
        AccountDeletionDialog->>User: Shows error message
    end
Loading

File-Level Changes

Change Details Files
Added i18n support to the delete account confirmation text field.
  • Replaced hardcoded confirmation text with a translation key.
  • Updated the confirmation text validation to accept the translated text.
frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/account/account_deletion.dart
Added translations for the delete account confirmation text in multiple languages.
  • Added translation keys and values for Arabic (ar-SA).
  • Added translation keys and values for German (de-DE).
  • Added translation keys and values for English (en).
  • Added translation keys and values for French (fr-FR).
  • Added translation keys and values for Korean (ko-KR).
  • Added translation keys and values for Turkish (tr-TR).
  • Added translation keys and values for Vietnamese (vi-VN).
  • Added translation keys and values for Simplified Chinese (zh-CN).
frontend/resources/translations/ar-SA.json
frontend/resources/translations/de-DE.json
frontend/resources/translations/en.json
frontend/resources/translations/fr-FR.json
frontend/resources/translations/ko-KR.json
frontend/resources/translations/tr-TR.json
frontend/resources/translations/vi-VN.json
frontend/resources/translations/zh-CN.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey @LucasXu0 - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider generating the _acceptableConfirmTexts list from the translations to avoid hardcoding the confirmation phrases.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@LucasXu0 LucasXu0 changed the title feat: support i18n in delete my account operation feat: support i18n in the 'delete my account' operation Mar 27, 2025
@LucasXu0 LucasXu0 force-pushed the delete_my_account branch from 92cb2db to 2552139 Compare March 27, 2025 07:33
@LucasXu0 LucasXu0 merged commit 7ed36f8 into AppFlowy-IO:main Mar 31, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant