Skip to content

Commit

Permalink
Merge pull request #762 from hackerspace-ntnu/fix/event-locale
Browse files Browse the repository at this point in the history
fix(translations): Edit the translation files to not send error
  • Loading branch information
moltubaer authored Aug 29, 2023
2 parents 95de524 + baf575b commit 641579d
Show file tree
Hide file tree
Showing 21 changed files with 50 additions and 27 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,20 @@ python manage.py migrate
```

Follow the above step about fixtures if you want your test data back


## Translations

We have locality for Norwegian and English
To generate new translations in `.po` files run
```
python manage.py makemessages -l nb -l en
```

Add the correct translations in the `msgstr` quotes.
If a translation is not given and the `msgstr` quote is empty, the msgid will be used

To compile the translations and make the translations available run
```
python manage.py compilemessages
```
2 changes: 1 addition & 1 deletion applications/locale/en/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: 2023-08-28 15:20+0200\n"
"POT-Creation-Date: 2023-08-29 19:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion applications/locale/nb/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: 2023-08-28 15:20+0200\n"
"POT-Creation-Date: 2023-08-29 19:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion files/locale/en/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: 2023-08-28 15:20+0200\n"
"POT-Creation-Date: 2023-08-29 19:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion files/locale/nb/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: 2023-08-28 15:20+0200\n"
"POT-Creation-Date: 2023-08-29 19:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion inventory/locale/en/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: 2023-08-28 15:20+0200\n"
"POT-Creation-Date: 2023-08-29 19:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion inventory/locale/nb/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: 2023-08-28 15:20+0200\n"
"POT-Creation-Date: 2023-08-29 19:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
6 changes: 5 additions & 1 deletion news/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-08-28 15:20+0200\n"
"POT-Creation-Date: 2023-08-29 19:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -300,6 +300,10 @@ msgstr "Attendees"
msgid "på venteliste"
msgstr "on waiting list"

#: news/templates/news/event.html:116
msgid "Logg inn for å melde deg på"
msgstr "Log in to sign up"

#: news/templates/news/event.html:119 news/templates/news/event.html:121
#: news/templates/news/event.html:124 news/templates/news/event.html:214
msgid "Meld deg på"
Expand Down
6 changes: 5 additions & 1 deletion news/locale/nb/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: 2023-08-28 15:20+0200\n"
"POT-Creation-Date: 2023-08-29 19:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -302,6 +302,10 @@ msgstr ""
msgid "på venteliste"
msgstr ""

#: news/templates/news/event.html:116
msgid "Logg inn for å melde deg på"
msgstr ""

#: news/templates/news/event.html:119 news/templates/news/event.html:121
#: news/templates/news/event.html:124 news/templates/news/event.html:214
msgid "Meld deg på"
Expand Down
2 changes: 1 addition & 1 deletion news/templates/news/event.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ <h5>{% trans 'Påmelding' %}</h5>
<div class="col s12">
{% if event.registration %}
{% if userstatus == "ikke pålogget" %}
<a class="hs-yellow btn btn-flat" href="{% url 'social:begin' 'dataporten_feide' %}?next={{ request.path }}">{{% trans 'Logg inn for å melde deg på' %}}</a>
<a class="hs-yellow btn btn-flat" href="{% url 'social:begin' 'dataporten_feide' %}?next={{ request.path }}">{% trans 'Logg inn for å melde deg på' %}</a>
{% elif userstatus == "ikke påmeldt" %}
{% if event.can_register == "ok" %}
<a class="btn btn-flat white-text waves-effect waves-light hs-green modal-trigger" href="#registrationModal">{% trans 'Meld deg på' %}</a>
Expand Down
2 changes: 1 addition & 1 deletion projectarchive/locale/en/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: 2023-08-28 15:20+0200\n"
"POT-Creation-Date: 2023-08-29 19:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion projectarchive/locale/nb/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: 2023-08-28 15:20+0200\n"
"POT-Creation-Date: 2023-08-29 19:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion reservations/locale/en/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: 2023-08-28 15:20+0200\n"
"POT-Creation-Date: 2023-08-29 19:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion reservations/locale/nb/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: 2023-08-28 15:20+0200\n"
"POT-Creation-Date: 2023-08-29 19:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion userprofile/locale/en/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: 2023-08-28 15:20+0200\n"
"POT-Creation-Date: 2023-08-29 19:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion userprofile/locale/nb/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: 2023-08-28 15:20+0200\n"
"POT-Creation-Date: 2023-08-29 19:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
6 changes: 3 additions & 3 deletions watchlist/locale/en/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: 2023-08-28 15:20+0200\n"
"POT-Creation-Date: 2023-08-29 19:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -23,8 +23,8 @@ msgid ""
"Vaktlisten gir en oversikt over når verkstedet er åpent og bemannet, og hva "
"slags kompetanse de vakthavende har"
msgstr ""
"The watchlist provides an overview of when the workshop is open and staffed, "
"and what kind of expertise the staff members have"
"The shift schedule provides an overview of when the workshop is open and "
"staffed, and what kind of expertise the staff members have"

#: watchlist/templates/watchlist/watchlist.html:108
msgid "Tid"
Expand Down
2 changes: 1 addition & 1 deletion watchlist/locale/nb/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: 2023-08-28 15:20+0200\n"
"POT-Creation-Date: 2023-08-29 19:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
10 changes: 4 additions & 6 deletions website/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-08-28 15:20+0200\n"
"POT-Creation-Date: 2023-08-29 19:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -122,10 +122,8 @@ msgid "Se"
msgstr "See"

#: website/templates/website/footer.html:20
#, fuzzy
#| msgid "Vaktliste"
msgid "vaktlista"
msgstr "Roster"
msgstr "shift schedule"

#: website/templates/website/footer.html:21
msgid "for detaljerte åpningstider"
Expand Down Expand Up @@ -216,7 +214,7 @@ msgstr "Members"
#: website/templates/website/header.html:198
#: website/templates/website/internalportal.html:118
msgid "Vaktliste"
msgstr "Roster"
msgstr "Shift schedule"

#: website/templates/website/header.html:119
#: website/templates/website/header.html:203
Expand Down Expand Up @@ -265,7 +263,7 @@ msgstr "Our list of members"

#: website/templates/website/header.html:196
msgid "Se vaktlista vår"
msgstr "Our roster"
msgstr "Our shift schedule"

#: website/templates/website/header.html:201
msgid "Se lagerbeholdningen vår"
Expand Down
2 changes: 1 addition & 1 deletion website/locale/nb/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-08-28 15:20+0200\n"
"POT-Creation-Date: 2023-08-29 19:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion website/templates/website/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h5>Hackerspace</h5>
{% trans "for detaljerte åpningstider" %}
</p>
</div>
<p>{% trans "For øvrige henvendelser kan du også ta kontakt via" %} <a class="white-text" href="mailto:hackerspace[email protected]">[email protected]</a>
<p>{% trans "For øvrige henvendelser kan du også ta kontakt via" %} <a class="white-text" style="white-space: nowrap;" href="mailto:herspace[email protected]">[email protected]</a>
</div>
<div class="col m6 l4 hide-on-small-only">
<h5>Lenker</h5>
Expand Down

0 comments on commit 641579d

Please sign in to comment.