Skip to content
Merged
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
66 changes: 62 additions & 4 deletions contributing/translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,17 @@ Currently supported languages: ar, cs, de, es, fi, fr, gl, it, nl, ru, sk, sv.
```
2. Update the language attribute in the new file: `<TS version="2.1" language="XX">`
3. Clear all existing translations (set entries to `type="unfinished"`)
4. Run `/translate translate XX` in Claude Code
5. Run `/translate compile` to compile `.ts` to `.qm`
6. Test in the app: `LANG=XX vorta`
4. Create a per-language glossary at `.claude/skills/translate/glossaries/XX.md` (use `de.md` as template)
5. Run `/translate translate XX` to generate translations
6. Run `/translate review XX` to check translation quality
7. Run `/translate compile` to compile `.ts` to `.qm`
8. Test in the app: `LANG=XX vorta`

### Updating a Language

- Run `/translate missing` to check untranslated string counts per language
- Run `/translate translate <lang>` to generate translations for a specific language
- Review the diff to verify translation quality
- Run `/translate review <lang>` to quality-check translations (glossary compliance, consistency, style, XML escaping, keyboard shortcuts). Reports issues with line numbers and offers auto-fix.
- Run `/translate compile` to compile updated `.ts` files to `.qm`

### Using and Testing Translations
Expand Down Expand Up @@ -76,6 +78,62 @@ Add new strings for translation:
- Elsewhere use `vorta.i18n.translate("scopename", "English string")`
- To only mark a string, but not translate: `vorta.i18n.trans_late` (Translated string will be used later. E.g. when displaying settings.)

### Per-Language Glossaries

Each supported language should have a glossary file at `.claude/skills/translate/glossaries/<lang>.md` that enforces consistent terminology across translations. These glossaries are used by both `/translate translate` and `/translate review` to ensure key terms are translated correctly.

When adding a new language, create a glossary file for it. Use an existing glossary (e.g., `de.md`) as a template and adapt the terms for the target language.

### Glossary of Common Terms

| English Term | Context/Notes |
|---|---|
| Passphrase | Password to unlock the borg key (NOT for encryption/decryption) |
| Repository | Local or remote folder where Borg stores data |
| Archive | Result of `borg create`, a point-in-time collection of files (not called "snapshot") |
| Backup | Noun: keep English; Verb: translate per language |
| Prune | Removing old archives per retention policy |
| Mount | Mounting an archive for browsing files |
| Extract | Restoring files from an archive |
| Profile | Backup profile configuration |
| Schedule | Backup schedule/timing |
| Source | Directories/files being backed up |
| Exclude | File/folder exclusion patterns |

### Translation Quality Guidelines

**DO:**
- Preserve placeholders like `{}`, `%1`, `%n` exactly as they appear
- Keep keyboard shortcuts (e.g., `&File`) with the `&` prefix
- Maintain XML escaping (`&amp;`, `&lt;`, etc.)
- Use Title Case for headings, buttons, and dropdowns
- End field labels with a colon

**DON'T:**
- Translate technical terms (Borg, SSH, etc.)
- Change placeholder order without linguistic necessity
- Add or remove punctuation that changes meaning
- Accept AI-generated translations without running `/translate review`

### Workflow Example

```bash
# 1. Check what needs translating
/translate missing

# 2. Generate translations for German
/translate translate de

# 3. Review translation quality
/translate review de

# 4. Compile translations
/translate compile

# 5. Test locally
LANG=de vorta
```

### Required Software

To work with translations, you need:
Expand Down