Damned Lies

Overview

The Damned Lies web application provides translation statistics about the GNOME project and many more:

  • based on the Django web Framework
  • provides many statistics (updated to each commit)
  • offers a review workflow with different roles (translator, reviewer, committer and administrator)
  • handles many VCS/DVCS (cvs, svn, git, mercurial, bzr)
  • organized around teams and languages
  • sends mails to the different team mailing lists
  • provides RSS feeds of actions (Vertimus) for each language and team
  • OpenID and local authentication
  • detects string freeze breaks

Source code

http://git.gnome.org/browse/damned-lies/

Production

Damned Lies is running at http://l10n.gnome.org

Maintainers

Claude Paroz

St├ęphane Raimbault

Vertimus Workflow

See http://l10n.gnome.org/help/vertimus_workflow/

XML interfaces

List of teams

http://l10n.gnome.org/teams/xml
http://l10n.gnome.org/teams/json

List of modules

http://l10n.gnome.org/module/xml
http://l10n.gnome.org/module/json

List of releases

http://l10n.gnome.org/releases/xml
http://l10n.gnome.org/releases/json

Release details

http://l10n.gnome.org/releases/<release_name>/xml

Release stats for a locale

Contains both ui and documentation stats (see domain)

http://l10n.gnome.org/languages/<locale>/<release_name>/xml

Services using these APIs

In cases of API changes, it might be good to know services depending on these URIs.

Localization

Traditional GNOME applications generally store translations in a per-domain directory, with files named after the pattern <lang>.po. French is po/fr.po, German po/de.po, etc.

On the contrary, Django applications store translations in per-language directories: locale/<lang>/LC_MESSAGES/django.po

The approach taken by Damned Lies is to favour the familiar workflow of GNOME translators and create the /po directory. This also has the advantage of not requiring special development in Damned Lies. Here are the needed steps to reconcile this scheme with the Django app requirements:

  1. To update the translations with latest strings, a management command (update-trans) has to be run, which does the following:

    • Copy po/<lang>.po in locale/<lang>/LC_MESSAGES/django.po

    • Create a specific file containing database-based strings which need to be translated (so as all translations are done through po files)
    • Run the Django traditional makemessages command to update (extract and merge) po file
    • Copy back locale/<lang>/LC_MESSAGES/django.po to po/<lang>.po

Note that the procedure is instance-specific due to database strings extraction.

  1. To install the translations, another management command (compile-trans) has to be run:

    • Copy all po/<lang>.po files to locale/<lang>/LC_MESSAGES/django.po

    • Run the compilemessages Django command to create mo files

The Django app needs to be restarted after new mo files have been installed.

There is currently no django-js domain for Damned Lies, but we could imagine a similar procedure (with a new domain, po files being stored in po-js/<lang>.po). The main downside of this strategy (for other apps than DL itself) is that it requires a running local instance of the app (due to management commands) to create the updated pot file. We could however imagine that Damned Lies calls a remote URL that produces an updated pot file, which would mean transforming the update-trans management command in a Django view (remotely callable by URL).


CategoryGnomeI18n

DamnedLies (last edited 2013-12-06 20:36:39 by AlexandreFranke)