Skip to content

Commit 944a292

Browse files
committed
Merge branch 'count-translation' of https://github.com/ewjoachim/readthedocs.org into ewjoachim-count-translation
2 parents 9fa1223 + 0c2e06f commit 944a292

18 files changed

+57
-50
lines changed

readthedocs/donate/models.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from django.db import models
99
from django.utils.crypto import get_random_string
1010
from django.utils.encoding import python_2_unicode_compatible
11-
from django.utils.translation import ugettext_lazy as _
11+
from django.utils.translation import ugettext_lazy as _, pgettext
1212
from django.core.urlresolvers import reverse
1313
from django.conf import settings
1414
from django_countries.fields import CountryField
@@ -179,9 +179,13 @@ def report_html_text(self):
179179

180180

181181
class BaseImpression(models.Model):
182+
183+
"""Statistics for tracking."""
184+
182185
date = models.DateField(_('Date'))
183186
offers = models.IntegerField(_('Offer'), default=0)
184-
views = models.IntegerField(_('View'), default=0)
187+
views = models.IntegerField(
188+
pgettext('View', 'Number of display on a screen that were sold'), default=0)
185189
clicks = models.IntegerField(_('Clicks'), default=0)
186190

187191
class Meta(object):

readthedocs/gold/templates/gold/projects.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@
2626

2727
<h3> {% trans "Existing Projects" %} </h3>
2828
<p>
29-
You can adopt {{ gold_user.num_supported_projects }} projects with your subscription.
29+
{% blocktrans count projects=gold_user.num_supported_projects %}
30+
You can adopt one project with your subscription.
31+
{% plural %}
32+
You can adopt {{ projects }} projects with your subscription.
33+
{% endblocktrans %}
3034
</p>
3135

3236
<ul>

readthedocs/gold/templates/gold/subscription_detail.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ <h2>{% trans "Gold Subscription" %}</h2>
5656

5757
<h3>{% trans "Projects" %}</h3>
5858
<p class="subscription-projects">
59-
{% blocktrans with projects=golduser.num_supported_projects %}
59+
{% blocktrans count projects=golduser.num_supported_projects %}
60+
You can adopt one project with your subscription.
61+
{% plural %}
6062
You can adopt {{ projects }} projects with your subscription.
6163
{% endblocktrans %}
6264
</p>

readthedocs/redirects/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ class Meta(object):
7979

8080
def __str__(self):
8181
if self.redirect_type == 'prefix':
82-
return ugettext('Prefix Redirect: %s ->' % self.from_url)
82+
return ugettext('Prefix Redirect:') + ' %s ->' % self.from_url
8383
elif self.redirect_type == 'page':
84-
return ugettext('Page Redirect: %s -> %s' % (
84+
return ugettext('Page Redirect:') + ' %s -> %s' % (
8585
self.from_url,
86-
self.to_url))
86+
self.to_url)
8787
return ugettext('Redirect: %s' % self.get_redirect_type_display())
8888

8989
def get_full_path(self, filename, language=None, version_slug=None):

readthedocs/templates/account/email/email_confirmation_message.html

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,16 @@
33
{% load i18n %}
44

55
{% block content %}
6-
{% blocktrans %}
76
<p>
8-
To complete setting up your account, please verify this email address by
9-
going to:
7+
{% trans "To verify your email address and finish setting up your account, please go to:" %}
108
</p>
119

1210
<p>
1311
<a href="{{ activate_url }}">{{ activate_url }}</a>
1412
</p>
1513

1614
<p>
17-
If you did not sign up for an account with Read the Docs, you can
18-
disregard this email.
15+
{% trans "If you did not sign up for an account with Read the Docs, you can disregard this email." %}
1916
</p>
20-
{% endblocktrans %}
2117
{% endblock %}
18+

readthedocs/templates/account/email/email_confirmation_message.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22

33
{% load i18n %}
44

5-
{% block content %}{% blocktrans %}
6-
To verify your email address and finish setting up your account, please
7-
go to:
5+
{% block content %}
6+
{% trans "To verify your email address and finish setting up your account, please go to:" %}
87

98
{{ activate_url }}
109

11-
If you did not sign up for an account with Read the Docs, you can
12-
disregard this email.
13-
{% endblocktrans %}{% endblock %}
10+
{% trans "If you did not sign up for an account with Read the Docs, you can disregard this email." %}
11+
{% endblock %}

readthedocs/templates/account/email/password_reset_key_message.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@
33
{% load i18n %}
44

55
{% block content %}
6-
{% blocktrans %}
76
<p>
8-
A request has been made to reset your Read the Docs password. To confirm
9-
this reset request, please go to:
7+
{% trans "A request has been made to reset your Read the Docs password. To confirm
8+
this reset request, please go to:" %}
109
</p>
1110

1211
<p>
1312
<a href="{{ password_reset_url }}">{{ password_reset_url }}</a>
1413
</p>
1514

1615
<p>
17-
If you did not request to reset you password, you can disregard this email.
16+
{% trans "If you did not request to reset you password, you can disregard this email." %}
1817
</p>
19-
{% endblocktrans %}
2018
{% endblock %}

readthedocs/templates/account/email/password_reset_key_message.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
{% load i18n %}
44

5-
{% block content %}{% blocktrans %}
6-
A request has been made to reset your Read the Docs password. To confirm
7-
this reset request, please go to:
5+
{% block content %}
6+
{% trans "A request has been made to reset your Read the Docs password. To confirm
7+
this reset request, please go to:" %}
88

99
{{ password_reset_url }}
1010

11-
If you did not request to reset you password, you can disregard this email.
12-
{% endblocktrans %}{% endblock %}
11+
{% trans "If you did not request to reset you password, you can disregard this email." %}
12+
{% endblock %}

readthedocs/templates/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<link rel="icon" type="image/png" href="{{ MEDIA_URL }}images/favicon.png">
1212

1313
<!-- title -->
14-
<title>{% block title %}{% endblock %}{% block head_title %}{% endblock %} | {% block branding %}{% trans "Read the Docs" %} {% endblock %}</title>
14+
<title>{% block title %}{% endblock %}{% block head_title %}{% endblock %} | {% block branding %}Read the Docs {% endblock %}</title>
1515

1616
<!-- css -->
1717
<link rel="stylesheet" href="{{ MEDIA_URL }}css/core.css">

readthedocs/templates/core/email/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
7-
<title>{% trans "Read the Docs" %}</title>
7+
<title>Read the Docs</title>
88

99
<style type="text/css">
1010
/* Styles */

readthedocs/templates/core/header.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<div class="rtfd-header-title">
1010
<h1>
1111
{% comment %}Translators: Name of the website{% endcomment %}
12-
<a href="{% url "homepage" %}">{% trans "Read the Docs" %}</a>
12+
<a href="{% url "homepage" %}">Read the Docs</a>
1313
</h1>
1414
</div>
1515
<!-- END header title -->
@@ -42,7 +42,7 @@ <h1>
4242
</div>
4343
{% endif %}
4444
<!-- END header nav -->
45-
45+
4646

4747
</div>
4848
</div>

readthedocs/templates/core/home-header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<!-- BEGIN header title-->
88
<div class="home-header-title">
9-
<h1>{% trans "Read the Docs" %}</h1>
9+
<h1>Read the Docs</h1>
1010
<p class="tagline">{% trans "Create, host, and browse documentation." %}</p>
1111
</div>
1212
<!-- END header title -->

readthedocs/templates/core/project_bar_base.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,21 @@ <h1>
3232
{% blocktrans %}
3333
This repository doesn't have a valid webhook set up,
3434
commits won't trigger new builds for this project.
35+
{% endblocktrans %}
3536
<br>
37+
{% blocktrans %}
3638
See <a href='{{ integrations_url }}'>your project integrations</a> for more information.
3739
{% endblocktrans %}
3840
</p>
3941
{% endif %}
4042

4143
{% if project.skip %}
4244
<p class="build-failure">
43-
{% blocktrans %}
45+
{% blocktrans %}
4446
Your project is currently disabled for abuse of the system.
4547
Please make sure it isn't using unreasonable amounts of resources or triggering lots of builds in a short amount of time.
4648
Please <a href="https://github.com/rtfd/readthedocs.org/issues">file a ticket</a> to get your project re-enabled.
47-
{% endblocktrans %}
49+
{% endblocktrans %}
4850
</p>
4951
<br>
5052
{% endif %}

readthedocs/templates/core/project_details.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ <h3>{% trans "Versions" %}</h3>
3535
</a>
3636
{% else %}
3737
<a class="module-item-title" href="{{ version.project.get_builds_url }}">
38-
{% blocktrans with version.slug as slug %} {{ slug }}{% endblocktrans %}
38+
{{ slug }}
3939
</a>
4040
{% endif %}
4141
{% if request.user|is_admin:project %}

readthedocs/templates/error_header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<h1>
1010
{% comment %}Translators: Name of the website{% endcomment %}
1111
<a href="//{{ PRODUCTION_DOMAIN }}">
12-
{% trans "Read the Docs" %}
12+
Read the Docs
1313
</a>
1414
</h1>
1515
</div>

readthedocs/templates/notifications/send_notification_form.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ <h3>{% trans 'Send Email' %}</h3>
1818
{% with extra_recipients=recipients|slice:"20:" %}
1919
{% if extra_recipients|length > 0 %}
2020
<li>
21-
{% blocktrans with count=extra_recipients|length %}
22-
And {{ count }} other recipients...
21+
{% blocktrans count counter=extra_recipients|length %}
22+
And 1 other recipient.
23+
{% plural %}
24+
And {{ counter }} other recipients...
2325
{% endblocktrans %}
2426
</li>
2527
{% endif %}

readthedocs/templates/projects/project_dashboard_base.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ <h3>{% trans "Projects" %}</h3>
7474
{% else %}
7575
<span class="right quiet">
7676
<span class="build-count">
77-
{% if builds == 1 %}
78-
{% trans "1 build" %}
79-
{% else %}
80-
{{ builds }} {% trans "builds" %}
81-
{% endif %}
77+
{% blocktrans count counter=builds %}
78+
1 build
79+
{% plural %}
80+
{{ builds }} builds
81+
{% endblocktrans %}
8282
</span>
8383
{% with build=project.get_latest_build %}
8484
{% if build.success %}

readthedocs/templates/projects/project_import.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ <h1>{% trans "Import a Repository" %}</h1>
7979
class="remote-repos-empty">
8080
<li class="module-item">
8181
{% if has_connected_accounts %}
82-
{% blocktrans with binding='data-bind="click: sync_projects"' trimmed %}
83-
<p>
82+
<p>
83+
{% blocktrans with binding='data-bind="click: sync_projects"' trimmed %}
8484
No remote repositories found,
8585
try <a href="#" {{ binding }}>refreshing your accounts</a>.
86-
</p>
87-
{% endblocktrans %}
86+
{% endblocktrans %}
87+
</p>
8888
{% else %}
8989
<p>
9090
{% blocktrans trimmed %}
@@ -163,7 +163,7 @@ <h1>{% trans "Import a Repository" %}</h1>
163163
data-bind="attr: {href: url}"
164164
class="remote-repo-view"
165165
title="{% trans "This repository has already been imported" %}">
166-
<span>{% trans "View" %}</span>
166+
<span>{% blocktrans context "verb, action to see in detail" %}"View"{% endblocktrans %}</span>
167167
</a>
168168
</li>
169169
<li data-bind="visible: !match() && !is_locked()" style="display: none;">

0 commit comments

Comments
 (0)