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, swcMinify: true,
reactStrictMode: true, reactStrictMode: true,
i18n: { i18n: {
locales: ["en", "fr", "ja", "es", "xx"], locales: ["en", "fr", "ja", "es"],
defaultLocale: "en", defaultLocale: "en",
}, },
images: { images: {

View File

@ -104,12 +104,8 @@ export default function AppLayout(props: AppLayoutProps): JSX.Element {
content={`${titlePrefix} - ${ogTitle}`} content={`${titlePrefix} - ${ogTitle}`}
></meta> ></meta>
{props.description && ( <meta name="description" content={metaDescription} />
<> <meta name="twitter:description" content={metaDescription}></meta>
<meta name="description" content={metaDescription} />
<meta name="twitter:description" content={metaDescription}></meta>
</>
)}
<meta property="og:image" content={metaImage.image}></meta> <meta property="og:image" content={metaImage.image}></meta>
<meta property="og:image:secure_url" 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"> <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-4xl"></p>
<p className="text-2xl w-64"> <p className="text-2xl w-64">
Select one of the options in the sidebar {props.langui.select_option_sidebar}
</p> </p>
</div> </div>
</div> </div>
@ -238,7 +234,7 @@ export default function AppLayout(props: AppLayoutProps): JSX.Element {
appLayout.languagePanelOpen ? "scale-100" : "scale-0" 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"> <div className="flex flex-wrap flex-row gap-2">
{router.locales?.sort().map((locale) => ( {router.locales?.sort().map((locale) => (
<Button <Button

View File

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

View File

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

View File

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

View File

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