Contents
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
https://gitlab.gnome.org/Infrastructure/damned-lies
Production
Damned Lies is running at https://l10n.gnome.org
Maintainers
Claude Paroz
Stéphane Raimbault
Vertimus Workflow
See https://l10n.gnome.org/help/vertimus_workflow/
XML interfaces
The XML interface is deprecated and replaced with the REST API on https://l10n.gnome.org/api/v1/ (currently still beta as of January 11th, 2019).
List of teams
https://l10n.gnome.org/teams/xml https://l10n.gnome.org/teams/json
REST API:
https://l10n.gnome.org/api/v1/teams/
List of modules
https://l10n.gnome.org/module/xml https://l10n.gnome.org/module/json
REST API (archived modules are filtered out in this list):
https://l10n.gnome.org/api/v1/modules/
List of releases
https://l10n.gnome.org/releases/xml https://l10n.gnome.org/releases/json
REST API:
https://l10n.gnome.org/api/v1/releases/
Release details
https://l10n.gnome.org/releases/<release_name>/xml
REST API:
https://l10n.gnome.org/api/v1/releases/<release_name>
Release stats for a locale
Contains both ui and documentation stats (see domain)
https://l10n.gnome.org/languages/<locale>/<release_name>/xml
REST API:
https://l10n.gnome.org/api/v1/releases/<release_name>/stats https://l10n.gnome.org/api/v1/releases/<release_name>/languages/<locale> https://l10n.gnome.org/api/v1/modules/<module_name>/branches/<branch_name>/domains/<domain_name>/languages/<locale>
Services using these APIs
In cases of API changes, it might be good to know services depending on these URIs.
Stats Generator http://fsa-bg.org/project/gtp/browser/scripts/xml-stats Alexander Shopov <ash@kambanaria.org>
L10n tools https://github.com/frandieguez/gnome-l10n-tools Fran Dieguez <frandieguez@gnome.org>
Transtats, https://github.com/transtats/transtats
<put your project/name here>
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:
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.
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).