<html><body bgcolor="#FFFFFF"><div><br><br>Jaime</div><div><br>Inicio del mensaje reenviado:<br><br></div><blockquote type="cite"><div><b>De:</b> Karl Ove Hufthammer &lt;<a href="mailto:karl@huftis.org">karl@huftis.org</a>&gt;<br><b>Fecha:</b> 15 de agosto de 2009 00:12:56 GMT+02:00<br><b>Para:</b> KDE i18n-doc &lt;<a href="mailto:kde-i18n-doc@kde.org">kde-i18n-doc@kde.org</a>&gt;<br><b>Asunto:</b> <b>KDE translation history for various teams</b><br><b>Responder a:</b> KDE i18n-doc &lt;<a href="mailto:kde-i18n-doc@kde.org">kde-i18n-doc@kde.org</a>&gt;<br><br></div></blockquote><div></div><blockquote type="cite"><div><span>KDE translators,</span><br><span></span><br><span>Are you interested in the history of KDE translation for your language, which </span><br><span>people have been working on the translation, and when they have done so?</span><br><span>This information is actually stored in the PO files, and I’ve created a simple </span><br><span>script for displaying it graphically. Here’s two examples, for Norwegian </span><br><span>Nynorsk and Norwegian Bokmål:</span><br><span></span><br><span><a href="http://huftis.org/kritikk/translation-statistics-nn.png">http://huftis.org/kritikk/translation-statistics-nn.png</a></span><br><span><a href="http://huftis.org/kritikk/translation-statistics-nb.png">http://huftis.org/kritikk/translation-statistics-nb.png</a></span><br><span></span><br><span>The blocks show when each translator has been working, and the number inside </span><br><span>each block shows how many files (not times) s/he edited that year. The names </span><br><span>are sorted by last year worked, and then by first year worked.</span><br><span></span><br><span>How to generate this statistics? First you’ll need to normalize the headers in </span><br><span>the PO files. You can easily do this with the pology tools:</span><br><span></span><br><span>posieve normalize-header folder</span><br><span></span><br><span>Then you have to download the scripts:</span><br><span></span><br><span>svn checkout --depth empty \</span><br><span>svn://svn.skolelinux.org/skolelinux/trunk/i18n/skript/</span><br><span>cd skript</span><br><span>svn up translation-statistics.sh</span><br><span>svn up translation-graph.R</span><br><span></span><br><span>The system consists of a simple bash script and a R script.</span><br><span>You’ll find R at <a href="http://www.r-project.org/">http://www.r-project.org/</a> and it’s also packaged</span><br><span>in all major distros. You’ll also need to ensure that the ggplot2</span><br><span>package is installed in R. (Running R, preferably as root, and typing</span><br><span>install.packages("ggplot2") should do the trick.)</span><br><span></span><br><span>Then you only need to run</span><br><span></span><br><span>./translation-statistics.sh folder-with-po-files</span><br><span></span><br><span>and the image will be created automatically, and even optimised for putting on </span><br><span>the Web if you have optipng installed.</span><br><span></span><br><span>Some caveats: The statistics may be unreliable for several reasons. For </span><br><span>instance, if you use a text editor to edit the files, your name will not </span><br><span>automatically be added to the file. Also, in older versions of KBabel, it was </span><br><span>possible to turn off the automatic credits insertion. And if you used the auto-</span><br><span>translation feature of KBabel, your name will be listed in many files, even if </span><br><span>you did not actually edit them. (There are also various other reasons that the </span><br><span>statistics may be wrong or misleading.)</span><br><span></span><br><span>If the statistics looks messed up because the same translator has used </span><br><span>slightly different names, or different e-mail addresses, this is an excellent </span><br><span>time for cleaning up the PO file headers … This command should give you </span><br><span>a nice overview:</span><br><span></span><br><span>find folder-with-po-files -name '*.po' | xargs grep -h '^# .*&lt;.*@' | \</span><br><span>sed -r 's/([^,]+),.*/\1/' | sort | uniq -c | sort -nr</span><br><span></span><br><span>Feel free to suggest any improvements to the scripts.</span><br><span></span><br><span>-- </span><br><span>Karl Ove Hufthammer</span><br><span><a href="http://huftis.org/">http://huftis.org/</a></span><br><span>Jabber: <a href="mailto:karl@huftis.org"><a href="mailto:karl@huftis.org">karl@huftis.org</a></a></span><br></div></blockquote></body></html>