mc/maint/sync-transifex/mc.hint-fromTransifex.sh
Slava Zanko 389b55ae6f Add the hint-files synchronization with Transifex.
For upload English hint-file to transifex, type:
cd doc/hints/po && make to-transifex

For download translation from Transifex type:
cd doc/hints/po && make from-transifex && \
    git add ../l10n/mc.hints.* && \
    git commit -s -m 'Update hints files from Transifex'

WARNING! For the functionality you should have installed 'tx' and 'po4a'
utilities. These utilities isn't required for compile and install mc
(you may install these utilities only if you want to interact with Transifex).

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-04-02 11:24:16 +03:00

51 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
# Midnight Commander - fetch doc/hints/mc.hint translations from Transifex
#
# Copyright (C) 2013
# The Free Software Foundation, Inc.
#
# Written by:
# Slava Zanko <slavazanko@gmail.com>, 2013
#
# This file is part of the Midnight Commander.
#
# The Midnight Commander is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# The Midnight Commander is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set -e
MC_SOURCE_ROOT_DIR=${MC_SOURCE_ROOT_DIR:-$(dirname $(dirname $(pwd)))}
#*** include section (source functions, for example) *******************
source "${MC_SOURCE_ROOT_DIR}/maint/sync-transifex/functions"
#*** file scope functions **********************************************
removeExtraBackSlash() {
sed -i -e 's/\\-/-/g' ${MC_SOURCE_ROOT_DIR}/doc/hints/l10n/mc.hint.*
}
#*** main code *********************************************************
WORK_DIR=$(initSyncDirIfNeeded "mc.hint")
receiveTranslationsFromTransifex "${WORK_DIR}"
createPo4A "mc.hint"
convertFromPoToText "${WORK_DIR}" "mc.hint"
removeExtraBackSlash