Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
🌍 i18n: Localize Token Balance Error Message (#14169)
Philipp Voß280da5100458
diff --git a/client/src/components/Messages/Content/Error.tsx b/client/src/components/Messages/Content/Error.tsxindex b464ce2f2a..d56f6caba5 100644--- a/client/src/components/Messages/Content/Error.tsx+++ b/client/src/components/Messages/Content/Error.tsx@@ -100,9 +100,13 @@ const errorMessages = {windowInMinutes > 1 ? `${windowInMinutes} minutes` : 'minute'}.`;},- token_balance: (json: TTokenBalance) => {+ token_balance: (json: TTokenBalance, localize: LocalizeFunction) => {const { balance, tokenCost, promptTokens, generations } = json;- const message = `Insufficient Funds! Balance: ${balance}. Prompt tokens: ${promptTokens}. Cost: ${tokenCost}.`;+ const message = localize('com_error_token_balance', {+ 0: balance,+ 1: promptTokens,+ 2: tokenCost,+ });return (<>{message}diff --git a/client/src/locales/en/translation.json b/client/src/locales/en/translation.jsonindex ce904766ad..398acf45fa 100644--- a/client/src/locales/en/translation.json+++ b/client/src/locales/en/translation.json@@ -391,6 +391,7 @@"com_error_no_user_key": "No key found. Please provide a key and try again.","com_error_refusal": "Response refused by safety filters. Rewrite your message and try again. If you encounter this frequently while using Claude Sonnet 4.5 or Opus 4.1, you can try Sonnet 4, which has different usage restrictions.","com_error_stream_expired": "The response stream has expired or already completed. Please try again.",+ "com_error_token_balance": "Insufficient funds. Balance: {{0}}. Prompt tokens: {{1}}. Cost: {{2}}.","com_file_pages": "Pages: {{pages}}","com_file_source": "File","com_file_unknown": "Unknown File",