Skip to content

Conversation

@Keyvanhardani
Copy link

Summary

This PR adds support for German language validation to help prevent common umlaut mistakes when writing German text content.

Changes

  1. New Plugin: german-language-validator

    • Validates Write/Edit operations for correct German umlaut usage
    • Checks 35+ common German words (für, über, können, Größe, Straße, etc.)
    • Blocks operations with clear warnings when errors are found
  2. New Hook Example: german_umlaut_validator_example.py

    • Standalone example showing how to implement language validation
    • Well-documented with usage instructions

Problem

When working with German language projects, AI assistants frequently write incorrect umlaut representations:

  • fuer instead of für
  • ueber instead of über
  • koennen instead of können
  • groesse instead of Größe
  • strasse instead of Straße

These errors cause issues in:

  • User-facing text in applications
  • Documentation and README files
  • Error messages and validation text
  • Database content and exports

Solution

The plugin/hook automatically validates text content before it's written, checking for common German umlaut mistakes and providing clear feedback.

Supported File Types

.md, .txt, .html, .tsx, .ts, .jsx, .js, .json, .py, .yml, .yaml, .xml, .vue

Test Plan

  • Hook example runs without errors
  • Plugin structure follows existing patterns
  • Detects common umlaut mistakes correctly
  • Allows content without German text to pass
  • Only checks relevant file types

Future Considerations

This approach could be extended to support:

  • French accents (é, è, ê, ç)
  • Spanish characters (ñ, ¿, ¡)
  • Other languages with special characters

Closes #17324


Submitted from a German enterprise project that frequently encounters this issue.

Adds a new plugin and hook example for validating German text content
to ensure correct umlaut usage (ä, ö, ü, ß).

Problem:
When working with German language projects, incorrect umlaut
representations are frequently written (e.g., 'fuer' instead of 'für',
'ueber' instead of 'über'). This causes issues in production code,
documentation, and user-facing content.

Solution:
- New plugin: german-language-validator
- New hook example: german_umlaut_validator_example.py
- Validates 35+ common German words that must have umlauts
- Blocks Write/Edit operations with clear warnings when errors found
- Supports common file types (.md, .tsx, .py, .json, etc.)

Closes anthropics#17324
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.

Feature Request: Built-in German Umlaut Validation for Write/Edit Operations

1 participant