Skip to content

fix: remove double space in i18n error message - #9556

Closed
陈民振 (Cmz9111) wants to merge 1 commit into
crewAIInc:mainfrom
Cmz9111:fix/i18n-double-space-typo
Closed

陈民振 (Cmz9111) wants to merge 1 commit into
crewAIInc:mainfrom
Cmz9111:fix/i18n-double-space-typo

Conversation

@Cmz9111

Copy link
Copy Markdown

Problem

The retrieve method in i18n.py raises an exception with a double space in the error message:

raise Exception(f"Prompt for '{kind}':'{key}'  not found.") from e

Note the two spaces between '{key}' and not found..

Solution

Remove the extra space so the error message reads correctly:

raise Exception(f"Prompt for '{kind}':'{key}' not found.") from e

Testing

  • Verified the change is a single-character fix (removing one space).
  • No functional behavior changes — only the error message text is affected.
  • Existing tests for i18n error handling continue to pass since the message content is not asserted with exact spacing in tests.

@strix-security

strix-security Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Strix Security Review

✅ No open security findings.

PR summary: Removes an extra space from the "Prompt for ... not found." exception message in `I18N.retrieve`, with no behavior change beyond the message text.

Review summary

The PR is a one-character cosmetic fix: it removes a stray double space from the exception message raised by I18N.retrieve in lib/crewai/src/crewai/utilities/i18n.py. The diff changes only a string literal — the same kind/key values are interpolated into the message before and after, no control flow, data flow, sink, or access-control decision is altered, and nothing new is exposed or reached. Review found no security issues in the changed code, and the one adjacent concern raised during triage was ruled out against the actual code.

Ruled out (1)
  • Does the edited exception-message line in `I18N.retrieve` change how recalled memory content is injected into an agent's system prompt in `lite_agent.py`?
    The recalled-memory path uses the successful `I18N_DEFAULT.slice("memory")` lookup at lib/crewai/src/crewai/lite_agent.py:627, so the modified line — which only executes when the prompt lookup raises — cannot influence the content appended to the system message, and that pre-existing file is untouc…

Review 1 on this PR · 63e7d6a · requested Nov 18 17:29 UTC when the PR was opened


Reviewed by Strix
Re-run review · Configure security review settings · Try a deeper review with @strix-security /deep

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the pull request.

First-time contributors need an associated open issue before we can review a PR.

  1. Open an issue with a template, or pick an existing open one.
  2. Open a new PR (or reopen this one) whose title or body mentions that issue, for example #123.

See the contributing guide.

@github-actions github-actions Bot added the needs-issue First-time contributor PR closed because it did not mention an open issue label Nov 18, 2026
@github-actions github-actions Bot closed this Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-issue First-time contributor PR closed because it did not mention an open issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant