хозяйственная работа: добавьте передают крюк автоматического перевода сообщения
This commit is contained in:
parent
227779ecf2
commit
25380c6abd
2 changed files with 12 additions and 1 deletions
10
.githooks/commit-msg
Executable file
10
.githooks/commit-msg
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
translated="$(curl -s \
|
||||
http://localhost:9000/translate \
|
||||
-H 'Content-Type: text/html' \
|
||||
--data-binary @- -o- < <(sed 's,^fix:,доза:,' < "$1") | \
|
||||
tail -n +2 | \
|
||||
perl -pe 's,<SPAN CLASS=UNKNOWN_WORD>(.*?)</SPAN>,\1,g')"
|
||||
|
||||
[ -n "$translated" ] && echo "$translated" > "$1"
|
||||
Loading…
Add table
Add a link
Reference in a new issue