From 0b07fdd3805f6c7f2bdb6a4331f7651e6175dc74 Mon Sep 17 00:00:00 2001 From: ajnart Date: Wed, 8 Feb 2023 22:11:38 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=8C=90=20Add=20Norwegian=20and=20Slov?= =?UTF-8?q?ak?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- next-i18next.config.js | 2 ++ src/tools/language.ts | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/next-i18next.config.js b/next-i18next.config.js index 32d339fe9..3ce413d58 100644 --- a/next-i18next.config.js +++ b/next-i18next.config.js @@ -25,6 +25,8 @@ module.exports = { 'uk', 'zh', 'el', + 'sk', + 'nb', ], localePath: path.resolve('./public/locales'), fallbackLng: 'en', diff --git a/src/tools/language.ts b/src/tools/language.ts index f0d0e9471..fb2335cfe 100644 --- a/src/tools/language.ts +++ b/src/tools/language.ts @@ -75,6 +75,20 @@ export const languages: Language[] = [ translatedName: 'LOLCAT', emoji: '🐱', }, + // Norwegian + { + shortName: 'nb', + originalName: 'Norsk', + translatedName: 'Norwegian', + emoji: '🇳🇴', + }, + // Slovak + { + shortName: 'sk', + originalName: 'Slovenčina', + translatedName: 'Slovak', + emoji: '🇸🇰', + }, { shortName: 'nl', originalName: 'Nederlands', From ba3f841ba3f5e6aa8904d74b49cea783fbcdb1b0 Mon Sep 17 00:00:00 2001 From: ajnart Date: Wed, 8 Feb 2023 22:15:44 +0900 Subject: [PATCH 2/3] Fix typos --- next-i18next.config.js | 2 +- src/tools/language.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/next-i18next.config.js b/next-i18next.config.js index 3ce413d58..7785243d3 100644 --- a/next-i18next.config.js +++ b/next-i18next.config.js @@ -26,7 +26,7 @@ module.exports = { 'zh', 'el', 'sk', - 'nb', + 'no', ], localePath: path.resolve('./public/locales'), fallbackLng: 'en', diff --git a/src/tools/language.ts b/src/tools/language.ts index fb2335cfe..8974e62a4 100644 --- a/src/tools/language.ts +++ b/src/tools/language.ts @@ -77,7 +77,7 @@ export const languages: Language[] = [ }, // Norwegian { - shortName: 'nb', + shortName: 'no', originalName: 'Norsk', translatedName: 'Norwegian', emoji: '🇳🇴', From 10e3718cb8450eed557a1851a128dcf48295cf6c Mon Sep 17 00:00:00 2001 From: ajnart Date: Sat, 11 Feb 2023 08:01:45 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=9A=A8=20Fix=20build=20for=20404=20pa?= =?UTF-8?q?ge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/404.tsx | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/pages/404.tsx b/src/pages/404.tsx index aadf66175..17c5b6966 100644 --- a/src/pages/404.tsx +++ b/src/pages/404.tsx @@ -9,7 +9,6 @@ import { } from '@mantine/core'; import React from 'react'; -import { serverSideTranslations } from 'next-i18next/serverSideTranslations'; import Link from 'next/link'; const useStyles = createStyles((theme) => ({ @@ -94,12 +93,3 @@ export default function Custom404() { ); } - -export async function getStaticProps({ locale }: { locale: string }) { - return { - props: { - ...(await serverSideTranslations(locale, ['common'])), - // Will be passed to the page component as props - }, - }; -}