Skip to content

Commit

Permalink
519 Translate Aboutpage (#941)
Browse files Browse the repository at this point in the history
* Translate Aboutpage

* Update backend/root/management/commands/seed_scripts/textitems.py

Co-authored-by: Robin <16273164+robines@users.noreply.github.com>

* Update backend/root/management/commands/seed_scripts/textitems.py

Co-authored-by: Robin <16273164+robines@users.noreply.github.com>

* Update backend/root/management/commands/seed_scripts/textitems.py

Co-authored-by: Robin <16273164+robines@users.noreply.github.com>

* Update backend/root/management/commands/seed_scripts/textitems.py

Co-authored-by: Robin <16273164+robines@users.noreply.github.com>

* Update backend/root/management/commands/seed_scripts/textitems.py

Co-authored-by: Robin <16273164+robines@users.noreply.github.com>

* Update backend/root/management/commands/seed_scripts/textitems.py

Co-authored-by: Robin <16273164+robines@users.noreply.github.com>

* fix typo

* ruff

* prettier :(

---------

Co-authored-by: Robin <16273164+robines@users.noreply.github.com>
  • Loading branch information
marionlys and robines authored Feb 8, 2024
1 parent f066ed9 commit e3b7106
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 51 deletions.
20 changes: 20 additions & 0 deletions backend/root/management/commands/seed_scripts/textitems.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,26 @@ def seed():
'text_nb': 'Har du spørsmål eller ønsker å komme i kontakt med oss? Ikke nøl med å ta kontakt!',
'text_en': 'Do you have any questions or want to get in touch with us? Don"t hesitate to contact us!',
},
{
'key': 'festivals',
'text_nb': 'Annenhvert år arrangeres Norges største kulturfestival UKA og verdens største internasjonale tematiske studentfestival under Studentersamfundets paraply.',
'text_en': "Every other year, Norway's largest cultural festival UKA and the world's largest international thematic student festival are organized under Studentersamfundet's umbrella.",
},
{
'key': 'volunteering',
'text_nb': 'Det meste av arbeid på Studentersamfundet i Trondhjem gjøres gjennom dugnad av studenter. Arbeidet er organisert i enheter som kalles gjenger. Potensielle nye medlemmer må søke den aktuelle gjengen om opptak, og gjengen vurderer hver enkelt søker. Med sine omtrent 1700 frivillige utgjør det indre miljøet i Studentersamfundet en betydelig del av det organiserte fritidstilbudet til studenter i Trondheim.',
'text_en': 'Most of the work at Samfundet is done on a voluntary basis by students. The work is organized into units called groups. Prospective new members must apply to the appropriate group for admission and the group reviews each applicant. With around 1700 volunteers, the internal environment of Samfundet constitutes a significant part of organized leisure activities for students in Trondheim.',
},
{
'key': 'the_society_meeting',
'text_nb': 'Samfundsmøtet er Studentersamfundets høyeste organ. Her velges leder samt medlemmer til Finansstyret og Rådet. Lederen velger ut sitt eget styre, som utformer den politiske profilen og representer medlemmene og foreningen Samfundet. Finansstyret administrerer forretningsdriften. Rådet kontrollerer at all virksomhet i Samfundet foregår i henhold til norske og interne lover. Samfundet har en daglig leder, økonomiansvarlig, husøkonom, vaktmester og renholdspersonell som er ansatte.',
'text_en': "The Society Meeting is our highest organ. We elect the leader here, as well as members of the Finance Board and the Council. The leader, elected politically, chooses his or her own Board, which forms the House's political profile and represents all of Samfundet's members. The Finance Board manages the business. The Council ensures that all activities at Samfundet take place according to Norwegian and internal laws. Samfundet has a general manager, financial manager, house-economist, caretaker and cleaning staff who are employees.",
},
{
'key': 'about_samfundet',
'text_nb': 'Studentersamfundet i Trondhjem er en organisasjon for studenter i Trondheim som eies og drives av sine rundt 16 100 medlemmer. Formålsparagrafen vår sier at ”Studentersamfundet skal være det naturlige samlingsstedet for studenter i Trondhjem”. Vårt røde runde huser konserter, ulike kulturarrangementer, utallige barer, en kafé og en restaurant. Mest sagnomsust er Samfundsmøtene, viet til debatt om politikk og aktuelle spørsmål, eller til underholdning og moro. Samfundet har også tre av Trondheims beste konsertscener.',
'text_en': "Samfundet is an organization for students in Trondheim that is owned and run by its approximately 16100 members. Our mission statement is Samfundet will be the natural meeting place for students in Trondheim. In our red, round building we regularly host concerts and various cultural events, and have countless bars, a café and a restaurant. The Society Meetings are perhaps our most famous events. These meetings serve as a place for debating politics and current events, and but also for entertainment and fun. Samfundet also has three of Trondheim's best music venues.",
},
{
'key': 'no_recruitment_text',
'text_nb': 'Det er for tiden ingen opptak på Samfundet',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function Navbar() {
className={styles.navbar_dropdown_link}
onAfterClick={() => setExpandedDropdown('')}
>
{t(KEY.common_about_samfundet)}
{t(KEY.common_general)}
</Link>
<a href="#" className={styles.navbar_dropdown_link} onClick={() => setExpandedDropdown('')}>
{t(KEY.common_membership)}
Expand Down
80 changes: 33 additions & 47 deletions frontend/src/Pages/AboutPage/AboutPage.tsx
Original file line number Diff line number Diff line change
@@ -1,60 +1,54 @@
import classNames from 'classnames';
import { useTranslation } from 'react-i18next';
import { Button, Carousel } from '~/Components';
import { Page } from '~/Components/Page';
import { runderode, splash } from '~/assets';
import { TextItem } from '~/constants';
import { useTextItem } from '~/hooks';
import { KEY } from '~/i18n/constants';
import { ROUTES } from '~/routes';
import { backgroundImageFromUrl } from '~/utils';
import styles from './AboutPage.module.scss';
import { VENUES } from './data';

export function AboutPage() {
const { t } = useTranslation();

return (
<Page>
<div className={styles.row}>
<img src={runderode} alt="Runderode" className={classNames(styles.runderode, styles.box)} />
<div className={styles.textBox}>
<h2 className={styles.header}>Om Samfundet</h2>
<p className={styles.text}>
Studentersamfundet i Trondhjem er en organisasjon for studenter i Trondheim som eies og drives av sine rundt
16 100 medlemmer. Formålsparagrafen vår sier at ”Studentersamfundet skal være det naturlige samlingsstedet
for studenter i Trondhjem”. Vårt røde runde huser konserter, ulike kulturarrangementer, utallige barer, en
kafé og en restaurant. Mest sagnomsust er Samfundsmøtene, viet til debatt om politikk og aktuelle spørsmål,
eller til underholdning og moro. Samfundet har også tre av Trondheims beste konsertscener.
</p>
<h2 className={styles.header}>{t(KEY.common_about_samfundet)}</h2>
<p className={styles.text}>{useTextItem(TextItem.about_samfundet)}</p>
<Button theme="samf" className={styles.button}>
MEDLEMSKAP
{t(KEY.common_membership).toUpperCase()}
</Button>
<Button theme="success" className={styles.button}>
FAQ
</Button>
<Button theme="blue" className={styles.button}>
KONTAKTINFO
{t(KEY.common_contact_information).toUpperCase()}
</Button>
<Button theme="outlined" className={styles.button}>
BILLETTER
{t(KEY.common_tickets).toUpperCase()}
</Button>
</div>
</div>
<div className={classNames(styles.box, styles.textBox)}>
<h2 className={styles.header}>Samfundsmøtet</h2>
<p className={styles.text}>
Samfundsmøtet er Studentersamfundets høyeste organ. Her velges leder samt medlemmer til Finansstyret og Rådet.
Lederen velger ut sitt eget styre, som utformer den politiske profilen og representer medlemmene og foreningen
Samfundet. Finansstyret administrerer forretningsdriften. Rådet kontrollerer at all virksomhet i Samfundet
foregår i henhold til norske og interne lover. Samfundet har en daglig leder, økonomiansvarlig, husøkonom,
vaktmester og renholdspersonell som er ansatte.
</p>
<h2 className={styles.header}>{t(KEY.common_the_society_meeting)}</h2>
<p className={styles.text}>{useTextItem(TextItem.the_society_meeting)}</p>
<Button theme="samf" className={styles.button}>
SAMFUNDET SOM ORGANISASJON
{t(KEY.common_about_the_organisation).toUpperCase()}
</Button>
<Button className={styles.button} theme="outlined">
SAKSDOKUMENTER
{t(KEY.common_documents).toUpperCase()}
</Button>
<Button className={styles.button} theme="outlined">
SAMFUNDETS HISTORIE
{t(KEY.common_our_history).toUpperCase()}
</Button>
</div>
<h2 className={styles.header2}>Lokaler</h2>
<h2 className={styles.header2}>{t(KEY.common_venues)}</h2>

<Carousel spacing={1.5} header>
{VENUES.images.map((image, idx) => {
Expand All @@ -69,40 +63,32 @@ export function AboutPage() {

<div className={styles.row}>
<Button className={styles.button} theme="outlined">
OVERSIKTSKART
{t(KEY.common_overview_map).toUpperCase()}
</Button>
<Button className={styles.button} theme="outlined">
NYBYGG
{t(KEY.common_new_building).toUpperCase()}
</Button>
</div>
<div className={styles.row}>
<div className={styles.image_box}>
<img src={splash} alt="Splash" className={styles.splash} />
<div className={styles.textBox}>
<h2 className={styles.header}>Frivilligheten</h2>
<p className={styles.text}>
Det meste av arbeid på Studentersamfundet i Trondhjem gjøres gjennom dugnad av studenter. Arbeidet er
organisert i enheter som kalles gjenger. Potensielle nye medlemmer må søke den aktuelle gjengen om opptak,
og gjengen vurderer hver enkelt søker. Med sine omtrent 1700 frivillige utgjør det indre miljøet i
Studentersamfundet en betydelig del av det organiserte fritidstilbudet til studenter i Trondheim.
</p>
<h2 className={styles.header}>{t(KEY.common_volunteering)}</h2>
<p className={styles.text}>{useTextItem(TextItem.volunteering)}</p>
<div className={styles.buttonTable}>
<Button className={styles.tableButton} theme="basic" link={ROUTES.frontend.groups}>
GJENGENE PÅ SAMFUNDET
{t(KEY.common_the_groups_at_samfundet).toUpperCase()}
</Button>
<Button className={styles.tableButton} theme="basic">
OPPTAK
{t(KEY.common_volunteer).toUpperCase()}
</Button>
</div>
</div>
</div>
<div className={styles.col}>
<div className={styles.uka_isfit}>
<h3 className={styles.header_col}>UKA & ISFiT</h3>
<p className={styles.text}>
Annenhvert år arrangeres Norges største kulturfestival UKA og verdens største internasjonale tematiske
studentfestival under Studentersamfundets paraply.
</p>
<p className={styles.text}>{useTextItem(TextItem.festivals)}</p>
<div className={styles.buttonTable}>
<Button className={styles.tableButton} theme="samf">
UKA
Expand All @@ -113,31 +99,31 @@ export function AboutPage() {
</div>
</div>
<div className={styles.other_info}>
<h3 className={styles.header_col}>Annen Info</h3>
<h3 className={styles.header_col}>{t(KEY.common_more_info)}</h3>
<div className={styles.buttonTable}>
<Button className={styles.tableButton} theme="basic">
Aldersgrenser
{t(KEY.common_age_limit).toUpperCase()}
</Button>
<Button className={styles.tableButton} theme="basic">
Booking
BOOKING
</Button>
<Button className={styles.tableButton} theme="basic">
Quiz
QUIZ
</Button>
<Button className={styles.tableButton} theme="basic">
Leie og tjenester
{t(KEY.common_rent_services).toUpperCase()}
</Button>
<Button className={styles.tableButton} theme="basic">
Presse
{t(KEY.common_press).toUpperCase()}
</Button>
<Button className={styles.tableButton} theme="basic">
Filmklubb
{t(KEY.common_film_club).toUpperCase()}
</Button>
<Button className={styles.tableButton} theme="basic">
Personvern
{t(KEY.common_privacy_policy).toUpperCase()}
</Button>
<Button className={styles.tableButton} theme="basic">
Tilrettelegning
{t(KEY.common_facilitation).toUpperCase()}
</Button>
</div>
</div>
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/constants/TextItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ export const TextItem = {
sulten_lyche_goal_text: 'sulten_lyche_goal_text',
sulten_lyche_about_menu_text: 'sulten_lyche_about_menu_text',
sulten_contact_page_text: 'sulten_contact_page_text',

//About page
festivals: 'festivals',
volunteering: 'volunteering',
the_society_meeting: 'the_society_meeting',
about_samfundet: 'about_samfundet',
sulten_contact_page_title: 'sulten_contact_page_title',

//Recruitment
Expand Down
21 changes: 20 additions & 1 deletion frontend/src/i18n/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const KEY = {
common_recruitment: 'common_recruitment',
common_reservation: 'common_reservation',
common_opening_hours: 'common_opening_hours',
common_about_samfundet: 'common_about_samfundet',
common_general: 'common_general',
common_long_description: 'common_long_description',
common_short_description: 'common_short_description',
common_back_to_samfundet: 'common_back_to_samfundet',
Expand All @@ -121,6 +121,25 @@ export const KEY = {
common_something_went_wrong: 'common_something_went_wrong',
common_click_here: 'common_click_here',

//About page
common_age_limit: 'common_age_limit',
common_rent_services: 'common_rent_services',
common_press: 'common_press',
common_film_club: 'common_film_club',
common_privacy_policy: 'common_privacy_policy',
common_facilitation: 'common_facilitation',
common_the_groups_at_samfundet: 'commong_the_groups_at_samfundet',
common_volunteering: 'common_volunteering',
common_overview_map: 'common_overview_map',
common_new_building: 'common_new_building',
common_documents: 'common_documents',
common_our_history: 'common_our_history',
common_about_the_organisation: 'common_about_the_organisation',
common_the_society_meeting: 'common_the_society_meeting',
common_tickets: 'common_tickets',
common_contact_information: 'common_contact_information',
common_about_samfundet: 'common_about_samfundet',

// Price groups:
common_ticket_type: 'common_ticket_type',
common_ticket_type_free: 'common_ticket_type_free',
Expand Down
42 changes: 40 additions & 2 deletions frontend/src/i18n/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const nb: Record<KeyValues, string> = {
[KEY.common_description]: 'Beskrivelse',
[KEY.common_reservation]: 'Reservasjon',
[KEY.common_opening_hours]: 'Åpningstider',
[KEY.common_about_samfundet]: 'Generelt',
[KEY.common_general]: 'Generelt',
[KEY.common_long_description]: 'Lang beskrivelse',
[KEY.common_short_description]: 'Kort beskrivelse',
[KEY.common_back_to_samfundet]: 'Tilbake til samfundet.no',
Expand All @@ -110,6 +110,25 @@ export const nb: Record<KeyValues, string> = {
[KEY.common_guests]: 'Gjester',
[KEY.common_occasion]: 'Annledning',

//About page
[KEY.common_age_limit]: 'aldersgrense',
[KEY.common_rent_services]: 'leie og tjenester',
[KEY.common_press]: 'presse',
[KEY.common_film_club]: 'filmklubb',
[KEY.common_privacy_policy]: 'personvern',
[KEY.common_facilitation]: 'tilrettelegging',
[KEY.common_the_groups_at_samfundet]: 'Gjengene på Samfundet',
[KEY.common_volunteering]: 'Frivilligheten',
[KEY.common_overview_map]: 'oversiktskart',
[KEY.common_new_building]: 'nybygg',
[KEY.common_documents]: 'saksdokumenter',
[KEY.common_our_history]: 'Samfundets historie',
[KEY.common_about_the_organisation]: 'Samfundet som organisasjon',
[KEY.common_the_society_meeting]: 'Samfundsmøtet',
[KEY.common_tickets]: 'billetter',
[KEY.common_contact_information]: 'Kontaktinfo',
[KEY.common_about_samfundet]: 'Om Samfundet',

// Price groups:
[KEY.common_ticket_type]: 'Billett',
[KEY.common_ticket_type_free]: 'Gratis',
Expand Down Expand Up @@ -354,7 +373,7 @@ export const en: Record<KeyValues, string> = {
[KEY.common_recruitment]: 'Recruitment',
[KEY.common_reservation]: 'Reservation',
[KEY.common_opening_hours]: 'Opening hours',
[KEY.common_about_samfundet]: 'General',
[KEY.common_general]: 'General',
[KEY.common_long_description]: 'Long description',
[KEY.common_short_description]: 'Short description',
[KEY.common_back_to_samfundet]: 'Back to samfundet.no',
Expand All @@ -368,6 +387,25 @@ export const en: Record<KeyValues, string> = {
[KEY.common_guests]: 'Guests',
[KEY.common_occasion]: 'Occasion',

//About page
[KEY.common_age_limit]: 'Age limit',
[KEY.common_rent_services]: 'Renting and other services',
[KEY.common_press]: 'Press',
[KEY.common_film_club]: 'Film club',
[KEY.common_privacy_policy]: 'Privacy policy',
[KEY.common_facilitation]: 'Facilitation',
[KEY.common_the_groups_at_samfundet]: 'The groups at Samfundet',
[KEY.common_volunteering]: 'Volunteering',
[KEY.common_overview_map]: 'Overview map',
[KEY.common_new_building]: 'New building',
[KEY.common_documents]: 'Documents',
[KEY.common_our_history]: 'Our history',
[KEY.common_about_the_organisation]: 'About the organisation',
[KEY.common_the_society_meeting]: 'The Society Meeting',
[KEY.common_tickets]: 'tickets',
[KEY.common_contact_information]: 'Contact information',
[KEY.common_about_samfundet]: 'About Samfundet',

// Price groups:
[KEY.common_ticket_type]: 'Ticket',
[KEY.common_ticket_type_free]: 'Free',
Expand Down

0 comments on commit e3b7106

Please sign in to comment.