Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ A summary of changes made to the codebase, grouped per deployment.
### New features

- The apply button in the English header, which previously read "søk verv", has now been translated to English ("apply to MAKE")
- Created page showing statistics about the use of the workshop and reservations of the equipment


### Improvements

Expand All @@ -31,6 +33,7 @@ A summary of changes made to the codebase, grouped per deployment.
- _Examples can be passwords of Google Workspace users that only exist for technical purposes,
or credentials for the admin page of a physical router_
- Added an "internal" ribbon label on internal articles and events
>>>>>>> 66675ec2 (Added page to show statistics from use of the workshop)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you forgot to remove all the remnants of a merge conflict :p

Suggested change
>>>>>>> 66675ec2 (Added page to show statistics from use of the workshop)


### Improvements

Expand Down
Binary file modified src/locale/nb/LC_MESSAGES/django.mo
Binary file not shown.
68 changes: 52 additions & 16 deletions src/locale/nb/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAKE NTNU website\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-05 18:43+0200\n"
"POT-Creation-Date: 2023-10-26 19:17+0200\n"
"PO-Revision-Date: 2018-10-09 14:05+0200\n"
"Last-Translator: Sindre Stephansen <[email protected]>\n"
"Language-Team: Norwegian Bokmål <[email protected]>\n"
Expand Down Expand Up @@ -133,7 +133,7 @@ msgstr "Legg til kunngjøring"
#: src/make_queue/templates/make_queue/course/printer_3d_course_list.html:18
#: src/make_queue/templates/make_queue/machine_list.html:21
#: src/make_queue/views/machine.py:178 src/make_queue/views/quota.py:88
#: src/make_queue/views/reservation_rule.py:74 src/makerspace/views.py:54
#: src/make_queue/views/reservation_rule.py:74 src/makerspace/views.py:57
#: src/news/views/article.py:88 src/news/views/event.py:237
#: src/news/views/event.py:324
msgid "Add"
Expand Down Expand Up @@ -806,7 +806,7 @@ msgstr ""
#: src/make_queue/models/reservation.py:31 src/news/admin.py:306
#: src/news/models.py:250
#: src/news/templates/admin/news/event/change_form_ticket_table.html:16
#: src/web/templates/web/header.html:90
#: src/web/templates/web/header.html:93
msgid "user"
msgstr "bruker"

Expand Down Expand Up @@ -1015,7 +1015,7 @@ msgid "“{quote}” —{quoted}"
msgstr "«{quote}» —{quoted}"

#: src/internal/templates/internal/base.html:6
#: src/web/templates/web/header.html:94
#: src/web/templates/web/header.html:97
msgid "Internal pages"
msgstr "Internsider"

Expand Down Expand Up @@ -1056,12 +1056,12 @@ msgid "Public pages"
msgstr "Offentlige sider"

#: src/internal/templates/internal/header.html:43
#: src/web/templates/web/header.html:104
#: src/web/templates/web/header.html:107
msgid "Django admin"
msgstr "Django-admin"

#: src/internal/templates/internal/header.html:48
#: src/web/templates/web/header.html:116
#: src/web/templates/web/header.html:119
msgid "Log out"
msgstr "Logg ut"

Expand Down Expand Up @@ -2273,7 +2273,7 @@ msgid "If specified, the equipment is sorted ascending by this value."
msgstr "Hvis spesifisert, sorteres utstyret stigende på denne verdien."

#: src/makerspace/templates/makerspace/equipment/admin_equipment_list.html:15
#: src/makerspace/views.py:57
#: src/makerspace/views.py:60
msgid "Add equipment"
msgstr "Legg til utstyr"

Expand Down Expand Up @@ -2311,11 +2311,47 @@ msgstr "Regler"
msgid "you must follow these to be allowed to use the workshop"
msgstr "du må følge disse for å få tillatelse til å bruke verkstedet"

#: src/makerspace/views.py:48
#: src/makerspace/templates/makerspace/statistics.html:6
#: src/makerspace/templates/makerspace/statistics.html:15
#: src/web/templates/web/header.html:67
msgid "Statistics"
msgstr "Statistikk"

#: src/makerspace/templates/makerspace/statistics.html:19
msgid "Total reservation time for each 3D printer"
msgstr "Total reservasjonstid for hver 3D-printer"

#: src/makerspace/templates/makerspace/statistics.html:20
#: src/makerspace/templates/makerspace/statistics.html:33
#: src/makerspace/templates/makerspace/statistics.html:61
msgid "This includes 3D printers, Raise3D printers and SLA 3D printers"
msgstr "Inkluderer 3D-printere, Raise3D-printere og SLA 3D-printere"

#: src/makerspace/templates/makerspace/statistics.html:32
msgid "Number of reservations pr. 3D-printer"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The abbreviation "pr." is not really used in English, as far as I'm aware 🤔 Also, there is no dash between "3D" and "printer" in English 🙂

Suggested change
msgid "Number of reservations pr. 3D-printer"
msgid "Number of reservations per 3D printer"

msgstr "Antall reservasjoner per 3D-printer"

#: src/makerspace/templates/makerspace/statistics.html:44
msgid "Total reservation time for each sewing machine"
msgstr "Total reservasjonstid for hver symaskin"

#: src/makerspace/templates/makerspace/statistics.html:52
msgid "Number of reservations pr. sewing machine"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgid "Number of reservations pr. sewing machine"
msgid "Number of reservations per sewing machine"

msgstr "Antall reservasjoner per symaskin"

#: src/makerspace/templates/makerspace/statistics.html:60
msgid "Longest printer reservations"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgid "Longest printer reservations"
msgid "Longest 3D printer reservations"

msgstr "Lengste 3D-printer reservasjoner"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
msgstr "Lengste 3D-printer reservasjoner"
msgstr "Lengste 3D-printerreservasjoner"


#: src/makerspace/templates/makerspace/statistics.html:72
msgid "Traffic"
msgstr "Trafikk"

#: src/makerspace/views.py:51
msgid "Admin page for equipment"
msgstr "Administrasjonsside for utstyr"

#: src/makerspace/views.py:63
#: src/makerspace/views.py:66
msgid "Change Equipment"
msgstr "Endre utstyr"

Expand Down Expand Up @@ -2892,7 +2928,7 @@ msgid "This ticket is registered to another account. Please"
msgstr "Denne billetten er knyttet til en annen bruker. Vennligst"

#: src/news/templates/news/event/ticket/event_ticket_detail.html:33
#: src/web/templates/web/header.html:124
#: src/web/templates/web/header.html:127
#: src/web/templates/web/login.html:12 src/web/templates/web/login.html:32
msgid "log in"
msgstr "logg inn"
Expand All @@ -2903,7 +2939,7 @@ msgstr "til den riktige brukeren for å se billetten din."

#: src/news/templates/news/event/ticket/event_ticket_my_list.html:6
#: src/news/templates/news/event/ticket/event_ticket_my_list.html:14
#: src/web/templates/web/header.html:112
#: src/web/templates/web/header.html:115
msgid "My tickets"
msgstr "Mine billetter"

Expand Down Expand Up @@ -3193,7 +3229,7 @@ msgstr ""
"for prosjektutvikling, både i privat og undervisningssammenheng, for alle "
"studenter og ansatte på NTNU."

#: src/web/templates/web/base.html:73
#: src/web/templates/web/base.html:76
msgid "Skip to main content"
msgstr "Hopp til hovedinnhold"

Expand Down Expand Up @@ -3262,19 +3298,19 @@ msgstr "Makerverkstedet"
msgid "About"
msgstr "Om"

#: src/web/templates/web/header.html:70
#: src/web/templates/web/header.html:73
msgid "About us"
msgstr "Om oss"

#: src/web/templates/web/header.html:76
#: src/web/templates/web/header.html:79
msgid "Apply to MAKE"
msgstr "Søk verv"

#: src/web/templates/web/header.html:99
#: src/web/templates/web/header.html:102
msgid "Administration"
msgstr "Administrasjon"

#: src/web/templates/web/header.html:109
#: src/web/templates/web/header.html:112
msgid "Profile"
msgstr "Profil"

Expand Down
Binary file modified src/locale/nb/LC_MESSAGES/djangojs.mo
Binary file not shown.
25 changes: 24 additions & 1 deletion src/locale/nb/LC_MESSAGES/djangojs.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Project-Id-Version: MAKE NTNU website\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-27 22:16+0200\n"
"POT-Creation-Date: 2023-11-09 19:28+0100\n"
"PO-Revision-Date: 2018-04-18 21:29+0200\n"
"Last-Translator: Sindre Stephansen <[email protected]>\n"
"Language-Team: Norwegian Bokmål <[email protected]>\n"
Expand Down Expand Up @@ -91,6 +91,29 @@ msgstr ""
msgid "Please refresh the page or contact the developers."
msgstr "Last inn siden på nytt eller kontakt utviklerne."

#: src/makerspace/static/makerspace/js/statistics_charts.js:39
#: src/makerspace/static/makerspace/js/statistics_charts.js:139
#: src/makerspace/static/makerspace/js/statistics_charts.js:233
msgid "Hours reserved"
msgstr "Antall timer reservert"

#: src/makerspace/static/makerspace/js/statistics_charts.js:90
#: src/makerspace/static/makerspace/js/statistics_charts.js:188
msgid "Times reserved"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it could reduce the possibility of misinterpreting the word "times" as "times of day", by being slightly more verbose:

Suggested change
msgid "Times reserved"
msgid "Number of times reserved"

msgstr "Antall ganger reservert"

#: src/makerspace/static/makerspace/js/statistics_charts.js:258
msgid "Traffic"
msgstr "Trafikk"

#: src/makerspace/static/makerspace/js/statistics_charts.js:274
msgid "Activity at the workshop"
msgstr "Aktivitet på verkstedet"

#: src/makerspace/static/makerspace/js/statistics_charts.js:284
msgid "Time of day"
msgstr "Tid på dagen"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "klokkeslett" is the more commonly used term for this :))

Suggested change
msgstr "Tid på dagen"
msgstr "Klokkeslett"


#: src/news/static/news/js/event/ticket/email_copy.js:34
msgid "Copied to clipboard!"
msgstr "Kopiert til utklippstavlen!"
Expand Down
4 changes: 4 additions & 0 deletions src/makerspace/static/makerspace/css/statistics.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.card{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This selector seems way too broad, and might unintentionally affect other cards on the page (in the future). A couple suggestions to fix this:

  1. Add a unique class to the class="ui column cards centered" element (e.g. class="statistics-cards ui column cards centered") and prepend it to the selector (i.e. .statistics-cards .card)
  2. Add a unique class to the card elements (e.g. class="statistics-card card") and replace the selector with that (i.e. just .statistics-card)

min-height: 50vh;
min-width: 65vh
}
Comment on lines +1 to +4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a space between the selector and the curly brace, a semicolon is missing, and "width" usually comes before "height" (for the same reason "x" usually comes before "y" in mathematical contexts).

Suggested change
.card{
min-height: 50vh;
min-width: 65vh
}
.card {
min-width: 65vh;
min-height: 50vh;
}

Loading