acheck - Check common localization mistakes
acheck [OPTIONS] [INPUT_FILE]
This program parses a file checking for syntax rules and
optionally asking Aspell for checking word spelling. It makes fix
suggestions and outputs a corrected file accordingly adding review comments
if requested.
It tries to find the file type according to the extension or the
first lines and loads rules accordingly.
It displays lines when they are parse.
When an error is found, a menu is displayed. Just press Enter if
you don't want to change anything. If a choice suits you, enter the
corresponding number. If you want to fix it but no choice is correct, enter
a space, then you will be asked for a string to replace the highlighted
text. The script will replace the highlighted text with your choice and
parse it again for new errors.
Here are all the available commands:
- Enter,
ignore.
- Ignore.
- Ctrl+L,
redraw.
- Rewrite the last line, suggestions and hints.
- Space, edit.
- Edit the highlighted text.
- E, edit line.
- Edit the whole line.
- H, add hint.
- Add the displayed hint as review comment. Use this if you want the
translator to see the corresponding warning or error but you have no
correction.
- N, next line.
- Skip the rest of this line.
- X, exit and discard all
changes.
- Quit without saving modifications, the script ask you for confirmation,
you have to enter `yes' to exit otherwise parsing starts again at
the current mistake.
- a, add in
dictionary.
- Add the highlighted word to you personal dictionary, capitalized as it
is.
- l, add lowercase in
dictionary.
- Lowercase the highlighted word to add it to your personal dictionary.
- i, ignore word.
- Ignore the highlighted word, same as Enter.
- I, ignore all.
- Ignore the highlighted word and add it to your session dictionary.
Verbosity level:
- -q, --quiet
- quiet mode.
- -v
- verbose, start at level $Debug +
1, add more for more verbosity (see below).
- --verbose
n
- set verbosity level to n (see below).
Files:
- -i,
--input
- input filename, can be '-' to read data from standard input.
- -o, --output
- output filename, can be '-' to write data to standard output. If no
output filename is provided, input file is backed up with `bak_ext'
extension and input filename is used.
Spell check:
- -s, --spell
- check spelling with Aspell.
- -d language, --dict
language
- use language dictionary for Aspell.
- -n, --nospell
- don't check spelling.
Mode:
- -r, --review
- review mode, add comments on lines beginning with
$Comment after parsed
line.
- -t, --trans
- translator mode, don't add comments, just fix errors.
others:
- --rules
ruleset
- use ruleset rules set.
- --type
filetype
- use filetype whatever the file type is.
- --dump
- Dump the rules to check and exit, use this for debugging purposes.
- -V, --version
- print version and exit.
- -h, --help
- print a short usage message and exit.
- 0 quiet, normal
- only warnings and errors
- 1 debug
- names of subroutines
- 2 debug verbose
- names and arguments of subroutines
- 3 .. 5 debug very verbose
- output parsing and checking details
Nicolas Bertolissio <bertol@debian.org>