Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .roo/commands/roo-resolve-conflicts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
description: "Resolve merge conflicts intelligently using git history analysis"
argument-hint: "#PR-number"
mode: merge-resolver
---

Resolve merge conflicts for a specific pull request by analyzing git history, commit messages, and code changes to make intelligent resolution decisions.

## Quick Start

1. **Provide a PR number** (e.g., `#123` or just `123`)

2. The workflow will automatically:
- Fetch PR information (title, description, branches)
- Checkout the PR branch
- Rebase onto the target branch to reveal conflicts
- Analyze and resolve conflicts using git history

## Workflow Steps

### 1. Initialize PR Resolution

```bash
# Fetch PR info
gh pr view [PR_NUMBER] --json title,body,headRefName,baseRefName

# Checkout and rebase
gh pr checkout [PR_NUMBER] --force
git fetch origin main
GIT_EDITOR=true git rebase origin/main
```

### 2. Identify Conflicts

```bash
git status --porcelain | grep "^UU"
```

### 3. Analyze Each Conflict

For each conflicted file:
- Read the conflict markers
- Run `git blame` on conflicting sections
- Fetch commit messages for context
- Determine the intent behind each change

### 4. Apply Resolution Strategy

Based on the analysis:
- **Bugfixes** generally take precedence over features
- **Recent changes** are often more relevant (unless older is a security fix)
- **Combine** non-conflicting changes when possible
- **Preserve** test updates alongside code changes

### 5. Complete Resolution

```bash
git add [resolved-files]
GIT_EDITOR=true git rebase --continue
```

## Key Guidelines

- Always escape conflict markers with `\` when using `apply_diff`
- Document resolution decisions in the summary
- Verify no syntax errors after resolution
- Preserve valuable changes from both sides when possible

## Examples

- `/roo-resolve-conflicts #123` - Resolve conflicts for PR #123
- `/roo-resolve-conflicts 456` - Resolve conflicts for PR #456
50 changes: 50 additions & 0 deletions .roo/commands/roo-translate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
description: "Translate and localize strings in the Roo Code extension"
argument-hint: "[language-code or 'all'] [string-key or file-path]"
mode: translate
---

Perform translation and localization tasks for the Roo Code extension. This command activates the translation workflow with comprehensive i18n guidelines.

## Quick Start

1. **Identify the translation scope:**
- If a specific language code is provided (e.g., `de`, `zh-CN`), focus on that language
- If `all` is specified, translate to all supported languages
- If a string key is provided, locate and translate that specific string
- If a file path is provided, work with that translation file

2. **Supported languages:** ca, de, en, es, fr, hi, id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW

3. **Translation locations:**
- Core Extension: `src/i18n/locales/`
- WebView UI: `webview-ui/src/i18n/locales/`

## Workflow

1. If adding new strings:
- Add the English string first
- Ask for confirmation before translating to other languages
- Use `apply_diff` for efficient file updates

2. If updating existing strings:
- Identify all affected language files
- Update English first, then propagate changes

3. Validate your changes:
```bash
node scripts/find-missing-translations.js
```

## Key Guidelines

- Use informal speech (e.g., "du" not "Sie" in German)
- Keep technical terms like "token", "Prompt" in English
- Preserve all `{{variable}}` placeholders exactly
- Use `apply_diff` instead of `write_to_file` for existing files

## Examples

- `/roo-translate de` - Focus on German translations
- `/roo-translate all welcome.title` - Translate a specific key to all languages
- `/roo-translate zh-CN src/i18n/locales/zh-CN/core.json` - Work on specific file
19 changes: 19 additions & 0 deletions .roo/guidance/roo-translator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Roo Code Translation Guidance

This file contains brand voice, tone, and word choice guidelines for Roo Code translations.

## Brand Voice

<!-- Add brand voice guidelines here -->

## Tone

<!-- Add tone guidelines here -->

## Word Choice

<!-- Add word choice preferences here -->

## Language-Specific Guidance

<!-- Add any language-specific guidance below -->
Loading
Loading