From a5226d72e13d1350d20626dba3ffbf3515194146 Mon Sep 17 00:00:00 2001 From: Ansh Goyal Date: Fri, 1 Sep 2023 17:47:27 +0530 Subject: [PATCH 1/4] feat: add translations for tools/cli page (#2078) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Maciej Urbańczyk --- components/buttons/GithubButton.js | 8 +- cypress/test/buttons/GithubButton.cy.js | 2 +- locales/de/common.json | 1 + locales/de/tools.json | 25 +++ locales/en/common.json | 1 + locales/en/tools.json | 25 +++ next-i18next-static-site.config.js | 2 +- pages/[lang]/tools/cli.js | 242 ++++++++++++++++++++++++ 8 files changed, 302 insertions(+), 4 deletions(-) create mode 100644 locales/de/tools.json create mode 100644 locales/en/tools.json create mode 100644 pages/[lang]/tools/cli.js diff --git a/components/buttons/GithubButton.js b/components/buttons/GithubButton.js index 31f8cf4322b5..1375efd9bf97 100644 --- a/components/buttons/GithubButton.js +++ b/components/buttons/GithubButton.js @@ -1,17 +1,21 @@ import Button from './Button' import IconGithub from '../icons/Github' +import { useTranslation } from '../../lib/i18n' export default function GithubButton({ - text = 'View on Github', + text = 'githubButton', href = 'https://github.com/asyncapi', target = '_blank', iconPosition = 'left', className, inNav = "false" }) { + + const { t } = useTranslation("common"); + return (