Index: trunk/l10n-kf5/scripts/findfiles =================================================================== --- trunk/l10n-kf5/scripts/findfiles (revision 1504855) +++ trunk/l10n-kf5/scripts/findfiles (revision 1504856) @@ -1,51 +1,51 @@ #! /usr/bin/env bash # This file extract .desktop like files for translation # The default extensions extracted are in the big find inside the for # If you need to extract a .desktop like file for your project # DO NOT add your own extension to the big find, just create a # ExtraDesktop.sh file in your project that returns in each line # the names of the files you want to be extracted if test -z "$1"; then echo "call: $0 " exit fi filelist=$1 dir=`dirname $0` . $dir/get_paths ml="`list_modules $dir` l10n" rm -f "$filelist"_* $filelist : > $filelist for mod in $ml; do dir=$BASEDIR/`get_path $mod` if test ! -d $dir; then echo "ERROR: module $mod cannot be found in directory $dir" continue fi echo "$dir" - find "$dir" \( -path "*/test/*" -o -path "*/tests/*" -o -path "*/autotest/*" -o -path "*/autotests/*" \) -prune -o \( \( -name \*.directory -o -name \*.desktop -o -name \*.desktop.cmake -o -name \*.kimap -o -name \*.themerc -o -name \*.kcsrc -o -name \*.setdlg -o -name index.theme -o -name \*.notifyrc -o -name \*.protocol -o -name \*.profile -o -name \*.actions -o -name \*.knsrc \) -a \( -type f -o -type l \) -print \) >> $filelist + find "$dir" \( -path "*/test/*" -o -path "*/tests/*" -o -path "*/autotest/*" -o -path "*/autotests/*" -o -path "*APPNAMELC*" \) -prune -o \( \( -name \*.directory -o -name \*.desktop -o -name \*.desktop.cmake -o -name \*.kimap -o -name \*.themerc -o -name \*.kcsrc -o -name \*.setdlg -o -name index.theme -o -name \*.notifyrc -o -name \*.protocol -o -name \*.profile -o -name \*.actions -o -name \*.knsrc \) -a \( -type f -o -type l \) -print \) >> $filelist extradesktopscripts=`find $dir -name ExtraDesktop.sh` initialdir=`pwd` for extradesktopscript in $extradesktopscripts; do dirwithscript=`dirname $extradesktopscript` cd $dirwithscript extradesktopfiles=`bash $extradesktopscript` for extradesktopfile in $extradesktopfiles; do echo $dirwithscript/$extradesktopfile >> $filelist done done cd $initialdir done sort -o $filelist -u $filelist for mod in $ml; do subfile="$filelist"_$mod fgrep $BASEDIR/`get_path $mod`/ $filelist > $subfile done Index: trunk/l10n-kf5/scripts/handle_json_files.sh =================================================================== --- trunk/l10n-kf5/scripts/handle_json_files.sh (revision 1504855) +++ trunk/l10n-kf5/scripts/handle_json_files.sh (revision 1504856) @@ -1,35 +1,35 @@ #! /bin/bash # kate: space-indent on; indent-width 2; replace-tabs on; extract_json() { arg1=$1; shift dest=$1; shift python ./scripts/createjsoncontext.py "$@" "$arg1" > json.$$.tmp msguniq --to-code=UTF-8 -o json.$$ json.$$.tmp 2>/dev/null if test -f json.$$; then if test ! -f "$dest"; then echo "File $dest is missing!" mv json.$$ "$dest" elif diff -q -I^\"POT-Creation-Date: json.$$ "$dest" > /dev/null; then rm -f json.$$ touch "$dest" else mv json.$$ "$dest" fi fi rm -f json.$$ json.$$.tmp } dir=$(dirname "$0") . "$dir/get_paths" releases=$(list_modules "$dir") for mod in $releases; do - jsonfilelist=$(find "$BASEDIR/$(get_path "$mod")" -name "*.json" -o -name "*.json.cmake" | grep -v '/autotests/' | grep -v '/tests/') + jsonfilelist=$(find "$BASEDIR/$(get_path "$mod")" -name "*.json" -o -name "*.json.cmake" | grep -v '/autotests/' | grep -v '/tests/' | grep -v 'APPNAMELC') if test -n "$jsonfilelist"; then extract_json "$BASEDIR/$(get_path "$mod")" "templates/messages/$(get_po_path "$mod")/json_$mod.pot" $jsonfilelist for jsonfile in $jsonfilelist; do python ./scripts/filljsonfrompo.py "$jsonfile" "$L10NDIR" "$(get_po_path "$mod")" "json_$mod.po" done fi done