Adds a data structure for error messages to fix #6.
Adds a summary printed to stdout which is much more human-readable than the per-line errors. Stdout is for humans, stderr is for Xcode.
Finds these issues in Stringsdict files:
Contains no variables (warning)
Uses implicit positions instead of explicit (ignored, since we have hundreds of these and no plans to fix them)
If/when we add config files we can re-enable it and disable it in our own config
Two arguments in the base language have different specifiers (error)
The base language skips an argument (warning)
The translation skips an argument (warning)
The translation argument has a different specifier than the base language (error)
A string is missing from a translation (warning)
The translation uses an argument the original does not have (error if greater than all original arguments, warning if it's earlier than the base language's last argument but the base language doesn't use it so we can't verify its type)
The tests could be improved a lot, but having just fixed a bunch of bugs in Asana's stringsdict files using the tool, I'm happy with the amount of coverage the current test suite provides.
Adds a data structure for error messages to fix #6.
Adds a summary printed to stdout which is much more human-readable than the per-line errors. Stdout is for humans, stderr is for Xcode.
Finds these issues in Stringsdict files:
The tests could be improved a lot, but having just fixed a bunch of bugs in Asana's stringsdict files using the tool, I'm happy with the amount of coverage the current test suite provides.