Skip to content

Fix README errors, add English translation, and automate sync checking#2

Merged
thilob merged 4 commits into
mainfrom
copilot/fix-readme-errors-and-sync
Jan 24, 2026
Merged

Fix README errors, add English translation, and automate sync checking#2
thilob merged 4 commits into
mainfrom
copilot/fix-readme-errors-and-sync

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 24, 2026

Documentation had German spelling errors, inconsistent script references (setup_can.sh vs setup-can.sh), and lacked an English version. This creates maintenance burden and accessibility issues.

Changes

README.md corrections:

  • Fixed 11 spelling/grammar errors (neue Rechtschreibung compliance: bewußt→bewusst, capitalization fixes)
  • Standardized all script references to match actual filenames: setup-can.sh, can-health-check.sh
  • Changed "Vibe Coding" to "AI-assisted Coding" (standard terminology)

README.en.md - new file:

  • Complete English translation with natural phrasing for native speakers
  • Technical terms appropriately translated (Gleisbox→track box, Stellwerk→signal box)
  • Maintains identical structure to German version

Sync automation:

  • .github/workflows/readme-consistency-check.yml detects when only one README is modified
  • Posts PR warnings and creates annotations to prevent translation drift
  • Minimal permissions: contents: read, pull-requests: write

Both READMEs now include bidirectional language switcher links.

Original prompt

Objective

Fix spelling and textual errors in README.md, add a fluent English translation (README.en.md), and implement a GitHub Action workflow to ensure both versions stay synchronized.

Changes Required

1. README.md - Corrections and Improvements

Fix the following issues in the German README.md:

Spelling and Grammar Errors:

  • Line 17: Complete the word "unterwegs" (currently truncated with [...])
  • Line 94: Change "Vibe Coding" to "AI-assisted Coding" (more standard terminology)
  • Line 106: Fix "automatisch Systemkonfiguration" → "automatische Systemkonfiguration"
  • Line 159: Fix "Unteverzeichnis" → "Unterverzeichnis"
  • Line 59: Change "viertel" → "Viertel" (noun capitalization)
  • Line 64: Update "bewußt" → "bewusst" (new German spelling)
  • Line 82: Fix "aufrufen" → "Aufrufen" (capitalization)
  • Line 89: Fix "booten" → "neu booten" (add "neu" for clarity)
  • Line 148: Fix "schwerste" → "Schwerste" (capitalization)

Script Name Inconsistencies:
Fix the inconsistent script filenames throughout the document:

  • Line 108: States setup-can.sh (with hyphen)
  • Line 112: Uses chmod +x setup_can.sh (with underscore)
  • Line 116: Uses sudo ./setup_can_marklin.sh (different name entirely)
  • Line 124: Copy-paste error - should be chmod +x can-health-check.sh not setup_can.sh

Standardize all references to: setup_can_marklin.sh and can-health-check.sh

Additional Improvements:

  • Add language switcher at the top of the file:
    **[🇩🇪 Deutsche Version](./README.md)** | **[🇬🇧 English version](./README.en.md)**
  • Line 167: Fix "mit unter Angabe" → "unter Angabe" (remove "mit")
  • Line 166: Fix "solltet" → "sollte"

2. README.en.md - New English Translation

Create a complete, fluent English translation of README.md with the corrected content:

  • File name: README.en.md
  • Must be natural and fluent for native English speakers
  • Maintain the same structure and formatting as the German version
  • Include the same language switcher at the top
  • Translate technical terms appropriately:
    • "Gleisbox" → "track box"
    • "Stellwerk" → "signal box"
    • "Weichen" → "switches" or "turnouts"
    • "Märklin 6021-Zentrale" → "Märklin 6021 control unit"
    • Keep technical terms like "CAN-Bus", "Raspberry Pi", "Rocrail" as-is
  • Keep all code blocks and commands identical (no translation)
  • Preserve the author's friendly, educational tone
  • Use proper English terminology for electronics (GPIO pins, optocouplers, termination resistors, etc.)

3. GitHub Action Workflow - Translation Consistency Check

Create .github/workflows/readme-consistency-check.yml:

Purpose: Automatically check if both README files are updated together

Features:

  • Trigger on push to main branch when README.md or README.en.md changes
  • Trigger on pull requests that modify either README file
  • Compare which files were changed
  • If only one README was updated, create a warning annotation
  • For pull requests, add a comment warning that both versions should be synchronized
  • Use actions/checkout@v4 and actions/github-script@v7

Workflow logic:

name: README Translation Consistency Check

on:
  pull_request:
    paths:
      - 'README.md'
      - 'README.en.md'
  push:
    branches:
      - main
    paths:
      - 'README.md'
      - 'README.en.md'

jobs:
  check-readme-sync:
    runs-on: ubuntu-latest
    
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
        with:
          fetch-depth: 2
      
      - name: Check if both READMEs were updated
        id: check_files
        run: |
          # Get list of changed files
          if [ "${{ github.event_name }}" == "pull_request" ]; then
            CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)
          else
            CHANGED_FILES=$(git diff --name-only HEAD^ HEAD)
          fi
          
          echo "Changed files:"
          echo "$CHANGED_FILES"
          
          README_MD_CHANGED=false
          README_EN_CHANGED=false
          
          if echo "$CHANGED_FILES" | grep -q "^README\.md$"; then
            README_MD_CHANGED=true
          fi
          
          if echo "$CHANGED_FILES" | grep -q "^README\.en\.md$"; then
            README_EN_CHANGED=true
          fi
          
          echo "readme_md_changed=$README_MD_CHANGED" >> $GITHUB_OUTPUT
          echo "readme_en_changed=$README_EN_CHANGED" >> $GITHUB_OUTPUT
          
          # Check if only one was changed
          if [ "$README_MD_CHANGED" = true ] && [ "$README_EN_CHANGED" = false ]; then
            echo "warning=Only README.md was updated. Please also update README.en.md" >> $GITHUB_OUTPUT
            exit 0
          elif [ "$README_MD_CHANGED" = false ] && [ "$README_EN_CHANGED" = true ]; then
            echo "warning=Only README.en.md was updated. Please also update README.md" >> $GITHUB_OUTPUT
            exit 0
          else
            echo "warning=" >> $GITHUB_OUTPUT
          fi
  ...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

*This pull request was created from Copilot chat.*
>

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

Copilot AI and others added 3 commits January 24, 2026 19:08
…tency check workflow

Co-authored-by: thilob <5732498+thilob@users.noreply.github.com>
Co-authored-by: thilob <5732498+thilob@users.noreply.github.com>
Co-authored-by: thilob <5732498+thilob@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix spelling and textual errors in README.md Fix README errors, add English translation, and automate sync checking Jan 24, 2026
Copilot AI requested a review from thilob January 24, 2026 19:12
@thilob
Copy link
Copy Markdown
Owner

thilob commented Jan 24, 2026

@copilot ist der zweite pr bereits fertig?

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 24, 2026

@copilot ist der zweite pr bereits fertig?

Ja, dieser PR ist fertig. Alle Anforderungen wurden umgesetzt:

✅ README.md - alle Rechtschreibfehler korrigiert, Skript-Namen vereinheitlicht
✅ README.en.md - vollständige englische Übersetzung erstellt
✅ GitHub Action Workflow für Synchronisations-Prüfung hinzugefügt
✅ Code Review bestanden
✅ CodeQL Security Check bestanden (0 Alerts)

Der letzte Commit ist cfda637.

@thilob thilob marked this pull request as ready for review January 24, 2026 19:15
@thilob thilob merged commit c5fa693 into main Jan 24, 2026
1 of 2 checks passed
@thilob thilob deleted the copilot/fix-readme-errors-and-sync branch January 24, 2026 22:54
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.

2 participants