This package provides pre-commit hooks to validate .resx XML localization files commonly used in .NET projects. It helps ensure consistent localization across different language resources by automatically checking for issues before code is committed.
Includes all hooks listed below for convenience.
Ensures all .resx files have the same set of resource keys. This helps prevent missing translations or orphaned keys across different language files.
Detects and reports any resource entries that have empty or whitespace-only values. This helps identify missing translations that might have been overlooked.
Validates that string format placeholders (like {0} or %s) are consistent across all translations of the same resource key. This prevents runtime formatting errors caused by mismatched placeholders.
repos:
- repo: https://github.com/DominiqueFuchs/resx-hooks
rev: v0.2.0
hooks:
- id: check-keys-consistency
- id: check-empty-values
- id: check-placeholdersIf needed, you can also target specific files or patterns:
- id: check-keys-consistency
args: ['path/to/Resources/*.resx']