commit | author | age
|
a5a448
|
1 |
#!/bin/bash |
LM |
2 |
|
|
3 |
# Copyright (C) 1997 - 2014 devXive - research and development |
|
4 |
# |
|
5 |
# The scriptfile is licensed under the Apache License, Version 2.0 (the "License"); |
|
6 |
# You may not use this file except in compliance with the License. |
|
7 |
# You may obtain a copy of the License at |
|
8 |
# |
|
9 |
# http://www.apache.org/licenses/LICENSE-2.0 |
|
10 |
# |
|
11 |
# Unless required by applicable law or agreed to in writing, software |
|
12 |
# distributed under the License is distributed on an "AS IS" BASIS, |
|
13 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
14 |
# See the License for the specific language governing permissions and |
|
15 |
# limitations under the License. |
|
16 |
# |
|
17 |
# The content of static vars and/or static echo output is licensed under the |
|
18 |
# devXive Proprietary Use License (http://devxive.com/legal/license) |
|
19 |
# |
|
20 |
# Author: devXive, Lahmizzar Muinela |
|
21 |
# Email: support@devxive.com |
|
22 |
# Twitter: @devxive |
|
23 |
# Website: http://devxive.com |
|
24 |
# |
|
25 |
# |
|
26 |
# Description: |
|
27 |
# Simple script to build an appropriate language manifest |
|
28 |
# |
|
29 |
# How to use |
|
30 |
# tx push -t[push the translation to the server] etc... see |
|
31 |
# |
|
32 |
# > /SVN/transifex-client/tx push -t -l sk_SK |
|
33 |
|
|
34 |
|
|
35 |
# -l : Specify which translations you want to push (defaults to all) |
|
36 |
# -r : Specify the resource for which you want to push the translations (defaults to all) |
|
37 |
# -f: Push source files without checking modification times |
|
38 |
# --skip: Don’t stop on errors. Useful when pushing many files concurrently. |
|
39 |
# -s: Push the source file to the server |
|
40 |
# -t: Push the translation files to the server |
|
41 |
# --no-interactive: Don’t require user input when forcing a push |
|
42 |
# -h: Shows the help screen for the command |
|
43 |
# |
|
44 |
# |
|
45 |
# /SVN/transifex-client/tx push -t -l sk_SK # to push the slovak translation to the server |
|
46 |
# |
|
47 |
# This script is a standalone script and need a specific file structure |
|
48 |
# |
|
49 |
# |
|
50 |
# TODO: Build this script |
|
51 |
|
|
52 |
if [[ "$1" == "" ]] |
|
53 |
then |
|
54 |
echo 'Please determine a source you wish to push!' |
|
55 |
echo 'eg:' |
|
56 |
echo '"./push source" to pushing the source files (as set in tx config - normally "en_GB") to transifex.' |
|
57 |
echo '"./push it_IT" to pushing the Italian translation files (as set in tx config) to transifex.' |
|
58 |
echo 'Please note that you have to use the TX language string (with an underscore)' |
|
59 |
exit 1 |
|
60 |
fi |
|
61 |
|
|
62 |
txClient="../../../transifex-client/tx" |
|
63 |
|
|
64 |
if [[ "$1" == "source" ]] |
|
65 |
then |
|
66 |
$txClient push -s |
|
67 |
exit 1 |
|
68 |
fi |
|
69 |
|
|
70 |
# If source is not pushed, then use the appropriate language |
|
71 |
$txClient push -t $1 |