Changeset View
Changeset View
Standalone View
Standalone View
trunk/l10n-kf5/scripts/handle_json_files.sh
Show All 19 Lines | 4 | extract_json() { | |||
---|---|---|---|---|---|
20 | rm -f json.$$ json.$$.tmp | 20 | rm -f json.$$ json.$$.tmp | ||
21 | } | 21 | } | ||
22 | 22 | | |||
23 | dir=$(dirname "$0") | 23 | dir=$(dirname "$0") | ||
24 | . "$dir/get_paths" | 24 | . "$dir/get_paths" | ||
25 | releases=$(list_modules "$dir") | 25 | releases=$(list_modules "$dir") | ||
26 | 26 | | |||
27 | for mod in $releases; do | 27 | for mod in $releases; do | ||
28 | jsonfilelist=$(find "$BASEDIR/$(get_path "$mod")" -name "*.json" -o -name "*.json.cmake" | grep -v '/autotests/' | grep -v '/tests/') | 28 | jsonfilelist=$(find "$BASEDIR/$(get_path "$mod")" -name "*.json" -o -name "*.json.cmake" | grep -v '/autotests/' | grep -v '/tests/' | grep -v 'APPNAMELC') | ||
29 | if test -n "$jsonfilelist"; then | 29 | if test -n "$jsonfilelist"; then | ||
30 | extract_json "$BASEDIR/$(get_path "$mod")" "templates/messages/$(get_po_path "$mod")/json_$mod.pot" $jsonfilelist | 30 | extract_json "$BASEDIR/$(get_path "$mod")" "templates/messages/$(get_po_path "$mod")/json_$mod.pot" $jsonfilelist | ||
31 | for jsonfile in $jsonfilelist; do | 31 | for jsonfile in $jsonfilelist; do | ||
32 | python ./scripts/filljsonfrompo.py "$jsonfile" "$L10NDIR" "$(get_po_path "$mod")" "json_$mod.po" | 32 | python ./scripts/filljsonfrompo.py "$jsonfile" "$L10NDIR" "$(get_po_path "$mod")" "json_$mod.po" | ||
33 | done | 33 | done | ||
34 | fi | 34 | fi | ||
35 | done | 35 | done |