mc.hint-fromTransifex.sh 1.5 KB

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