Skip to content

Comments

chore: update i18n#7846

Merged
LucasXu0 merged 7 commits intoAppFlowy-IO:mainfrom
LucasXu0:i18n
Apr 28, 2025
Merged

chore: update i18n#7846
LucasXu0 merged 7 commits intoAppFlowy-IO:mainfrom
LucasXu0:i18n

Conversation

@LucasXu0
Copy link
Collaborator

@LucasXu0 LucasXu0 commented Apr 28, 2025

Feature Preview


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

Update localization strings and enhance user feedback for member invitation flows.

Enhancements:

  • Provide specific success/error messages for generating and resetting invite links.
  • Automatically copy invite links to the clipboard upon successful generation or reset, showing a confirmation toast.
  • Prompt users to upgrade when trying to generate or copy an invite link if the member limit is reached.
  • Differentiate backend actions and user feedback for generating versus resetting invite links.
  • Standardize confirmation dialogs for member removal and logout.
  • Prevent text overflow for member emails in the settings list.
  • Ensure only one "link copied" toast is visible at a time.

Chores:

  • Update numerous localization strings in en.json.
  • Remove unused code related to email invitations on mobile.
  • Remove potentially incorrect toast positioning logic on mobile.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Apr 28, 2025

Reviewer's Guide by Sourcery

This pull request updates internationalization keys across various parts of the application, primarily focusing on workspace member management and authentication flows. It replaces hardcoded strings with localized versions and refines the user experience around invite links and confirmation prompts.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Update internationalization keys and messages
  • Replaced hardcoded strings with i18n keys for various messages and labels.
  • Added new i18n keys for invite link generation/reset, member limits, and sign-in/out messages.
  • Updated toast notification messages to use localized strings.
  • Updated dialog titles, descriptions, and button labels to use localized strings.
frontend/appflowy_flutter/lib/mobile/presentation/setting/workspace/add_members_screen.dart
frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/members/workspace_member_page.dart
frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/members/inivitation/inivite_member_by_link.dart
frontend/appflowy_flutter/lib/mobile/presentation/setting/workspace/invite_members_screen.dart
frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/account/account_sign_in_out.dart
frontend/appflowy_flutter/lib/user/presentation/screens/sign_in_screen/widgets/continue_with/continue_with_magic_link_or_passcode_page.dart
frontend/resources/translations/en.json
Refine invite link handling and member limit checks
  • Added logic to differentiate between generating and resetting an invite link.
  • Implemented checks for exceeding the member limit before generating or copying an invite link.
  • Added an upgrade plan action to the member limit exceeded dialog.
  • Ensured invite links are copied to the clipboard upon successful generation or reset.
  • Improved toast notification handling for copying the invite link.
frontend/appflowy_flutter/lib/mobile/presentation/setting/workspace/add_members_screen.dart
frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/members/workspace_member_page.dart
frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/members/inivitation/inivite_member_by_link.dart
frontend/appflowy_flutter/lib/mobile/presentation/setting/workspace/invite_members_screen.dart
frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/members/workspace_member_bloc.dart
Adjust UI components and dialog types
  • Changed confirmation dialogs (remove member, logout) to use showCancelAndConfirmDialog.
  • Added text overflow handling for member names in the member list.
  • Converted _CopyLinkButton to a StatefulWidget for better toast management.
frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/members/workspace_member_page.dart
frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/members/inivitation/inivite_member_by_link.dart
frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/account/account_sign_in_out.dart
Code cleanup and minor adjustments
  • Removed commented-out code.
  • Removed unused keyboard height calculation for toast notifications.
  • Added a check to ensure the bloc is not closed before updating the invite link.
frontend/appflowy_flutter/lib/mobile/presentation/setting/workspace/add_members_screen.dart
frontend/appflowy_flutter/lib/mobile/presentation/setting/workspace/invite_members_screen.dart
frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/members/workspace_member_bloc.dart

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!

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
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 abstracting the common logic for handling invite link generation/reset results (toast notifications, clipboard copy) to reduce duplication across UI files.
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.

@github-actions
Copy link

github-actions bot commented Apr 28, 2025

🥷 Ninja i18n – 🛎️ Translations need to be updated

Project /project.inlang

lint rule new reports level link
Missing translation 145 warning contribute (via Fink 🐦)

@LucasXu0 LucasXu0 merged commit 807aa74 into AppFlowy-IO:main Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant