Skip to content

feat: add language support for wiki generation#75

Open
maxfrank76 wants to merge 2 commits intorepowise-dev:mainfrom
maxfrank76:feature/add-language-support
Open

feat: add language support for wiki generation#75
maxfrank76 wants to merge 2 commits intorepowise-dev:mainfrom
maxfrank76:feature/add-language-support

Conversation

@maxfrank76
Copy link
Copy Markdown

Add language support for wiki generation

This PR adds the ability to generate wiki documentation in a user‑specified language (e.g., Russian, Spanish, etc.) instead of always English. The language is read from .repowise/config.yaml (language: ru) and passed through the generation pipeline.

Changes

  1. models.py: added language: str = "en" field to GenerationConfig.
  2. init_cmd.py: loads language from config and passes it to GenerationConfig; also displays selected language in console.
  3. orchestrator.py: added generation_config parameter to run_generation to preserve the original config (especially language) when creating a new GenerationConfig with adjusted max_concurrency.
  4. page_generator.py:
    • Constructor accepts language and stores it as self._language.
    • _call_provider injects a language instruction into the system prompt if self._language != "en". The instruction tells the LLM to generate documentation in the specified language while keeping code, file paths, and symbol names unchanged.

How to test

  1. Create .repowise/config.yaml with:
    provider: ollama
    model: qwen3.5:latest
    language: ru
  2. Run repowise init (--force (or repowise update --all for existing wiki)).
  3. The generated wiki pages should be in Russian (or your chosen language).

Notes

Default language is en.
Only descriptive text is translated; code blocks, file paths, and symbol names remain original.
Works with any provider (Anthropic, OpenAI, Gemini, Ollama) as long as the model supports multilingual output.

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.

1 participant