Skip to content

Commit 9681428

Browse files
authored
Merge pull request #73 from trypear/nang/upstream
Upstream v1.14.3
2 parents e7fc70b + 26069de commit 9681428

761 files changed

Lines changed: 83457 additions & 39058 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clinerules

Lines changed: 0 additions & 17 deletions
This file was deleted.

.dockerignore

Lines changed: 0 additions & 45 deletions
This file was deleted.

.eslintrc.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
}
1616
],
1717
"@typescript-eslint/semi": "off",
18+
"no-unused-vars": "off",
19+
"@typescript-eslint/no-unused-vars": "off",
1820
"eqeqeq": "warn",
1921
"no-throw-literal": "warn",
2022
"semi": "off"
Lines changed: 77 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,80 @@
11
name: Bug Report
2-
description: File a bug report
2+
description: Clearly report a bug with detailed repro steps
33
labels: ["bug"]
44
body:
5-
- type: input
6-
id: version
7-
attributes:
8-
label: Which version of the app are you using?
9-
description: Please specify the app version you're using (e.g. v3.3.1)
10-
validations:
11-
required: true
12-
- type: dropdown
13-
id: provider
14-
attributes:
15-
label: Which API Provider are you using?
16-
multiple: false
17-
options:
18-
- OpenRouter
19-
- Anthropic
20-
- Google Gemini
21-
- DeepSeek
22-
- OpenAI
23-
- OpenAI Compatible
24-
- GCP Vertex AI
25-
- AWS Bedrock
26-
- Glama
27-
- VS Code LM API
28-
- LM Studio
29-
- Ollama
30-
validations:
31-
required: true
32-
- type: input
33-
id: model
34-
attributes:
35-
label: Which Model are you using?
36-
description: Please specify the model you're using (e.g. Claude 3.7 Sonnet)
37-
validations:
38-
required: true
39-
- type: textarea
40-
id: what-happened
41-
attributes:
42-
label: What happened?
43-
description: Also tell us, what did you expect to happen?
44-
placeholder: Tell us what you see!
45-
validations:
46-
required: true
47-
- type: textarea
48-
id: steps
49-
attributes:
50-
label: Steps to reproduce
51-
description: How do you trigger this bug? Please walk us through it step by step.
52-
value: |
53-
1.
54-
2.
55-
3.
56-
validations:
57-
required: true
58-
- type: textarea
59-
id: logs
60-
attributes:
61-
label: Relevant API REQUEST output
62-
description: Please copy and paste any relevant output. This will be automatically formatted into code, so no need for backticks.
63-
render: shell
64-
- type: textarea
65-
id: additional-context
66-
attributes:
67-
label: Additional context
68-
description: Add any other context about the problem here, such as screenshots or related issues.
5+
- type: input
6+
id: version
7+
attributes:
8+
label: App Version
9+
description: Specify exactly which version you're using (e.g., v3.3.1)
10+
validations:
11+
required: true
12+
13+
- type: dropdown
14+
id: provider
15+
attributes:
16+
label: API Provider
17+
description: Choose the API provider involved
18+
multiple: false
19+
options:
20+
- OpenRouter
21+
- Anthropic
22+
- Google Gemini
23+
- DeepSeek
24+
- OpenAI
25+
- OpenAI Compatible
26+
- GCP Vertex AI
27+
- Amazon Bedrock
28+
- Requesty
29+
- Glama
30+
- VS Code LM API
31+
- LM Studio
32+
- Ollama
33+
validations:
34+
required: true
35+
36+
- type: input
37+
id: model
38+
attributes:
39+
label: Model Used
40+
description: Clearly specify the exact model (e.g., Claude 3.7 Sonnet)
41+
validations:
42+
required: true
43+
44+
- type: textarea
45+
id: what-happened
46+
attributes:
47+
label: Actual vs. Expected Behavior
48+
description: Clearly state what actually happened and what you expected instead.
49+
placeholder: Provide precise details of the issue here.
50+
validations:
51+
required: true
52+
53+
- type: textarea
54+
id: steps
55+
attributes:
56+
label: Detailed Steps to Reproduce
57+
description: |
58+
List the exact steps someone must follow to reproduce this bug:
59+
1. Starting conditions (software state, settings, environment)
60+
2. Precise actions taken (every click, selection, input)
61+
3. Clearly observe and report outcomes
62+
value: |
63+
1.
64+
2.
65+
3.
66+
validations:
67+
required: true
68+
69+
- type: textarea
70+
id: logs
71+
attributes:
72+
label: Relevant API Request Output
73+
description: Paste relevant API logs or outputs here (formatted automatically as code)
74+
render: shell
75+
76+
- type: textarea
77+
id: additional-context
78+
attributes:
79+
label: Additional Context
80+
description: Include extra details, screenshots, or related issues.

.github/workflows/code-qa.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ jobs:
6262
run: npm run knip
6363

6464
test-extension:
65-
runs-on: ubuntu-latest
65+
runs-on: ${{ matrix.os }}
66+
strategy:
67+
matrix:
68+
os: [ubuntu-latest, windows-latest]
6669
steps:
6770
- name: Checkout code
6871
uses: actions/checkout@v4
@@ -73,11 +76,16 @@ jobs:
7376
cache: 'npm'
7477
- name: Install dependencies
7578
run: npm run install:all
79+
- name: Compile (to build and copy WASM files)
80+
run: npm run compile
7681
- name: Run unit tests
7782
run: npx jest --silent
7883

7984
test-webview:
80-
runs-on: ubuntu-latest
85+
runs-on: ${{ matrix.os }}
86+
strategy:
87+
matrix:
88+
os: [ubuntu-latest, windows-latest]
8189
steps:
8290
- name: Checkout code
8391
uses: actions/checkout@v4

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.pnpm-store
12
dist
23
out
34
out-*
@@ -31,7 +32,6 @@ docs/_site/
3132

3233
#Logging
3334
logs
34-
.aider*
35-
.env
36-
# aider
37-
.aider*
35+
36+
# Vite development
37+
.vite-port

.husky/pre-commit

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,12 @@ else
1212
npx_cmd="npx"
1313
fi
1414

15-
"$npx_cmd" lint-staged
15+
npm run generate-types
16+
17+
if [ -n "$(git diff --name-only src/exports/roo-code.d.ts)" ]; then
18+
echo "Error: There are unstaged changes to roo-code.d.ts after running 'npm run generate-types'."
19+
echo "Please review and stage the changes before committing."
20+
exit 1
21+
fi
22+
23+
"$npx_cmd" lint-staged
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# 1. SUPPORTED LANGUAGES AND LOCATION
2+
3+
- Localize all strings into the following locale files: ca, de, en, es, fr, hi, it, ja, ko, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW
4+
- The VSCode extension has two main areas that require localization:
5+
- Core Extension: src/i18n/locales/ (extension backend)
6+
- WebView UI: webview-ui/src/i18n/locales/ (user interface)
7+
8+
# 2. VOICE, STYLE AND TONE
9+
10+
- Always use informal speech (e.g., "du" instead of "Sie" in German) for all translations
11+
- Maintain a direct and concise style that mirrors the tone of the original text
12+
- Carefully account for colloquialisms and idiomatic expressions in both source and target languages
13+
- Aim for culturally relevant and meaningful translations rather than literal translations
14+
- Preserve the personality and voice of the original content
15+
- Use natural-sounding language that feels native to speakers of the target language
16+
- Don't translate the word "token" as it means something specific in English that all languages will understand
17+
- Don't translate domain-specific words (especially technical terms like "Prompt") that are commonly used in English in the target language
18+
19+
# 3. CORE EXTENSION LOCALIZATION (src/)
20+
21+
- Located in src/i18n/locales/
22+
- NOT ALL strings in core source need internationalization - only user-facing messages
23+
- Internal error messages, debugging logs, and developer-facing messages should remain in English
24+
- The t() function is used with namespaces like 'core:errors.missingToolParameter'
25+
- Be careful when modifying interpolation variables; they must remain consistent across all translations
26+
- Some strings in formatResponse.ts are intentionally not internationalized since they're internal
27+
- When updating strings in core.json, maintain all existing interpolation variables
28+
- Check string usages in the codebase before making changes to ensure you're not breaking functionality
29+
30+
# 4. WEBVIEW UI LOCALIZATION (webview-ui/src/)
31+
32+
- Located in webview-ui/src/i18n/locales/
33+
- Uses standard React i18next patterns with the useTranslation hook
34+
- All user interface strings should be internationalized
35+
- Always use the Trans component with named components for text with embedded components
36+
37+
<Trans> example:
38+
39+
`"changeSettings": "You can always change this at the bottom of the <settingsLink>settings</settingsLink>",`
40+
41+
```
42+
<Trans
43+
i18nKey="welcome:telemetry.changeSettings"
44+
components={{
45+
settingsLink: <VSCodeLink href="#" onClick={handleOpenSettings} />
46+
}}
47+
/>
48+
```
49+
50+
# 5. TECHNICAL IMPLEMENTATION
51+
52+
- Use namespaces to organize translations logically
53+
- Handle pluralization using i18next's built-in capabilities
54+
- Implement proper interpolation for variables using {{variable}} syntax
55+
- Don't include defaultValue. The `en` translations are the fallback
56+
- Always use apply_diff instead of write_to_file when editing existing translation files (much faster and more reliable)
57+
- When using apply_diff, carefully identify the exact JSON structure to edit to avoid syntax errors
58+
- Placeholders (like {{variable}}) must remain exactly identical to the English source to maintain code integration and prevent syntax errors
59+
60+
# 6. WORKFLOW AND APPROACH
61+
62+
- First add or modify English strings, then ask for confirmation before translating to all other languages
63+
- Use this process for each localization task:
64+
1. Identify where the string appears in the UI/codebase
65+
2. Understand the context and purpose of the string
66+
3. Update English translation first
67+
4. Create appropriate translations for all other supported languages
68+
5. Validate your changes with the missing translations script
69+
- Flag or comment if an English source string is incomplete ("please see this...") to avoid truncated or unclear translations
70+
- For UI elements, distinguish between:
71+
- Button labels: Use short imperative commands ("Save", "Cancel")
72+
- Tooltip text: Can be slightly more descriptive
73+
- Preserve the original perspective: If text is a user command directed at the software, ensure the translation maintains this direction, avoiding language that makes it sound like an instruction from the system to the user
74+
75+
# 7. COMMON PITFALLS TO AVOID
76+
77+
- Switching between formal and informal addressing styles - always stay informal ("du" not "Sie")
78+
- Translating or altering technical terms and brand names that should remain in English
79+
- Modifying or removing placeholders like {{variable}} - these must remain identical
80+
- Translating domain-specific terms that are commonly used in English in the target language
81+
- Changing the meaning or nuance of instructions or error messages
82+
- Forgetting to maintain consistent terminology throughout the translation
83+
84+
# 8. QUALITY ASSURANCE
85+
86+
- Maintain consistent terminology across all translations
87+
- Respect the JSON structure of translation files
88+
- Watch for placeholders and preserve them in translations
89+
- Be mindful of text length in UI elements when translating to languages that might require more characters
90+
- Use context-aware translations when the same string has different meanings
91+
- Always validate your translation work by running the missing translations script:
92+
```
93+
node scripts/find-missing-translations.js
94+
```
95+
- Address any missing translations identified by the script to ensure complete coverage across all locales
96+
97+
# 9. TRANSLATOR'S CHECKLIST
98+
99+
- ✓ Used informal tone consistently ("du" not "Sie")
100+
- ✓ Preserved all placeholders exactly as in the English source
101+
- ✓ Maintained consistent terminology with existing translations
102+
- ✓ Kept technical terms and brand names unchanged where appropriate
103+
- ✓ Preserved the original perspective (user→system vs system→user)
104+
- ✓ Adapted the text appropriately for UI context (buttons vs tooltips)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# German (de) Translation Guidelines
2+
3+
**Key Rule:** Always use informal speech ("du" form) in all German translations without exception.
4+
5+
## Quick Reference
6+
7+
| Category | Formal (Avoid) | Informal (Use) | Example |
8+
| ----------- | ------------------------- | ------------------- | ----------------- |
9+
| Pronouns | Sie | du | you |
10+
| Possessives | Ihr/Ihre/Ihrem | dein/deine/deinem | your |
11+
| Verbs | können Sie, müssen Sie | kannst du, musst du | you can, you must |
12+
| Imperatives | Geben Sie ein, Wählen Sie | Gib ein, Wähle | Enter, Choose |
13+
14+
**Technical terms** like "API", "token", "prompt" should not be translated.

0 commit comments

Comments
 (0)