Skip to content

Commit

Permalink
Translated buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersSeverinsen committed Jun 30, 2024
1 parent 37de397 commit 5fa3c87
Show file tree
Hide file tree
Showing 8 changed files with 117 additions and 71 deletions.
3 changes: 2 additions & 1 deletion bartenders/templates/ballots_update.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ <h2>Tilføj poll</h2>
{% csrf_token %}
{% bootstrap_form form %}
{% buttons %}
{% bootstrap_button "Gem" button_type="submit" icon="floppy-disk" button_class="btn-primary" %}
{% translate "Gem" as BUTTON_TEXT %}
{% bootstrap_button BUTTON_TEXT button_type="submit" icon="floppy-disk" button_class="btn-primary" %}
{% endbuttons %}
</form>

Expand Down
6 changes: 4 additions & 2 deletions bartenders/templates/bartender_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
<form method="post" id="info_form">
{% csrf_token %}
{% buttons %}
{% bootstrap_button "Gem" button_type="submit" icon="floppy-disk" button_class="btn-primary" %}
{% translate "Gem" as BUTTON_TEXT %}
{% bootstrap_button BUTTON_TEXT button_type="submit" icon="floppy-disk" button_class="btn-primary" %}
{% endbuttons %}
<p><b>{% translate "Bartender status" %}:</b>
{% if object.isActiveBartender %}
Expand Down Expand Up @@ -80,7 +81,8 @@
</tbody>
</table>
{% buttons %}
{% bootstrap_button "Gem" button_type="submit" icon="floppy-disk" button_class="btn-primary" %}
{% translate "Log ind" as BUTTON_TEXT %}
{% bootstrap_button BUTTON_TEXT button_type="submit" icon="floppy-disk" button_class="btn-primary" %}
{% endbuttons %}
</form>
{% else %}
Expand Down
7 changes: 4 additions & 3 deletions events/forms.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from django import forms
from django.utils.translation import ugettext_lazy as _

from .models import EventChoiceOption, EventResponse

Expand All @@ -17,8 +18,8 @@ def create_option(self, *args, **kwargs):
class EventResponseForm(forms.Form):
ATTENDING_CHOICES = (
(None, "---------"),
(True, "Deltager"),
(False, "Deltager ikke"),
(True, _("Deltager")),
(False, _("Deltager ikke")),
)

def _to_bool(self, s):
Expand Down Expand Up @@ -55,7 +56,7 @@ def __init__(self, *args, event, bartender, **kwargs):
attending_choices = self.ATTENDING_CHOICES[1:]

self.fields["attending"] = forms.TypedChoiceField(
label="Deltager", choices=attending_choices, coerce=self._to_bool
label=_("Deltager"), choices=attending_choices, coerce=self._to_bool
)
if event_response:
self.fields["attending"].initial = event_response.attending
Expand Down
3 changes: 2 additions & 1 deletion events/templates/events.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ <h4>{% translate "Tilmelding" %}</h4>
<input type="hidden" name="event_id" value="{{ event.id }}">
{% bootstrap_form events_data.form %}
{% buttons %}
{% bootstrap_button "Gem" button_type="submit" icon="floppy-disk" button_class="btn-primary" %}
{% translate "Gem" as BUTTON_TEXT %}
{% bootstrap_button BUTTON_TEXT button_type="submit" icon="floppy-disk" button_class="btn-primary" %}
{% endbuttons %}
</fieldset>
</form>
Expand Down
49 changes: 33 additions & 16 deletions locale/da/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-06-29 23:42+0200\n"
"POT-Creation-Date: 2024-06-30 21:55+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -90,6 +90,11 @@ msgstr ""
msgid "Eventuelle ekstra info til bestyrelsen skrives her"
msgstr ""

#: bartenders/templates/ballots_update.html:18
#: bartenders/templates/bartender_info.html:36 events/templates/events.html:49
msgid "Gem"
msgstr ""

#: bartenders/templates/barplan.html:8 web/templates/base.html:60
msgid "Barplan"
msgstr ""
Expand Down Expand Up @@ -125,56 +130,60 @@ msgstr ""
msgid "Ansvarlige"
msgstr ""

#: bartenders/templates/bartender_info.html:38
#: bartenders/templates/bartender_info.html:39
msgid "Bartender status"
msgstr ""

#: bartenders/templates/bartender_info.html:40
#: bartenders/templates/bartender_info.html:41
msgid "Aktiv"
msgstr ""

#: bartenders/templates/bartender_info.html:41
#: bartenders/templates/bartender_info.html:42
msgid "Bliv inaktiv"
msgstr ""

#: bartenders/templates/bartender_info.html:43
#: bartenders/templates/bartender_info.html:44
msgid "Inaktiv"
msgstr ""

#: bartenders/templates/bartender_info.html:44
#: bartenders/templates/bartender_info.html:45
msgid "Hvis du gerne vil være aktive igen, så kontakt"
msgstr ""

#: bartenders/templates/bartender_info.html:48
#: bartenders/templates/bartender_info.html:49
msgid ""
"Husk at du som inaktiv bartender ikke kan komme til bartenderarrangementerne."
msgstr ""

#: bartenders/templates/bartender_info.html:51
#: bartenders/templates/bartender_info.html:52
msgid "Mailinglist status"
msgstr ""

#: bartenders/templates/bartender_info.html:53
#: bartenders/templates/bartender_info.html:54
msgid "På mailinglisten"
msgstr ""

#: bartenders/templates/bartender_info.html:55
#: bartenders/templates/bartender_info.html:56
msgid "Meld dig af mailinglisten"
msgstr ""

#: bartenders/templates/bartender_info.html:58
#: bartenders/templates/bartender_info.html:59
msgid "Ikke på mailinglisten"
msgstr ""

#: bartenders/templates/bartender_info.html:59
#: bartenders/templates/bartender_info.html:60
msgid "Meld dig på mailinglisten"
msgstr ""

#: bartenders/templates/bartender_info.html:65
#: bartenders/templates/bartender_info.html:66
msgid "Datoer, hvor du ikke har mulighed for at stå i bar"
msgstr ""

#: bartenders/templates/bartender_info.html:87
#: bartenders/templates/bartender_info.html:84 web/templates/login.html:12
msgid "Log ind"
msgstr ""

#: bartenders/templates/bartender_info.html:89
msgid "er ikke bartender."
msgstr ""

Expand Down Expand Up @@ -257,6 +266,14 @@ msgstr ""
msgid "Bartendertilmeldingen er lukket."
msgstr ""

#: events/forms.py:21 events/forms.py:59
msgid "Deltager"
msgstr ""

#: events/forms.py:22
msgid "Deltager ikke"
msgstr ""

#: events/templates/events.html:8
msgid "Bartender events"
msgstr ""
Expand Down Expand Up @@ -322,11 +339,11 @@ msgstr ""
msgid "Tilmelding"
msgstr ""

#: events/templates/events.html:59
#: events/templates/events.html:60
msgid "Tilmeldte"
msgstr ""

#: events/templates/events.html:68
#: events/templates/events.html:69
msgid "Navn"
msgstr ""

Expand Down
Binary file modified locale/en/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit 5fa3c87

Please sign in to comment.