Add the hint-files synchronization with Transifex.
[midnight-commander.git] / maint / sync-transifex / mc.hint-fromTransifex.sh
blob17946f4e0b3fdff94a9638be060384d62d15bfe4
1 #!/bin/bash
3 # Midnight Commander - fetch doc/hints/mc.hint translations from Transifex
5 # Copyright (C) 2013
6 # The Free Software Foundation, Inc.
8 # Written by:
9 # Slava Zanko <slavazanko@gmail.com>, 2013
11 # This file is part of the Midnight Commander.
13 # The Midnight Commander is free software: you can redistribute it
14 # and/or modify it under the terms of the GNU General Public License as
15 # published by the Free Software Foundation, either version 3 of the License,
16 # or (at your option) any later version.
18 # The Midnight Commander is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with this program. If not, see <http://www.gnu.org/licenses/>.
26 set -e
28 MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(pwd)))}
30 #*** include section (source functions, for example) *******************
32 source "${MC_SOURCE_ROOT_DIR}/maint/sync-transifex/functions"
34 #*** file scope functions **********************************************
36 removeExtraBackSlash() {
37 sed -i -e 's/\\-/-/g' ${MC_SOURCE_ROOT_DIR}/doc/hints/l10n/mc.hint.*
40 #*** main code *********************************************************
42 WORK_DIR=$(initSyncDirIfNeeded "mc.hint")
44 receiveTranslationsFromTransifex "${WORK_DIR}"
46 createPo4A "mc.hint"
48 convertFromPoToText "${WORK_DIR}" "mc.hint"
50 removeExtraBackSlash