QGIS/scripts/create-transifex-resources.sh
lbartoletti 124e26815d Standardize shebangs (was Usr bin env) (#6229)
* Use portable /usr/bin/env/{perl,python} instead of /usr/bin/{perl,python}

* fix perl;add bash

* Fix indentation using modified scripts

* Revert "fix perl;add bash"

This reverts commit be8b9113c25f7c2fb9c8c9bad556fbca2f0c0ba2.

* python3 everywhere

* more bash

* rebase
change perl

* Linux perl; missing from last PR

* fix doxygen_space

* Use portable /usr/bin/env/{perl,python} instead of /usr/bin/{perl,python}

* fix perl;add bash

* Fix indentation using modified scripts

* Revert "fix perl;add bash"

This reverts commit be8b9113c25f7c2fb9c8c9bad556fbca2f0c0ba2.

* python3 everywhere

* more bash

* rebase
change perl

* fix doxygen_space
2018-02-05 03:38:02 -09:00

52 lines
1.8 KiB
Bash
Executable File

#!/usr/bin/env bash
###########################################################################
# create-transifex-resources.sh
# ---------------------
# Date : March 2013
# Copyright : (C) 2013 by Tim Sutton
# Email : tim at linfiniti dot com
###########################################################################
# #
# This program 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 2 of the License, or #
# (at your option) any later version. #
# #
###########################################################################
# This script is used to register QGIS translatable resources with Transifex
# http://transifex.com
#
# Note that this script updates or creates entries in .tx/config file
#
# Tim Sutton, March 2013
# TODO: update script to consider qgis_sr@latin and qgis_zh-Han*
LOCALES=`ls i18n/qgis_*.ts| grep -o "qgis_[a-z\_A-Z]*" | sed 's/qgis_//g' | sort | uniq`
TSFILE='i18n/qgis_en.ts'
RESOURCE='i18n/qgis_<lang>.ts'
#qgis-application because no _ allowed in resource name
set -x
tx set -t QT --minimum-perc=35 --auto-local -r QGIS.qgis-application \
$RESOURCE \
--source-lang en \
--source $TSFILE \
--execute
for LOCALE in $LOCALES
do
LOCALEFILE=`echo $TSFILE | sed "s/\_en/\_$LOCALE/g"`
tx set -r QGIS.qgis-application -l $LOCALE "$LOCALEFILE"
done
#Print out a listing of all registered resources
tx status
# Push all the resources to the tx server
tx push -s -t --skip