Skip to content

Commit

Permalink
Fixed some translation errors and added flag to language button (#649)
Browse files Browse the repository at this point in the history
  • Loading branch information
njal3001 committed Jan 17, 2023
1 parent 9ae5cb2 commit ceafb00
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ env/
venv/
.vscode/
**/__pycache__

/static/
*.mo
20 changes: 4 additions & 16 deletions website/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
Expand All @@ -23,7 +22,6 @@ msgid "Har du en skaper i magen?"
msgstr "Are you a creator?"

#: templates/website/index.html:25
#, fuzzy
#| msgid "creator-header"
msgid "creator-text"
msgstr ""
Expand All @@ -39,19 +37,17 @@ msgid "curious-text"
msgstr ""
"Whether you just want to test it out, or are a veteran of VR-"
"development, we have both equipment and expertise in Virtual Reality on"
"Hackerspace."
" Hackerspace."

#: templates/website/index.html:38
msgid "Kreativt, innovativt og ikke minst sosialt"
msgstr "Creative, innovative and social"

#: templates/website/index.html:39
#, fuzzy
#| msgid "creator-header"
msgid "arena-text"
msgstr ""
"Hackerspace offers an arena for projects, whether it's IoT gadgets,"
"software, 3D printing, or other cool stuff."
" software, 3D printing, or other cool stuff."

#: templates/website/index.html:51
msgid "Hvem er vi?"
Expand All @@ -73,8 +69,8 @@ msgstr ""
msgid "who3"
msgstr ""
"Whether you want to make an LED light flash or make a 3D model of "
"itTrondheim, the members of Hackerspace can offer varied and good expertise "
"andhelp you with that, regardless of your Hackerspace membership."
"Trondheim, the members of Hackerspace can offer varied and good expertise "
"and help you with that, regardless of your Hackerspace membership."

#: templates/website/index.html:55
msgid "who4"
Expand Down Expand Up @@ -111,11 +107,3 @@ msgstr "Recent news"
#: templates/website/index.html:89
msgid "Siste arrangementer"
msgstr "Recent events"

#~ msgid " og "
#~ msgstr " and "

#, fuzzy
#~| msgid "creator-header"
#~ msgid "who-header"
#~ msgstr "Are you a creator?"
3 changes: 0 additions & 3 deletions website/locale/nb/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ msgid "Har du en skaper i magen?"
msgstr ""

#: templates/website/index.html:25
#, fuzzy
#| msgid "creator-header"
msgid "creator-text"
msgstr ""
Expand All @@ -46,7 +45,6 @@ msgid "Kreativt, innovativt og ikke minst sosialt"
msgstr ""

#: templates/website/index.html:39
#, fuzzy
#| msgid "creator-header"
msgid "arena-text"
msgstr ""
Expand Down Expand Up @@ -108,7 +106,6 @@ msgstr ""
msgid "Siste arrangementer"
msgstr ""

#, fuzzy
#~| msgid "creator-header"
#~ msgid "who-header"
#~ msgstr "Hvem er vi?"
Binary file added website/static/website/img/icon/GB.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/static/website/img/icon/NO.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion website/templates/website/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
{% else %}
<li><a class="dropdown-trigger-user" href="{% url 'social:begin' 'dataporten_feide' %}?next={{ request.path }}" data-target="userdropdown"><i class="material-icons">account_circle</i></a> </li>
{% endif %}
<li>
{% include "website/lang_toggle.html" with style="margin: 3px 10px"%}
</li>
</ul>
<!-- Mobil dynamisk meny -->
<ul class="sidenav" id="mobile-sidebar">
Expand Down Expand Up @@ -230,7 +233,6 @@
</ul>

</div>
{% include "website/lang_toggle.html" %}
</div>
</nav>
</div>
Expand Down
11 changes: 9 additions & 2 deletions website/templates/website/lang_toggle.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% load i18n %}
{% load static %}

<form action="{% url 'set_language' %}" method="post">{% csrf_token %}
<form action="{% url 'set_language' %}" method="post" style="{{ style }}">{% csrf_token %}
{% get_current_language as LANGUAGE_CODE %}
<input name="next" type="hidden" value="{{ redirect_to }}">
<input name="language" type="hidden"
Expand All @@ -11,5 +12,11 @@
"nb"
{% endif %}
>
<input type="submit" value={{ LANGUAGE_CODE }}>
<input type="image" src=
{% if LANGUAGE_CODE == "nb" %}
"{% static 'website/img/icon/GB.png' %}"
{% else %}
"{% static 'website/img/icon/NO.png' %}"
{% endif %}
>
</form>

0 comments on commit ceafb00

Please sign in to comment.