Skip to content

Commit c6912b4

Browse files
authored
Mark more strings as translatable (#270)
1 parent 7983887 commit c6912b4

6 files changed

Lines changed: 14 additions & 14 deletions

File tree

events/forms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ class Meta:
215215
def __init__(self, *args, **kwargs):
216216
super().__init__(*args, **kwargs)
217217
self.fields["city"].required = True
218-
self.fields["access"].choices = [(0, "Public"), (2, "Private")]
218+
self.fields["access"].choices = [(0, _("Public")), (2, _("Private"))]
219219

220220

221221
class NewTeamForm(forms.ModelForm):
@@ -228,7 +228,7 @@ class Meta:
228228
def __init__(self, *args, **kwargs):
229229
super().__init__(*args, **kwargs)
230230
self.fields["city"].required = True
231-
self.fields["access"].choices = [(0, "Public"), (2, "Private")]
231+
self.fields["access"].choices = [(0, _("Public")), (2, _("Private"))]
232232

233233

234234
class TeamDefinitionForm(forms.ModelForm):

get_together/templates/get_together/events/edit_event.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h2>{% blocktrans with event_name=event.name %}Updating {{event_name}}{% endbloc
1414
{% include "events/event_form.html" %}
1515
<br />
1616
<a href="{{ event.get_absolute_url }}" class="btn btn-secondary"><i class="fa fa-chevron-left"></i> {% trans "Back" %}</a>
17-
<button type="submit" class="btn btn-primary">Update</button>
17+
<button type="submit" class="btn btn-primary">{% trans "Update" %}</button>
1818
</form>
1919
{% if event.status == event.CANCELED %}
2020
<a href="{% url 'restore-event' event.id %}" class="btn btn-success">{% trans "Restore" %}</a>

get_together/templates/get_together/events/manage_attendees.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ <h2>{% blocktrans with event_url=event.get_absolute_url event_name=event.name co
8484

8585
<div class="col-sm-3">
8686
<div class="container">
87-
<h4>Contact</h4><hr/>
87+
<h4>{% trans "Contact" %}</h4><hr/>
8888
<div class="row">
8989
<div class="col">
9090
<form action="{% url 'manage-attendees' event.id %}" method="POST">
9191
{% csrf_token %}
9292
{{ contact_form.as_p }}
93-
<button type="submit" class="btn btn-primary btn-sm">Send</button>
93+
<button type="submit" class="btn btn-primary btn-sm">{% trans "Send" %}</button>
9494
</form>
9595
</div>
9696
</div>
@@ -132,4 +132,4 @@ <h4>Contact</h4><hr/>
132132
$("#attendee-actual-form-"+attendee_id).show()
133133
}
134134
</script>
135-
{% endblock %}
135+
{% endblock %}

get_together/templates/get_together/users/login.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h3>{% trans "Login to your account" %}</h3>
1717
{% if settings.SOCIAL_AUTH_TWITTER_KEY %}<a class="btn btn-twitter mb-1 col-8" href="{% url 'social:begin' 'twitter' %}?{{ request.META.QUERY_STRING }}"><i class="fab fa-twitter"></i> Twitter</a></br>{% endif %}
1818
{% comment %}{% if settings.SOCIAL_AUTH_LINKEDIN_KEY %}<a class="btn btn-linkedin mb-1 col-8" href="{% url 'social:begin' 'linkedin' %}?{{ request.META.QUERY_STRING }}"><i class="fab fa-linkedin"></i> LinkedIn</a></br>{% endif %}{% endcomment %}
1919
{% if settings.SOCIAL_AUTH_GITHUB_KEY %}<a class="btn btn-github mb-1 col-8" href="{% url 'social:begin' 'github' %}?{{ request.META.QUERY_STRING }}"><i class="fab fa-github"></i> GitHub</a></br>{% endif %}
20-
<p class="text-muted small mt-2">OR</p>
20+
<p class="text-muted small mt-2">{% trans "OR" %}</p>
2121
<div>
2222
<ul class="nav nav-tabs justify-content-center mb-2" id="localTab" role="tablist">
2323
<li class="nav-item">
@@ -37,7 +37,7 @@ <h3>{% trans "Login to your account" %}</h3>
3737
<button class="btn btn-primary" type="submit" name="action" value="login">{% trans "Login" %}</button>
3838
</form>
3939
<br /><br />
40-
<a href="{% url 'password_reset' %}">Forgot my password</a>
40+
<a href="{% url 'password_reset' %}">{% trans "Forgot my password" %}</a>
4141
</div>
4242
<div class="tab-pane fade {% if action == 'signup' %}show active{% endif %}" id="signup" role="tabpanel" aria-labelledby="signup-tab">
4343
<form action="#" method="POST">

get_together/views/events.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,13 +316,13 @@ def manage_attendees(request, event_id):
316316
if attendee.user.user.account.is_email_confirmed
317317
]
318318
default_choices = [
319-
("all", "Everyone (%s)" % len(attendee_choices)),
320-
("hosts", "Only Hosts"),
319+
("all", _("Everyone (%s)" % len(attendee_choices))),
320+
("hosts", _("Only Hosts")),
321321
]
322322
if event.is_over:
323-
default_choices.append(("attended", "Only Attended"))
323+
default_choices.append(("attended", _("Only Attended")))
324324
else:
325-
default_choices.append(("attending", "Only Attending"))
325+
default_choices.append(("attending", _("Only Attending")))
326326

327327
if request.method == "POST":
328328
contact_form = EventContactForm(request.POST)

get_together/views/teams.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ def manage_members(request, team_id):
262262
if member.user.user.account.is_email_confirmed
263263
]
264264
default_choices = [
265-
("all", "All Members (%s)" % len(member_choices)),
266-
("admins", "Only Administrators"),
265+
("all", _("All Members (%s)" % len(member_choices))),
266+
("admins", _("Only Administrators")),
267267
]
268268
if request.method == "POST":
269269
contact_form = TeamContactForm(request.POST)

0 commit comments

Comments
 (0)