Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add settings screen for accessibility configurations #370

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
74 changes: 44 additions & 30 deletions assets/translations/en.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
{
"accessibilitySettingsScreen": {
"title": "Accessibility settings",
"customFontTitle": "Custom font",
"customFontAction": "Pick a font",
"customFontPlacement": "Use it for",
"themeCustomizationTitle": "Theme customization",
"customFontSectionTitle": "Accessible font",
"customThemeSectionTitle": "Accessible theme",
"highContrastTitle": "High contrast",
"greyscaleTitle": "Greyscale"
},
"agendaScreen": {
"backToToday": "Back to today",
"dailyLayout": "Daily layout",
Expand All @@ -12,6 +23,12 @@
},
"bookingScreen": {
"barCodeTitle": "Barcode",
"bookingStatus": {
"available": "Available",
"booked": "Booked",
"full": "Full",
"notAvailable": "Not available"
},
"cancelBooking": "Cancel booking",
"cancelBookingText": "Are you sure you want to cancel this booking?",
"cancelFeedback": "Booking canceled",
Expand All @@ -21,35 +38,29 @@
"locationType": {
"place": "Place",
"virtualPlace": "Link virtual place"
},
"bookingStatus": {
"notAvailable": "Not available",
"available": "Available",
"booked": "Booked",
"full": "Full"
}
},
"bookingsScreen": {
"emptyState": "You have no active bookings",
"newBooking": "New booking",
"sectionTitle": "Active",
"title": "Bookings"
},
"bookingSeatScreen": {
"title": "Select a seat",
"noSeatsAvailable": "We're sorry,\nthere are no places available",
"deadlineExpired": "We're sorry,\nthe deadline to book for this round has passed",
"slotBookableFrom": "This slot will be bookable starting from ",
"confirm": "Confirm booking",
"deadlineExpired": "We're sorry,\nthe deadline to book for this round has passed",
"informationAcknowledgment": "I declare that I have read it\nof the ",
"informationAcknowledgmentLink": "COVID 19 emergency information",
"noSeatSelected": "No seat",
"zoomInToEnableSeatSelection": "Zoom in to enable seat selection",
"noSeatsAvailable": "We're sorry,\nthere are no places available",
"seatStatus": {
"booked": "Booked",
"available": "Available",
"booked": "Booked",
"notAvailable": "Non bookable"
}
},
"slotBookableFrom": "This slot will be bookable starting from ",
"title": "Select a seat",
"zoomInToEnableSeatSelection": "Zoom in to enable seat selection"
},
"bookingsScreen": {
"emptyState": "You have no active bookings",
"newBooking": "New booking",
"sectionTitle": "Active",
"title": "Bookings"
},
"colors": {
"amber": "Amber",
Expand All @@ -73,25 +84,17 @@
"yellow": "Yellow"
},
"common": {
"back": "Back",
"desk": "Desk",
"seat": "Seat",
"reset": "Reset",
"hour": "Hour",
"day": "Day",
"accessibility": "Accessibility",
"actionPotentiallyNotUndoable": "This action may not be undoable",
"activeStatus": {
"false": "Non active",
"true": "Active"
},
"agent": "Agent",
"legend": "Legend",
"close": "Close",
"search": "Search",
"cfu": "CFU",
"all": "All",
"appFeedback": "App Feedback",
"areYouSure?": "Are you sure?",
"back": "Back",
"booking": "Booking",
"booking_plural": "Bookings",
"building": "Building",
Expand All @@ -101,8 +104,10 @@
"campus": "Campus",
"cancel": "Cancel",
"capacity": "Capacity",
"cfu": "CFU",
"classroomsNotSpecified": "Classroom not specified",
"cleanCourseFiles": "Remove all course files",
"close": "Close",
"color": "Color",
"comingSoon": "Coming soon",
"confirm": "Confirm",
Expand All @@ -115,10 +120,12 @@
"creditsWithoutUnit": "{{credits}}",
"dateAndHours": "Date and hour",
"dateToBeDefined": "Date to be defined",
"day": "Day",
"deadline": "Deadline",
"deadline_plural": "Deadlines",
"delete": "Delete",
"department": "Department",
"desk": "Desk",
"done": "Done",
"doubleClickToSeeLinks": "Tap twice to see links",
"doubleTapToActive": "Tap twice to activate",
Expand Down Expand Up @@ -162,13 +169,15 @@
"follow": "Follow",
"free": "Free",
"grade": "Grade",
"hour": "Hour",
"hours": "Hour",
"icon": "Icon",
"inYourAgenda": "in your agenda",
"it": "Italian",
"language": "Language",
"lecture": "Lecture",
"lecture_plural": "Lectures",
"legend": "Legend",
"loading": "Loading",
"location": "Location",
"logout": "Logout",
Expand All @@ -178,6 +187,7 @@
"newItems_plural": "New items",
"next": "Next",
"noInternet": "You are offline, some features may not be available",
"noValue": "No value",
"notFound": "Not found",
"notes": "Notes",
"notice": "Notice",
Expand Down Expand Up @@ -210,9 +220,12 @@
"recentlyViewed": "Recently viewed",
"refresh": "Refresh",
"remove": "Remove",
"reset": "Reset",
"retract": "Retract",
"roleCollaborator": "Collaborator",
"roleHolder": "Holder",
"search": "Search",
"seat": "Seat",
"selectAnOption": "Please select an option",
"services": "Services",
"somethingWentWrong": "Something went wrong, try again later",
Expand Down Expand Up @@ -428,7 +441,8 @@
"title": "Guide"
},
"guidesScreen": {
"title": "Guides"
"title": "Guides",
"total": "There are {{total}} guides"
},
"jobOfferScreen": {
"application": "Application",
Expand Down
72 changes: 42 additions & 30 deletions assets/translations/it.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
{
"accessibilitySettingsScreen": {
"title": "Impostazioni di accessibilità",
"customFontTitle": "Font personalizzato",
"customFontDefault": "No custom font",
"customFontAction": "Seleziona un font",
"customFontPlacement": "Usalo per",
"customFontSectionTitle": "Font accessibile",
"customThemeSectionTitle": "Tema accessibile",
"highContrastTitle": "Alto contrasto",
"greyscaleTitle": "Scala di grigi"
},
"agendaScreen": {
"backToToday": "Torna a oggi",
"dailyLayout": "Layout giornaliero",
Expand All @@ -12,6 +23,12 @@
},
"bookingScreen": {
"barCodeTitle": "Barcode",
"bookingStatus": {
"available": "Prenotabile",
"booked": "Prenotato",
"full": "Non prenotabile",
"notAvailable": "Non ancora prenotabile"
},
"cancelBooking": "Annulla prenotazione",
"cancelBookingText": "Sei sicuro di voler annullare la prenotazione?",
"cancelFeedback": "Prenotazione annullata",
Expand All @@ -21,35 +38,29 @@
"locationType": {
"place": "Luogo",
"virtualPlace": "Link sportello virtuale"
},
"bookingStatus": {
"notAvailable": "Non ancora prenotabile",
"available": "Prenotabile",
"booked": "Prenotato",
"full": "Non prenotabile"
}
},
"bookingsScreen": {
"emptyState": "Non hai prenotazioni attive",
"newBooking": "Nuova prenotazione",
"sectionTitle": "Attive",
"title": "Prenotazioni"
},
"bookingSeatScreen": {
"title": "Scegli il posto",
"noSeatsAvailable": "Siamo spiacenti,\nnon ci sono posti disponibili",
"deadlineExpired": "Siamo spiacenti,\nè scaduto il termine ultimo per potersi prenotare a questo turno",
"slotBookableFrom": "Questo slot sarà prenotabile a partire dal ",
"confirm": "Conferma prenotazione",
"deadlineExpired": "Siamo spiacenti,\nè scaduto il termine ultimo per potersi prenotare a questo turno",
"informationAcknowledgment": "Dichiaro di aver preso visione \ndell' ",
"informationAcknowledgmentLink": "Informativa emergenza COVID 19",
"noSeatSelected": "Nessuna",
"zoomInToEnableSeatSelection": "Zoom in per abilitare la selezione del posto",
"noSeatsAvailable": "Siamo spiacenti,\nnon ci sono posti disponibili",
"seatStatus": {
"booked": "Prenotato",
"available": "Disponibile",
"booked": "Prenotato",
"notAvailable": "Non prenotabile"
}
},
"slotBookableFrom": "Questo slot sarà prenotabile a partire dal ",
"title": "Scegli il posto",
"zoomInToEnableSeatSelection": "Zoom in per abilitare la selezione del posto"
},
"bookingsScreen": {
"emptyState": "Non hai prenotazioni attive",
"newBooking": "Nuova prenotazione",
"sectionTitle": "Attive",
"title": "Prenotazioni"
},
"colors": {
"amber": "Ambra",
Expand All @@ -73,23 +84,13 @@
"yellow": "Giallo"
},
"common": {
"desk": "Cattedra",
"seat": "Postazione",
"reset": "Reimposta",
"hour": "Orario",
"day": "Giorno",
"other": "Altro",
"noValue": "Nessun valore",
"accessibility": "Accessibilità",
"actionPotentiallyNotUndoable": "Questa azione potrebbe non essere annullabile",
"activeStatus": {
"false": "Non attiva",
"true": "Attiva"
},
"agent": "Operatore",
"legend": "Legenda",
"close": "Chiudi",
"search": "Cerca",
"cfu": "CFU",
"all": "Tutti",
"appFeedback": "Segnalazioni App",
"areYouSure?": "Sei sicuro?",
Expand All @@ -103,8 +104,10 @@
"campus": "Sede",
"cancel": "Annulla",
"capacity": "Capacità",
"cfu": "CFU",
"classroomsNotSpecified": "Luogo non specificato",
"cleanCourseFiles": "Rimuovi file dei corsi",
"close": "Chiudi",
"color": "Colore",
"comingSoon": "Coming soon",
"confirm": "Conferma",
Expand All @@ -117,10 +120,12 @@
"creditsWithoutUnit": "{{credits}}",
"dateAndHours": "Data e ora",
"dateToBeDefined": "Data da definire",
"day": "Giorno",
"deadline": "Scadenza",
"deadline_plural": "Scadenze",
"delete": "Elimina",
"department": "Dipartimento",
"desk": "Cattedra",
"done": "Fatto",
"doubleClickToSeeLinks": "Premi due volte per vedere i link",
"doubleTapToActive": "Doppio tocco per attivare",
Expand Down Expand Up @@ -164,13 +169,15 @@
"follow": "Segui",
"free": "Libera",
"grade": "Voto",
"hour": "Orario",
"hours": "Ore",
"icon": "Icona",
"inYourAgenda": "nella tua agenda",
"it": "Italiano",
"language": "Lingua",
"lecture": "Lezione",
"lecture_plural": "Lezioni",
"legend": "Legenda",
"loading": "Caricamento",
"location": "Sede",
"logout": "Logout",
Expand All @@ -180,6 +187,7 @@
"newItems_plural": "Nuovi elementi",
"next": "Avanti",
"noInternet": "Sei offline, alcune funzionalità potrebbero non essere disponibili",
"noValue": "Nessun valore",
"notFound": "Luogo inesistente",
"notes": "Note",
"notice": "Avviso",
Expand All @@ -201,6 +209,7 @@
"true": "Doppio click per chiudere"
},
"options": "Opzioni",
"other": "Altro",
"pause": "Pausa",
"period": "Semestre",
"phone": "Telefono",
Expand All @@ -211,9 +220,12 @@
"recentlyViewed": "Visto di recente",
"refresh": "Aggiorna",
"remove": "Rimuovi",
"reset": "Reimposta",
"retract": "Ritira",
"roleCollaborator": "Collaboratore",
"roleHolder": "Titolare",
"search": "Cerca",
"seat": "Postazione",
"selectAnOption": "Seleziona una delle opzioni",
"services": "Servizi",
"somethingWentWrong": "Qualcosa è andato storto, riprova più tardi",
Expand Down
3 changes: 1 addition & 2 deletions lib/ui/components/ListItem.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
StyleProp,
TextProps,
TextStyle,
TouchableHighlight,
TouchableHighlightProps,
Expand All @@ -20,7 +19,7 @@ import { GlobalStyles } from '../../../src/core/styles/GlobalStyles';
import { resolveLinkTo } from '../../../src/utils/resolveLinkTo';
import { useTheme } from '../hooks/useTheme';
import { DisclosureIndicator } from './DisclosureIndicator';
import { Text } from './Text';
import { Text, TextProps } from './Text';

export interface ListItemProps extends TouchableHighlightProps {
title: string | JSX.Element;
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/components/Metric.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { View, ViewProps } from 'react-native';

import { useTheme } from '../hooks/useTheme';
import { CardProps } from './Card';
import { Text, Props as TextProps } from './Text';
import { Text, TextProps } from './Text';

type Props = ViewProps & {
title: string;
Expand Down
10 changes: 7 additions & 3 deletions lib/ui/components/Text.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { Text as RNText, StyleSheet, TextProps } from 'react-native';
import {
Text as RNText,
TextProps as RNTextProps,
StyleSheet,
} from 'react-native';

import { useStylesheet } from '../hooks/useStylesheet';
import { useTheme } from '../hooks/useTheme';
import { Theme } from '../types/Theme';

export interface Props extends TextProps {
export interface TextProps extends RNTextProps {
variant?:
| 'heading'
| 'subHeading'
Expand Down Expand Up @@ -45,7 +49,7 @@ export const Text = ({
uppercase,
children,
...rest
}: Props) => {
}: TextProps) => {
const { colors, fontFamilies, fontWeights } = useTheme();
const styles = useStylesheet(createStyles);
const fontFamilyName =
Expand Down
Loading
Loading