mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-24 00:47:57 -05:00
37 lines
902 B
Bash
Executable File
37 lines
902 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# 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
|