Issue Details (XML | Word | Printable)

Key: MDLSITE-565
Type: New Feature New Feature
Status: Open Open
Priority: Minor Minor
Assignee: David Mudrak
Reporter: David Mudrak
Votes: 0
Watchers: 5
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle.org Sites

Have a page with language translation statistics

Created: 21/Nov/08 11:43 PM   Updated: 24/Nov/08 06:02 PM
Return to search
Component/s: CVS repository, moodle.org

File Attachments: 1. Text File strings.txt (903 kB)
2. Text File summary.txt (6 kB)


URL: http://moodle.org/langstats
Participants: David Mudrak, Eloy Lafuente (stronk7), Koen Roggemans and Petr Skoda
Security Level: None


 Description  « Hide
At the moment, we do not publish the information about a language translation status (basically the number of untranslated strings). It has been requested several times - see e.g.
http://moodle.org/mod/forum/discuss.php?d=64025 or http://moodle.org/mod/forum/discuss.php?d=106441

I have written a first prototype of such analyser in February 2007 but it has not been finished. Nowadays I rewrote the tool from scratch and I plan to publish first results within a week or two. After a discussion with Petr Skoda, I propose following procedure:
* I will write a tool that generates static HTML files with the language status info
* I will let the script run every day at one of my servers (http://moodle.cz)
* I will commit the results into the CVS regularly (every day? every week?) - well, not me but the cron will do the job ;-)
* moodle.org administrators will checkout the results from CVS into http://moodle.org/langstats/ as often as they want. I will prepare the skin of the pages to fit moodle.org theme

Then we will have both moodle.org/stats and moodle.org/langstats available.

Please comment on feature requests, the proposed procedure etc.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
David Mudrak added a comment - 21/Nov/08 11:45 PM
Added some watchers of the issue to comment and approve

David Mudrak added a comment - 22/Nov/08 12:44 AM
An example of one of the outputs - the ratio of translated strings in the individual language pack files.

Petr Skoda added a comment - 22/Nov/08 02:20 AM
could we have totals for each lang pack and sort the results by translation %?

Koen Roggemans added a comment - 22/Nov/08 05:32 AM
Nice page.
It would be nice if it could be calculated against the last stable release, but by lack of an overview of which strings should be in there, that is not possible... Just a thought

David Mudrak added a comment - 22/Nov/08 08:36 AM
summary.txt - the overview of all language pack and their translated strings ratio. Ordered by the language code. I can't see any reason why sort by the ratio as proposed by Petr - translating is not a competition

Legend:
LANGUAGE: the code of the pack language(+its parent language)
OWN: number of string directly translated in this language pack
INH: the number of translated strings inherited from the parent language pack
FROM: the total number of English strings
RATIO - percentage ratio of available string (directly translated or inherited from the parent language)
TRANSLATED: the star symbol represents 10% of directly translated strings. The dot sign represents 10% of inherited strings


David Mudrak added a comment - 22/Nov/08 08:39 AM
LANGUAGE: the code of the pack language(+its parent language)
MODULE: the file name containing $string[] defintion
OWN: number of string directly translated in this module
INH: the number of translated strings inherited from the parent language pack in this module
FROM: the total number of English strings in this module
RATIO - percentage ratio of available strings (directly translated or inherited from the parent language)
TRANSLATED: the star symbol represents 10% of directly translated strings. The dot sign represents 10% of inherited strings

David Mudrak added a comment - 22/Nov/08 08:48 AM
The figures are calculated against the current stable release, i.e. against the English pack that comes with Moodle 1.9.x. This is how the script works:

1. get the list of all PHP files in the English language pack. Ignore langconfig.php and styles.php
2. iterate thru all language packs in the CVS lang
2.1. for every string in the English language pack check if it is translated in the current language pack
2.2. if it is not, check if the parent language is defined and if it provides the translation

A string is considered translated if it is found either in the language pack itself or in its parent pack. The English (en_utf8) is not considered as a parent pack (if it was, all packages would have 100% ratio). Therefore, en_us_utf8 has only 1% translated ratio, because it does not explicitly defines en_utf8 as its parent language.

I will publish the source code of the langstats soon.


Eloy Lafuente (stronk7) added a comment - 24/Nov/08 07:48 AM
Cool David!

Just guessing if we could put that script in download.moodle.org (where all the lang packs exist) and generate raw info (something like summary.txt but in csv, tabular or xml format). And then use that summary info where needed (lang page of download.moodle.org, new stats page in moodle.org... and so on).

I think we could process that weekly easily, leaving your own server free of those tasks, David.

Nice stuff! Thanks!

Ciao


David Mudrak added a comment - 24/Nov/08 05:33 PM
Thanks for comments Eloy

download server is a great location of the script. But during the development and testing phase, I need to generate statistics at my own server in order to have quick access to the script itself. So if there is a bug/improvement I can fix/implement it quickly. So either I can be given access to the download.moodle.org or I shall run the script at my own server and when we are happy with the results format and layout, the script can be moved to the download.moodle.org

I have committed the current version of the script into contrib - see http://cvs.moodle.org/contrib/tools/langtools/
I plan to use this CVS directory as a collection of several language manipulation and maintaining tools. Also these are first applications of Language manipulation API proposed recently.


Koen Roggemans added a comment - 24/Nov/08 06:02 PM
This is a great page. Hopefully it will encourage more people to contribute to the neglected language packs now it is so clear in what state they are.

It is a good plan to keep all langtools on one spot. I suggest to add the language pack checker script that Petr wrote (currently in MDL-14152) too - I promote it regularly to translators with errors to use it