Skip to content

Conversation

@cenktekin
Copy link

@cenktekin cenktekin commented Oct 20, 2025

User description

Summary

  • Improve terminology and clarity:
    • Polish → Parlat (content polishing)
    • Precise → Kesin
    • “Float the Window” → “Pencereyi Yüzdür”
    • UNAUTHORIZED → Yetkisiz
  • Normalize wording:
    • Consistent “API URL’si”
    • Standardize Enter/Shift hints
    • Refine “OpenAI Security Check Required” phrasing (Doğrulama)
    • Expand “exceeded context length” message with guidance
  • Add missing EN keys:
    • “And click the retry button in the top right corner”
    • “Crop Text to ensure the input tokens do not exceed the model's limit”
  • Minor punctuation/consistency fixes

Scope

  • File changed: src/_locales/tr/main.json
  • No runtime logic changes; localization only

Validation

  • npm run pretty: PASS
  • npm run lint: PASS
  • npm run build: PASS

Manual sanity checks

  • Settings labels in Turkish
  • Input hints (Enter / Shift + Enter)
  • Error/alert texts (unauthorized, security check, context length)
  • New keys appear where applicable

Notes

  • Keeps TR in parity with EN and improves wording consistency.

PR Type

Documentation


Description

  • Improve Turkish terminology consistency and clarity

    • "Polish" → "Parlat", "Precise" → "Kesin", "Float the Window" → "Pencereyi Yüzdür"
    • "UNAUTHORIZED" → "Yetkisiz", "OpenAI Security Check Required" → "OpenAI Güvenlik Doğrulaması Gerekli"
  • Normalize URL and technical wording across translations

    • Standardize "API URL'si" format, "Token" terminology
    • Capitalize "Enter" and "Shift + Enter" in input hints
  • Expand error messages with actionable guidance

    • Add context length exceeded message with recovery steps
    • Add missing retry button hint for Claude login flow
  • Add missing English keys to Turkish localization

    • "Crop Text to ensure the input tokens do not exceed the model's limit"
    • "And click the retry button in the top right corner"
  • Minor punctuation and wording refinements for consistency


Diagram Walkthrough

flowchart LR
  A["Turkish Localization<br/>src/_locales/tr/main.json"] -->|Terminology Updates| B["Improved Clarity<br/>Polish→Parlat, Precise→Kesin"]
  A -->|URL Standardization| C["Consistent Format<br/>API URL'si, Token"]
  A -->|Enhanced Messages| D["Actionable Guidance<br/>Context length, Retry hints"]
  A -->|Missing Keys| E["Parity with EN<br/>Crop Text, Retry button"]
  B --> F["Better UX<br/>Turkish users"]
  C --> F
  D --> F
  E --> F
Loading

File Walkthrough

Relevant files
Documentation
main.json
Turkish localization improvements and English parity         

src/_locales/tr/main.json

  • Improved terminology: "Polish" → "Parlat", "Precise" → "Kesin", "Float
    the Window" → "Pencereyi Yüzdür", "UNAUTHORIZED" → "Yetkisiz"
  • Standardized URL wording: "API URL'si" format, "Token" instead of
    "Jeton"
  • Normalized input hints: Capitalized "Enter" and "Shift + Enter" for
    consistency
  • Enhanced error messages: Added context length guidance and retry
    button hint
  • Added missing English keys: "Crop Text to ensure the input tokens do
    not exceed the model's limit"
  • Minor punctuation fixes: Semicolon usage, "Özetle" → "Özet", "Sonsuza
    dek" → "Süresiz"
+27/-25 

Summary by CodeRabbit

  • New Features

    • Added text cropping functionality to prevent input tokens from exceeding model limits
  • Improvements

    • Restructured error messages for context length issues with clearer user guidance
    • Comprehensive translation updates across multiple languages for enhanced localization
    • Refined UI text and messaging throughout the application for consistency and clarity

✏️ Tip: You can customize this high-level summary in your review settings.

- Fix terminology: Polish→Parlat, Precise→Kesin, Float window→Pencereyi Yüzdür, UNAUTHORIZED→Yetkisiz
- Normalize URL wording (API URL’si), Enter/Shift hints
- Improve clarity: context length message, security check wording
- Add missing keys from EN (retry button hint, crop text setting)
- Minor punctuation/consistency fixes

Build & lint: PASS
@gemini-code-assist
Copy link

Summary of Changes

Hello @cenktekin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the Turkish localization of the application by refining existing translations for improved clarity, consistency, and natural language use. It also incorporates translations for previously missing English keys, ensuring a more complete and user-friendly experience for Turkish speakers. All changes are confined to the localization file, with no impact on runtime logic.

Highlights

  • Improved Terminology and Clarity: Several key terms have been updated for better accuracy and natural flow in Turkish, including 'Polish' to 'Parlat', 'Precise' to 'Kesin', 'Float the Window' to 'Pencereyi Yüzdür', and 'UNAUTHORIZED' to 'Yetkisiz'.
  • Normalized Wording and Consistency: The format for 'API URL's' has been standardized across various entries, 'Enter' and 'Shift + Enter' hints are now unified, the phrasing for 'OpenAI Security Check Required' has been refined to 'OpenAI Güvenlik Doğrulaması Gerekli', and the 'exceeded context length' message now includes clear guidance.
  • Added Missing English Keys: Translations have been introduced for previously untranslated English phrases, such as 'And click the retry button in the top right corner' and 'Crop Text to ensure the input tokens do not exceed the model's limit'.
  • Minor Punctuation and Consistency Fixes: Various small issues related to punctuation, grammar, and consistent use of terms (e.g., 'Jeton' to 'Token', 'Sonsuza dek' to 'Süresiz') have been addressed to enhance the overall translation quality.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 20, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Translation files across 13 supported languages are refactored to split context-length error messages into separate keys for reusability, and error handling logic is updated to display multi-line feedback to users instead of concatenated messages.

Changes

Cohort / File(s) Summary
Localization: Error Message Refactoring
src/_locales/tr/main.json, src/_locales/de/main.json, src/_locales/en/main.json, src/_locales/es/main.json, src/_locales/fr/main.json, src/_locales/in/main.json, src/_locales/it/main.json, src/_locales/ja/main.json, src/_locales/ko/main.json, src/_locales/pt/main.json, src/_locales/ru/main.json, src/_locales/zh-hans/main.json, src/_locales/zh-hant/main.json
Consistent pattern applied across all 13 locales: (1) shortened "Exceeded maximum context length" by extracting guidance text to a separate key, (2) added new key "Please clear the conversation and try again" with locale-specific translations, (3) added new key "Crop Text to ensure the input tokens do not exceed the model's limit" with locale-specific translations. Turkish file also includes general UI string updates (capitalization, phrasing adjustments).
Error Handler Logic
src/services/wrappers.mjs
Updated handlePortError to expand error payloads for context-length violations: now includes the new "Please clear the conversation and try again" message with proper line breaks before the original error details, enabling multi-line user feedback.
Build Configuration
.gitignore
Added ICON_SYSTEM_ANALYSIS.md to ignore list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Poem

🐰 Hop, hop—translations split with care,
Thirteen tongues now speak so clear!
Error messages find their place,
In separate keys, at helpful pace.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: improving Turkish translations and achieving parity with English localization.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bfe2a03 and af4981d.

📒 Files selected for processing (10)
  • .gitignore
  • src/_locales/de/main.json
  • src/_locales/es/main.json
  • src/_locales/fr/main.json
  • src/_locales/in/main.json
  • src/_locales/it/main.json
  • src/_locales/ja/main.json
  • src/_locales/ko/main.json
  • src/_locales/pt/main.json
  • src/_locales/ru/main.json
✅ Files skipped from review due to trivial changes (1)
  • .gitignore
🚧 Files skipped from review as they are similar to previous changes (8)
  • src/_locales/pt/main.json
  • src/_locales/ru/main.json
  • src/_locales/de/main.json
  • src/_locales/fr/main.json
  • src/_locales/it/main.json
  • src/_locales/es/main.json
  • src/_locales/in/main.json
  • src/_locales/ja/main.json
🔇 Additional comments (2)
src/_locales/ko/main.json (2)

109-109: New key addition is consistent with the broader localization effort.

The addition of the "Crop Text" feature description key aligns with the PR objectives of adding missing English keys across all locales. The translation "입력 토큰이 모델 제한을 초과하지 않도록 텍스트 자르기" appears structurally sound.

Please verify the translation accurately conveys the technical meaning of cropping text to prevent token limit violations.


93-94: Korean translations are accurate and structurally sound.

The split of the context-length error message into separate keys improves reusability and is correctly implemented across all 13 language files with consistent structure.

The Korean translations accurately convey the intended meaning:

  • Line 93: "최대 컨텍스트 길이를 초과하였습니다" correctly translates "Exceeded maximum context length"
  • Line 94: "대화 내용을 지우고 다시 시도해주세요" correctly translates "Please clear the conversation and try again"

Both translations use appropriate formal tone for error messages and recovery instructions, consistent with the other language versions.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Oct 20, 2025

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
- [ ] Create ticket/issue <!-- /create_ticket --create_ticket=true -->

</details></td></tr>
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
No custom compliance provided

Follow the guide to enable custom compliance check.

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Oct 20, 2025

PR Code Suggestions ✨

Latest suggestions up to e9128de

CategorySuggestion                                                                                                                                    Impact
Incremental [*]
Clarify keypress instruction text

Improve the clarity of a Turkish instruction by changing "... için Enter" (for
Enter) to "... için Enter'a basın" (press Enter for).

src/_locales/tr/main.json [28]

-"Type your question here\nEnter to stop generating\nShift + enter to break line": "Sorunuzu buraya yazın\nÜretmeyi durdurmak için Enter\nSatır atlamak için Shift + Enter",
+"Type your question here\nEnter to stop generating\nShift + enter to break line": "Sorunuzu buraya yazın\nÜretmeyi durdurmak için Enter'a basın\nSatır atlamak için Shift + Enter'a basın",
  • Apply / Chat
Suggestion importance[1-10]: 5

__

Why: The suggestion correctly identifies an unnatural translation and proposes a clearer, more idiomatic phrasing for user instructions, improving usability.

Low
Fix inconsistent capitalization typo

Correct an inconsistent capitalization by changing "Token" to "token" in a
Turkish error message to match other usages in the file.

src/_locales/tr/main.json [134]

-"moonshot token required, please login at https://kimi.com first, and then click the retry button": "moonshot Token gereklidir, lütfen önce https://kimi.com adresinde oturum açın ve ardından yeniden dene düğmesine tıklayın",
+"moonshot token required, please login at https://kimi.com first, and then click the retry button": "moonshot token gereklidir, lütfen önce https://kimi.com adresinde oturum açın ve ardından yeniden dene düğmesine tıklayın",
  • Apply / Chat
Suggestion importance[1-10]: 4

__

Why: The suggestion correctly points out an inconsistent capitalization of the word "Token" and proposes to make it lowercase for consistency, which is a good practice for localization.

Low
  • Update

Previous suggestions

✅ Suggestions up to commit bea7e8f
CategorySuggestion                                                                                                                                    Impact
General
Apply consistent capitalization for keys
Suggestion Impact:The commit updated the Turkish translation to capitalize "Enter" and "Shift + Enter" exactly as suggested.

code diff:

   "Type your question here\nEnter to send, shift + enter to break line": "Sorunuzu buraya yazın\nGöndermek için Enter\nSatır atlamak için Shift + Enter",
-  "Type your question here\nEnter to stop generating\nShift + enter to break line": "Sorunuzu buraya yazın\nÜretmeyi durdurmak için enter\nSatır atlamak için shift + enter",
+  "Type your question here\nEnter to stop generating\nShift + enter to break line": "Sorunuzu buraya yazın\nÜretmeyi durdurmak için Enter\nSatır atlamak için Shift + Enter",

For consistency with other translations in the file, capitalize Enter and Shift
+ Enter in the value for the key "Type your question here\nEnter to stop
generating\nShift + enter to break line".

src/_locales/tr/main.json [28]

-"Type your question here\nEnter to stop generating\nShift + enter to break line": "Sorunuzu buraya yazın\nÜretmeyi durdurmak için enter\nSatır atlamak için shift + enter",
+"Type your question here\nEnter to stop generating\nShift + enter to break line": "Sorunuzu buraya yazın\nÜretmeyi durdurmak için Enter\nSatır atlamak için Shift + Enter",

[Suggestion processed]

Suggestion importance[1-10]: 5

__

Why: The suggestion correctly identifies an inconsistency in the Turkish translation where enter and shift + enter were not capitalized, unlike a similar key updated in this PR, improving UI consistency.

Low
Possible issue
Fix an incomplete translation
Suggestion Impact:The commit updated the Turkish translation to include "Ve" at the start, matching the source text ("And ...").

code diff:

-  "And refresh this page or type you question again": "Bu sayfayı yenileyin veya sorunuzu tekrar yazın",
-  "And click the retry button in the top right corner": "Ve sağ üstteki Yeniden Dene düğmesine tıklayın",
+  "And refresh this page or type you question again": "Ve bu sayfayı yenileyin veya sorunuzu tekrar yazın",

Restore the word "Ve" ("And") at the beginning of the translation for the key
"And refresh this page or type you question again" to match the source text and
maintain consistency.

src/_locales/tr/main.json [50]

-"And refresh this page or type you question again": "Bu sayfayı yenileyin veya sorunuzu tekrar yazın",
+"And refresh this page or type you question again": "Ve bu sayfayı yenileyin veya sorunuzu tekrar yazın",

[Suggestion processed]

Suggestion importance[1-10]: 4

__

Why: The suggestion correctly points out that the PR removed "Ve" ("And") from a translation, making it inconsistent with the English source key and another related Turkish translation, thus improving translation accuracy.

Low

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request significantly improves the Turkish localization by refining terminology, enhancing clarity, standardizing wording, and adding missing translations. The changes demonstrate a good understanding of both the source text and Turkish language nuances. I have a couple of minor suggestions to further improve consistency and completeness, but overall, this is excellent work that will greatly benefit Turkish-speaking users.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f973bd9 and bea7e8f.

📒 Files selected for processing (1)
  • src/_locales/tr/main.json (9 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/_locales/**/main.json

📄 CodeRabbit inference engine (AGENTS.md)

Do not change localization keys; add keys only in en/main.json and propagate values to other locales

Files:

  • src/_locales/tr/main.json
🔇 Additional comments (1)
src/_locales/tr/main.json (1)

15-163: Translation improvements look good overall.

The terminology updates (Url → URL'si, UNAUTHORIZED → Yetkisiz, Polish → Parlat, Precise → Kesin, Float the Window → Pencereyi Yüzdür) improve clarity and parity with the English version. Message expansions (lines 50, 94, 106) add helpful user guidance. Capitalization and punctuation consistency throughout the file is solid.

…n- Remove non-EN key from TR locale\n- Set value of existing key to retry-button hint (matches EN mapping)
@cenktekin
Copy link
Author

Applied minor suggestions: capitalized Enter/Shift in the stop-generating hint and restored ‘to avoid blocking’ for parity. Formatted, linted, build OK. Commit: dca858a

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves Turkish translations to enhance clarity, consistency, and parity with English source strings. It focuses on terminology refinement, standardized formatting conventions, and expanded error messaging.

Key Changes:

  • Refined Turkish terminology for better clarity (e.g., "Polish" → "Parlat" for content polishing, "Precise" → "Kesin", "UNAUTHORIZED" → "Yetkisiz")
  • Standardized technical terms and formatting (consistent "API URL'si", capitalized keyboard shortcuts like "Enter" and "Shift + Enter", "Token" instead of "Jeton")
  • Added missing translation keys and expanded error messages with actionable guidance (context length exceeded message, retry button hint, "Crop Text" entry)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Align 'And refresh this page' translation with English source
- Capitalize 'Token' in moonshot error message for consistency
@PeterDaveHello
Copy link
Member

@codex review

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Swish!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- Split 'Exceeded maximum context length' into separate error and action keys as requested.
- Updated all 13 language locales to match this new structure to ensure consistency and prevent mixed-language error messages.
- Reorganized 'Crop Text' setting to a more logical position (near conversation length settings) per review suggestion.
- Fixed a translation mismatch in the Turkish locale for the 'retry button' instruction.
- Applied code formatting across modified files.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (6)
src/_locales/in/main.json (1)

1-164: Missing translation key for "Crop Text" setting.

The English locale file includes a new key "Crop Text to ensure the input tokens do not exceed the model's limit" (line 109 in en/main.json), but this key is absent from the Indonesian locale. This key should be added to maintain parity with the English version.

src/_locales/de/main.json (1)

1-164: Missing translation key for "Crop Text" setting.

The English locale includes "Crop Text to ensure the input tokens do not exceed the model's limit" (en/main.json line 109), which is missing from the German locale. Consider adding the German translation to maintain feature parity.

src/_locales/ja/main.json (1)

1-164: Missing "Crop Text" translation.

The "Crop Text to ensure the input tokens do not exceed the model's limit" key (present in en/main.json line 109) is absent from the Japanese locale. Add the Japanese translation for completeness.

src/_locales/it/main.json (1)

1-164: Missing "Crop Text" translation.

The Italian locale is missing the "Crop Text to ensure the input tokens do not exceed the model's limit" key that appears in the English locale (line 109). Please add the Italian translation.

src/_locales/es/main.json (1)

1-164: Missing "Crop Text" translation.

The Spanish locale lacks the "Crop Text to ensure the input tokens do not exceed the model's limit" key found in the English locale (line 109). Add the Spanish translation to maintain feature parity.

src/_locales/ru/main.json (1)

1-164: Missing "Crop Text" translation.

The Russian locale is missing the "Crop Text to ensure the input tokens do not exceed the model's limit" key present in the English locale (line 109). Add the Russian translation for consistency.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e9128de and bfe2a03.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (15)
  • ICON_SYSTEM_ANALYSIS.md
  • src/_locales/de/main.json
  • src/_locales/en/main.json
  • src/_locales/es/main.json
  • src/_locales/fr/main.json
  • src/_locales/in/main.json
  • src/_locales/it/main.json
  • src/_locales/ja/main.json
  • src/_locales/ko/main.json
  • src/_locales/pt/main.json
  • src/_locales/ru/main.json
  • src/_locales/tr/main.json
  • src/_locales/zh-hans/main.json
  • src/_locales/zh-hant/main.json
  • src/services/wrappers.mjs
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/_locales/tr/main.json
🧰 Additional context used
🧬 Code graph analysis (1)
src/services/wrappers.mjs (1)
src/components/ConversationCard/index.jsx (1)
  • port (59-59)
🔇 Additional comments (15)
src/_locales/in/main.json (1)

93-94: LGTM: Error message split implemented correctly.

The split of the context length error into two separate keys follows the PR's broader i18n consistency update. The Indonesian translations are clear and appropriate.

src/_locales/de/main.json (1)

93-94: LGTM: Error message restructuring applied correctly.

The German translations properly split the context length error message into two distinct keys, aligning with the broader localization consistency effort.

src/_locales/en/main.json (1)

93-94: LGTM: Error message refactoring implemented cleanly.

The split of the context-length error into two keys ("Exceeded maximum context length" and "Please clear the conversation and try again") improves modularity and aligns with the PR's goal of clearer, more actionable error messaging.

src/_locales/ja/main.json (1)

93-94: LGTM: Japanese error message split is clean and accurate.

The Japanese translations correctly implement the two-key error message pattern, with natural phrasing that maintains clarity for users.

src/_locales/it/main.json (1)

93-94: LGTM: Italian translations follow the new error message structure.

The Italian locale properly implements the split error messaging pattern with appropriate translations.

src/_locales/es/main.json (1)

93-94: LGTM: Spanish error message refactoring is correct.

The Spanish translations accurately split the context-length error into two keys, maintaining clear and actionable messaging for Spanish-speaking users.

src/_locales/zh-hans/main.json (2)

93-94: LGTM: Simplified Chinese error message split is well executed.

The Simplified Chinese translations cleanly implement the two-key error message pattern with accurate and natural phrasing.


109-109: Good: "Crop Text" translation included.

The Simplified Chinese locale correctly includes the translation for the new "Crop Text" setting. This locale is one of the few that has this translation—ensure other locales follow suit.

src/_locales/ru/main.json (1)

93-94: LGTM: Russian translations correctly implement the new structure.

The Russian locale properly splits the context-length error message into two keys with accurate translations.

src/_locales/fr/main.json (1)

93-94: LGTM! French translations are clear and actionable.

The split of the error message into a concise error statement (line 93) and separate guidance (line 94) improves clarity. The French translations are appropriate and align with the PR's objectives to provide more actionable error messages.

src/_locales/ko/main.json (1)

93-94: LGTM! Korean translations follow the improved error message structure.

The changes correctly split the error message into a descriptive error (line 93) and actionable guidance (line 94), consistent with the improvements across other locales.

src/_locales/pt/main.json (1)

93-94: LGTM! Portuguese translations are clear and consistent.

The error message split follows the same pattern as other locales, with appropriate Portuguese translations for both the error statement (line 93) and the guidance (line 94).

src/_locales/zh-hant/main.json (2)

93-94: LGTM! Traditional Chinese translations are accurate and consistent.

The error message improvements are properly translated and follow the same pattern established across all other locales in this PR.


109-109: ✓ The "Crop Text" key is present and consistent across all locales.

The key appears at line 109 in en/main.json, tr/main.json, and zh-hant/main.json with appropriate translations. The PR's objective to add this English key to the Turkish locale has been completed successfully.

src/services/wrappers.mjs (1)

63-70: All locale files already include both translation keys—no action required.

Verification confirms that all 13 locale files (de, en, es, fr, in, it, ja, ko, pt, ru, tr, zh-hans, zh-hant) contain both "Exceeded maximum context length" and "Please clear the conversation and try again" keys. No runtime translation errors will occur.

🔎 Optional: Consider using template literals for readability
-        port.postMessage({
-          error:
-            t('Exceeded maximum context length') +
-            '\n' +
-            t('Please clear the conversation and try again') +
-            '\n\n' +
-            err.message,
-        })
+        port.postMessage({
+          error: `${t('Exceeded maximum context length')}
+${t('Please clear the conversation and try again')}
+
+${err.message}`,
+        })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants