Skip to content

Commit

Permalink
add nested keys and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
anshgoyalevil committed Jul 27, 2023
1 parent ab1262c commit 61c4e4b
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 17 deletions.
6 changes: 2 additions & 4 deletions components/Hero.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import Paragraph from './typography/Paragraph'
import AlgoliaSearch, { SearchButton } from './AlgoliaSearch'; // Import AlgoliaSearch component
import IconLoupe from './icons/Loupe';
import {
getAllLanguageSlugs,
getLanguage,
useTranslation,
} from "next-i18next-static-site";

Expand All @@ -24,10 +22,10 @@ export default function Hero({ className = ''}) {
<header className={`px-2 mt-12 ${className}`}>
<div className="text-center">
<Heading level="h1" typeStyle="heading-xl" className="mb-4">
{t('landingPageHeroHeading_1')} {` `}
{t('main.header')} {` `}
<span className="block md:-mt-4">
{" "}
{t('landingPageHeroHeading_2')}
{t('main.subHeader')}
</span>
</Heading>
<Heading level="h2" typeStyle="body-lg" textColor="text-gray-700" className="mb-10 max-w-4xl mx-auto">
Expand Down
5 changes: 3 additions & 2 deletions components/navigation/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,16 @@ export default function NavBar({
<IconLoupe />
</SearchButton>

<LanguageSelect
{/* // Language Picker Component */}
{/* <LanguageSelect
options={uniqueLangs}
onChange={(value) => {
setLang(value.toLowerCase());
changeLanguage(value.toLowerCase());
}}
className=""
selected={i18n.language.toLocaleUpperCase()}
/>
/> */}

<GithubButton text="GitHub" href="https://github.com/asyncapi/spec" className="py-2 ml-2" inNav="true" />

Expand Down
4 changes: 0 additions & 4 deletions locales/de/common.json

This file was deleted.

6 changes: 6 additions & 0 deletions locales/de/landing-page.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"main": {
"header": "Die Zukunft gestalten",
"subHeader": "Ereignisgesteuerte Architekturen (EDA)"
}
}
4 changes: 0 additions & 4 deletions locales/en/common.json

This file was deleted.

6 changes: 6 additions & 0 deletions locales/en/landing-page.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"main": {
"header": "Building the future of",
"subHeader": "Event-Driven Architectures (EDA)"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
i18n: {
languages: ["en", "de"],
defaultLanguage: "en",
namespaces: ["common"],
defaultNamespace: "common",
namespaces: ["landing-page"],
defaultNamespace: "landing-page",
},
};
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const gemoji = require('remark-gemoji-to-emoji');
const a11yEmoji = require('@fec/remark-a11y-emoji');
const slug = require('remark-slug');
const headingId = require('remark-heading-id');
const { i18n } = require("./next-i18next-static-site-config");
const { i18n } = require("./next-i18next-static-site.config");

const withMDX = require('@next/mdx')({
extension: /\.mdx?$/,
Expand Down

0 comments on commit 61c4e4b

Please sign in to comment.