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: Fixed Locale.Error.Unauthorized text display issue #6348

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

huangwudi6
Copy link

@huangwudi6 huangwudi6 commented Mar 9, 2025

💻 变更类型 | Change Type

  • feat
  • fix
  • refactor
  • perf
  • style
  • test
  • docs
  • ci
  • chore
  • build

🔀 变更说明 | Description of Change

Fixed Locale.Error.Unauthorized text display issue

image image

📝 补充信息 | Additional Information

Summary by CodeRabbit

  • Style
    • Updated the text formatting for unauthorized error messages across multiple languages to ensure instructions display clearly and consistently for users.

Copy link

vercel bot commented Mar 9, 2025

Someone is attempting to deploy a commit to the NextChat Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Mar 9, 2025

Walkthrough

All locale files in the application were updated to adjust the string formatting in the unauthorized error messages. In each language-specific file, double backslashes (\\) used to escape numbered list items were replaced with single backslashes (\). The changes affect only how the messages are rendered and do not modify any underlying logic, control flow, or functionality of the application.

Changes

Files Change Summary
app/locales/{ar, bn, cn, cs, da, de, en, es, fr, id, it, jp, ko, no, pt, ru, sk, tr, tw, vi}.ts Replaced double backslashes (\\) with single backslashes (\) in the unauthorized error messages' numbered list items to correct the string formatting.

Poem

I'm a little bunny with code to adore,
Hopping through locales to fix the lore.
Double slashes left like footprints in the dew,
Now a single hop makes the message true.
Celebrate the tweak with a wiggle and a cheer—🐇✨ code is clear!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f7cde17 and cbeda62.

📒 Files selected for processing (20)
  • app/locales/ar.ts (1 hunks)
  • app/locales/bn.ts (1 hunks)
  • app/locales/cn.ts (1 hunks)
  • app/locales/cs.ts (1 hunks)
  • app/locales/da.ts (1 hunks)
  • app/locales/de.ts (1 hunks)
  • app/locales/en.ts (1 hunks)
  • app/locales/es.ts (1 hunks)
  • app/locales/fr.ts (1 hunks)
  • app/locales/id.ts (1 hunks)
  • app/locales/it.ts (1 hunks)
  • app/locales/jp.ts (1 hunks)
  • app/locales/ko.ts (1 hunks)
  • app/locales/no.ts (1 hunks)
  • app/locales/pt.ts (1 hunks)
  • app/locales/ru.ts (1 hunks)
  • app/locales/sk.ts (1 hunks)
  • app/locales/tr.ts (1 hunks)
  • app/locales/tw.ts (1 hunks)
  • app/locales/vi.ts (1 hunks)
🔇 Additional comments (20)
app/locales/tr.ts (1)

11-18: Formatting Update: Unauthorized Error Message in Turkish

The update correctly replaces the double backslashes (which were previously escaping the numbered list items) with single backslashes. This adjustment ensures that the list items in the unauthorized error message are rendered as intended in both conditional branches.

app/locales/jp.ts (1)

11-18: Formatting Correction in Unauthorized Message (Japanese Locale)

The change from double backslashes to single backslashes in the unauthorized error message fixes the display issue. The numbered instructions now render correctly without altering the wording or intended guidance.

app/locales/de.ts (1)

11-18: Locale Formatting Fix for Unauthorized Error (German Locale)

Replacing the double backslashes with a single backslash in the error message resolves the display problem. The message now correctly shows the numbered list items, ensuring clarity for users.

app/locales/cs.ts (1)

11-18: Corrected Message Formatting in Unauthorized Error (Czech Locale)

The modification from double to single backslashes in the unauthorized error text enables proper rendering of the numbered list items. This change is consistent with the updates made in other locale files and does not affect the underlying message content.

app/locales/id.ts (1)

11-18: Unauthorized Error Message Formatting Fixed (Indonesian Locale)

The shift from double backslashes to single backslashes in the unauthorized error message effectively resolves the display issue. The numbered list now appears correctly, preserving the intended instructions and overall message clarity.

app/locales/it.ts (1)

12-13: Fixed the escape sequence in error message.

The change from double backslashes to single backslashes correctly addresses the text display issue for the unauthorized error message. This will ensure proper rendering of the numbered list items without showing unwanted escape characters in the UI.

app/locales/es.ts (1)

12-13: Fixed the escape sequence in error message.

The change from double backslashes to single backslashes correctly addresses the unauthorized text display issue. This ensures consistent formatting across all locale files and proper rendering of the numbered list items.

app/locales/pt.ts (1)

12-13: Fixed the escape sequence in error message.

The change from double backslashes to single backslashes correctly addresses the unauthorized text display issue. This ensures the numbered list items will render properly without showing extraneous backslashes in the UI.

app/locales/ru.ts (1)

12-13: Fixed the escape sequence in error message.

The change from double backslashes to single backslashes correctly addresses the unauthorized text display issue. This ensures proper rendering of the numbered list items in the Russian locale, consistent with the fixes in other language files.

app/locales/da.ts (1)

10-18: Adjusted Unauthorized Error Message Formatting in Danish
The backslashes preceding the numbered list items were changed from double backslashes to single backslashes. This change should fix the display issue for the “Unauthorized” message without affecting the message content.

app/locales/en.ts (1)

10-19: Updated Unauthorized Error Message Formatting in English
The error messages under Error.Unauthorized now use single backslashes for line-item formatting instead of double backslashes. This update is consistent with the intended display behavior and improves clarity.

app/locales/ar.ts (1)

10-18: Corrected Escape Sequences in Arabic Unauthorized Error Message
The Arabic error message now uses single backslashes before the numbered instructions. This change aligns the formatting with other locales, ensuring a consistent and correct display of the error message.

app/locales/tw.ts (1)

9-17: Standardized Escape Sequence in Traditional Chinese Unauthorized Error Message
Replaced double backslashes with single backslashes for the list items. This update should ensure that the unauthorized error message in Traditional Chinese renders properly and consistently with other locales.

app/locales/cn.ts (1)

10-18: Updated Escape Characters in Chinese Unauthorized Error Message
The change from double backslashes to single backslashes for the numbered list items in the error message ensures proper rendering. This adjustment is consistent with similar updates across the locale files.

app/locales/ko.ts (1)

12-13: Consistent Escape Character Update in Unauthorized Message
The numbered list items in the Unauthorized message have been updated from using double backslashes to single backslashes. This change should render the list correctly in the UI. Please verify that the display now matches the intended design.

app/locales/no.ts (1)

12-13: Uniform Formatting for Unauthorized Error Text
The escape characters before the numbered list items in the Unauthorized error message have been changed from double (\\) to single (\) backslashes. This update ensures that the list renders properly for Norwegian users.

app/locales/fr.ts (1)

12-13: Improved String Escape Formatting in Error Message
In the French locale, the Unauthorized error message now uses single backslashes for the numbered list items instead of double backslashes. This adjustment enhances the display of the error message while keeping the content intact.

app/locales/bn.ts (1)

12-13: Corrected Escape Sequences for Error Message Rendering
For the Bengali locale, the Unauthorized error message has had its backslash escapes updated (from \\ to \) for the numbered items. This change should ensure that the list items appear as intended without extra escape characters.

app/locales/vi.ts (1)

12-13: Refined Escape Character Usage in Unauthorized Message
The Vietnamese locale update now replaces double backslashes with single backslashes in the Unauthorized error message’s numbered list. This cosmetic fix is consistent with other locale files and should resolve the display issue.

app/locales/sk.ts (1)

12-14: Updated Error Message Formatting: Single Backslashes

The unauthorized error message in the isApp branch now correctly uses single backslashes for the numbered list items instead of double backslashes. This change should resolve the display issue with extra escaping and bring its format in line with other locale files. Please verify on all client builds that the rendered output meets expectations.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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