Commit c68fcaf4 authored by Michal Čihař's avatar Michal Čihař

Prefer engage URL in API

parent 9d3e02f2
......@@ -62,7 +62,8 @@ Weblate provides various exports to allow you further process the data.
"total": 436,
"translated": 436,
"translated_percent": 100.0,
"url": "http://l10n.cihar.com/projects/weblate/master/cs/"
"url": "http://l10n.cihar.com/engage/weblate/cs/"
"url_translate": "http://l10n.cihar.com/projects/weblate/master/cs/"
},
{
"code": "nl",
......@@ -76,7 +77,8 @@ Weblate provides various exports to allow you further process the data.
"total": 436,
"translated": 319,
"translated_percent": 73.2,
"url": "http://l10n.cihar.com/projects/weblate/master/nl/"
"url": "http://l10n.cihar.com/engage/weblate/nl/"
"url_translate": "http://l10n.cihar.com/projects/weblate/master/nl/"
},
{
"code": "el",
......@@ -90,7 +92,8 @@ Weblate provides various exports to allow you further process the data.
"total": 436,
"translated": 312,
"translated_percent": 71.6,
"url": "http://l10n.cihar.com/projects/weblate/master/el/"
"url": "http://l10n.cihar.com/engage/weblate/el/"
"url_translate": "http://l10n.cihar.com/projects/weblate/master/el/"
},
]
......@@ -113,7 +116,9 @@ Weblate provides various exports to allow you further process the data.
``translated``, ``translated_percet``
number and percentage of translated strings
``url``
URL to access the translation
URL to access the translation (engagement URL)
``url_translate``
URL to access the translation (real translation URL)
.. _rss:
......
......@@ -112,7 +112,8 @@ def export_stats(request, project, subproject):
'fuzzy_percent': trans.get_fuzzy_percent(),
'failing': trans.get_failing_checks(),
'failing_percent': trans.get_failing_checks_percent(),
'url': 'http://%s%s' % (site.domain, trans.get_absolute_url()),
'url': trans.get_share_url(),
'url_translate': 'http://%s%s' % (site.domain, trans.get_absolute_url()),
})
return HttpResponse(
json.dumps(response, default = dt_handler),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment