[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-i18n-doc
Subject: Re: How many translators are working for KDE?
From: Pablo de Vicente <pvicentea () wanadoo ! es>
Date: 2002-01-16 19:27:07
[Download RAW message or body]
El Mié 16 Ene 2002 09:23, Jaime Robles escribió:
> El Mar 15 Ene 2002 18:52, Malcolm Hunter escribió:
> > Maybe if you mentioned what you want the information for? If it's just
> > curiosity, people might not think it's very important. I think this
> > information could be useful to add to the existing teams web page. We
> > already have the coordinator names, but having an indication of the
> > number of translators for each team might be an incentive for people to
> > join.
>
> You are right.
> I started that just for curiosity since i was writing ann article for a
> magazine... the time for the article expired and i continued for curiosity.
> It could be a good data for the web... i will publish the results as soon
> as i have de most of the data. :-)
> Thanks for all your responses!
This is interesting...
I have spoiled (:-) some time making a script (very badly programmed) to
obtain the distribution of work within each KDE translation team. That is, I
wanted to check if translations are symmetrically (or homogeneously)
disttributed among the members of the translation teams. Just for fun. I have
no other intention.
I would like to send you some elaborated results but I do not find one
simple parameter that describes the assymetry. Perhaps somebody in the list
has a good idea. I do not want to spend more time on this.
The best way to see this at a glance is to make an histogram: "Translator
index VS Percentage of translation done". I have not produced plots for all
teams but files for each team. Since the data for all teams ocupy 600 lines I
do not want to send them to the list included in this message. And I suppose
you do not want to see an attached file to this message. So I include the
couple of scripts (one in Tcl, the other is a shell command) I have written.
I have obtained the data from the kde-i18n module retrieved from the CVS this
morning.
The scripts look at the header of all PO files and extract the name of each
translator and the size of that file. Since some translators sign with
different names the results are in some cases partially wrong. That is, one
translator may appear several times as if he were several different
translators.
The results do not show the names of translators but if you want to see
them (for example, to manually make corrections) just uncomment one line of
the TCL script and comment the previous. To run the script you need a
directory structure like this:
scripts go here -> /home/nameoftheuser/stats/
kde-i18n module -> /home/nameoftheuser/kde/kde-3.0-cvs/kde-i18n
I send the scripts so that you can run them, modify them, use them as
example to make one new better one or throw them to the trash.
The script generates one file per team like this:
0 48 0.000 1 0.001
1 46 0.000 1 0.001
15 46 0.000 1 0.001
6 46 0.000 1 0.001
18 172 0.000 2 0.003
2 810 0.001 1 0.001
7 812 0.001 1 0.001
3 2020 0.002 2 0.003
13 7270 0.007 7 0.010
10 9243 0.009 4 0.006
11 11630 0.012 3 0.004
5 13992 0.014 14 0.020
16 34619 0.034 46 0.064
8 43585 0.043 28 0.039
9 63553 0.063 34 0.047
17 69541 0.069 23 0.032
4 105188 0.104 74 0.103
12 217823 0.216 112 0.156
14 429028 0.425 361 0.504
Column 1: index of translator
Column 2: size of files translated
Column 3: column 2/Total size of files
Column 4: Number of files translated
Column 5: column4/Number of files translated.
If somebody wants to see the results I can email them.
regards,
Pablo de Vicente
------------
script.sh
------------
languages="af ar ara az bg br bs ca cy da de el en_GB eo es et eu fi fr ga gl
he hr hu id ind is it ja ko ku lt lv mi mk mt nb nl nn oc pl pt pt_BR ro ru
sk sl sr sv ta th tr uk vi wa xh xx zh_CN zh_TW zu"
cd ../kde/kde-3.0-cvs/kde-i18n
for l in $languages; do
fileaux="$HOME/stats/stats-$l.aux"
filename="$HOME/stats/stats-$l.dat"
fileout="$filename.out"
fileend="$fileout.sorted"
cd $l
find . -name '*.po' -exec grep -n "Last-Translator" {} \; -printf %k >
$fileaux
cd ..
sort -t : -k 3 $fileaux -o $filename
rm $fileaux
$HOME/stats/kde-stat.tcl $filename
rm $filename
sort -k 3 $fileout -o $fileend
rm $fileout
done
---------------
kde-stat.tcl:
---------------
#!/usr/bin/tclsh
#
# P de Vicente vicente@oan.es
#-------------------------------------------------------------------
proc print_result {fileOUT} {
global sizeF numberOfFiles index TotalSize nfiles names
set i 0
while {$i<=$index} {
# work done meassured in size of files (bytes)
set s $sizeF($i)
set s [format "%8d" $s]
# percentage of work done meassured in size of files/total size
set ps [expr $s/($TotalSize * 1.0)]
set ps [format "%4.3f" $ps]
# work done meassured in number of files
set n $nfiles($i)
set n [format "%4d" $n]
# percentage of work done meassured in number of files/total number of files
set pn [expr $n/($numberOfFiles * 1.0)]
set pn [format "%4.3f" $pn]
set nam $names($i)
# index for the translator
set i [format "%2d" $i]
# Uncomment the next line to get the names of translators
# puts $fileOUT " $i $s $ps $n $pn $nam"
puts $fileOUT " $i $s $ps $n $pn"
incr i
}
}
#--------------------------------------------------------------------------
# Main Program
#
if {$argc>=1} {
if {[catch {open $argv r} fileID]} {
puts stderr "$fileID"
exit
}
} else {
puts " Wrong syntax, missing parameter. Try: kde-stat.tcl filename"
exit
}
set fichero "$argv.out"
gets $fileID line
set list_line [split $line :]
set numberOfFiles 1
set siz [lindex $list_line 0]
set TotalSize $siz
set index 0
set nf 1
set nfiles($index) 1
set sizeF($index) $siz
set prev_translator [lindex $list_line 2]
set list_prev_translator [split $prev_translator <]
set previous_translator [lindex $list_prev_translator 0]
set names($index) $previous_translator
while {[gets $fileID line] >= 0} {
set list_line [split $line :]
set trans [lindex $list_line 2]
set list_trans [split $trans <]
set translator [lindex $list_trans 0]
set siz [lindex $list_line 0]
if {$translator != $previous_translator} {
incr index
set sizeF($index) 0
set nfiles($index) 0
# just for debugging purposes so I see the names of the translators
puts $translator
set previous_translator $translator
set names($index) $translator
}
set sizeF($index) [expr $siz + $sizeF($index)]
incr nfiles($index)
set TotalSize [expr $siz + $TotalSize]
incr numberOfFiles
}
set fileOUT [open $fichero w]
print_result $fileOUT
close $fileOUT
puts stdout " "
puts stdout " Results in: $fichero "
puts stdout " "
close $fileID
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic