-
Notifications
You must be signed in to change notification settings - Fork 60.7k
Update cn.ts #6378
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
Update cn.ts #6378
Conversation
|
@HOOL-CC is attempting to deploy a commit to the NextChat Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThis pull request updates multiple locale files by streamlining the error messages shown for unauthorized access. Previously, messages contained multi-step instructions and promotional wording; they have now been simplified to a single directive prompting users to click a link to enter their access password or key. Additionally, new built-in mask entries for code explanation and translation have been added to select mask files, expanding the preconfigured roles available in the application. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant A as Application
participant M as Model
U->>A: Selects built-in mask (Code Explanation/Translator)
A->>M: Sends request using mask-specific configuration
M-->>A: Returns result (explanation or translation)
A->>U: Displays the result
Poem
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (12)
app/locales/de.ts (1)
10-12: Consider simplifying the redundant conditional logicThe
isAppconditional check (lines 10-12) now returns the same message for both conditions, making the ternary operator redundant. This could be simplified to a single string assignment without the conditional logic.- Unauthorized: isApp - ? `Sie verwenden die öffentliche Bereitstellungsversion, klicken Sie [hier](/#/auth), um das Zugangspasswort oder Ihren eigenen Schlüssel einzugeben 🔑.` - : `Sie verwenden die öffentliche Bereitstellungsversion, klicken Sie [hier](/#/auth), um das Zugangspasswort oder Ihren eigenen Schlüssel einzugeben 🔑.`, + Unauthorized: `Sie verwenden die öffentliche Bereitstellungsversion, klicken Sie [hier](/#/auth), um das Zugangspasswort oder Ihren eigenen Schlüssel einzugeben 🔑.`,app/locales/no.ts (1)
10-12: Remove unnecessary conditional statementThe error message is now identical for both conditions of the
isAppternary operator, making the conditional check unnecessary. Consider simplifying to a single string assignment.- Unauthorized: isApp - ? `Du bruker den offentlige distribusjonsversjonen, klikk [her](/#/auth) for å skrive inn tilgangspassordet eller din egen nøkkel 🔑.` - : `Du bruker den offentlige distribusjonsversjonen, klikk [her](/#/auth) for å skrive inn tilgangspassordet eller din egen nøkkel 🔑.`, + Unauthorized: `Du bruker den offentlige distribusjonsversjonen, klikk [her](/#/auth) for å skrive inn tilgangspassordet eller din egen nøkkel 🔑.`,app/locales/it.ts (1)
10-12: Simplify redundant conditional expressionSince both conditions in the ternary operator now return the identical message, the conditional logic can be removed for better code clarity and maintenance.
- Unauthorized: isApp - ? `Stai utilizzando la versione di distribuzione pubblica, fai clic [qui](/#/auth) per inserire la password di accesso o la tua chiave 🔑.` - : `Stai utilizzando la versione di distribuzione pubblica, fai clic [qui](/#/auth) per inserire la password di accesso o la tua chiave 🔑.`, + Unauthorized: `Stai utilizzando la versione di distribuzione pubblica, fai clic [qui](/#/auth) per inserire la password di accesso o la tua chiave 🔑.`,app/locales/tr.ts (1)
10-12: Eliminate duplicate conditional branchesThe
isAppconditional check is now redundant as both branches contain identical text. This can be simplified to improve readability and maintainability.- Unauthorized: isApp - ? `Halka açık dağıtım sürümünü kullanıyorsunuz, erişim şifrenizi veya kendi anahtarınızı girmek için [buraya](/#/auth) tıklayın 🔑.` - : `Halka açık dağıtım sürümünü kullanıyorsunuz, erişim şifrenizi veya kendi anahtarınızı girmek için [buraya](/#/auth) tıklayın 🔑.`, + Unauthorized: `Halka açık dağıtım sürümünü kullanıyorsunuz, erişim şifrenizi veya kendi anahtarınızı girmek için [buraya](/#/auth) tıklayın 🔑.`,app/locales/ru.ts (1)
10-12: Simplify the conditional statement since both branches are identical.The error message is now identical for both app and non-app versions, which is good for consistency. However, you could simplify this code further by removing the conditional since both branches contain the same text.
Error: { Unauthorized: isApp - ? `Вы используете версию публичного развертывания, нажмите [здесь](/#/auth), чтобы ввести пароль доступа или свой ключ 🔑.` - : `Вы используете версию публичного развертывания, нажмите [здесь](/#/auth), чтобы ввести пароль доступа или свой ключ 🔑.`, + ? `Вы используете версию публичного развертывания, нажмите [здесь](/#/auth), чтобы ввести пароль доступа или свой ключ 🔑.`,Alternative approach (even better):
Error: { - Unauthorized: isApp - ? `Вы используете версию публичного развертывания, нажмите [здесь](/#/auth), чтобы ввести пароль доступа или свой ключ 🔑.` - : `Вы используете версию публичного развертывания, нажмите [здесь](/#/auth), чтобы ввести пароль доступа или свой ключ 🔑.`, + Unauthorized: `Вы используете версию публичного развертывания, нажмите [здесь](/#/auth), чтобы ввести пароль доступа или свой ключ 🔑.`, },app/locales/da.ts (1)
10-12: Simplify the conditional statement since both branches are identical.The error message is now identical for both app and non-app versions, improving message consistency. However, this conditional statement is redundant since both branches contain the same text.
Error: { - Unauthorized: isApp - ? `Du bruger den offentlige deploymentsversion, klik på [her](/#/auth) for at indtaste adgangskoden eller din egen nøgle 🔑.` - : `Du bruger den offentlige deploymentsversion, klik på [her](/#/auth) for at indtaste adgangskoden eller din egen nøgle 🔑.`, + Unauthorized: `Du bruger den offentlige deploymentsversion, klik på [her](/#/auth) for at indtaste adgangskoden eller din egen nøgle 🔑.`, },app/locales/fr.ts (1)
10-12: Simplify the conditional statement since both branches are identical.The error message is now identical for both app and non-app versions, which streamlines the user experience. However, the conditional statement is now redundant since both branches contain the same text.
Error: { - Unauthorized: isApp - ? `Vous utilisez la version de déploiement public, cliquez [ici](/#/auth) pour saisir le mot de passe d'accès ou votre propre clé 🔑.` - : `Vous utilisez la version de déploiement public, cliquez [ici](/#/auth) pour saisir le mot de passe d'accès ou votre propre clé 🔑.`, + Unauthorized: `Vous utilisez la version de déploiement public, cliquez [ici](/#/auth) pour saisir le mot de passe d'accès ou votre propre clé 🔑.`, },app/locales/id.ts (1)
10-12: Simplify the conditional statement since both branches are identical.The error message is now identical for both app and non-app versions, providing a more consistent user experience. However, the conditional statement is redundant since both branches contain the same text.
Error: { - Unauthorized: isApp - ? `Anda sedang menggunakan versi penyebaran publik, klik [di sini](/#/auth) untuk memasukkan kata sandi akses atau kunci Anda sendiri 🔑.` - : `Anda sedang menggunakan versi penyebaran publik, klik [di sini](/#/auth) untuk memasukkan kata sandi akses atau kunci Anda sendiri 🔑.`, + Unauthorized: `Anda sedang menggunakan versi penyebaran publik, klik [di sini](/#/auth) untuk memasukkan kata sandi akses atau kunci Anda sendiri 🔑.`, },app/locales/es.ts (1)
10-12: Simplified error message improves clarityThe error message has been streamlined to provide a single, clear action for users regardless of whether they're using the app or web version. This improves the user experience by reducing complexity.
However, since the messages for both conditions are now identical, consider removing the conditional statement entirely:
- Error: { - Unauthorized: isApp - ? `Estás utilizando la versión de implementación pública, haz clic [aquí](/#/auth) para ingresar la contraseña de acceso o tu propia clave 🔑.` - : `Estás utilizando la versión de implementación pública, haz clic [aquí](/#/auth) para ingresar la contraseña de acceso o tu propia clave 🔑.`, - }, + Error: { + Unauthorized: `Estás utilizando la versión de implementación pública, haz clic [aquí](/#/auth) para ingresar la contraseña de acceso o tu propia clave 🔑.`, + },app/masks/en.ts (1)
30-62: Useful Translator mask with minor suggestionThe Translator mask is a helpful addition that allows users to translate text into various languages. The implementation is solid with good configuration parameters.
One minor suggestion: The current avatar uses the China flag (1f1e8-1f1f3), which might imply Chinese-specific translation. Since this mask is designed to translate "into various languages" (as stated in line 44), consider using a more language-neutral emoji like "🌐" (1f310) or "🔄" (1f504) to better represent the multi-language translation capability.
app/locales/ar.ts (1)
10-12: Simplified error message improves clarityThe error message has been streamlined to provide a single, clear action for users regardless of whether they're using the app or web version. This improves the user experience by reducing complexity.
Since the messages for both conditions are now identical, consider removing the conditional statement entirely:
- Error: { - Unauthorized: isApp - ? `أنت تستخدم نسخة النشر العامة، انقر [هنا](/#/auth) لإدخال كلمة المرور أو مفتاحك الخاص 🔑` - : `أنت تستخدم نسخة النشر العامة، انقر [هنا](/#/auth) لإدخال كلمة المرور أو مفتاحك الخاص 🔑`, - }, + Error: { + Unauthorized: `أنت تستخدم نسخة النشر العامة، انقر [هنا](/#/auth) لإدخال كلمة المرور أو مفتاحك الخاص 🔑`, + },app/locales/tw.ts (1)
9-11: Simplified error message improves clarityThe error message has been streamlined to provide a single, clear action for users regardless of whether they're using the app or web version. This improves the user experience by reducing complexity.
Since the messages for both conditions are now identical, consider removing the conditional statement entirely:
- Error: { - Unauthorized: isApp - ? `你正在使用公有部署版本,點擊[這裡](/#/auth)輸入訪問密碼或自己秘鑰 🔑。` - : `你正在使用公有部署版本,點擊[這裡](/#/auth)輸入訪問密碼或自己秘鑰 🔑。`, - }, + Error: { + Unauthorized: `你正在使用公有部署版本,點擊[這裡](/#/auth)輸入訪問密碼或自己秘鑰 🔑。`, + },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (23)
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)app/masks/cn.ts(1 hunks)app/masks/en.ts(1 hunks)app/masks/tw.ts(1 hunks)
🔇 Additional comments (12)
app/masks/cn.ts (1)
4-62: New mask entries for code explanation and translation look good!These two new mask entries enhance the functionality by providing specialized roles for code explanation and translation. Both use the "gpt-4o-mini" model with appropriate configuration parameters. The translation mask includes helpful input format instructions for users.
app/masks/tw.ts (1)
4-62: Consistent implementation of new mask entries for Traditional ChineseThe added masks for code explanation and translation in Traditional Chinese match the functionality implemented in the Chinese (cn.ts) version, providing a consistent experience across language variants. The implementation correctly maintains the specific cultural and linguistic nuances.
app/locales/jp.ts (1)
10-12: Simplified error message improves user experienceThe updated error message for unauthorized access now provides a clearer, more concise instruction for users. By simplifying to a single message that directs users to click a link and enter their access credentials, it reduces confusion and streamlines the user experience.
app/locales/ko.ts (1)
10-12: Streamlined unauthorized access message maintains consistencyThe Korean locale now uses the same simplified error message pattern as other languages, directing users to enter their access password or key via a link. This change maintains consistency across the application and improves the clarity of instructions.
app/locales/sk.ts (1)
11-13: Streamlined error message for consistent user experienceThe error message for unauthorized access has been simplified and now displays the same content regardless of whether the user is on the app or web version. This change creates a more consistent user experience and reduces maintenance complexity by eliminating conditional messaging variations.
app/locales/cs.ts (1)
11-12: Approved: Consistent error messaging patternThe modification follows the same pattern as other locales, providing a streamlined single-line error message for both app and non-app users. This consistent approach improves the user experience and simplifies future maintenance.
app/locales/en.ts (1)
12-13: Simplified error message improves clarityThe English version of the error message has been streamlined to match the pattern applied across all locales. This simplification makes the message more direct and actionable for users while maintaining consistency with other language versions.
app/locales/pt.ts (1)
11-12: Approved: Aligned with global error messaging patternThe Portuguese translation now follows the unified error message pattern implemented across all locales. The consistent messaging helps maintain a cohesive user experience regardless of the selected language.
app/masks/en.ts (1)
4-29: Great addition of the Code Explanation maskThe Code Explanation mask provides valuable functionality for helping users understand code snippets. The configuration is well-defined with appropriate parameters:
- Properly configured with gpt-4o-mini model
- Reasonable temperature (0.5) for balanced creativity/accuracy
- Clear template prompt that focuses on code explanation
- Appropriate avatar that represents a developer
This will enhance the application by providing users with a specialized tool for code comprehension.
app/locales/vi.ts (1)
11-12: Improved error message consistency and clarity.The error messages for unauthorized access have been simplified to a single, clear instruction directing users to enter their access password or private key. This change makes the error handling more user-friendly and consistent between app and non-app versions.
app/locales/cn.ts (1)
11-12: Good differentiation between private and public deployments.The error messages maintain a clear distinction between private deployment ("私有部署版本") and public deployment ("公有部署版本") versions while providing the same straightforward instruction for both. This ensures users understand which type of deployment they're using while following a consistent message pattern.
app/locales/bn.ts (1)
11-12: Consistent error message simplification across locales.The Bengali locale now uses an identical simplified message for both app and non-app versions, matching the pattern established in other locale files. This creates a consistent user experience across different languages and deployment types.
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
📝 补充信息 | Additional Information
Summary by CodeRabbit
Style
New Features