Skip to content

Commit

Permalink
Move global translations to the global translation definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamik10 committed Dec 16, 2023
1 parent 42faeef commit dccc5ba
Show file tree
Hide file tree
Showing 22 changed files with 52 additions and 151 deletions.
12 changes: 0 additions & 12 deletions src/apps/advanced-search/AdvancedSearch.dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,6 @@ export default {
'[\n {\n "branchId":"DK-775120",\n "title":"Højbjerg"\n },\n {\n "branchId":"DK-775122",\n "title":"Beder-Malling"\n },\n {\n "branchId":"DK-775144",\n "title":"Gellerup"\n },\n {\n "branchId":"DK-775167",\n "title":"Lystrup"\n },\n {\n "branchId":"DK-775146",\n "title":"Harlev"\n },\n {\n "branchId":"DK-775168",\n "title":"Skødstrup"\n },\n {\n "branchId":"FBS-751010",\n "title":"Arresten"\n },\n {\n "branchId":"DK-775147",\n "title":"Hasle"\n },\n {\n "branchId":"FBS-751032",\n "title":"Må ikke benyttes"\n },\n {\n "branchId":"FBS-751031",\n "title":"Fjernlager 1"\n },\n {\n "branchId":"DK-775126",\n "title":"Solbjerg"\n },\n {\n "branchId":"FBS-751030",\n "title":"ITK"\n },\n {\n "branchId":"DK-775149",\n "title":"Sabro"\n },\n {\n "branchId":"DK-775127",\n "title":"Tranbjerg"\n },\n {\n "branchId":"DK-775160",\n "title":"Risskov"\n },\n {\n "branchId":"DK-775162",\n "title":"Hjortshøj"\n },\n {\n "branchId":"DK-775140",\n "title":"Åby"\n },\n {\n "branchId":"FBS-751009",\n "title":"Fjernlager 2"\n },\n {\n "branchId":"FBS-751029",\n "title":"Stadsarkivet"\n },\n {\n "branchId":"FBS-751027",\n "title":"Intern"\n },\n {\n "branchId":"FBS-751026",\n "title":"Fælles undervejs"\n },\n {\n "branchId":"FBS-751025",\n "title":"Fællessekretariatet"\n },\n {\n "branchId":"DK-775133",\n "title":"Bavnehøj"\n },\n {\n "branchId":"FBS-751024",\n "title":"Fjernlånte materialer"\n },\n {\n "branchId":"DK-775100",\n "title":"Hovedbiblioteket"\n },\n {\n "branchId":"DK-775170",\n "title":"Trige"\n },\n {\n "branchId":"DK-775150",\n "title":"Tilst"\n },\n {\n "branchId":"DK-775130",\n "title":"Viby"\n },\n {\n "branchId":"DK-775164",\n "title":"Egå"\n }\n]',
control: { type: "text" }
},
addToFavoritesAriaLabelText: {
control: {
type: "text"
},
defaultValue: "Add @title to favorites list"
},
removeFromFavoritesAriaLabelText: {
control: {
type: "text"
},
defaultValue: "Remove @title from favorites list"
},
loadingText: {
name: "Loading",
defaultValue: "Loading",
Expand Down
2 changes: 0 additions & 2 deletions src/apps/advanced-search/AdvancedSearch.entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ import AdvancedSearch from "./AdvancedSearch";
import { GlobalEntryTextProps } from "../../core/storybook/globalTextArgs";

interface AdvancedSearchEntryTextProps {
addToFavoritesAriaLabelText: string;
byAuthorText: string;
etAlText: string;
inSeriesText: string;
loadingText: string;
numberDescriptionText: string;
removeFromFavoritesAriaLabelText: string;
resultPagerStatusText: string;
noSearchResultText: string;
showMoreText: string;
Expand Down
2 changes: 0 additions & 2 deletions src/apps/dashboard/dashboard.dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import reservationGroupModalArgs from "../../core/storybook/reservationGroupModa
import reservationMaterialDetailsProps from "../../core/storybook/reservationMaterialDetailsArgs";
import materialDetailsModalArgs from "../../core/storybook/materialDetailsModalArgs";
import deleteReservationModalArgs from "../../core/storybook/deleteReservationModalArgs";
import acceptModalArgs from "../../core/storybook/acceptFeesModalArgs";
import reservationListArgs from "../../core/storybook/reservationListArgs";
import globalTextArgs from "../../core/storybook/globalTextArgs";

Expand All @@ -22,7 +21,6 @@ export default {
...renewalArgs,
...reservationGroupModalArgs,
...reservationMaterialDetailsProps,
...acceptModalArgs,
...materialDetailsModalArgs,
...deleteReservationModalArgs,
...reservationListArgs,
Expand Down
2 changes: 0 additions & 2 deletions src/apps/dashboard/dashboard.entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { ReservationMaterialDetailsProps } from "../../core/storybook/reservatio
import { MaterialDetailsModalProps } from "../../core/storybook/materialDetailsModalArgs";
import { GroupModalReservationsProps } from "../../core/storybook/reservationGroupModalArgs";
import { DeleteReservationModalArgs } from "../../core/storybook/deleteReservationModalArgs";
import { AcceptFeesModalEntryTextProps } from "../../core/storybook/acceptFeesModalArgs";
import { RenewalArgs } from "../../core/storybook/renewalArgs";
import { GlobalEntryTextProps } from "../../core/storybook/globalTextArgs";

Expand Down Expand Up @@ -64,7 +63,6 @@ const DashboardEntry: FC<
GroupModalProps &
GroupModalLoansProps &
DeleteReservationModalArgs &
AcceptFeesModalEntryTextProps &
GroupModalReservationsProps &
RenewalArgs &
ReservationMaterialDetailsProps &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,6 @@ export default {
type: "text"
},
defaultValue: "https://unsplash.com/photos/wd6YQy0PJt8" // open source image of a red panda
},
addToFavoritesAriaLabelText: {
control: {
type: "text"
},
defaultValue: "Add @title to favorites list"
},
removeFromFavoritesAriaLabelText: {
control: {
type: "text"
},
defaultValue: "Remove @title from favorites list"
}
}
} as ComponentMeta<typeof FavoritesListMaterialComponent>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export interface FavoritesListMaterialComponentProps {
etAlText: string;
favoritesListMaterialComponentGoToListText: string;
favoritesListMaterialComponentGoToListUrl: string;
addToFavoritesAriaLabelText: string;
removeFromFavoritesAriaLabelText: string;
}

const SomethingSimilarEntry: FC<
Expand Down
2 changes: 0 additions & 2 deletions src/apps/loan-list/list/loan-list.dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import globalTextArgs from "../../../core/storybook/globalTextArgs";
import LoanList from "./loan-list.entry";
import groupModalArgs from "../../../core/storybook/groupModalArgs";
import loanGroupModalArgs from "../../../core/storybook/loanGroupModalArgs";
import acceptModalArgs from "../../../core/storybook/acceptFeesModalArgs";
import materialDetailsModalArgs from "../../../core/storybook/materialDetailsModalArgs";
import renewalArgs from "../../../core/storybook/renewalArgs";
import { getModalIds } from "../../../core/utils/helpers/modal-helpers";
Expand All @@ -21,7 +20,6 @@ export default {
...globalTextArgs,
...loanGroupModalArgs,
...renewalArgs,
...acceptModalArgs,
...materialDetailsModalArgs,
...blockedArgs,
// Config
Expand Down
2 changes: 0 additions & 2 deletions src/apps/loan-list/list/loan-list.entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { GroupModalProps } from "../../../core/storybook/groupModalArgs";
import { GroupModalLoansProps } from "../../../core/storybook/loanGroupModalArgs";
import { RenewalArgs } from "../../../core/storybook/renewalArgs";
import { MaterialDetailsModalProps } from "../../../core/storybook/materialDetailsModalArgs";
import { AcceptFeesModalEntryTextProps } from "../../../core/storybook/acceptFeesModalArgs";
import { GlobalEntryTextProps } from "../../../core/storybook/globalTextArgs";

export interface LoanListEntryConfigProps {
Expand Down Expand Up @@ -64,7 +63,6 @@ export interface LoanListEntryWithPageSizeProps
RenewalArgs,
LoanListEntryUrlProps,
MaterialDetailsModalProps,
AcceptFeesModalEntryTextProps,
GlobalUrlEntryPropsInterface {}

const LoanListEntry: FC<LoanListEntryWithPageSizeProps> = ({
Expand Down
12 changes: 0 additions & 12 deletions src/apps/material/material.dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -679,18 +679,6 @@ export default {
defaultValue: "Unknown",
control: { type: "text" }
},
addToFavoritesAriaLabelText: {
control: {
type: "text"
},
defaultValue: "Add @title to favorites list"
},
removeFromFavoritesAriaLabelText: {
control: {
type: "text"
},
defaultValue: "Remove @title from favorites list"
},
firstAvailableEditionText: {
name: "First available edition",
defaultValue: "First available edition",
Expand Down
2 changes: 0 additions & 2 deletions src/apps/material/material.entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import GlobalUrlEntryPropsInterface from "../../core/utils/types/global-url-prop
import { GlobalEntryTextProps } from "../../core/storybook/globalTextArgs";

interface MaterialEntryTextProps {
addToFavoritesAriaLabelText: string;
alreadyReservedText: string;
approveReservationText: string;
blockedButtonText: string;
Expand Down Expand Up @@ -143,7 +142,6 @@ interface MaterialEntryTextProps {
readArticleText: string;
receiveEmailWhenMaterialReadyText: string;
receiveSmsWhenMaterialReadyText: string;
removeFromFavoritesAriaLabelText: string;
reservableFromAnotherLibraryText: string;
reservationErrorsDescriptionText: string;
reservationErrorsTitleText: string;
Expand Down
12 changes: 0 additions & 12 deletions src/apps/recommender/Recommender.dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,6 @@ export default {
},
defaultValue: "For your inspiration"
},
addToFavoritesAriaLabelText: {
control: {
type: "text"
},
defaultValue: "Add @title to favorites list"
},
removeFromFavoritesAriaLabelText: {
control: {
type: "text"
},
defaultValue: "Remove @title from favorites list"
},
materialUrl: {
defaultValue: "/work/:workid",
control: { type: "text" }
Expand Down
2 changes: 0 additions & 2 deletions src/apps/recommender/Recommender.entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ export interface RecommenderProps {
materialAndAuthorText: string;
etAlText: string;
recommenderTitleInspirationText: string;
addToFavoritesAriaLabelText: string;
removeFromFavoritesAriaLabelText: string;
}

export interface ReccommenderPropsInterface
Expand Down
5 changes: 0 additions & 5 deletions src/apps/reservation-list/list/reservation-list.dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,6 @@ export default {
defaultValue: "Settings",
control: { type: "text" }
},
pauseReservationModalAriaDescriptionText: {
defaultValue:
"This modal makes it possible to pause your physical reservations",
control: { type: "text" }
},
pauseReservationModalHeaderText: {
defaultValue: "Pause reservations on physical items",
control: { type: "text" }
Expand Down
1 change: 0 additions & 1 deletion src/apps/reservation-list/list/reservation-list.entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export interface ReservationListTextProps {
reservationListPauseReservationOnHoldText: string;
reservationListOnHoldAriaText: string;
reservationListPauseReservationAriaModalText: string;
pauseReservationModalAriaDescriptionText: string;
pauseReservationModalHeaderText: string;
pauseReservationModalBodyText: string;
pauseReservationModalCloseModalText: string;
Expand Down
12 changes: 0 additions & 12 deletions src/apps/search-result/search-result.dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,18 +203,6 @@ export default {
defaultValue: "+ more filters",
control: { type: "text" }
},
addToFavoritesAriaLabelText: {
control: {
type: "text"
},
defaultValue: "Add @title to favorites list"
},
removeFromFavoritesAriaLabelText: {
control: {
type: "text"
},
defaultValue: "Remove @title from favorites list"
},
loadingText: {
name: "Loading",
defaultValue: "Loading",
Expand Down
2 changes: 0 additions & 2 deletions src/apps/search-result/search-result.entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { GlobalEntryTextProps } from "../../core/storybook/globalTextArgs";

interface SearchResultEntryTextProps {
addMoreFiltersText: string;
addToFavoritesAriaLabelText: string;
byAuthorText: string;
etAlText: string;
facetAccessTypesText: string;
Expand All @@ -34,7 +33,6 @@ interface SearchResultEntryTextProps {
inSeriesText: string;
loadingText: string;
numberDescriptionText: string;
removeFromFavoritesAriaLabelText: string;
resultPagerStatusText: string;
showingResultsForText: string;
noSearchResultText: string;
Expand Down
12 changes: 0 additions & 12 deletions src/apps/something-similar/SomethingSimilar.dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,6 @@ export default {
type: "text"
},
defaultValue: "Something similar"
},
addToFavoritesAriaLabelText: {
control: {
type: "text"
},
defaultValue: "Add @title to favorites list"
},
removeFromFavoritesAriaLabelText: {
control: {
type: "text"
},
defaultValue: "Remove @title from favorites list"
}
}
} as ComponentMeta<typeof SomethingSimilar>;
Expand Down
2 changes: 0 additions & 2 deletions src/apps/something-similar/SomethingSimilar.entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ export interface SomethingSimilarProps {
etAlText: string;
somethingSimilarByTheSameAuthorText: string;
somethingSimilarSomethingSimilarAuthorText: string;
addToFavoritesAriaLabelText: string;
removeFromFavoritesAriaLabelText: string;
faust: FaustId;
}

Expand Down
12 changes: 0 additions & 12 deletions src/components/button-favourite/button-favourite.dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,6 @@ export default {
control: "text",
defaultValue: "work-of:870970-basis:45234401"
},
addToFavoritesAriaLabelText: {
control: {
type: "text"
},
defaultValue: "Add @title to favorites list"
},
removeFromFavoritesAriaLabelText: {
control: {
type: "text"
},
defaultValue: "Remove @title from favorites list"
},
title: {
control: {
type: "text"
Expand Down
36 changes: 0 additions & 36 deletions src/core/storybook/acceptFeesModalArgs.ts

This file was deleted.

52 changes: 52 additions & 0 deletions src/core/storybook/globalTextArgs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,49 @@ export default {
acceptModalAriaLabelText: {
defaultValue: "accept modal aria label text",
control: { type: "text" }
},
pauseReservationModalAriaDescriptionText: {
defaultValue:
"This modal makes it possible to pause your physical reservations",
control: { type: "text" }
},
addToFavoritesAriaLabelText: {
defaultValue: "Add @title to favorites list",
control: {
type: "text"
}
},
removeFromFavoritesAriaLabelText: {
defaultValue: "Remove @title from favorites list",
control: {
type: "text"
}
},
acceptModalAriaDescriptionText: {
defaultValue: "accept modal aria description text",
control: { type: "text" }
},

acceptModalHeaderText: {
defaultValue: "Hov, dit gebyr forhøjes!",
control: { type: "text" }
},
acceptModalBodyText: {
defaultValue:
"Fornyer du dine lån, forhøjes dit gebyr. Alle materialer ikke kan fornys og lånet splittes derfor op. Ved overskredne lån modtager du et gebyr pr. lån og derfor forhøjes dit samlede gebyr, hvis du vælger at gå videre med at fornye.",
control: { type: "text" }
},
acceptModalAreYouSureText: {
defaultValue: "Er du sikker på du vil fornye?",
control: { type: "text" }
},
acceptModalAcceptButtonText: {
defaultValue: "Ja, forny mulige",
control: { type: "text" }
},
acceptModalCancelButtonText: {
defaultValue: "Annuller fornyelse",
control: { type: "text" }
}
};

Expand Down Expand Up @@ -174,5 +217,14 @@ export interface GlobalEntryTextProps {
closeModalAriaLabelInterestPeriodText: string;
closeModalAriaLabelSmsText: string;
deleteReservationModalButtonText: string;
pauseReservationModalAriaDescriptionText: string;
acceptModalAriaDescriptionText: string;
addToFavoritesAriaLabelText: string;
removeFromFavoritesAriaLabelText: string;
acceptModalAriaLabelText: string;
acceptModalHeaderText: string;
acceptModalAreYouSureText: string;
acceptModalBodyText: string;
acceptModalCancelButtonText: string;
acceptModalAcceptButtonText: string;
}
Loading

0 comments on commit dccc5ba

Please sign in to comment.