kerberos: remember account details from dissect_krb5_PAC_UPN_DNS_INFO on EncTicketPar...
[wireshark-sm.git] / tools / update-tx
blobb91bcfa5f22630f9ed467f63203037c3a34ae741
1 #!/bin/bash
2 # Copyright 2015, Alexis La Goutte (See AUTHORS file)
4 # Resync translation between Gerrit repo and Transifex
6 NO_PUSH="False"
7 while getopts "n" OPTCHAR ; do
8 case $OPTCHAR in
9 n) NO_PUSH="True" ;;
10 *) printf "Unknown option: %s\\n" "$OPTARG"
11 esac
12 done
13 shift $((OPTIND - 1))
15 TOP_LEVEL=$(git rev-parse --show-toplevel)
16 if ! cd "$TOP_LEVEL" ; then
17 echo "Can't change to the top-level source directory."
18 exit 1
21 LUPDATE_INCLUDES=(-I .)
22 while read -r ; do
23 LUPDATE_INCLUDES+=(-I "$REPLY")
24 done < <(find "$TOP_LEVEL/ui/qt" -type d)
26 # All .cpp, .h, and .ui files under ui/qt
27 LUPDATE_FILES=()
28 while read -r ; do
29 LUPDATE_FILES+=("$REPLY")
30 done < <(find ui/qt -name '*.cpp' -o -name '*.h' -o -name '*.ui')
32 # Add line numbers
33 for i in ui/qt/*.ts ; do
34 lupdate -locations absolute "${LUPDATE_INCLUDES[@]}" "${LUPDATE_FILES[@]}" -ts "$i"
35 done
37 # Get last translation for Transifex
38 tx pull -f
40 # Regenerate last translation for repo
41 for i in ui/qt/*.ts ; do
42 lupdate -locations absolute "${LUPDATE_INCLUDES[@]}" "${LUPDATE_FILES[@]}" -ts "$i"
43 done
45 # Push last change tranlastion on Transifex
46 if [ "$NO_PUSH" != "True" ]; then
47 tx push -t -s
50 # Remove line numbers
51 for i in ui/qt/*.ts ; do
52 lupdate -locations none -no-ui-lines "${LUPDATE_INCLUDES[@]}" "${LUPDATE_FILES[@]}" -ts "$i"
53 done
55 #Add new commit with last translation update
56 #git commit -a -m "TX: Update Translations (sync)"
58 #Push update translation on Gerrit
59 #git push origin HEAD:refs/for/master/tx
62 # Editor modelines
64 # Local Variables:
65 # c-basic-offset: 4
66 # tab-width: 8
67 # indent-tabs-mode: nil
68 # End:
70 # ex: set shiftwidth=4 tabstop=8 expandtab:
71 # :indentSize=4:tabSize=8:noTabs=true: