Skip to content

Commit

Permalink
Few adjustments
Browse files Browse the repository at this point in the history
- Enable SSR load theme
- Fix tutors' groups label and href
  • Loading branch information
Giuseppetm committed Oct 10, 2023
1 parent da3cc91 commit 40d30ec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import { CookiesProvider } from 'react-cookie';
import { ThemeProvider, useTheme } from '@fluentui/react';
import { Theme } from '../services/Utils';
import { initializeIcons } from '@fluentui/react/lib/Icons';
import { registerIcons, setIconOptions } from '@fluentui/react/lib/Styling';
import { loadTheme, registerIcons, setIconOptions } from '@fluentui/react/lib/Styling';
import { registeredIcons } from 'services/Icons';
import { GlobalProvider } from 'services/GlobalContext';
import { useContext } from 'react';
import { buildLightTheme } from 'services/Themes';
import GlobalContext from '../services/GlobalContext';
import Script from 'next/script';
import Head from 'next/head';
Expand All @@ -19,7 +20,12 @@ import PrivacyPolicyDialog from 'components/Atoms/PrivacyPolicyDialog';
import LocalizationChangeDialog from 'components/Atoms/LocalizationChangeDialog';
import LocalizationService from 'services/LocalizationService';

LocalizationService.localize("it"); // Enable SSR localized fields (italian by default)
/**
* Enables SSR localization and theme.
*/
LocalizationService.localize("it");
loadTheme(buildLightTheme("a"));

setIconOptions({ disableWarnings: true });
registerIcons({ icons: registeredIcons });
initializeIcons();
Expand Down
4 changes: 2 additions & 2 deletions services/LocalizationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ class LocalizationService {
websites: 'Siti web',
mainGroup: 'Gruppo principale',
mainGroupDescription: 'Gruppo principale per qualsiasi tipo di discussione inerente al corso di laurea.',
tutorsGroupDescription: '<Text variant="small" styles={semibold}>ATTENZIONE: </Text><Text variant="small">Questo gruppo <Text styles={semibold} variant="small">non è gestito dal network StudentiUniMi</Text> ma dai <Link href="https://orientamento.di.unimi.it/index.php/contatti/tutor-di-processo">tutor di processo</Link> nominati dal Dipartimento di Informatica.</Text>',
tutorsGroupDescription: '<Text variant="small" styles={semibold}>ATTENZIONE: </Text><Text variant="small">Questo gruppo <Text styles={semibold} variant="small">non è gestito dal network StudentiUniMi</Text> ma dai <Link href="https://orientamento.di.unimi.it/index.php/contatti/tutor-peer-to-peer">tutor peer to peer</Link> nominati dal Dipartimento di Informatica.</Text>',
groupNotAvailable: 'Gruppo non presente',
contactAdmin: "<Icon iconName='FollowUser'/> Contatta un <Link href='/organization'>amministratore</Link> se vuoi essere aggiunto al gruppo, oppure chiedilo direttamente su <Link href='https://t.me/unimichat'>@unimichat</Link>.",
degreesNotFound: 'Nessun corso di laurea trovato.',
Expand Down Expand Up @@ -677,7 +677,7 @@ class LocalizationService {
websites: 'Websites',
mainGroup: 'Main group',
mainGroupDescription: 'Main group for any type of discussion about this degree.',
tutorsGroupDescription: '<Text variant="small" styles={semibold}>WARNING:</Text><Text variant="small"> This group <Text styles={semibold} variant="small">is not managed by network StudentiUniMi</Text> but by <Link href="https://orientamento.di.unimi.it/index.php/contatti/tutor-di-processo">tutors</Link> nominated by the computer science department.</Text>',
tutorsGroupDescription: '<Text variant="small" styles={semibold}>WARNING:</Text><Text variant="small"> This group <Text styles={semibold} variant="small">is not managed by network StudentiUniMi</Text> but by <Link href="https://orientamento.di.unimi.it/index.php/contatti/tutor-peer-to-peer">tutors peer to peer</Link> nominated by the computer science department.</Text>',
groupNotAvailable: 'Group not available',
contactAdmin: "<Icon iconName='FollowUser'/> Contact an <Link href='/organization'>administrator</Link> if you would like to be added to this group, or ask directly on <Link href='https://t.me/unimichat'>@unimichat</Link>.",
groupsNotFound: 'Groups not found.',
Expand Down

0 comments on commit 40d30ec

Please sign in to comment.