From kde-i18n-doc Wed Jul 19 09:28:42 2006 From: Achim Bohnet Date: Wed, 19 Jul 2006 09:28:42 +0000 To: kde-i18n-doc Subject: Re: tool l10n statistics for release announcements? Message-Id: <200607191128.42552.ach () mpe ! mpg ! de> X-MARC-Message: https://marc.info/?l=kde-i18n-doc&m=115330298003491 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_KtfvEDYgtfid6T+" --Boundary-00=_KtfvEDYgtfid6T+ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 13 July 2006 22:52, Tom Albers wrote: > Op donderdag 13 juli 2006 17:34, schreef Achim Bohnet: Big thank you to Tom for the script. Attached a bit enhanced version that can also handle several .po files per language. Below the announcement that includes stats for translations (I cc'ed the announcement to the list but got the address wrong. Sorry). Any suggestions (or patches) to enhance the output that the translators would like to see is very welcome. Achim > > Hi, > > > > first of all thx to all how help adding/enhancing > > digikam(imageplugins) translations of msg/docs > > in the stable branch for the 0.8.2 release! > > > > Unfortunately it's not so easy to get an overview of > > what has changed, to add it to the release announcement. > > > > Has anybody a tools that does something like > > > > $ kdel10nstat -L 66 -u 20 old-tarball new-tarball > > > > that gives the number and list of translation > > > > a) in the new-tarball > > b) transaltion with > 66 % (-L) > > c) translations that have updated/added > 20 % of strings > > compared to old-tarball > > d) list of translators involved > > > > or any other metric the kde-i18n team would like to see in the > > announcements to honour their work. > > > > Achim >=20 > Achim, >=20 > I had some parts lying around from a previous project, attached is: >=20 > - the requested script > I'll put it in playground / scripts after some feedback >=20 > - 1.txt: ./kdel10stat -L 48 digikam-0.8.2/po digikam-0.8.1/po > This output can be used in the copyright file.=20 >=20 > - 2.txt: ./kdel10stat -l 48 digikam-0.8.2/po digikam-0.8.1/po > This output can be used in the news file / announcements >=20 > Sorry for the encoding, UTF8 setups should deal with it better. The outpu= t=20 > always needs to be screened before usage.... >=20 > If any translater has any idea for other cool stats, let me know, you can= see=20 > what is possible.... >=20 > Toma >=20 The digiKam Team is pleased to announce digiKam 0.8.2 and digiKamimageplugins 0.8.2. digiKam is a digital photo management application for KDE, focussed on importing, organizing and editing digital photos. Aimed at all types of users. digiKam imageplugins enhance digiKam's image editor with more than 2 dozend plugins that make correcting you photos easier. The source for digikam and digikamimageplugins 0.8.2 is available from: http://sourceforge.net/project/showfiles.php?group_id=3D42641 Changes since digikam 0.8.2-rc1 include: Bugs fixed: o Unsupported initialization of CameraList object (#129610) o digikam "Mount and Download" Problems (#124952) o Thumbnail generation fails with raw images (#128283) o Camera gui always puts *.JPG and *.NEF in the configure - digikam dia= log/File Mime Types/ Image Files (#127697) o Crash when moving an album to another album (#128069) o Autoration of photos may confuse user because of changes made he is n= ot aware of (#126335) o Communication between digikam and its kioslaves broken if size_t !=3D= off_t (#127634) o Mimimize button missing on "Compaq Flash Reader" camera window (#1164= 85) o mimelnk/x-image-raw.desktop conflicts with kdegraphics-3.5.x (#121242) Changes since digikamimageplugins 0.8.1 include: Bugs fixed: o White Balance plugin : Fixed Gamma correction slider values inver= sed o Infrared plugins: fix unecessary bluring effects Translations: Opensource wouldn't be such a great success without all the translators. digikam: There are 46 languages available, this is a list of the current transla= tors: =D0=97=D0=BB=D0=B0=D1=82=D0=BA=D0=BE =D0=9F=D0=BE=D0=BF=D0=BE=D0=B2= (bg) Golam Mortuza Hossain (bn) Thierry Vignaud (br) Josep Ma. Ferrer (ca) Klara Cihlarova (cs) Thierry Vignaud (cy) Erik Kj=C3=A6r Pedersen (da) Thomas Reitelbach (de) Spiros Georgaras (el) Malcolm Hunter (en_GB) Pablo de Vicente (es) Marek Laane (et) marcos (eu) "Last-Translator: Mikael Lammentausta " (fi) Tung Nguyen (fr) Kevin Patrick Scannell (ga) Xabi G. Feal (gl) =D7=93=D7=99=D7=90=D7=92=D7=95 =D7=99=D7=A1=D7=98=D7=A8=D7=95=D7=91= =D7=A0=D7=99 (he) Tamas Szanto (hu) FULL NAME (is) Federico Zenith (it) Yukiko BANDO (ja) Leang Chumsoben (km) Donatas Glodenis (lt) Bozidar Proevski (mk) Sharuzzaman Ahmat Raslan (ms) Kevin Attard Compagno (mt) =C3=98yvind A. Holm (nb) Bram Schoenmakers (nl) Karl Ove Hufthammer (nn) Amanpreet Singh Brar (pa) Robert Gomulka (pl) Pedro Morais (pt) Lisiane Sztoltz Teixeira (pt_BR) Claudiu Costin (ro) Nick Shaforostoff (ru) Steve Murphy (rw) Gregor Rakar (sl) Chusslove Illich (sr) Chusslove Illich (sr@Latn) Stefan Asserh=C3=A4ll (sv) Tamil PC (ta) =C4=B0smail =C5=9Eim=C5=9Fek (tr) Ivan Petrouchtchak (uk) Clytie Siddall (vi) Funda Wang (zh_CN) We welcome bn eu km ms uk vi as new languages The following languages have improved their translations with 50% or mo= re: ca fi hu The following languages have 100% translations for the second release i= n row: da de el et it ja nl pt sv digikamimageplugins: There are 40 languages available, this is a list of the current transla= tors: Thierry Vignaud (br) Josep Ma. Ferrer (ca) Jakub Friedl Klara Cihlarova (c= s) Thierry Vignaud (cy) Erik Kj=C3=A6r Pedersen Rune R=C3=B8nd= e Laursen (da) Oliver D=C3=B6rr Stephan Johach= Thomas Reitelbach (de) Spiros Georgaras Toussis Manolis (el) Andrew Coles Malcolm Hunter (en_GB) Enrique Matias Sanchez Pablo de Vicente Pablo Pita Leira (es) Marek Laane Marek Laane (et) Ion Gazta=C3=B1aga (eu) Mikael Lammentausta (fi) Tung Nguyen (fr) Kevin Patrick Scannell (ga) mvillarino (gl) Nadav Kavalerchik =D7=93=D7=99=D7=90= =D7=92=D7=95 =D7=99=D7=A1=D7=98=D7=A8=D7=95=D7=91=D7=A0=D7=99 (he) Gabor Dudas Tamas Szanto (hu) Federico Zenith (it) Yukiko BANDO (ja) Khoem Sokhem Leang Chumsoben (km) Donatas Glodenis (lt) Sharuzzaman Ahmat Raslan (ms) Kevin Attard Compagno (mt) Nils Kristian Tomren (nb) Rinse de Vries (nl) Karl Ove Hufthammer (nn) Amanpreet Singh Alam (pa) Michal Rudolf Robert Gomulka = (pl) Jos=C3=A9 Nuno Coelho Pires Pedro Morais <= morais@kde.org> (pt) Lisiane Sztoltz Teixeira Marcus Gama (pt_BR) Nick Shaforostoff (ru) Steve Murphy (rw) Chusslove Illich Slobodan Simic (sr) Chusslove Illich Slobodan Simic (sr@Latn) Stefan Asserhall (sv) Tamil PC VelMurugan = (ta) =C4=B0smail =C5=9Eim=C5=9Fek (tr) Ivan Petrouchtchak (uk) Clytie Siddall (vi) Funda Wang (zh_CN) We welcome eu fi gl hu km ms uk vi as new languages The following languages have improved their translations with 50% or mo= re: ca The following languages have 100% translations for the second release i= n row: da de el en_GB et it nl pl pt sr sr@Latn sv More details in the ChangeLog files. Achim Bohnet digiKam team =2D-=20 To me vi is Zen. To use vi is to practice zen. Every command is a koan. Profound to the user, unintelligible to the uninitiated. You discover truth everytime you use it. -- reddy@lion.austin.ibm.com --Boundary-00=_KtfvEDYgtfid6T+ Content-Type: application/x-shellscript; name="kdel10stat" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kdel10stat" #!/bin/bash # Copyright (C) 2005-2006 Tom Albers # Copyright (C) 2006 Achim Bohnet # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage "./kdel10stat -L 50 digikam-0.8.2/po digikam-0.8.1/po" or # "./kdel10stat -l 50 digikam-0.8.2/po digikam-0.8.1/po" debug () { return; } #debug () { echo "$@"; } export LANGAUGE=en export LC_ALL=en_US.UTF-8 MSGFMT=`which msgfmt` if [ "$MSGFMT" == "" ] ; then echo "please install msgfmt and make sure it is in your path, can not continue"; exit; fi; MIN_PERC=0; if [ "$1" == "-L" ]; then MIN_PERC=$2; PAD=$3; PAD2=$4 else if [ "$1" == "-l" ]; then MIN_PERC=$2; PAD=$3; PAD2=$4 else exit; fi fi; # FIXME: assumes that at least one language has copied all language templates S_NUMPO=`for d in $PAD/*/ ; do ls $d/*.po | wc -l; done | sort -n | uniq | tail -1` S_NUMPO2=`for d in $PAD2/*/ ; do ls $d/*.po | wc -l; done | sort -n | uniq | tail -1` debug $S_NUMPO $S_NUMPO2 echo -n "processing: " for lang in `find $PAD -maxdepth 1 -type d -follow -printf '%f\n' | sed -n '2,$p'|sort`; do S_TRANS=0 S_NOTRANS=0 NUMPO=0 for po in `ls $PAD/$lang/*.po`; do let 'NUMPO++' # Make some stats! STATS=`msgfmt --statistics $po 2>&1` TRANS=`echo $STATS |sed 's/^\(.*\) translated message.*/\1/'` if [ "$TRANS" == "$STATS" ]; then TRANS=0; fi; FUZZY=`echo $STATS |sed '/.*, \(.*\) fuzzy translation.*/ s//\1/'` if [ "$FUZZY" == "$STATS" ]; then FUZZY=0; fi; UNTRANS=`echo $STATS |sed '/.*, \(.*\) untranslated messages.*/ s//\1/'` if [ "$UNTRANS" == "$STATS" ]; then UNTRANS=0; fi; S_TRANS=`expr $S_TRANS + $TRANS` S_NOTRANS=`expr $S_NOTRANS + $FUZZY + $UNTRANS` done TOT=`expr $S_TRANS + $S_NOTRANS` PERC=`expr $[ $S_TRANS * 100 * $NUMPO / $TOT / $S_NUMPO ]` if [ `expr $[ $PERC > $MIN_PERC ]` = 1 ] then ALL_LANG_MIN+=$lang"("$PERC"%) " fi echo -n "$lang($PERC%) " debug "all_lang_min=$ALL_LANG_MIN" # Do the same for the PAD2 if [ -d $PAD2/$lang/ ]; then S_TRANS2=0 S_NOTRANS2=0 NUMPO=0 for po in $PAD2/$lang/*.po; do let 'NUMPO++' STATS=`msgfmt --statistics $po 2>&1` TRANS=`echo $STATS |sed 's/^\(.*\) translated message.*/\1/'` if [ "$TRANS" == "$STATS" ]; then TRANS=0; fi; FUZZY=`echo $STATS |sed '/.*, \(.*\) fuzzy translation.*/ s//\1/'` if [ "$FUZZY" == "$STATS" ]; then FUZZY=0; fi; UNTRANS=`echo $STATS |sed '/.*, \(.*\) untranslated messages.*/ s//\1/'` if [ "$UNTRANS" == "$STATS" ]; then UNTRANS=0; fi; S_TRANS2=`expr $S_TRANS2 + $TRANS` S_NOTRANS2=`expr $S_NOTRANS2 + $FUZZY + $UNTRANS` done TOT2=`expr $S_TRANS2 + $S_NOTRANS2` PERC2=`expr $[ $S_TRANS2 * 100 * $NUMPO / $TOT2 / $S_NUMPO2 ]` DIFF=`expr $PERC - $PERC2` if [ $DIFF -gt $MIN_PERC ] then IMPROVED+=$lang" "; fi if [ $DIFF == 0 ] && [ $PERC == 100 ] then AGAIN100+=$lang" "; fi else NEWLANG+=$lang" "; fi # Save all languages ALL_LANG+=$lang" "; # Copyrights if [ "$1" == "-L" ]; then COPYRIGHT=`grep '^#.*@.*' $PAD/$lang/*.po | sed 's/# \(.*\)/\1/' | sed 's/ /easywayout/g' | sort | uniq` COPYRIGHT2=`grep 'Last-Translator' $PAD/$lang/*.po | sed 's/.*Last-Translator: \(.*\)\\\\n.*/Last Translator: \1/' | sed 's/ /easywayout/g' | sort | uniq` COPY+=$lang":\n"; for k in $COPYRIGHT2 $COPYRIGHT do COPY+="\t" COPY+=`echo $k | sed 's/easywayout/ /g'` COPY+="\n" done else COPYRIGHT2=`grep 'Last-Translator' $PAD/$lang/*.po | sed 's/.*Last-Translator. \(.*\)\\\\n.*/\1/' | sed 's/ /easywayout/g' | sort | uniq` for k in $COPYRIGHT2 do COPY+="\t" COPY+=`echo $k | sed 's/easywayout/ /g'` done COPY+=" ("$lang")"; COPY+="\n" fi AMOUNT=`expr $AMOUNT + 1`; done; echo done. echo if [ "$1" == "-L" ]; then echo "All languages available: " $ALL_LANG; echo "All Languages with "$MIN_PERC"% translated: "$ALL_LANG_MIN; echo -e "Copyrights:\n"$COPY; else echo -e "There are "$AMOUNT" languages available, this is a list of the current translators:\n\n"$COPY; echo -e "We welcome "$NEWLANG"as new languages" echo -e "The following languages have improved their translations with "$MIN_PERC"% or more: "$IMPROVED echo -e "The following languages have 100% translations for the second release in row: "$AGAIN100 fi --Boundary-00=_KtfvEDYgtfid6T+--