Index: branches/stable/l10n-kde4/scripts/get_paths =================================================================== --- branches/stable/l10n-kde4/scripts/get_paths (revision 1542766) +++ branches/stable/l10n-kde4/scripts/get_paths (revision 1542767) @@ -1,219 +1,219 @@ all_modules="kde-kdeaccessibility \ kde-kdeadmin \ kde-applications \ kde-kde-runtime \ kde-kde-workspace \ kde-kdeedu \ kde-kdegames \ kde-kdegraphics \ kde-kdelibs \ kde-kdemultimedia \ kde-kdenetwork \ kde-kdepim \ kde-kdepimlibs \ kde-kdepim-runtime \ kde-kdeplasma-addons \ kde-kdesdk \ kde-kdetoys \ kde-kdeutils \ kde-kdewebdev \ kde-workspace \ extragear-accessibility \ extragear-artwork \ extragear-base \ extragear-games \ extragear-graphics \ extragear-kdevelop \ extragear-libs \ extragear-multimedia \ extragear-network \ extragear-office \ extragear-pim \ extragear-security \ extragear-sdk \ extragear-sysadmin \ extragear-utils \ kdesupport-phonon \ kdereview \ playground-accessibility \ playground-artwork \ playground-base \ playground-devtools \ playground-edu \ playground-games \ playground-graphics \ playground-ioslaves \ playground-libs \ playground-multimedia \ playground-network \ playground-office \ playground-pim \ playground-sdk \ playground-sysadmin \ playground-utils \ calligra" function list_modules { if [ "x$1" = "x" ]; then dir=. else dir=$1 fi rm -f $dir/kde_projects.xml - wget -q http://projects.kde.org/kde_projects.xml -O $dir/kde_projects.xml + wget -q https://projects.kde.org/kde_projects.xml -O $dir/kde_projects.xml if [ $? = "0" ]; then for gitmodule in $all_modules; do firstpart=`echo $gitmodule | sed -r -e 's/-.*$//'` secondpart=`echo $gitmodule | sed -r -e 's/^[^-]*-?//'` m=`python $dir/print_l10n_project_names.py $dir/kde_projects.xml $dir $firstpart $secondpart` modules="$modules $m" done echo $modules | tr " " "\n" | sort | tr "\n" " " rm -f $dir/kde_projects.xml else echo "" fi } function get_path { case "$1" in l10n) echo branches/stable/l10n-kde4 ;; applications_baloo-widgets) echo git-stable/$1 ;; kdelibs*|kde-runtime|kde-workspace|workspace_*|applications_*|kdeplasma-addons|kdemultimedia_*|kdepimlibs|kdepim|kdepim-runtime|kdesupport-phonon_*|kdegraphics_*|kdeedu_*|kdeutils_*|kdeaccessibility_*|kdegames_*|kdesdk_*|kdetoys_*|kdeadmin_*|kdenetwork_*|kdewebdev_*) echo git-stable/$1 ;; extragear-*_*) echo git-stable/extragear-`echo $1 | sed -e "s,extragear-,,"` ;; extragear-*) echo branches/stable/extragear-kde4/`echo $1 | sed -e "s,extragear-,,"` ;; calligra|calligra_*) echo git-stable/calligra ;; *) echo "ERROR: unknown module $1" exit 1 ;; esac } function get_po_path { case "$1" in extragear-*_*) echo $1 | sed -r -e 's/_[^_]+$//' ;; kdelibs_*|applications_*|kdegraphics_*|kdeedu_*|kdeutils_*|kdeaccessibility_*|kdemultimedia_*|kdegames_*|kdesdk_*|kdetoys_*|kdeadmin_*|kdenetwork_*|calligra_*|kdewebdev_*) echo $1 | sed -r -e 's/_[^_]+$//' ;; workspace_kdeplasma-addons) echo 'kdeplasma-addons' ;; workspace_*) echo 'kde-workspace' ;; kdesupport-phonon_*) echo qt ;; kdesupport_*) echo $1 | sed -r -e 's/_[^_]+$//' ;; *) echo $1 ;; esac } function get_vcs { case "$1" in extragear-*_*) echo git ;; kde-runtime|kde-workspace|workspace_*|applications_*) echo git ;; kdegraphics_*|kdeedu_*|kdeutils_*|kdeaccessibility_*|kdemultimedia_*|kdegames_*|kdesdk_*|kdetoys_*|kdeadmin_*|kdenetwork_*|kdewebdev_*) echo git ;; kdesupport-phonon_*) echo git ;; kdelibs*|kdeplasma-addons|kdepimlibs|kdepim|kdepim-runtime) echo git ;; calligra*) echo git ;; *) echo svn ;; esac } function get_branch { case "$1" in extragear-accessibility_simon) echo "0.5" ;; extragear-multimedia_amarok) echo "2.9" ;; extragear-multimedia_kmplayer) echo "0.11" ;; extragear-office_kmymoney) echo "4.8" ;; kdesupport-phonon_phonon-vlc) echo "0.10" ;; kdesupport-phonon_phonon-gstreamer) echo "4.7" ;; kdesupport-phonon_phonon) echo "4.10" ;; *) echo "get_branch_none" exit 1 ;; esac } function get_url { case "$1" in kdelibs|kdeplasma-addons|kdepimlibs|kdepim|kdepim-runtime|calligra|kde-runtime|kde-workspace) echo "kde:$1.git" ;; kdesupport-phonon_*) get_url_repo=`echo $1 | sed -e "s/kdesupport-phonon_//"` echo "kde:$get_url_repo.git" ;; extragear-*_*) get_url_repo=`echo $1 | sed -e "s/extragear-.*_//"` echo "kde:$get_url_repo.git" ;; kdelibs_*|applications_*|kdegraphics_*|kdeedu_*|kdeutils_*|kdeaccessibility_*|kdemultimedia_*|kdegames_*|kdesdk_*|kdetoys_*|kdeadmin_*|kdenetwork_*|workspace_*|calligra_*|kdewebdev_*) get_url_repo=`echo $1 | sed -e 's/[^_]*_//'` echo "kde:$get_url_repo.git" ;; *) echo "ERROR: $1 is not a git repo" exit 1 ;; esac } Index: branches/stable/l10n-kde4/scripts/lokalize/opensrc.py =================================================================== --- branches/stable/l10n-kde4/scripts/lokalize/opensrc.py (revision 1542766) +++ branches/stable/l10n-kde4/scripts/lokalize/opensrc.py (revision 1542767) @@ -1,99 +1,99 @@ #!/usr/bin/env python2 # -*- coding: utf-8 -*- import os,sys import Editor import Lokalize from opensrc_list import mapSrc editor=Editor globals()['test']='sssss' lll=['sss'] ourPath=([p for p in sys.path if p.endswith('/scripts/lokalize')]+[''])[0] def srcFileOpenRequested(filename, line): try: Editor.setSrcFileOpenRequestAccepted(True) except: print 'your lokalize needs update ;)' if not editor.isValid() or editor.currentFile()=='': return import Kross forms = Kross.module("forms") print filename print globals()['test'] print lll (path, pofilename)=os.path.split(Editor.currentFile()) (package, ext)=os.path.splitext(pofilename) (upperPath, module)=os.path.split(path) if module.startswith('extragear-'): module=module.replace('extragear-','../extragear/') elif module.startswith('playground-'): module=module.replace('playground-','../playground/') elif module=='kdebase': trySubmodules=['workspace','apps','runtime'] for s in trySubmodules: if os.path.exists(ourPath+'/../../../KDE/kdebase/'+s+'/'+package): module=module+'/'+s print module break if package.startswith('desktop_'): while 1: try: package=package[package.index('_')+1:] except: break KdeTrunkPath=os.path.normpath(ourPath+'/../../../') mapSrcSuggest = mapSrc.get(package, '---') tryList=[KdeTrunkPath+'/'+mapSrcSuggest+'/'+filename, mapSrcSuggest+'/'+filename, # for suggestions providing full path KdeTrunkPath+'/KDE/'+module+'/'+package+'/'+filename, KdeTrunkPath+'/KDE/'+module+'/'+package+'/src/'+filename, KdeTrunkPath+'/KDE/'+module+'/'+package+'/'+package+'/'+filename, path+'/'+filename] for i in range(len(tryList)): tryList[i]=os.path.normpath(tryList[i]) srcFilePath=(filter(lambda p:os.path.exists(p),tryList)+[''])[0] if len(srcFilePath)==0: progress = forms.showProgressDialog("Searching source file on disk",'Searching source file on disk...') progress.setRange(0,2) import subprocess print 'using locate...' progress.addText(" ...using 'locate' commandline tool") progress.setValue(0) progress.setValue(1) process = subprocess.Popen(['locate', KdeTrunkPath+'/*/'+filename], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) srcFilePath = process.stdout.readline() try: srcFilePath=srcFilePath[:-1] except: print "nothing found by 'locate'" try:process.terminate() except: print 'seems like the old python version ;)' if not len(srcFilePath) or not os.path.exists(srcFilePath): progress.addText(" ...using 'find' commandline tool") progress.setValue(2) print 'using find...' process = subprocess.Popen(['find', KdeTrunkPath+'/KDE/'+module, '-path', filename, '-type','f'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) srcFilePath = process.stdout.readline() try: srcFilePath=srcFilePath[:-1] except: print "nothing found by 'find'" try:process.terminate() except: print 'seems like the old python version ;)' progress.deleteLater() if len(srcFilePath): os.system('kate '+srcFilePath+(' --line %d &' % line)) print 'kate '+srcFilePath+(' --line %d &' % line) else: print "couldn't find. searched in:", print tryList answer=forms.showMessageBox("QuestionYesNo", "Could not find source file", "Searched in:\n"+'\n'.join(tryList)+""" Also searched using 'locate' command. Would you like to initiate websearch (using lxr.kde.org)? """) if answer=='Yes': - os.system("kfmclient openURL 'http://lxr.kde.org/search?filestring=%s&string='" % filename) + os.system("kfmclient openURL 'https://lxr.kde.org/search?_filestring=%s&_string='" % filename) Index: branches/stable/l10n-kde4/scripts/posieve_check-tp-kde_results_to_webpage.sh =================================================================== --- branches/stable/l10n-kde4/scripts/posieve_check-tp-kde_results_to_webpage.sh (revision 1542766) +++ branches/stable/l10n-kde4/scripts/posieve_check-tp-kde_results_to_webpage.sh (revision 1542767) @@ -1,225 +1,225 @@ #!/bin/bash # Author: Albert Astals Cid # License: WTFPL 2 - http://sam.zoy.org/wtfpl/ if [ ! -d scripts ]; then echo "You have to run the script from the parent directory of scripts/" exit fi if test "$1" = "--posievepath"; then POSIEVEPATH=$2 fi if test "$3" = "--outputdir"; then OUTPUTDIR=$4 fi if [ -z "$POSIEVEPATH" ]; then echo "You have to specify the pology path" echo " Syntax: $0 --posievepath /path/to/posieve --outputdir /path/to/output/dir" exit fi if [ ! -f "$POSIEVEPATH" ]; then echo "$POSIEVEPATH does not exist" echo " Syntax: $0 --pologypath /path/to/posieve --outputdir /path/to/output/dir" exit fi if [ -z "$OUTPUTDIR" ]; then echo "You have to specify the output dir" echo " Syntax: $0 --posievepath /path/to/posieve --outputdir /path/to/output/dir" exit fi if [ ! -d "$OUTPUTDIR" ]; then echo "$OUTPUTDIR is not a directory" echo " Syntax: $0 --pologypath /path/to/posieve --outputdir /path/to/output/dir" exit fi -SVNPATH=http://websvn.kde.org/branches/stable +SVNPATH=https://websvn.kde.org/branches/stable ORIGSUBDIRSFILE=subdirs SUBDIRSFILE=subdirs.tmp REVISION=$(LANG=C svn info | grep "Changed Rev" | cut -d " " -f 4) # Remove x-test from the teams to process grep -v "x-test" $ORIGSUBDIRSFILE > $SUBDIRSFILE # Run posieve while read it; do if [ -d $it/messages/ ]; then echo "Running check-xml-kde4 over of $it..." $POSIEVEPATH --skip-obsolete check-tp-kde $it/messages/ > $it/xml_message_problems else rm -f $it/xml_message_problems touch $it/xml_message_problems fi if [ -d $it/docmessages/ ]; then echo "Running check-xml-docbook4 over of $it..." $POSIEVEPATH --skip-obsolete check-tp-kde $it/docmessages/ > $it/xml_docmessage_problems else rm -f $it/xml_docmessage_problems touch $it/xml_docmessage_problems fi done < $SUBDIRSFILE # Remove last line from each result file while read it; do head -n-1 $it/xml_message_problems > my_tmp_file mv my_tmp_file $it/xml_message_problems head -n-1 $it/xml_docmessage_problems > my_tmp_file mv my_tmp_file $it/xml_docmessage_problems done < $SUBDIRSFILE rm -f my_tmp_file # create the index.html file ( cat << HEADDONE Errors for revision ${REVISION} - +

Errors for revision ${REVISION}

HEADDONE ) > $OUTPUTDIR/index.html tmerrors=0 tderrors=0 while read it; do merrors=$(wc -l < $it/xml_message_problems) derrors=$(wc -l < $it/xml_docmessage_problems) ((tmerrors = tmerrors + merrors)) ((tderrors = tderrors + derrors)) teamname=`grep "^$it=" teamnames | cut -d = -f 2` echo -n "" >> $OUTPUTDIR/index.html if [ $merrors -eq 0 ]; then echo -n "" >> $OUTPUTDIR/index.html else echo -n "" >> $OUTPUTDIR/index.html fi if [ $derrors -eq 0 ]; then echo "" >> $OUTPUTDIR/index.html else echo "" >> $OUTPUTDIR/index.html fi done < $SUBDIRSFILE echo -n "" >> $OUTPUTDIR/index.html echo -n "" >> $OUTPUTDIR/index.html echo "" >> $OUTPUTDIR/index.html echo "" >> $OUTPUTDIR/index.html echo "
LanguageMessagesDocmessages
$teamname flag $teamnameno errors$merrors errorsno errors
$derrors errors
Total$tmerrors errors$tderrors errors
" >> $OUTPUTDIR/index.html # create the messages.html file for it in `cat $SUBDIRSFILE`; do mkdir -p $OUTPUTDIR/$it echo "$it messages errors for revision $REVISION" > $OUTPUTDIR/$it/messages.html echo "

$it messages errors for revision $REVISION

" >> $OUTPUTDIR/$it/messages.html echo "" >> $OUTPUTDIR/$it/messages.html echo "" >> $OUTPUTDIR/$it/messages.html exec < $it/xml_message_problems while read line do fileSeparator=`expr index "$line" ":"` if [ $fileSeparator != "0" ]; then file=${line:0:fileSeparator-1} file=`echo $file | sed "s/$it\/messages\///g"` restofline=${line:fileSeparator} restofline=${restofline//&/&} restofline=${restofline///>} echo -n "" >> $OUTPUTDIR/$it/messages.html echo "" >> $OUTPUTDIR/$it/messages.html fi done echo "
FileLine(#Message number)[info]: Error
$file$restofline
" >> $OUTPUTDIR/$it/messages.html echo "
" >> $OUTPUTDIR/$it/messages.html echo "
" >> $OUTPUTDIR/$it/messages.html echo "$it docmessages errors table
" >> $OUTPUTDIR/$it/messages.html echo "Global errors table" >> $OUTPUTDIR/$it/messages.html echo "" >> $OUTPUTDIR/$it/messages.html done # create the docmessages.html file for it in `cat $SUBDIRSFILE`; do echo "$it docmessages errors for revision $REVISION" > $OUTPUTDIR/$it/docmessages.html echo "

$it docmessages errors for revision $REVISION

" >> $OUTPUTDIR/$it/docmessages.html echo "" >> $OUTPUTDIR/$it/docmessages.html echo "" >> $OUTPUTDIR/$it/docmessages.html exec < $it/xml_docmessage_problems while read line do fileSeparator=`expr index "$line" ":"` file=${line:0:fileSeparator-1} file=`echo $file | sed "s/$it\/docmessages\///g"` restofline=${line:fileSeparator} restofline=${restofline//&/&} restofline=${restofline///>} echo -n "" >> $OUTPUTDIR/$it/docmessages.html echo "" >> $OUTPUTDIR/$it/docmessages.html done echo "
FileLine(#Message number)[info]: Error
$file$restofline
" >> $OUTPUTDIR/$it/docmessages.html echo "
" >> $OUTPUTDIR/$it/docmessages.html echo "
" >> $OUTPUTDIR/$it/docmessages.html echo "$it messages errors table
" >> $OUTPUTDIR/$it/docmessages.html echo "Global errors table" >> $OUTPUTDIR/$it/docmessages.html echo "" >> $OUTPUTDIR/$it/docmessages.html done # clean temp files while read it; do rm -f $it/xml_message_problems rm -f $it/xml_docmessage_problems done < $SUBDIRSFILE rm -f $SUBDIRSFILE