/
data.html
178 lines (157 loc) · 5.83 KB
/
data.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
{% extends "base.html" %}
{% load i18n %}
{% load translations %}
{% load icons %}
{% block breadcrumbs %}
<li><a href="{{ object.get_absolute_url }}">{{ object }}</a></li>
<li><a href="{% url 'data_project' project=object.slug %}">{% trans "Data exports" %}</a></li>
{% endblock %}
{% block content %}
<p>
{% trans "Various data from Weblate is available in machine-readable format." %}
</p>
<h3>
{% trans "RSS feeds" %}
{% documentation_icon 'api' 'rss' %}
</h3>
<p>
{% trans "Follow the translation progress and all important changes from RSS feeds." %}
</p>
<table class="table">
<thead>
<tr>
<th>{% trans "Project" %}</th>
<th>{% trans "URL" %}</th>
<th>{% trans "Link" %}</th>
</thead>
<tbody>
<tr>
<th>{{ object }}</th>
<td>{{ site_url }}{% url 'rss' path=object.get_url_path %}</td>
<td><a href="{{ site_url }}{% url 'rss' path=object.get_url_path %}">{% trans "RSS" %}</a></td>
</tr>
{% for component in components %}
<tr>
<th>{{ component }}</th>
<td>{{ site_url }}{% url 'rss' path=component.get_url_path %}</td>
<td><a href="{{ site_url }}{% url 'rss' path=component.get_url_path %}">{% trans "RSS" %}</a></td>
</tr>
{% endfor %}
</tbody>
</table>
<p>{% trans "Per language RSS feeds are also available. Construct them by appending a language code to the URLs above." %}</p>
<h3>
{% trans "Statistics" %}
{% documentation_icon 'api' %}
</h3>
<p>
{% blocktrans %}Translation statistics for every component in JSON format lets you use the data in other websites or tools.{% endblocktrans %}
</p>
<table class="table">
<thead>
<tr>
<th>{% trans "Project" %}</th>
<th>{% trans "URL" %}</th>
<th>{% trans "Link" %}</th>
</thead>
<tbody>
{% for component in components %}
<tr>
<th>{{ component }}</th>
<td>{{ site_url }}{% url 'api:component-statistics' project__slug=object.slug slug=component.slug %}</td>
<td><a href="{{ site_url }}{% url 'api:component-statistics' project__slug=object.slug slug=component.slug %}">{% trans "View" %}</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% with component=components.0 %}
{% if component %}
<p>{% trans "You can fetch statistics for all translations in one component like this:" %}</p>
<pre>
<button type="button" class="btn btn-link btn-xs pull-right" data-visibility=".auth-token" title="{% trans "Toggle API key visibility" %}">{% icon "eye.svg" %}</button>curl \
-H "Authorization: Token <span class="auth-token">{{ request.user.auth_token.key|default:"TOKEN" }}</span>" \
{{ site_url }}{% url 'api:component-translations' project__slug=object.slug slug=component.slug %}
</pre>
{% endif %}
{% endwith %}
{% if hooks_enabled and project.enable_hooks %}
<h3>
{% trans "Notification hooks" %}
{% documentation_icon 'api' 'hooks' %}
</h3>
<p>
{% blocktrans %}With notification hooks, Weblate automatically imports changes made by your developers, allowing continuous localization.{% endblocktrans %}
</p>
{% endif %}
<table class="table">
<thead>
<tr>
<th>{% trans "Project" %}</th>
<th>{% trans "URL" %}</th>
<th>{% trans "Link" %}</th>
</thead>
<tbody>
<tr>
<th>{{ object }}</th>
<td>{{ site_url }}{% url 'api:project-repository' slug=object.slug %}</td>
<td><a href="{{ site_url }}{% url 'api:project-repository' slug=object.slug %}">{% trans "Hook" %}</a></td>
</tr>
{% for component in components %}
<tr>
<th>{{ component }}</th>
<td>{{ site_url }}{% url 'api:component-repository' project__slug=object.slug slug=component.slug %}</td>
<td><a href="{{ site_url }}{% url 'api:component-repository' project__slug=object.slug slug=component.slug %}">{% trans "Hook" %}</a></td>
</tr>
{% endfor %}
</tbody>
</table>
<p>{% trans "You pull changes from a remote repository to Weblate like this:" %}</p>
<pre>
<button type="button" class="btn btn-link btn-xs pull-right" data-visibility=".auth-token" title="{% trans "Toggle API key visibility" %}">{% icon "eye.svg" %}</button>curl \
-d operation=pull \
-H "Authorization: Token <span class="auth-token">{{ request.user.auth_token.key|default:"TOKEN" }}</span>" \
{{ site_url }}{% url 'api:project-repository' slug=object.slug %}
</pre>
<p>{% blocktrans %}Weblate also supports direct notifications from several code hosting sites:{% endblocktrans %}</p>
<table class="table">
<thead>
<tr>
<th>{% trans "Hosting site" %}</th>
<th>{% trans "URL" %}</th>
<th>{% trans "Note" %}</th>
</tr>
</thead>
<tbody>
<tr>
<th><a href="https://github.com/">GitHub</a></th>
<td>{{ site_url }}{% url 'webhook' service='github' %}</td>
<td><a href="{% documentation "admin/continuous" "github-setup" %}">{% trans "The documentation has detailed instructions" %}</a></td>
</tr>
<tr>
<th><a href="https://about.gitlab.com/">GitLab</a></th>
<td>{{ site_url }}{% url 'webhook' service='gitlab' %}</td>
<td><a href="{% documentation "admin/continuous" "gitlab-setup" %}">{% trans "The documentation has detailed instructions" %}</a></td>
</tr>
<tr>
<th><a href="https://bitbucket.org/">Bitbucket</a></th>
<td>{{ site_url }}{% url 'webhook' service='bitbucket' %}</td>
<td><a href="{% documentation "admin/continuous" "bitbucket-setup" %}">{% trans "The documentation has detailed instructions" %}</a></td>
</tr>
<tr>
<th><a href="https://docs.pagure.org/pagure/">Pagure</a></th>
<td>{{ site_url }}{% url 'webhook' service='pagure' %}</td>
<td><a href="{% documentation "admin/continuous" "pagure-setup" %}">{% trans "The documentation has detailed instructions" %}</a></td>
</tr>
<tr>
<th><a href="https://azure.microsoft.com/services/devops/repos/">Azure Repos</a></th>
<td>{{ site_url }}{% url 'webhook' service='azure' %}</td>
<td><a href="{% documentation "admin/continuous" "azure-setup" %}">{% trans "The documentation has detailed instructions" %}</a></td>
</tr>
<tr>
<th><a href="https://gitea.io/">Gitea</a></th>
<td>{{ site_url }}{% url 'webhook' service='gitea' %}</td>
<td><a href="{% documentation "admin/continuous" "gitea-setup" %}">{% trans "The documentation has detailed instructions" %}</a></td>
</tr>
</tbody>
</table>
{% endblock %}