[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: l10n-support/ca/scripts
From: Antoni Bella Pérez <null () kde ! org>
Date: 2018-06-04 9:43:45
Message-ID: E1fPm1h-00012D-4f () code ! kde ! org
[Download RAW message or body]
SVN commit 1517165 by bellaperez:
Catalan works
- Code cleaning ̣-- more readable
- Output improvements
** (unfinished)
M +30 -24 doc_parse_dates.sh
--- trunk/l10n-support/ca/scripts/doc_parse_dates.sh #1517164:1517165
@@ -7,17 +7,15 @@
# ...
LANGCODE='ca'
-REPO="git://anongit.kde.org"
+REPO="https://cgit.kde.org"
-git_log() {
- git log --max-count=1 --date=iso-strict $REPO/$1 | grep "^Date:" > parse-dates.tmp
- DATE_R=$()
- HOUR_R=$()
-}
+git_log() { wget $REPO/konsole.git/log/doc/manual/draganddrop-contextmenu.png; }
parse_date() {
DATE_L=$()
HOUR_L=$()
+ DATE_R=$()
+ HOUR_R=$()
if [ $DATE_L -gt $DATE_R ]; then
echo
@@ -24,6 +22,17 @@
fi
}
+header_table() {
+ echo -e "\n Screenshot name Git \
date Local date" + echo " \
|--------------------------------------------------|--------------|--------------|" \
+} +
+footer_table() {
+ echo -e " \
|--------------------------------------------------|--------------|--------------|\n" \
+} +
+found_ss() { ls documentation/$MODULE/$DOCDIR/{*.jpg,*.png} 2>/dev/null | head -1; }
+
# Search folders created with DocBook files that are in the repo translations.
for docdir in $(find $LANGCODE/docs/* -type f -name *.docbook | xargs dirname | sort \
| uniq) do
@@ -30,7 +39,7 @@
MODULE=$(dirname $docdir | cut -f 3 -d'/') # applications
DOCDIR0=$(dirname $docdir | cut -f 4 -d'/') # kioslave, kcontrol5 or \
kioslave5 DOCDIR=$(basename $docdir) # keditbookmarks
-# test "$MODULE" = "calligra" && exit 0 # NOTE: Uncomment for \
testing over 'applications' module only + test "$MODULE" = "calligra" && exit 0 \
# NOTE: Uncomment for testing over 'applications' module only
# wacomtablet, gopher, gdrive, kcm_ssl, kcron, kamera, cddbretrieval5, audiocd
# blockdevices, desktop, kgamma5, khotkeys, kwindecoration, kwineffects, \
kwinscreenedges
# kwintabbox, plasma-pa, powerdevil, screenlocker, windowbehaviour, \
windowspecific @@ -45,35 +54,30 @@
elif [[ "$DOCDIR" = +(engineexplorer|plasmoidviewer) ]]; then
GITDIR="$(grep "^entry plasma-sdk " scripts/documentation_paths)$DOCDIR"
DOCDIR=$(echo "$GITDIR" | cut -f 2 -d' ')
- else
- if [ "$DOCDIR0" = "kcontrol" ]; then
# plasma-desktop
- if [[ "$DOCDIR" = \
+(autostart|baloo|clock|colors|componentchooser|cursortheme|desktopthemedetails|emotic \
ons|fontinst|fonts|formats|icons|joystick|kcmaccess|kcmlaunchfeedback|kcmnotify|kcmsms \
erver|kcmstyle|kded|keyboard|keys|mouse|paths|phonon|solid-actions|solid-device-automounter|spellchecking|splashscreen|translations|workspaceoptions) \
]]; then + elif [[ "$DOCDIR" = \
+(autostart|baloo|clock|colors|componentchooser|cursortheme|desktopthemedetails|emotic \
ons|fontinst|fonts|formats|icons|joystick|kcmaccess|kcmlaunchfeedback|kcmnotify|kcmsms \
erver|kcmstyle|kded|keyboard|keys|mouse|paths|phonon|solid-actions|solid-device-automounter|spellchecking|splashscreen|translations|workspaceoptions) \
]]; then
GITDIR="$REPO/plasma-desktop.git HEAD:doc/kcontrol/$DOCDIR"
DOCDIR=$(echo "$GITDIR" | cut -f 3 -d':' | sed -e 's/doc\///')
- fi
- elif [ "$DOCDIR0" = "kcontrol5" ]; then
# konqueror - kcontrol5
- if [[ "$DOCDIR" = \
+(bookmarks|filemanager|history|kcmcss|khtml-adblock|khtml-behavior|khtml-general|khtml-java-js|performance) \
]]; then + elif [[ "$DOCDIR" = \
+(bookmarks|filemanager|history|kcmcss|khtml-adblock|khtml-behavior|khtml-general|khtml-java-js|performance) \
]]; then GITDIR="$REPO/konqueror.git HEAD:doc/kcontrol5/$DOCDIR"
DOCDIR=$(echo "$GITDIR" | cut -f 3 -d':' | sed -e 's/doc\///')
# kio
elif [[ "$DOCDIR" = \
+(cache|cookies|netpref|proxy|smb|trash|useragent|webshortcuts) ]]; then + [ \
"$DOCDIR" = "smb" ] && [ "$DOCDIR0" = "kioslave5" ] && continue \
GITDIR="$REPO/kio.git HEAD:docs/kcontrol5/$DOCDIR"
DOCDIR=$(echo "$GITDIR" | cut -f 3 -d':' | sed -e 's/docs\///')
+ elif [[ "$DOCDIR" = \
+(data|file|ftp|help|documentationnotfound|http|mailto|telnet|webdav) ]]; then + \
GITDIR="$REPO/kio.git HEAD:docs/kioslave5/$DOCDIR" + test "$DOCDIR" = \
documentationnotfound && GITDIR="$REPO/kio.git HEAD:docs/kioslave5/help/$DOCDIR" + \
DOCDIR=$(echo "$GITDIR" | cut -f 3 -d':' | sed -e 's/docs\///') # kde-cli-tools
elif [ "$DOCDIR" = "filetypes" ]; then
GITDIR="$REPO/kde-cli-tools.git HEAD:docs/kcontrol5/$DOCDIR"
DOCDIR=$(echo "$GITDIR" | cut -f 3 -d':' | sed -e 's/docs\///')
- fi
- elif [ "$DOCDIR0" = "kioslave5" ]; then
- # kio
- if [[ "$DOCDIR" = \
+(data|file|ftp|help|documentationnotfound|http|mailto|telnet|webdav) \
]]; then
- GITDIR="$REPO/kio.git HEAD:docs/kioslave5/$DOCDIR"
- test "$DOCDIR" = documentationnotfound && GITDIR="$REPO/kio.git \
HEAD:docs/kioslave5/help/$DOCDIR"
- DOCDIR=$(echo "$GITDIR" | cut -f 3 -d':' | sed -e 's/docs\///')
# kio-extras
elif [[ "$DOCDIR" = \
+(bookmarks|bzip2|fish|gzip|info|man|network|nfs|recentdocuments|sftp|smb|tar|thumbnail|xz) \
]]; then + [ "$DOCDIR" = "smb" ] && [ "$DOCDIR0" = "kcontrol5" ] && continue
GITDIR="$REPO/kio-extras.git HEAD:doc/kioslave5/$DOCDIR"
DOCDIR=$(echo "$GITDIR" | cut -f 3 -d':' | sed -e 's/doc\///')
# ldap, pop3, sieve
@@ -80,22 +84,24 @@
elif [[ "$DOCDIR" = +(ldap|pop3|sieve) ]]; then
GITDIR=$(grep "/$DOCDIR " scripts/documentation_paths)
DOCDIR=$(echo "$GITDIR" | cut -f 2 -d' ')
- fi
- fi
+ else
GITDIR=$(grep "^entry $DOCDIR " scripts/documentation_paths)
fi
+ echo "** $docdir -> $GITDIR" # NOTE: If GITDIR var is empty, change above
# Without screenshots, not parsed
- test -z "$(find documentation/$MODULE/$DOCDIR/* -type f -name "*.png" -o -name \
"*.jpg")" && continue
- echo "** $docdir -> $GITDIR" # NOTE: If GITDIR var is empty, change above
+ [ -z $(found_ss) ] && continue
# Translated index.docbook = doc is released
if [ $(find $docdir/* -type f -name "index.docbook") ]; then
+ [ -n $(found_ss) ] && header_table
# Find item/s into documentation/'module'/'app' local dir
for screenshot in $(find documentation/$MODULE/$DOCDIR/* -type f -name \
"*.png" -o -name "*.jpg") do
+
echo " - $(filename $screenshot)"
done
+ [ -n $(found_ss) ] && footer_table
fi
done
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic