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

fix: translations #7694

Merged
merged 1 commit into from
Apr 8, 2025
Merged

Conversation

richardshiue
Copy link
Collaborator

@richardshiue richardshiue commented Apr 7, 2025

  1. Stop using grid_url_copy for toast notifications and use message_copy_success instead
  2. Remove grid_url_copiedNotification tokens

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 translation tokens for copy success notifications across multiple files

Bug Fixes:

  • Replace deprecated grid-related copy notification tokens with a more generic message_copy_success token

Enhancements:

  • Standardize copy success notifications across different parts of the application

@richardshiue richardshiue requested a review from LucasXu0 April 7, 2025 06:06
Copy link

sourcery-ai bot commented Apr 7, 2025

Reviewer's Guide by Sourcery

This PR replaces the grid_url_copy and grid_url_copiedNotification tokens with message_copy_success in toast notifications across the application. It also removes the now-unused grid_url_copiedNotification tokens from the translation files.

Sequence diagram for showing toast notification after copying URL

sequenceDiagram
    participant User
    participant Component
    participant showToastNotification

    User->>Component: Copy URL
    Component->>showToastNotification: Display message_copy_success
    activate showToastNotification
    showToastNotification-->>Component: Notification shown
    deactivate showToastNotification
    Component-->>User: URL copied notification
Loading

File-Level Changes

Change Details Files
Replaced specific toast notification messages with a generic success message.
  • Replaced grid_url_copy with message_copy_success in MobileViewPageMoreBottomSheet.
  • Replaced grid_url_copiedNotification with message_copy_success in AIChatMessageActionBar.
  • Replaced grid_url_copiedNotification with message_copy_success in AIChatMessagePopup.
  • Replaced grid_url_copiedNotification with message_copy_success in MobileURLEditor.
  • Replaced grid_url_copiedNotification with message_copy_success in ExportTab.
  • Replaced grid_url_copy with message_copy_success in _PublishedWidgetState.
  • Replaced grid_url_copy with message_copy_success in _ShareTabContent.
  • Replaced grid_url_copy with message_copy_success in SettingsPageSitesEvent.
frontend/appflowy_flutter/lib/mobile/presentation/base/view_page/more_bottom_sheet.dart
frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/message/ai_message_action_bar.dart
frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/message/ai_message_bubble.dart
frontend/appflowy_flutter/lib/plugins/database/widgets/cell/editable_cell_skeleton/url.dart
frontend/appflowy_flutter/lib/plugins/shared/share/export_tab.dart
frontend/appflowy_flutter/lib/plugins/shared/share/publish_tab.dart
frontend/appflowy_flutter/lib/plugins/shared/share/share_tab.dart
frontend/appflowy_flutter/lib/workspace/presentation/settings/pages/sites/constants.dart
Removed unused translation tokens.
  • Removed grid_url_copiedNotification from ar-SA.json.
  • Removed grid_url_copiedNotification from de-DE.json.
  • Removed grid_url_copiedNotification from el-GR.json.
  • Removed grid_url_copiedNotification from en.json.
  • Removed grid_url_copiedNotification from es-VE.json.
  • Removed grid_url_copiedNotification from fr-FR.json.
  • Removed grid_url_copiedNotification from he.json.
  • Removed grid_url_copiedNotification from ja-JP.json.
  • Removed grid_url_copiedNotification from ko-KR.json.
  • Removed grid_url_copiedNotification from ru-RU.json.
  • Removed grid_url_copiedNotification from th-TH.json.
  • Removed grid_url_copiedNotification from tr-TR.json.
  • Removed grid_url_copiedNotification from uk-UA.json.
  • Removed grid_url_copiedNotification from vi-VN.json.
  • Removed grid_url_copiedNotification from zh-CN.json.
  • Removed grid_url_copiedNotification from zh-TW.json.
frontend/resources/translations/ar-SA.json
frontend/resources/translations/de-DE.json
frontend/resources/translations/el-GR.json
frontend/resources/translations/en.json
frontend/resources/translations/es-VE.json
frontend/resources/translations/fr-FR.json
frontend/resources/translations/he.json
frontend/resources/translations/ja-JP.json
frontend/resources/translations/ko-KR.json
frontend/resources/translations/ru-RU.json
frontend/resources/translations/th-TH.json
frontend/resources/translations/tr-TR.json
frontend/resources/translations/uk-UA.json
frontend/resources/translations/vi-VN.json
frontend/resources/translations/zh-CN.json
frontend/resources/translations/zh-TW.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

@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 @richardshiue - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider using a constant for LocaleKeys.message_copy_success to avoid potential typos and improve maintainability.
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.

@richardshiue richardshiue merged commit 462c822 into AppFlowy-IO:main Apr 8, 2025
18 checks passed
@richardshiue richardshiue deleted the fix/translations branch April 8, 2025 05:08
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