Skip to content

Conversation

@acmasok
Copy link

@acmasok acmasok commented Jan 20, 2026

Summary

Adds language support for AI-generated content in Ideation and Roadmap sections. Closes #1359.

Changes

Frontend

  • generation-handlers.ts - reads settings.language and passes to config
  • roadmap-handlers.ts - reads settings.language and passes to config
  • agent-queue.ts - passes --language argument to backend processes
  • types.ts, insights.ts - added language property to types

Backend

  • ideation_runner.py - accepts --language CLI argument
  • roadmap_runner.py - accepts --language CLI argument
  • ideation/generator.py - adds language instruction to AI prompts
  • roadmap/executor.py - adds language instruction to AI prompts
  • roadmap/orchestrator.py, models.py - passes language through the chain

Supported Languages

  • Russian (ru), French (fr), German (de), Spanish (es), Chinese (zh), Japanese (ja), Korean (ko)

Behavior

  • Language is automatically read from Settings → Language
  • AI prompts include instruction to generate text content in the selected language
  • Technical terms, file paths, and code remain in English for consistency
  • Default language is English (en)

Test plan

  • Set language to Russian in Settings → Language
  • Generate Roadmap content
  • Verify vision, descriptions, feature names are in Russian
  • Generate Ideation content
  • Verify idea titles, descriptions, rationale are in Russian
  • Verify technical terms and code remain in English

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Multi-language AI content for Ideation & Roadmap (ru, fr, de, es, zh, ja, ko)
    • Language preference now flows from app settings into AI generators
    • Added full Russian UI translations across the app
  • Bug Fixes

    • Fixed recovery/ideation content generation so it respects the selected language (no longer defaults to English)

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

acmasok and others added 3 commits January 20, 2026 12:35
Add complete Russian localization for the frontend UI including:
- All 11 translation files (common, navigation, settings, tasks, welcome, onboarding, dialogs, gitlab, taskReview, terminal, errors)
- Updated i18n constants to include Russian language option
- Updated i18n index to import Russian translations

This enables Russian-speaking users to use Auto-Claude in their native language.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: anatolijnesterov <acmasok@gmail.com>
- Pass language setting to ideation and roadmap generators
- Add language instruction to AI prompts for non-English content
- Support ru, fr, de, es, zh, ja, ko languages
- Keep technical terms and code in English

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 20, 2026 11:00
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

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
🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title refers to v2.7.5 but changes implement v2.7.6 per CHANGELOG.md, version files, and commit messages. Update the PR title to reflect the actual version being released: 'feat(i18n): Add language support for AI-generated content (v2.7.6)'.
Docstring Coverage ⚠️ Warning Docstring coverage is 78.57% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed All objectives from #1359 are met: frontend reads language settings and propagates via handlers/types; backend accepts --language CLI argument in both runners; language instructions added to ideation/roadmap prompts; supported languages (ru/fr/de/es/zh/ja/ko) implemented; technical terms kept in English.
Out of Scope Changes check ✅ Passed All changes are directly related to adding language support for AI-generated content; version bumps and Russian i18n locale files align with the main objective.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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

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

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @acmasok, 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 introduces comprehensive internationalization (i18n) support for AI-generated content within the Ideation and Roadmap features. It enables users to receive AI-generated text in their preferred language, enhancing accessibility and user experience for a global audience. The changes span both frontend and backend components, ensuring that language preferences are seamlessly propagated and applied during content generation, while maintaining English for technical elements. Additionally, a full Russian translation has been integrated into the frontend.

Highlights

  • AI Content Localization: AI-generated content in both the Ideation and Roadmap sections now supports multiple languages, enhancing accessibility for a global user base.
  • Expanded Language Support: Initial support has been added for Russian, French, German, Spanish, Chinese, Japanese, and Korean languages.
  • Frontend Integration: The frontend now reads the user's selected language from settings and passes this preference to the backend AI content generation processes.
  • Backend Prompting Logic: Backend AI generators have been updated to dynamically include language instructions in their prompts, ensuring that generated text content is localized according to user settings.
  • Technical Term Consistency: A key design decision ensures that technical terms, file paths, and code snippets within AI-generated content will consistently remain in English, regardless of the selected output language.
  • Russian Translation Added: Comprehensive Russian (ru) translations have been added across various frontend components, including common UI elements, dialogs, settings, navigation, and task management.
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.

Copy link
Contributor

@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

В целом, этот pull request успешно добавляет поддержку русского языка для AI-генерируемого контента в разделах Ideation и Roadmap. Изменения в основном касаются добавления параметра языка в конфигурации бэкенда и фронтенда, а также обновления логики генерации подсказок для включения инструкций по языку. Также были добавлены файлы локализации для русского языка. Однако, обнаружена критическая проблема с файлом package-lock.json, где версия проекта откатывается с 2.7.5 на 2.7.4, что противоречит названию pull request и может привести к проблемам с зависимостями. Кроме того, есть возможность для улучшения поддерживаемости путем централизации списка названий языков в бэкенде.

{
"name": "auto-claude",
"version": "2.7.5",
"version": "2.7.4",
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

Версия проекта в package-lock.json откатывается с 2.7.5 на 2.7.4. Это противоречит названию pull request, которое указывает на версию v2.7.5. Пожалуйста, убедитесь, что версия в package-lock.json соответствует ожидаемой версии 2.7.5, чтобы избежать проблем с зависимостями и развертыванием.

Suggested change
"version": "2.7.4",
"version": "2.7.5",

"": {
"name": "auto-claude",
"version": "2.7.5",
"version": "2.7.4",
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

Версия проекта в package-lock.json откатывается с 2.7.5 на 2.7.4. Это противоречит названию pull request, которое указывает на версию v2.7.5. Пожалуйста, убедитесь, что версия в package-lock.json соответствует ожидаемой версии 2.7.5, чтобы избежать проблем с зависимостями и развертыванием.

Suggested change
"version": "2.7.4",
"version": "2.7.5",

"apps/frontend": {
"name": "auto-claude-ui",
"version": "2.7.5",
"version": "2.7.4",
Copy link
Contributor

Choose a reason for hiding this comment

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

critical

Версия проекта в package-lock.json откатывается с 2.7.5 на 2.7.4. Это противоречит названию pull request, которое указывает на версию v2.7.5. Пожалуйста, убедитесь, что версия в package-lock.json соответствует ожидаемой версии 2.7.5, чтобы избежать проблем с зависимостями и развертыванием.

Suggested change
"version": "2.7.4",
"version": "2.7.5",

Comment on lines +94 to +101
language_names = {
"ru": "Russian",
"fr": "French",
"de": "German",
"es": "Spanish",
"zh": "Chinese",
"ja": "Japanese",
"ko": "Korean",
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Словарь language_names жестко закодирован здесь. Если потребуется добавить больше языков, этот словарь придется обновлять в нескольких местах (например, в roadmap/executor.py). Рассмотрите возможность централизации этого списка языков в одном файле конфигурации или базе данных, чтобы улучшить поддерживаемость.

Comment on lines +118 to +125
language_names = {
"ru": "Russian",
"fr": "French",
"de": "German",
"es": "Spanish",
"zh": "Chinese",
"ja": "Japanese",
"ko": "Korean",
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Как и в ideation/generator.py, словарь language_names жестко закодирован здесь. Для лучшей поддерживаемости и масштабируемости рассмотрите возможность централизации этого списка языков в одном файле конфигурации или базе данных, чтобы избежать дублирования и упростить добавление новых языков в будущем.

Copy link
Contributor

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 adds language support for AI-generated content in the Ideation and Roadmap sections. The language setting from the app preferences is now passed through to the AI content generators, enabling multilingual content generation while keeping technical terms, file paths, and code in English.

Changes:

  • Added language parameter support throughout the frontend and backend pipeline
  • Implemented Russian (ru) UI translations with comprehensive localization files
  • Added language instruction injection into AI prompts for supported languages (Russian, French, German, Spanish, Chinese, Japanese, Korean)

Reviewed changes

Copilot reviewed 28 out of 29 changed files in this pull request and generated no comments.

Show a summary per file
File Description
package-lock.json Version downgrade from 2.7.5 to 2.7.4 (critical issue)
apps/frontend/src/shared/types/insights.ts Added language property to IdeationConfig type
apps/frontend/src/shared/constants/i18n.ts Added Russian to supported languages
apps/frontend/src/shared/i18n/index.ts Imported and registered Russian translation resources
apps/frontend/src/shared/i18n/locales/ru/*.json Complete Russian UI translations (11 files)
apps/frontend/src/main/ipc-handlers/generation-handlers.ts Read language from settings and pass to ideation config
apps/frontend/src/main/ipc-handlers/roadmap-handlers.ts Read language from settings and pass to roadmap config
apps/frontend/src/main/agent/types.ts Added language property to RoadmapConfig interface
apps/frontend/src/main/agent/agent-queue.ts Pass --language argument to backend processes
apps/backend/runners/ideation_runner.py Accept --language CLI argument
apps/backend/runners/roadmap_runner.py Accept --language CLI argument
apps/backend/ideation/generator.py Add language instruction to AI prompts
apps/backend/runners/roadmap/executor.py Add language instruction to AI prompts
apps/backend/ideation/types.py Added language property to IdeationConfig dataclass
apps/backend/runners/roadmap/models.py Added language property to RoadmapConfig dataclass
apps/backend/ideation/config.py Pass language through configuration chain
apps/backend/ideation/runner.py Accept and pass language parameter
apps/backend/runners/roadmap/orchestrator.py Accept and pass language parameter
CHANGELOG.md Documented new features for v2.7.5

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

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: 3

Caution

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

⚠️ Outside diff range comments (5)
apps/backend/runners/roadmap/executor.py (1)

69-83: Normalize/validate language before prompt injection.
Casing or unexpected values (e.g., EN, en-US, or arbitrary strings) will be injected into the prompt and can produce inconsistent output. Normalize the code and only apply the instruction for supported languages.

🛠️ Proposed fix
-        self.language = language
+        self.language = (language or "en").lower()
@@
-        if self.language and self.language != "en":
+        if self.language != "en":
             language_names = {
                 "ru": "Russian",
                 "fr": "French",
                 "de": "German",
                 "es": "Spanish",
                 "zh": "Chinese",
                 "ja": "Japanese",
                 "ko": "Korean",
             }
-            lang_name = language_names.get(self.language, self.language)
-            prompt += f"\n**IMPORTANT - Output Language**: Generate ALL text content (vision, descriptions, feature names, rationale, explanations) in {lang_name}. Keep only technical terms, file paths, and code in English.\n"
+            lang_name = language_names.get(self.language)
+            if lang_name:
+                prompt += (
+                    f"\n**IMPORTANT - Output Language**: Generate ALL text content "
+                    f"(vision, descriptions, feature names, rationale, explanations) "
+                    f"in {lang_name}. Keep only technical terms, file paths, and code in English.\n"
+                )

Also applies to: 116-128

apps/frontend/src/main/ipc-handlers/ideation/generation-handlers.ts (1)

71-84: Consider adding language to debug logging for consistency.

The configWithSettings object includes language, but the debug log on lines 78-84 omits it. For consistency with roadmap handlers (which log the full config), consider adding language to the logged properties.

♻️ Add language to debug logging
   debugLog("[Ideation Handler] Start generation request:", {
     projectId,
     enabledTypes: configWithSettings.enabledTypes,
     maxIdeasPerType: configWithSettings.maxIdeasPerType,
     model: configWithSettings.model,
     thinkingLevel: configWithSettings.thinkingLevel,
+    language: configWithSettings.language,
   });
apps/backend/runners/roadmap_runner.py (1)

103-136: Consider adding language to the debug log for observability.

The debug statement on lines 103-110 logs several CLI arguments but omits language. For debugging and troubleshooting language-related issues, consider including it.

♻️ Add language to debug logging
     debug(
         "roadmap_runner",
         "CLI invoked",
         project=str(args.project),
         output=str(args.output) if args.output else None,
         model=args.model,
         refresh=args.refresh,
+        language=args.language,
     )
apps/backend/ideation/config.py (1)

20-71: Validate/normalize language before it reaches prompt construction.
If language is user-configurable, passing it through unchecked can allow unsupported values or prompt-injection-like strings. Add a small allowlist/normalization here (or a shared validator) and default to "en" on invalid input.

🔧 Proposed guardrail
+ALLOWED_LANGUAGES = {"en", "ru", "fr", "de", "es", "zh", "ja", "ko"}
+
 class IdeationConfigManager:
@@
-        self.language = language
+        normalized_language = language.strip().lower()
+        self.language = (
+            normalized_language if normalized_language in ALLOWED_LANGUAGES else "en"
+        )
apps/backend/runners/roadmap/orchestrator.py (1)

26-66: Add language validation to prevent prompt injection in both roadmap and ideation paths.

The language parameter lacks validation at both the CLI and orchestrator levels. Users can pass arbitrary strings that get interpolated directly into LLM prompts via the .get() fallback at lines 127 (roadmap/executor.py) and 103 (ideation/generator.py). For example, --language "en\n\nIGNORE_INSTRUCTIONS" would inject unescaped content into the system prompt.

Unlike thinking_level (which uses choices=["none", "low", "medium", "high", "ultrathink"]), the --language argument has no choices constraint, allowing any string through. The executor's fallback language_names.get(self.language, self.language) returns the raw unsanitized value when not found in the mapping, then embeds it directly into the prompt string without escaping.

Add a shared validation constant and normalize the language in both RoadmapOrchestrator.__init__ (line 44) and the equivalent ideation runner initialization:

🔧 Suggested fix
+# At module level (shared across both orchestrator and ideation)
+SUPPORTED_LANGUAGES = {"en", "ru", "fr", "de", "es", "zh", "ja", "ko"}
+
 def __init__(
     self,
     project_dir: Path,
@@ -44,7 +47,10 @@ class RoadmapOrchestrator:
     self.enable_competitor_analysis = enable_competitor_analysis
     self.refresh_competitor_analysis = refresh_competitor_analysis
-    self.language = language
+    normalized_language = language.strip().lower()
+    self.language = (
+        normalized_language if normalized_language in SUPPORTED_LANGUAGES else "en"
+    )
🤖 Fix all issues with AI agents
In `@apps/backend/ideation/generator.py`:
- Around line 92-104: The inline language_names dict inside the method using
self.language should be extracted to a shared module-level constant (e.g.,
LANGUAGE_NAMES) so it isn't recreated on every call and can be reused across
files; create the constant at top of apps/backend/ideation/generator.py (or a
shared util module if used by other modules like roadmap/executor.py), replace
the inline language_names reference in the method with
LANGUAGE_NAMES.get(self.language, self.language), and update imports/usages
accordingly to use the shared constant.

In `@apps/backend/runners/ideation_runner.py`:
- Around line 125-130: The --language parser.add_argument currently accepts any
string; add validation similar to the existing --types handling by restricting
accepted values (either via argparse's choices or by checking against a
SUPPORTED_LANGUAGES list) and surface a clear error for invalid codes; update
the --language add_argument call (the parser.add_argument for "--language") to
use choices=<SUPPORTED_LANGUAGES> or validate the parsed args.language against
SUPPORTED_LANGUAGES (create that constant if needed) and raise/argparse.error
with a helpful message on invalid input.

In `@apps/frontend/src/shared/types/insights.ts`:
- Line 31: Replace the loose string type on the language property with the
specific SupportedLanguage type: import SupportedLanguage from
apps/frontend/src/shared/constants/i18n.ts and change the declaration language?:
string to language?: SupportedLanguage in the insights type (referencing the
existing language property in apps/frontend/src/shared/types/insights.ts); also
update the trailing comment to remove "etc." and note only 'en' | 'fr' | 'ru'
are supported so the comment matches the constrained type.

Comment on lines +92 to +104
# Add language instruction if not English
if self.language and self.language != "en":
language_names = {
"ru": "Russian",
"fr": "French",
"de": "German",
"es": "Spanish",
"zh": "Chinese",
"ja": "Japanese",
"ko": "Korean",
}
lang_name = language_names.get(self.language, self.language)
prompt += f"\n**IMPORTANT - Output Language**: Generate ALL text content (titles, descriptions, rationale, implementation approaches) in {lang_name}. Keep only technical terms, file paths, and code in English.\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider extracting the language names mapping as a module-level constant.

The implementation correctly injects language instructions only for non-English languages. However, the language_names dictionary is defined inline within the method, which means it gets recreated on every call. Additionally, this same mapping likely exists (or will exist) in other files like roadmap/executor.py.

♻️ Suggested refactor to extract constant
+# Language code to full name mapping for AI prompts
+LANGUAGE_NAMES = {
+    "ru": "Russian",
+    "fr": "French",
+    "de": "German",
+    "es": "Spanish",
+    "zh": "Chinese",
+    "ja": "Japanese",
+    "ko": "Korean",
+}
+
+
 class IdeationGenerator:

Then in the method:

         # Add language instruction if not English
         if self.language and self.language != "en":
-            language_names = {
-                "ru": "Russian",
-                "fr": "French",
-                "de": "German",
-                "es": "Spanish",
-                "zh": "Chinese",
-                "ja": "Japanese",
-                "ko": "Korean",
-            }
-            lang_name = language_names.get(self.language, self.language)
+            lang_name = LANGUAGE_NAMES.get(self.language, self.language)
             prompt += f"\n**IMPORTANT - Output Language**: Generate ALL text content (titles, descriptions, rationale, implementation approaches) in {lang_name}. Keep only technical terms, file paths, and code in English.\n"
🤖 Prompt for AI Agents
In `@apps/backend/ideation/generator.py` around lines 92 - 104, The inline
language_names dict inside the method using self.language should be extracted to
a shared module-level constant (e.g., LANGUAGE_NAMES) so it isn't recreated on
every call and can be reused across files; create the constant at top of
apps/backend/ideation/generator.py (or a shared util module if used by other
modules like roadmap/executor.py), replace the inline language_names reference
in the method with LANGUAGE_NAMES.get(self.language, self.language), and update
imports/usages accordingly to use the shared constant.

Comment on lines +125 to +130
parser.add_argument(
"--language",
type=str,
default="en",
help="Language for generated content (en, ru, fr, etc.)",
)
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider validating the --language argument.

The CLI argument is correctly added with appropriate help text. However, unlike --types (which validates against IDEATION_TYPES at lines 144-148), invalid language codes will pass through without early feedback.

♻️ Optional: Add language validation
+SUPPORTED_LANGUAGES = ["en", "ru", "fr", "de", "es", "zh", "ja", "ko"]
+
 # ...

     parser.add_argument(
         "--language",
         type=str,
         default="en",
-        help="Language for generated content (en, ru, fr, etc.)",
+        choices=SUPPORTED_LANGUAGES,
+        help=f"Language for generated content (options: {', '.join(SUPPORTED_LANGUAGES)})",
     )

Using choices provides argparse-level validation with automatic error messages.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
parser.add_argument(
"--language",
type=str,
default="en",
help="Language for generated content (en, ru, fr, etc.)",
)
SUPPORTED_LANGUAGES = ["en", "ru", "fr", "de", "es", "zh", "ja", "ko"]
# ... [existing code]
parser.add_argument(
"--language",
type=str,
default="en",
choices=SUPPORTED_LANGUAGES,
help=f"Language for generated content (options: {', '.join(SUPPORTED_LANGUAGES)})",
)
🤖 Prompt for AI Agents
In `@apps/backend/runners/ideation_runner.py` around lines 125 - 130, The
--language parser.add_argument currently accepts any string; add validation
similar to the existing --types handling by restricting accepted values (either
via argparse's choices or by checking against a SUPPORTED_LANGUAGES list) and
surface a clear error for invalid codes; update the --language add_argument call
(the parser.add_argument for "--language") to use choices=<SUPPORTED_LANGUAGES>
or validate the parsed args.language against SUPPORTED_LANGUAGES (create that
constant if needed) and raise/argparse.error with a helpful message on invalid
input.

append?: boolean; // If true, append to existing ideas instead of replacing
model?: string; // Model shorthand (opus, sonnet, haiku)
thinkingLevel?: string; // Thinking level (none, low, medium, high, ultrathink)
language?: string; // Language for generated content (en, ru, fr, etc.)
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for SupportedLanguage type and AVAILABLE_LANGUAGES constant
rg -n "SupportedLanguage|AVAILABLE_LANGUAGES" --type=ts --type=tsx apps/frontend/src/shared/

# Also check the i18n.ts constants file directly
echo "=== Checking i18n.ts file ==="
find apps/frontend/src/shared/constants -name "*i18n*" -type f

Repository: AndyMik90/Auto-Claude

Length of output: 182


🏁 Script executed:

#!/bin/bash
# Check the insights.ts file to see the full context of the IdeationConfig type
head -50 apps/frontend/src/shared/types/insights.ts

Repository: AndyMik90/Auto-Claude

Length of output: 1922


🏁 Script executed:

#!/bin/bash
# Search for usage of IdeationConfig and language property
rg -n "IdeationConfig|language:" --type=ts --type=tsx apps/frontend/src/ -A 2 -B 2 | head -100

Repository: AndyMik90/Auto-Claude

Length of output: 92


🏁 Script executed:

#!/bin/bash
# Read the i18n.ts constants file
cat apps/frontend/src/shared/constants/i18n.ts

Repository: AndyMik90/Auto-Claude

Length of output: 518


🏁 Script executed:

#!/bin/bash
# Search for AVAILABLE_LANGUAGES with rg (simpler search)
rg "AVAILABLE_LANGUAGES" apps/frontend/src/shared/

Repository: AndyMik90/Auto-Claude

Length of output: 144


🏁 Script executed:

#!/bin/bash
# Search for where language property is used
rg "language" apps/frontend/src/ -B 2 -A 2 | head -80

Repository: AndyMik90/Auto-Claude

Length of output: 6077


🏁 Script executed:

#!/bin/bash
# Check how IdeationConfig is actually used to see if changing the type would break anything
rg "IdeationConfig" apps/frontend/src/ -B 2 -A 5

Repository: AndyMik90/Auto-Claude

Length of output: 23388


🏁 Script executed:

#!/bin/bash
# Check RoadmapConfig to see if it has the same issue
rg "RoadmapConfig" apps/frontend/src/ -B 2 -A 8 | grep -A 8 "interface RoadmapConfig"

Repository: AndyMik90/Auto-Claude

Length of output: 755


Use SupportedLanguage type instead of generic string for better type safety and consistency.

Import SupportedLanguage from apps/frontend/src/shared/constants/i18n.ts and change the type from language?: string to language?: SupportedLanguage. This ensures the language property is restricted to the three supported languages ('en' | 'fr' | 'ru') and maintains consistency with how settings.ts types the UI language preference. Also update the comment to remove the misleading "etc." since only these three languages are currently supported.

🤖 Prompt for AI Agents
In `@apps/frontend/src/shared/types/insights.ts` at line 31, Replace the loose
string type on the language property with the specific SupportedLanguage type:
import SupportedLanguage from apps/frontend/src/shared/constants/i18n.ts and
change the declaration language?: string to language?: SupportedLanguage in the
insights type (referencing the existing language property in
apps/frontend/src/shared/types/insights.ts); also update the trailing comment to
remove "etc." and note only 'en' | 'fr' | 'ru' are supported so the comment
matches the constrained type.

acmasok and others added 2 commits January 20, 2026 14:37
The recovery agent was generating content in English even when
language was set to Russian because it didn't include the language
instruction in its prompt.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@AndyMik90 AndyMik90 force-pushed the develop branch 2 times, most recently from 67a743f to e83e445 Compare January 21, 2026 14:26
@nsvk13
Copy link

nsvk13 commented Jan 22, 2026

Dear @AndyMik90 , chance to get this reviewed/merged soon?
Bump!

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.

feat(i18n): Add language support for AI-generated content (Ideation & Roadmap)

3 participants