2 # Copyright 2015, Alexis La Goutte (See AUTHORS file)
4 # Resync translation between Wireshark's git repository and Transifex
6 # We keep translation files in the following locations:
8 # ui/stratoshark/*.ts (Qt)
9 # packaging/debian/po/ (Gettext)
12 while getopts "n" OPTCHAR
; do
15 *) printf "Unknown option: %s\\n" "$OPTARG"
20 TOP_LEVEL
=$
(git rev-parse
--show-toplevel)
21 if ! cd "$TOP_LEVEL" ; then
22 echo "Can't change to the top-level source directory."
26 LUPDATE_INCLUDES
=(-I .
)
28 LUPDATE_INCLUDES
+=(-I "$REPLY")
29 done < <(find "$TOP_LEVEL/ui/qt" -type d
)
31 # All .cpp, .h, and .ui files under ui/qt
34 LUPDATE_FILES
+=("$REPLY")
35 done < <(find ui
/qt
-name '*.cpp' -o -name '*.h' -o -name '*.ui')
38 for i
in ui
/qt
/*.ts
; do
39 lupdate
-locations absolute
"${LUPDATE_INCLUDES[@]}" "${LUPDATE_FILES[@]}" -ts "$i"
42 # Get last translation for Transifex
45 # Regenerate last translation for repo
46 for i
in ui
/qt
/*.ts
; do
47 lupdate
-locations absolute
"${LUPDATE_INCLUDES[@]}" "${LUPDATE_FILES[@]}" -ts "$i"
50 # Push last change tranlastion on Transifex
51 if [ "$NO_PUSH" != "True" ]; then
56 for i
in ui
/qt
/*.ts
; do
57 lupdate
-locations none
-no-ui-lines "${LUPDATE_INCLUDES[@]}" "${LUPDATE_FILES[@]}" -ts "$i"
66 # indent-tabs-mode: nil
69 # ex: set shiftwidth=4 tabstop=8 expandtab:
70 # :indentSize=4:tabSize=8:noTabs=true: