Commit b6800444 authored by Michal Čihař's avatar Michal Čihař

Add example precommit hook to unwrap po file

Issue #365
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 920ad46f
......@@ -354,6 +354,13 @@ For example you can allow script which does some cleanup:
'/usr/local/bin/cleanup-translation',
)
Weblate comes with few example hook scripts which you might find useful:
:file:`examples/hook-generate-mo`
Generates MO file from a PO file
:file:`examples/hook-unwrap-po`
Unwraps lines in a PO file.
.. note::
The hook is executed using system() call, so it is evaluated in a shell.
......
#!/bin/sh
# Example Weblate hook to uwrap po file
msgcat -o "${1}" --no-wrap "${1}"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment