Added missing translations here and there

This commit is contained in:
DrMint 2022-03-05 16:34:19 +01:00
parent 9b42a4f59f
commit 444842e570
7 changed files with 19 additions and 24 deletions

View File

@ -3,7 +3,7 @@ module.exports = {
swcMinify: true,
reactStrictMode: true,
i18n: {
locales: ["en", "fr", "ja", "es", "xx"],
locales: ["en", "fr", "ja", "es"],
defaultLocale: "en",
},
images: {

View File

@ -104,12 +104,8 @@ export default function AppLayout(props: AppLayoutProps): JSX.Element {
content={`${titlePrefix} - ${ogTitle}`}
></meta>
{props.description && (
<>
<meta name="description" content={metaDescription} />
<meta name="twitter:description" content={metaDescription}></meta>
</>
)}
<meta property="og:image" content={metaImage.image}></meta>
<meta property="og:image:secure_url" content={metaImage.image}></meta>
@ -160,7 +156,7 @@ export default function AppLayout(props: AppLayoutProps): JSX.Element {
<div className="text-dark border-dark border-2 border-dotted rounded-2xl p-8 grid grid-flow-col place-items-center gap-9 opacity-40">
<p className="text-4xl"></p>
<p className="text-2xl w-64">
Select one of the options in the sidebar
{props.langui.select_option_sidebar}
</p>
</div>
</div>
@ -238,7 +234,7 @@ export default function AppLayout(props: AppLayoutProps): JSX.Element {
appLayout.languagePanelOpen ? "scale-100" : "scale-0"
}`}
>
<h2 className="text-2xl">Select a language</h2>
<h2 className="text-2xl">{props.langui.select_language}</h2>
<div className="flex flex-wrap flex-row gap-2">
{router.locales?.sort().map((locale) => (
<Button

View File

@ -81,6 +81,7 @@ query getWebsiteInterface($language_code: String) {
no_year
order_by
group_by
select_option_sidebar
}
}
}

View File

@ -163,6 +163,7 @@ export type GetWebsiteInterfaceQuery = {
no_year: string;
order_by: string;
group_by: string;
select_option_sidebar: string;
};
}>;
};

View File

@ -4,6 +4,7 @@ import { getWebsiteInterface } from "graphql/operations";
import { GetStaticProps } from "next";
import { GetWebsiteInterfaceQuery } from "graphql/operations-types";
import AppLayout from "components/AppLayout";
import ReturnButton from "components/PanelComponents/ReturnButton";
type FourOhFourProps = {
langui: GetWebsiteInterfaceQuery;
@ -14,9 +15,7 @@ export default function FourOhFour(props: FourOhFourProps): JSX.Element {
const contentPanel = (
<ContentPanel>
<h1>404 - {langui.page_not_found}</h1>
<Link href="/">
<a>Go back home</a>
</Link>
<ReturnButton href="/" title="Home" langui={langui} />
</ContentPanel>
);
return (

View File

@ -141,13 +141,11 @@ export default function Home(props: HomeProps): JSX.Element {
);
return (
<>
<AppLayout
navTitle={"Accords Library"}
navTitle={"Home"}
langui={langui}
contentPanel={contentPanel}
/>
</>
);
}

View File

@ -64,15 +64,15 @@ export function prettyItemType(
const type = metadata.__typename;
switch (metadata.__typename) {
case "ComponentMetadataAudio":
return langui.library_item_type_audio;
return langui.audio;
case "ComponentMetadataBooks":
return langui.library_item_type_textual;
return langui.textual;
case "ComponentMetadataGame":
return langui.library_item_type_game;
return langui.game;
case "ComponentMetadataVideo":
return langui.library_item_type_video;
return langui.video;
case "ComponentMetadataOther":
return langui.library_item_type_other;
return langui.other;
default:
return "";
}