Re: State of the Belarusian Free / Open Source translations

Alexander Mikhailian <[email protected]>
Newsgroups gmane.comp.internationalization.belarusian
Message-ID <[email protected]>
Dears,

I have rerun the script that extracts belarusian translations from the Google
Code Search using a more sophisticated regexp (thanks to Pavel Piatruk for the
hint).

As the discussion on the list turned mostly around the be vs. be@tarask vs
be@latin flamewars, I push it to the limit and publish the ratio between the
three language variants in the belarusian translations:

  The be@tarask variant accounts for 86,49% of belarusian translations, the be
  variant follows with 12,22% and be@latin concludes with a share of 1,29% of
  translations.

Here is the list of "last translators", sorted by the number of translation
strings associated with them:

  20047	Ales Nyakhaychyk	be@tarask
  3105	Alexander Nyakhaychyk	be@tarask
  2694	Ihar Hrachyshka	be@tarask
  1340	Pavel Piatruk	be
  1189	Hleb Valoska	be@tarask
  1076	Smaliakou Zmicier	be
  989	 Ihar Hrachyshka	be@tarask
  792	Siarhei Liantsevich	be
  572	Eugene Zelenko	be@tarask
  517	Yura Semashko	be@tarask
  446	Alaksandar Navicki	be@latin
  385	Ihar Viarheichyk	be
  357	booxter	be
  280	\tHleb Valoska	be@tarask
  253	szk	be
  246	Vital khilko	be@tarask
  199	Vital Khilko (aka dojlid)	be@tarask
  45	Andrei Darashenka	be@tarask
  13	Hleb Rubanau	be
  6	Darafei Praliaskouski	be
  0	Yevgeny Gromov	
  0	Vital Khilko	be@tarask

The distribution of the language variant by the last translator has been done
by manually checking the contents of the translation files retrieved.

P.S. It has been pointed out that KDE, OpenOffice and Mozilla translations
have not been counted, which makes the above numbers somewhat shaky. 

P.P.S. Please feel free to take on the get-be-po.sh attached below and tweak
it for good.

-- 
Alexander Mikhailian

_______________________________________________
I18n mailing list
[email protected]
http://mova.org/cgi-bin/mailman/listinfo/i18n
get-be-po.sh (application/x-sh, 2.8 KB)
#!/bin/bash
TMPDIR=/tmp
MAXRESULTS=50
STARTINDEX=1
ENDINDEX=801
# file:\.po$ (Language-Team:\ *Belarusian)|(file:\/be\.po$)
QUERY=file%3A%5C.po%24+%28Language-Team%3A%5C+*Belarusian%29%7C%28file%3A%5C%2Fbe%5C.po%24%29
# unpack the tar.gz and store the .po
function targz {
  outfile=`basename $packageuri`
  wget -O $outfile $packageuri
  tar -C $TMPDIR -xzf $outfile $filename
  checksum=`sha1sum $TMPDIR/$filename |awk '{print $1}'`
  mv $TMPDIR/$filename $checksum.po
}

# unpack the tar.bz2 and store the .po
function tarbz2 {
  outfile=`basename $packageuri`
  wget -O $outfile $packageuri
  tar -C $TMPDIR -xjf $outfile $filename
  checksum=`sha1sum $TMPDIR/$filename |awk '{print $1}'`
  mv $TMPDIR/$filename $checksum.po
}
# get the .po file over http
function plainpo {
  outfile=`basename $filename`
  wget -O $outfile $packageuri/$filename
  checksum=`sha1sum $outfile |awk '{print $1}'`
  mv $outfile $checksum.po
}

function plainsvn {
  outfile=`basename $filename`
  svn export $packageuri/$filename
  checksum=`sha1sum $outfile |awk '{print $1}'`
  mv $outfile $checksum.po
}

for i in `seq $STARTINDEX $MAXRESULTS $ENDINDEX`
do
   # download the gdata feeds
   wget -q -O $i.tmp "http://www.google.com/codesearch/feeds/search?q=$QUERY&start-index=$i&max-results=$MAXRESULTS"  && xmllint --format $i.tmp > $i.xml
   rm $i.tmp
   # exctract the package name and the file name
   xsltproc parse-gdata.xsl $i.xml |while read packagename; read packageuri; read filename
     do
       # guess the package type
       # tar.bz2 over http
       if [[ $packageuri =~ "^http://.*tar.gz$" ]]
       then
         echo "Unpacking $packageuri..."
         targz
       # tar.gz over http
       elif [[ $packageuri =~ "^http://.*tar.bz2$" ]]
       then
         echo "Unpacking $packageuri..."
         tarbz2
       # plain text file over http
       elif [[ $packageuri =~ "^http://" && $filename =~ "\/be\.po$" ]] 
       then
         echo "Unpacking $packageuri..."
         plainpo
       # file in an svn repository
       elif [[ $packageuri =~ "^svn://" && $filename =~ "\/be\.po$" ]] 
       then
         echo "Unpacking $packageuri..."
         plainsvn
       fi
     done
done

for i in *.po
do
  name=`grep -h Last-Translator $i |sed 's/"Last-Translator: \(.*\) <.*/\1/'`
  mkdir -p "authors/$name"
  mv $i "authors/$name/"
done

for i in authors/*
do
  bn=`basename "$i"`
   cd "$i"
   msgcat -u *po > "../$bn.po"
   cd ../../
done

for i in authors/*po
do
  count=`grep msgstr "$i" |wc -l`
  temp=`echo "${i%.po} "`; echo -e "$count\t${temp#authors/}"
done |sort -rn

# After assigning the language variants to the Last Translators, 
#
# cat count.txt | awk 'BEGIN{FS="\t"} {stats[$3]+=$1} END{ print "be@tarask: " stats["be@tarask"]; print "be: " stats["be"] ; print "be@latin: " stats["be@latin"]}'
# be@tarask: 29883
# be: 4222
# be@latin: 446
parse-gdata.xsl (application/xml, 708 B) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.