From b3a1b84fb46e2a63c883c69bfb06b288c610aea9 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Prado Date: Wed, 20 Dec 2023 14:36:32 -0300 Subject: [PATCH 1/4] chore(docs): add pt-BR language support --- apps/clappr.io/docusaurus.config.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/apps/clappr.io/docusaurus.config.js b/apps/clappr.io/docusaurus.config.js index 8659ef539..82a4f887c 100644 --- a/apps/clappr.io/docusaurus.config.js +++ b/apps/clappr.io/docusaurus.config.js @@ -23,7 +23,7 @@ const config = { // to replace "en" with "zh-Hans". i18n: { defaultLocale: 'en', - locales: ['en'], + locales: ['en', 'pt-BR'], }, presets: [ @@ -55,15 +55,15 @@ const config = { }, items: [ { - to: '/docs/intro', - label: 'Docs', - position: + to: '/docs/intro', + label: 'Docs', + position: 'left' }, { - to: 'http://clappr.github.io/', - label: 'API', - position: + to: 'http://clappr.github.io/', + label: 'API', + position: 'left' }, { @@ -71,6 +71,10 @@ const config = { label: 'GitHub', position: 'right', }, + { + type: 'localeDropdown', + position: 'right', + }, ], }, footer: { From c0a9e8581e2a19254a955850579c786b5345f083 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Prado Date: Wed, 20 Dec 2023 16:50:22 -0300 Subject: [PATCH 2/4] chore(docs): translate main elements --- apps/clappr.io/i18n/pt-BR/code.json | 280 ++++++++++++++++++ .../options.json | 14 + .../current.json | 18 ++ .../docusaurus-theme-classic/footer.json | 34 +++ .../docusaurus-theme-classic/navbar.json | 18 ++ .../src/components/HomepageFeatures/index.js | 50 ++-- apps/clappr.io/src/pages/index.js | 38 ++- 7 files changed, 407 insertions(+), 45 deletions(-) create mode 100644 apps/clappr.io/i18n/pt-BR/code.json create mode 100644 apps/clappr.io/i18n/pt-BR/docusaurus-plugin-content-blog/options.json create mode 100644 apps/clappr.io/i18n/pt-BR/docusaurus-plugin-content-docs/current.json create mode 100644 apps/clappr.io/i18n/pt-BR/docusaurus-theme-classic/footer.json create mode 100644 apps/clappr.io/i18n/pt-BR/docusaurus-theme-classic/navbar.json diff --git a/apps/clappr.io/i18n/pt-BR/code.json b/apps/clappr.io/i18n/pt-BR/code.json new file mode 100644 index 000000000..af6a1e4d4 --- /dev/null +++ b/apps/clappr.io/i18n/pt-BR/code.json @@ -0,0 +1,280 @@ +{ + "Get Started": { + "message": "Começar" + }, + "Try a Demo": { + "message": "Demonstração" + }, + "Easy to Use": { + "message": "Fácil de usar" + }, + "Clappr was designed from the ground up to be easily installed and used. Just import it, plug it in your page and it's ready to play.": { + "message": "O Clappr foi projetado desde o início para ser facilmente instalado e usado. Basta importá-lo, conectá-lo à sua página e ele estará pronto para ser usado." + }, + "Build It Your Way": { + "message": "Monte do seu jeito" + }, + "Clappr is 100% open-source. It's architecture was projected with extensibility and low coupling by design. You can build new features and customize anything you want in Clappr with the use of plugins.": { + "message": "O Clappr é 100% de código aberto. Sua arquitetura foi projetada com extensibilidade e baixo acoplamento por design. Você pode criar novos recursos e personalizar o que quiser no Clappr com o uso de plug-ins." + }, + "Play Anywhere": { + "message": "Execute em qualquer lugar" + }, + "Clappr is HTML5 first and is able to deliver your content across multiple modern media devices. You can also extend the default HTML5 playback or create your own playback interface to create a new media support!": { + "message": "O Clappr é o primeiro em HTML5 e é capaz de fornecer seu conteúdo em vários dispositivos de mídia modernos. Você também pode estender a reprodução padrão do HTML5 ou criar sua própria interface de reprodução para criar um novo suporte de mídia!" + }, + "theme.ErrorPageContent.title": { + "message": "This page crashed.", + "description": "The title of the fallback page when the page crashed" + }, + "theme.ErrorPageContent.tryAgain": { + "message": "Try again", + "description": "The label of the button to try again when the page crashed" + }, + "theme.NotFound.title": { + "message": "Página não encontrada", + "description": "The title of the 404 page" + }, + "theme.NotFound.p1": { + "message": "Não foi possível encontrar o que você está procurando.", + "description": "The first paragraph of the 404 page" + }, + "theme.NotFound.p2": { + "message": "Entre em contato com o proprietário do site que lhe trouxe para cá e lhe informe que o link está quebrado.", + "description": "The 2nd paragraph of the 404 page" + }, + "theme.admonition.note": { + "message": "note", + "description": "The default label used for the Note admonition (:::note)" + }, + "theme.admonition.tip": { + "message": "tip", + "description": "The default label used for the Tip admonition (:::tip)" + }, + "theme.admonition.danger": { + "message": "danger", + "description": "The default label used for the Danger admonition (:::danger)" + }, + "theme.admonition.info": { + "message": "info", + "description": "The default label used for the Info admonition (:::info)" + }, + "theme.admonition.caution": { + "message": "caution", + "description": "The default label used for the Caution admonition (:::caution)" + }, + "theme.BackToTopButton.buttonAriaLabel": { + "message": "Volte para o topo", + "description": "The ARIA label for the back to top button" + }, + "theme.blog.archive.title": { + "message": "Arquivo", + "description": "The page & hero title of the blog archive page" + }, + "theme.blog.archive.description": { + "message": "Arquivo", + "description": "The page & hero description of the blog archive page" + }, + "theme.AnnouncementBar.closeButtonAriaLabel": { + "message": "Fechar", + "description": "The ARIA label for close button of announcement bar" + }, + "theme.blog.paginator.navAriaLabel": { + "message": "Navegação da página de listagem do blog", + "description": "The ARIA label for the blog pagination" + }, + "theme.blog.paginator.newerEntries": { + "message": "Conteúdo mais novo", + "description": "The label used to navigate to the newer blog posts page (previous page)" + }, + "theme.blog.paginator.olderEntries": { + "message": "Conteúdo mais antigo", + "description": "The label used to navigate to the older blog posts page (next page)" + }, + "theme.blog.post.paginator.navAriaLabel": { + "message": "Navegação da página de postagem do blog", + "description": "The ARIA label for the blog posts pagination" + }, + "theme.blog.post.paginator.newerPost": { + "message": "Postagem mais nova", + "description": "The blog post button label to navigate to the newer/previous post" + }, + "theme.blog.post.paginator.olderPost": { + "message": "Postagem mais antiga", + "description": "The blog post button label to navigate to the older/next post" + }, + "theme.blog.post.plurals": { + "message": "Uma postagem|{count} postagens", + "description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.blog.tagTitle": { + "message": "{nPosts} marcadas com \"{tagName}\"", + "description": "The title of the page for a blog tag" + }, + "theme.tags.tagsPageLink": { + "message": "Ver todas os Marcadores", + "description": "The label of the link targeting the tag list page" + }, + "theme.colorToggle.ariaLabel": { + "message": "Switch between dark and light mode (currently {mode})", + "description": "The ARIA label for the navbar color mode toggle" + }, + "theme.colorToggle.ariaLabel.mode.dark": { + "message": "dark mode", + "description": "The name for the dark color mode" + }, + "theme.colorToggle.ariaLabel.mode.light": { + "message": "light mode", + "description": "The name for the light color mode" + }, + "theme.docs.DocCard.categoryDescription": { + "message": "{count} items", + "description": "The default description for a category card in the generated index about how many items this category includes" + }, + "theme.docs.breadcrumbs.home": { + "message": "Home page", + "description": "The ARIA label for the home page in the breadcrumbs" + }, + "theme.docs.breadcrumbs.navAriaLabel": { + "message": "Breadcrumbs", + "description": "The ARIA label for the breadcrumbs" + }, + "theme.docs.paginator.navAriaLabel": { + "message": "Navigação das páginas de documentação", + "description": "The ARIA label for the docs pagination" + }, + "theme.docs.paginator.previous": { + "message": "Anterior", + "description": "The label used to navigate to the previous doc" + }, + "theme.docs.paginator.next": { + "message": "Próxima", + "description": "The label used to navigate to the next doc" + }, + "theme.docs.tagDocListPageTitle.nDocsTagged": { + "message": "Um documento selecionado|{count} documentos selecionados", + "description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.tagDocListPageTitle": { + "message": "{nDocsTagged} com \"{tagName}\"", + "description": "The title of the page for a docs tag" + }, + "theme.docs.versionBadge.label": { + "message": "Version: {versionLabel}" + }, + "theme.docs.versions.unreleasedVersionLabel": { + "message": "Esta é uma documentação não lançada para {siteTitle} {versionLabel}.", + "description": "The label used to tell the user that he's browsing an unreleased doc version" + }, + "theme.docs.versions.unmaintainedVersionLabel": { + "message": "Esta é a documentação para {siteTitle} {versionLabel}, que não é mais mantida ativamente.", + "description": "The label used to tell the user that he's browsing an unmaintained doc version" + }, + "theme.docs.versions.latestVersionSuggestionLabel": { + "message": "Para a documentação atualizada, veja: {latestVersionLink} ({versionLabel}).", + "description": "The label used to tell the user to check the latest version" + }, + "theme.docs.versions.latestVersionLinkLabel": { + "message": "última versão", + "description": "The label used for the latest version suggestion link label" + }, + "theme.common.editThisPage": { + "message": "Editar essa página", + "description": "The link label to edit the current page" + }, + "theme.common.headingLinkTitle": { + "message": "Link direto para o título", + "description": "Title for link to heading" + }, + "theme.lastUpdated.atDate": { + "message": " em {date}", + "description": "The words used to describe on which date a page has been last updated" + }, + "theme.lastUpdated.byUser": { + "message": " por {user}", + "description": "The words used to describe by who the page has been last updated" + }, + "theme.lastUpdated.lastUpdatedAtBy": { + "message": "Última atualização {atDate}{byUser}", + "description": "The sentence used to display when a page has been last updated, and by who" + }, + "theme.navbar.mobileVersionsDropdown.label": { + "message": "Versions", + "description": "The label for the navbar versions dropdown on mobile view" + }, + "theme.common.skipToMainContent": { + "message": "Pular para o conteúdo principal", + "description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation" + }, + "theme.tags.tagsListLabel": { + "message": "Marcadores:", + "description": "The label alongside a tag list" + }, + "theme.CodeBlock.copied": { + "message": "Copiado", + "description": "The copied button label on code blocks" + }, + "theme.CodeBlock.copyButtonAriaLabel": { + "message": "Copiar código para a área de transferência", + "description": "The ARIA label for copy code blocks button" + }, + "theme.CodeBlock.copy": { + "message": "Copiar", + "description": "The copy button label on code blocks" + }, + "theme.CodeBlock.wordWrapToggle": { + "message": "Toggle word wrap", + "description": "The title attribute for toggle word wrapping button of code block lines" + }, + "theme.blog.sidebar.navAriaLabel": { + "message": "Blog recent posts navigation", + "description": "The ARIA label for recent posts in the blog sidebar" + }, + "theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": { + "message": "Toggle the collapsible sidebar category '{label}'", + "description": "The ARIA label to toggle the collapsible sidebar category" + }, + "theme.navbar.mobileLanguageDropdown.label": { + "message": "Languages", + "description": "The label for the mobile language switcher dropdown" + }, + "theme.TOCCollapsible.toggleButtonLabel": { + "message": "Nessa página", + "description": "The label used by the button on the collapsible TOC component" + }, + "theme.blog.post.readMore": { + "message": "Leia Mais", + "description": "The label used in blog post item excerpts to link to full blog posts" + }, + "theme.blog.post.readMoreLabel": { + "message": "Read more about {title}", + "description": "The ARIA label for the link to full blog posts from excerpts" + }, + "theme.blog.post.readingTime.plurals": { + "message": "Leitura de um minuto|Leitura de {readingTime} minutos", + "description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.sidebar.collapseButtonTitle": { + "message": "Fechar painel lateral", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.collapseButtonAriaLabel": { + "message": "Fechar painel lateral", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": { + "message": "← Voltar para o menu principal", + "description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)" + }, + "theme.docs.sidebar.expandButtonTitle": { + "message": "Expandir painel lateral", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.docs.sidebar.expandButtonAriaLabel": { + "message": "Expandir painel lateral", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "An extensible media player for web applications": { + "message": "Um player de vídeo extensível para aplicações web" + } +} diff --git a/apps/clappr.io/i18n/pt-BR/docusaurus-plugin-content-blog/options.json b/apps/clappr.io/i18n/pt-BR/docusaurus-plugin-content-blog/options.json new file mode 100644 index 000000000..9239ff706 --- /dev/null +++ b/apps/clappr.io/i18n/pt-BR/docusaurus-plugin-content-blog/options.json @@ -0,0 +1,14 @@ +{ + "title": { + "message": "Blog", + "description": "The title for the blog used in SEO" + }, + "description": { + "message": "Blog", + "description": "The description for the blog used in SEO" + }, + "sidebar.title": { + "message": "Recent posts", + "description": "The label for the left sidebar" + } +} diff --git a/apps/clappr.io/i18n/pt-BR/docusaurus-plugin-content-docs/current.json b/apps/clappr.io/i18n/pt-BR/docusaurus-plugin-content-docs/current.json new file mode 100644 index 000000000..8760e5df6 --- /dev/null +++ b/apps/clappr.io/i18n/pt-BR/docusaurus-plugin-content-docs/current.json @@ -0,0 +1,18 @@ +{ + "version.label": { + "message": "Next", + "description": "The label for version current" + }, + "sidebar.docs.category.Getting Started": { + "message": "Getting Started", + "description": "The label for category Getting Started in sidebar docs" + }, + "sidebar.docs.category.Guides": { + "message": "Guides", + "description": "The label for category Guides in sidebar docs" + }, + "sidebar.docs.category.Plugins": { + "message": "Plugins", + "description": "The label for category Plugins in sidebar docs" + } +} diff --git a/apps/clappr.io/i18n/pt-BR/docusaurus-theme-classic/footer.json b/apps/clappr.io/i18n/pt-BR/docusaurus-theme-classic/footer.json new file mode 100644 index 000000000..0c08a764b --- /dev/null +++ b/apps/clappr.io/i18n/pt-BR/docusaurus-theme-classic/footer.json @@ -0,0 +1,34 @@ +{ + "link.title.Learn": { + "message": "Aprender", + "description": "The title of the footer links column with title=Learn in the footer" + }, + "link.title.Community": { + "message": "Comunidade", + "description": "The title of the footer links column with title=Community in the footer" + }, + "link.item.label.Getting Started": { + "message": "Iniciar", + "description": "The label of footer link with label=Getting Started linking to /getting-started/intro" + }, + "link.item.label.Docs": { + "message": "Docs", + "description": "The label of footer link with label=Docs linking to /docs/intro" + }, + "link.item.label.API": { + "message": "API", + "description": "The label of footer link with label=API linking to http://clappr.github.io/" + }, + "link.item.label.Stack Overflow": { + "message": "Stack Overflow", + "description": "The label of footer link with label=Stack Overflow linking to https://stackoverflow.com/questions/tagged/clappr" + }, + "link.item.label.GitHub": { + "message": "GitHub", + "description": "The label of footer link with label=GitHub linking to https://github.com/clappr/clappr" + }, + "copyright": { + "message": "Copyright © 2023 Clappr, Inc. Feito com Docusaurus.", + "description": "The footer copyright" + } +} diff --git a/apps/clappr.io/i18n/pt-BR/docusaurus-theme-classic/navbar.json b/apps/clappr.io/i18n/pt-BR/docusaurus-theme-classic/navbar.json new file mode 100644 index 000000000..a2bf973dd --- /dev/null +++ b/apps/clappr.io/i18n/pt-BR/docusaurus-theme-classic/navbar.json @@ -0,0 +1,18 @@ +{ + "title": { + "message": "Clappr", + "description": "The title in the navbar" + }, + "item.label.Docs": { + "message": "Docs", + "description": "Navbar item with label Docs" + }, + "item.label.API": { + "message": "API", + "description": "Navbar item with label API" + }, + "item.label.GitHub": { + "message": "GitHub", + "description": "Navbar item with label GitHub" + } +} diff --git a/apps/clappr.io/src/components/HomepageFeatures/index.js b/apps/clappr.io/src/components/HomepageFeatures/index.js index dd5285dc0..187e295aa 100644 --- a/apps/clappr.io/src/components/HomepageFeatures/index.js +++ b/apps/clappr.io/src/components/HomepageFeatures/index.js @@ -1,43 +1,45 @@ -import React from 'react'; -import clsx from 'clsx'; -import styles from './styles.module.css'; +import React from 'react' +import Translate from '@docusaurus/Translate' +import clsx from 'clsx' +import styles from './styles.module.css' const FeatureList = [ { - title: 'Easy to Use', + title: Easy to Use, Svg: require('@site/static/img/undraw_website_setup_re_d4y9.svg').default, description: ( - <> - Clappr was designed from the ground up to be easily installed and - used. Just import it, plug it in your page and it's ready to play. - + + Clappr was designed from the ground up to be easily installed and used. + Just import it, plug it in your page and it's ready to play. + ), }, { - title: 'Build It Your Way', + title: Build It Your Way, Svg: require('@site/static/img/undraw_programming_re_kg9v.svg').default, description: ( - <> - Clappr is 100% open-source. It's architecture was projected with extensibility - and low coupling by design. You can build new features and customize anything you - want in Clappr with the use of plugins. - + + Clappr is 100% open-source. It's architecture was projected with + extensibility and low coupling by design. You can build new features and + customize anything you want in Clappr with the use of plugins. + ), }, { - title: 'Play Anywhere', + title: Play Anywhere, Svg: require('@site/static/img/undraw_video_streaming_re_v3qg.svg').default, description: ( - <> - Clappr is HTML5 first and is able to deliver your content across multiple modern media - devices. You can also extend the default HTML5 playback or create your own playback - interface to create a new media support! - + + Clappr is HTML5 first and is able to deliver your content across + multiple modern media devices. You can also extend the default HTML5 + playback or create your own playback interface to create a new media + support! + ), }, -]; +] -function Feature({Svg, title, description}) { +function Feature({ Svg, title, description }) { return (
@@ -48,7 +50,7 @@ function Feature({Svg, title, description}) {

{description}

- ); + ) } export default function HomepageFeatures() { @@ -62,5 +64,5 @@ export default function HomepageFeatures() { - ); + ) } diff --git a/apps/clappr.io/src/pages/index.js b/apps/clappr.io/src/pages/index.js index d9076f7d4..225a236af 100644 --- a/apps/clappr.io/src/pages/index.js +++ b/apps/clappr.io/src/pages/index.js @@ -1,29 +1,26 @@ -import React from 'react'; -import clsx from 'clsx'; -import Link from '@docusaurus/Link'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import Layout from '@theme/Layout'; -import HomepageFeatures from '@site/src/components/HomepageFeatures'; +import React from 'react' +import Translate from '@docusaurus/Translate' +import clsx from 'clsx' +import Link from '@docusaurus/Link' +import useDocusaurusContext from '@docusaurus/useDocusaurusContext' +import Layout from '@theme/Layout' +import HomepageFeatures from '@site/src/components/HomepageFeatures' -import styles from './index.module.css'; +import styles from './index.module.css' function HomepageHeader() { - const {siteConfig} = useDocusaurusContext(); + const { siteConfig } = useDocusaurusContext() return (

{siteConfig.title}

-

{siteConfig.tagline}

+

An extensible media player for web applications

- - Get Started + + Get Started - - Try a Demo + + Try a Demo