ieee80211: extend DMG capabilities element
[metze/wireshark/wip.git] / tools / update-tx
1 #!/bin/bash
2 # Copyright 2015, Alexis La Goutte (See AUTHORS file)
3 #
4 # Resync translation between Gerrit repo and Transifex
5
6 NO_PUSH="False"
7 while getopts "n" OPTCHAR ; do
8     case $OPTCHAR in
9         n) NO_PUSH="True" ;;
10     esac
11 done
12 shift $((OPTIND - 1))
13
14 # All .cpp, .h, and .ui files under ui/qt plus wireshark-qt.cpp.
15 LUPDATE_FILES=$(find ui/qt -name '*.cpp' -o -name '*.h' -o -name '*.ui')
16 LUPDATE_FILES=($LUPDATE_FILES wireshark-qt.cpp)
17
18 # Add line numbers
19 for i in ui/qt/*.ts ; do
20     lupdate -locations absolute "${LUPDATE_FILES[@]}" -ts "$i"
21 done
22
23 # Get last translation for Transifex
24 tx pull -f
25
26 # Regenerate last translation for repo
27 for i in ui/qt/*.ts ; do
28     lupdate -locations absolute "${LUPDATE_FILES[@]}" -ts "$i"
29 done
30
31 # Push last change tranlastion on Transifex
32 if [ "$NO_PUSH" != "True" ]; then
33     tx push -t -s
34 fi
35
36 # Remove line numbers
37 for i in ui/qt/*.ts ; do
38     lupdate -locations none -no-ui-lines "${LUPDATE_FILES[@]}" -ts "$i"
39 done
40
41 #Add new commit with last translaation update
42 #git commit -a -m "TX: Update Translations (sync)"
43
44 #Push update translation on Gerrit
45 #git push origin HEAD:refs/for/master/tx
46
47 #
48 #  Editor modelines
49 #
50 #  Local Variables:
51 #  c-basic-offset: 4
52 #  tab-width: 8
53 #  indent-tabs-mode: nil
54 #  End:
55 #
56 #  ex: set shiftwidth=4 tabstop=8 expandtab:
57 #  :indentSize=4:tabSize=8:noTabs=true:
58 #