# Hooks

Pootle supports hooks to customize its behavior at various points in its interaction with Version Control Systems, translation update and translation initialization.

Hooks are Python scripts and can do things like checking or converting formats before commit.

Note

See bug 2559 tracking changes needed for hooks to run on Pootle 2.5.

## Implementing a hook

Hooks are Python scripts stored in the pootle/scripts directory and are named after their project name. Thus, hello.py for a project called hello.

The project hook should implement functions for each needed hooktype.

## Available hooktypes

Hooktype | Arguments | Return
--- | --- | ---
initalize | projectdir, languagecode |
precommit | file, author, message |
postcommit | file, success |
preupdate | file |
postupdate | file |