From 6a1c026b7cfba020d842b61ee49717921a09c5a6 Mon Sep 17 00:00:00 2001 From: Bruno Pulis Date: Thu, 22 Aug 2019 00:12:48 -0300 Subject: [PATCH 1/4] add support to pt-br --- _config.yml | 1 + source/_data/languages.yml | 1 + themes/cypress/languages/pt-br.yml | 214 +++++++++++++++++++++++++++++ 3 files changed, 216 insertions(+) create mode 100644 themes/cypress/languages/pt-br.yml diff --git a/_config.yml b/_config.yml index 4509cca7a1..a1a0bc12d4 100644 --- a/_config.yml +++ b/_config.yml @@ -13,6 +13,7 @@ language: - en - zh-cn - ja + - pt-br # URL ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' diff --git a/source/_data/languages.yml b/source/_data/languages.yml index f649846109..5bbf0b68a9 100644 --- a/source/_data/languages.yml +++ b/source/_data/languages.yml @@ -1,3 +1,4 @@ en: English ja: 日本語 zh-cn: 简体中文 +pt-br: Português Brazil diff --git a/themes/cypress/languages/pt-br.yml b/themes/cypress/languages/pt-br.yml new file mode 100644 index 0000000000..5a8d4b205e --- /dev/null +++ b/themes/cypress/languages/pt-br.yml @@ -0,0 +1,214 @@ +menu: + guides: Guias + api: API + plugins: Plugins + faq: FAQ + examples: Exemplos + search: Pesquisa + +index: + get-started: Introdução + +page: + contents: Conteúdo + back-to-top: Ir para o topo + improve: Melhorar este documento + prev: Anterior + next: Próximo + last-updated: "Última atualização: %s" + +sidebar: + guides: + overview: Overview + why-cypress: Por que Cypress? + getting-started: Introdução + key-differences: Key Differences + installing-cypress: Instalando o Cypress + writing-your-first-test: Escrevendo seu primeiro teste + testing-your-app: Testando sua Aplicação + interacting-with-elements: Interagindo com Elementos + core-concepts: Principais Conceitos + introduction-to-cypress: Introdução ao Cypress + writing-and-organizing-tests: Escrevendo e Organizando seus Testes + conditional-testing: Conditional Testing + test-runner: The Test Runner + dashboard: Dashboard + dashboard-introduction: Introdução + projects: Projects + runs: Runs + organizations: Organizations + users: Usuários + github-integration: Integração com GitHub + debugging: Debugging + variables-and-aliases: Variables and Aliases + stubs-spies-and-clocks: Stubs, Spies, and Clocks + network-requests: Network Requests + screenshots-and-videos: Screenshots and Videos + guides: Guides + command-line: Command Line + continuous-integration: Continuous Integration + parallelization: Parallelization + environment-variables: Variáveis de Ambiente + launching-browsers: Launching Browsers + custom-commands: Custom Commands + web-security: Web Security + references: Referências + configuration: Configuração + proxy-configuration: Configuração de Proxy + error-messages: Mensagens de Erro + bundled-tools: Bundled Tools + assertions: Assertions + best-practices: Best Practices + trade-offs: Trade-offs + changelog: Changelog + roadmap: Roadmap + tooling: Tooling + intelligent-code-completion: Intelligent Code Completion + plugins-guide: Plugins + reporters: Reporters + typescript-support: TypeScript + module-api: Module API + retry-ability: Retry-ability + visual-testing: Visual Testing + code-coverage: Cobertura de Código + api: + api: API + table-of-contents: Table of Contents + commands: Commands + and: and + as: as + blur: blur + check: check + children: children + clear: clear + clearcookie: clearCookie + clearcookies: clearCookies + clearlocalstorage: clearLocalStorage + click: click + clock: clock + closest: closest + contains: contains + dblclick: dblclick + debug: debug + document: document + each: each + end: end + eq: eq + exec: exec + filter: filter + find: find + first: first + fixture: fixture + focus: focus + focused: focused + get: get + getcookie: getCookie + getcookies: getCookies + go: go + hash: hash + hover: hover + invoke: invoke + its: its + last: last + location: location + log: log + next: next + nextall: nextAll + nextuntil: nextUntil + not: not + parent: parent + parents: parents + parentsuntil: parentsUntil + pause: pause + prev: prev + prevall: prevAll + prevuntil: prevUntil + readfile: readFile + reload: reload + request: request + root: root + route: route + screenshot: screenshot + scrollintoview: scrollIntoView + scrollto: scrollTo + select: select + server: server + setcookie: setCookie + should: should + siblings: siblings + spread: spread + spy: spy + stub: stub + submit: submit + task: task + then: then + tick: tick + title: title + trigger: trigger + type: type + uncheck: uncheck + url: url + viewport: viewport + visit: visit + wait: wait + window: window + within: within + wrap: wrap + writefile: writeFile + events: Events + catalog-of-events: Catalog of Events + assertions: Assertions + all-assertions: All Assertions + on: on + once: once + removelistener: removeListener + removealllisteners: removeAllListeners + utilities: Utilities + _: _ + $: $ + minimatch: minimatch + moment: moment + blob: Blob + promise: Promise + cypress-api: Cypress API + config: config + env: env + iscy: isCy + custom-commands: Commands + cookies: Cookies + dom: dom + cypress-log: log + cypress-server: Server + plugins: Plugins + writing-a-plugin: Writing a Plugin + preprocessors-api: Preprocessors + browser-launch-api: Browser Launching + configuration-api: Configuration + version: version + arch: arch + browser: browser + platform: platform + selector-playground-api: SelectorPlayground + screenshot-api: Screenshot + after-screenshot-api: After Screenshot + spec: spec + examples: + examples: Examples + recipes: Recipes + tutorials: Tutorial Videos + applications: Applications + docker: Docker + media: Media + courses-media: Courses + webinars-media: Webinars + blogs-media: Blogs + talks-media: Talks + podcasts-media: Podcasts + screencasts-media: Screencasts + workshop: Workshop + faq: + questions: FAQ + general-questions-faq: General Questions + using-cypress-faq: Using Cypress + dashboard-faq: Dashboard + company-faq: Company From 2e454ac1ca10b63477a52bf169a82d6aa46377c7 Mon Sep 17 00:00:00 2001 From: Bruno Pulis Date: Sat, 7 Sep 2019 01:59:34 -0300 Subject: [PATCH 2/4] translate content to pt-br --- themes/cypress/languages/pt-br.yml | 86 +++++++++++++++--------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/themes/cypress/languages/pt-br.yml b/themes/cypress/languages/pt-br.yml index 5a8d4b205e..e7c502b245 100644 --- a/themes/cypress/languages/pt-br.yml +++ b/themes/cypress/languages/pt-br.yml @@ -19,10 +19,10 @@ page: sidebar: guides: - overview: Overview + overview: Visão Geral why-cypress: Por que Cypress? getting-started: Introdução - key-differences: Key Differences + key-differences: Principais diferenças installing-cypress: Instalando o Cypress writing-your-first-test: Escrevendo seu primeiro teste testing-your-app: Testando sua Aplicação @@ -30,51 +30,51 @@ sidebar: core-concepts: Principais Conceitos introduction-to-cypress: Introdução ao Cypress writing-and-organizing-tests: Escrevendo e Organizando seus Testes - conditional-testing: Conditional Testing - test-runner: The Test Runner + conditional-testing: Testes Condicionais + test-runner: O Test Runner dashboard: Dashboard dashboard-introduction: Introdução - projects: Projects + projects: Projetos runs: Runs - organizations: Organizations + organizations: Organizações users: Usuários github-integration: Integração com GitHub - debugging: Debugging - variables-and-aliases: Variables and Aliases - stubs-spies-and-clocks: Stubs, Spies, and Clocks + debugging: Debugando + variables-and-aliases: Variáveis e Aliases + stubs-spies-and-clocks: Stubs, Spies e Clocks network-requests: Network Requests - screenshots-and-videos: Screenshots and Videos - guides: Guides - command-line: Command Line - continuous-integration: Continuous Integration - parallelization: Parallelization + screenshots-and-videos: Screenshots e Vídeos + guides: Guias + command-line: Linha de Comando + continuous-integration: Integração Contínua + parallelization: Paralelização environment-variables: Variáveis de Ambiente - launching-browsers: Launching Browsers - custom-commands: Custom Commands - web-security: Web Security + launching-browsers: Iniciando navegadores + custom-commands: Comandos Customizados + web-security: Segurança Web references: Referências configuration: Configuração proxy-configuration: Configuração de Proxy error-messages: Mensagens de Erro - bundled-tools: Bundled Tools - assertions: Assertions - best-practices: Best Practices + bundled-tools: Ferramentas incluídas + assertions: Asserções + best-practices: Boas Práticas trade-offs: Trade-offs changelog: Changelog - roadmap: Roadmap - tooling: Tooling - intelligent-code-completion: Intelligent Code Completion + roadmap: Roteiro + tooling: Ferramentas + intelligent-code-completion: Conclusão Inteligente de Código plugins-guide: Plugins reporters: Reporters typescript-support: TypeScript - module-api: Module API - retry-ability: Retry-ability - visual-testing: Visual Testing + module-api: Módulo de API + retry-ability: Capacidade de repetição + visual-testing: Teste Visual code-coverage: Cobertura de Código api: api: API - table-of-contents: Table of Contents - commands: Commands + table-of-contents: Índice + commands: Comandos and: and as: as blur: blur @@ -156,9 +156,9 @@ sidebar: wrap: wrap writefile: writeFile events: Events - catalog-of-events: Catalog of Events - assertions: Assertions - all-assertions: All Assertions + catalog-of-events: Catalogo de Eventos + assertions: Asserções + all-assertions: Todas Asserções on: on once: once removelistener: removeListener @@ -180,10 +180,10 @@ sidebar: cypress-log: log cypress-server: Server plugins: Plugins - writing-a-plugin: Writing a Plugin - preprocessors-api: Preprocessors + writing-a-plugin: Escrevendo um Plugin + preprocessors-api: Pré-processadores browser-launch-api: Browser Launching - configuration-api: Configuration + configuration-api: Configuração version: version arch: arch browser: browser @@ -193,22 +193,22 @@ sidebar: after-screenshot-api: After Screenshot spec: spec examples: - examples: Examples - recipes: Recipes - tutorials: Tutorial Videos - applications: Applications + examples: Exemplos + recipes: Tutoriais + tutorials: Tutoriais em Vídeo + applications: Aplicações docker: Docker media: Media - courses-media: Courses + courses-media: Cursos webinars-media: Webinars blogs-media: Blogs - talks-media: Talks + talks-media: Palestras podcasts-media: Podcasts screencasts-media: Screencasts workshop: Workshop faq: questions: FAQ - general-questions-faq: General Questions - using-cypress-faq: Using Cypress + general-questions-faq: Perguntas gerais + using-cypress-faq: Usando Cypress dashboard-faq: Dashboard - company-faq: Company + company-faq: Empresa From 45d67e2a4b44869762a54938bb9e571ff42e1448 Mon Sep 17 00:00:00 2001 From: Bruno Pulis Date: Mon, 9 Sep 2019 23:10:02 -0300 Subject: [PATCH 3/4] add translation pt-br to why-cypress --- source/pt-br/guides/overview/why-cypress.md | 95 +++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 source/pt-br/guides/overview/why-cypress.md diff --git a/source/pt-br/guides/overview/why-cypress.md b/source/pt-br/guides/overview/why-cypress.md new file mode 100644 index 0000000000..f29d8d7407 --- /dev/null +++ b/source/pt-br/guides/overview/why-cypress.md @@ -0,0 +1,95 @@ +--- +title: Por quê o Cypress? +--- + +{% note info %} +# {% fa fa-graduation-cap %} O que você aprenderá + +- O que é Cypress e por que você deve usá-lo +- Nossa missão e em que acreditamos +- Principais recursos do Cypress + +{% endnote %} + +# Breve definição + +Cypress é uma ferramenta de teste de última geração para front end criada para a web moderna. Abordamos os principais pontos problemáticos que os desenvolvedores e engenheiros de QA enfrentam ao testar aplicações modernas. + +Nós simplificamos: + +- {% urlHash 'Configurando os testes' Configurando-testes %} +- {% urlHash 'Escrevendo testes' Escrevendo-testes %} +- {% urlHash 'Executando testes' Executando-testes %} +- {% urlHash 'Debugando Testes' Debugando-testes %} + +Cypress é mais frequentemente comparado com o Selenium; no entanto, Cypress é fundamentalmente e arquiteturalmente diferente. Cypress não é limitado pelas mesmas restrições que o Selenium. + +Isso permite que você **escreva testes mais rápidos**, **mais fáceis** e **mais confiáveis**. + +# Quem usa o Cypress? + +Nossos usuários geralmente são desenvolvedores ou engenheiros de QA que criam aplicações web usando frameworks modernos de JavaScript. + +O Cypress permite que você escreva todos os tipos de teste: + +- Testes de ponta a ponta (E2E) +- Testes de Integração +- Testes Unitários + +Cypress pode testar qualquer coisa que seja executada em um navegador. + +# Ecossitema do Cypress + +Cypress consiste em um Test Runner gratuito, {% url "open source" https://github.com/cypress-io/cypress %}, {% url "locally installed" installing-cypress %} Test Runner **and** a Dashboard Service for {% url 'recording your tests' dashboard-introduction%}. + +- ***Em Primeiro Lugar:*** Cypress makes it easy to set up and start writing tests every day while you build your application locall. *TDD at its best!* +- ***Later:*** After building up a suite of tests and {% url "integrating Cypress" continuous-integration %} with your CI Provider, our {% url 'Dashboard Service' dashboard-introduction%} can record your test runs. You'll never have to wonder: *Why did this fail?* + +# Nossa missão + +Nossa missão é construir um ecossistema open source que aprimore a produtividade, torne o teste uma experiência agradável e gere a felicidade do desenvolvedor. +Nós nos responsabilizamos por defender um processo de teste que **realmente funciona**. + +Acreditamos que nossa documentação deve ser simples e acessível. Isso significa permitir que nossos leitores compreendem completamente não apenas o **porque** e o **como** também. + +Queremos ajudar os desenvolvedores a criar uma nova geração de aplicações modernas de maneira mais rápida, meljor esem o estresse e a ansiedade que associamos ao gerenciamento de testes. + +Sabemos que, para sermos bem-sucedidos, precisamos habilitar, nutrir e promover um ecossistema que cresça como open source. Cada linha de teste é um investimento no seu **código fonte**, nunca será associados a nós como um serviço pago ou empresa. Os testes serão capazes de executar e trabalhar independentemente *sempre*. + +Acreditamos que o teste precisa de {% fa fa-heart %} e estamos aqui para criar uma ferramenta, um serviço e uma comunidade na qual todos possam aprender e se beneficiar. Estamos resolvendo os pontos mais difícies compartilhados por todos os desenvolvedores que trabalham na web. Acreditamos nessa missão e esperamos que você se junte a nós para tornar o Cypress um ecossistema duradouro que faça todos felizes. + +# Recursos + +Cypress comes fully baked, batteries included. Here is a list of things it can do that no other testing framework can: + +- **Time Travel:** Cypress takes snapshots as your tests run. Hover over commands in the {% url 'Command Log' test-runner#Command-Log %} to see exactly what happened at each step. +- **Debuggability:** Stop guessing why your tests are failing. {% url 'Debug directly' debugging %} from familiar tools like Developer Tools. Our readable errors and stack traces make debugging lightning fast. +- **Automatic Waiting:** Never add waits or sleeps to your tests. Cypress {% url 'automatically waits' introduction-to-cypress#Cypress-is-Not-Like-jQuery %} for commands and assertions before moving on. No more async hell. +- **Spies, Stubs, and Clocks:** Verify and {% url 'control the behavior' stubs-spies-and-clocks %} of functions, server responses, or timers. The same functionality you love from unit testing is right at your fingertips. +- **Network Traffic Control:** Easily {% url 'control, stub, and test edge cases' network-requests %} without involving your server. You can stub network traffic however you like. +- **Resultados Consistentes:** Our architecture doesn’t use Selenium or WebDriver. Say hello to fast, consistent and reliable tests that are flake-free. +- **Screenshots e Vídeos:** View screenshots taken automatically on failure, or videos of your entire test suite when run from the CLI. + +## {% fa fa-cog %} Configurando testes + +Não há servidores, drivers ou nenhuma outra dependências para instalar ou configurar. Você pode escrever seu primeiro teste aprovado em 60 segundos. + +{% video local /img/snippets/installing-cli.mp4 %} + +## {% fa fa-code %} Escrevendo testes + +Tests written in Cypress are easy to read and understand. Our API comes fully baked, on top of tools you are familiar with already. + +{% video local /img/snippets/writing-tests.mp4 %} + +## {% fa fa-play-circle %} Executando testes + +Cypress runs as fast as your browser can render content. You can watch tests run in real time as you develop your applications. TDD FTW! + +{% video local /img/snippets/running-tests.mp4 %} + +## {% fa fa-bug %} Debugando testes + +Mensagens de erro legíveis ajudam você a debugar rapidamente. Você também tem acesso a todas as ferramentas de desenvolvedor que conhece e ama. + +{% video local /img/snippets/debugging.mp4 %} From f85b62f41fdadc0018b65fc06b62595612ea848b Mon Sep 17 00:00:00 2001 From: Jennifer Shehane Date: Wed, 11 Sep 2019 18:04:17 -0400 Subject: [PATCH 4/4] Update logic to copy over en docs to non-translated pt-br pages --- .gitignore | 1 + copy-english-docs.js | 10 +++++++--- cypress/integration/main_spec.js | 1 + robots.txt | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 7e60468342..8ddd744fb7 100644 --- a/.gitignore +++ b/.gitignore @@ -30,4 +30,5 @@ source/_data/banners.yml # source/ja source/zh-cn +source/pt-br diff --git a/copy-english-docs.js b/copy-english-docs.js index 660d63ec8c..a174d2da0b 100644 --- a/copy-english-docs.js +++ b/copy-english-docs.js @@ -15,6 +15,7 @@ const getLanguageName = (short) => { const names = { ja: 'Japanese', 'zh-cn': 'Chinese', + 'pt-br': 'Portuguese Brazil', } if (!names[short]) { @@ -48,8 +49,9 @@ const findAllDocs = () => { const isJapaneseDoc = R.test(/\/ja\//) const isChineseDoc = R.test(/\/zh-cn\//) +const isPortugueseDoc = R.test(/\/pt-br\//) const isImage = R.test(/\/img\//) -const isTranslation = R.anyPass([isJapaneseDoc, isChineseDoc, isImage]) +const isTranslation = R.anyPass([isJapaneseDoc, isChineseDoc, isPortugueseDoc, isImage]) const translationsFilter = R.reject(isTranslation) @@ -60,7 +62,7 @@ const findAllEnglishDocs = () => { } /** - * @param {("ja" | "zh-cn")} shortName The short language name + * @param {("ja" | "zh-cn" | "pt-br")} shortName The short language name */ const findAllDocsFor = (shortName) => { const relativeSourceFolder = `source/${shortName}` @@ -69,7 +71,7 @@ const findAllDocsFor = (shortName) => { } /** - * @param {("ja" | "zh-cn")} targetLanguage + * @param {("ja" | "zh-cn" | "pt-br")} targetLanguage */ const copyAllEnglishDocsNotTranslatedTo = (targetLanguage) => { return Promise.all([ @@ -107,6 +109,8 @@ const copyUntranslatedDocs = () => { return copyAllEnglishDocsNotTranslatedTo('ja') .then(() => { return copyAllEnglishDocsNotTranslatedTo('zh-cn') + }).then(() => { + return copyAllEnglishDocsNotTranslatedTo('pt-br') }) } diff --git a/cypress/integration/main_spec.js b/cypress/integration/main_spec.js index af1353e5bf..43097ca026 100644 --- a/cypress/integration/main_spec.js +++ b/cypress/integration/main_spec.js @@ -15,6 +15,7 @@ describe('Main', () => { cy.request('/robots.txt').its('body') .should('include', 'Disallow: /ja/') .and('include', 'Disallow: /zh-cn/') + .and('include', 'Disallow: /pt-br/') }) } }) diff --git a/robots.txt b/robots.txt index 072afff0bc..36a3841eeb 100644 --- a/robots.txt +++ b/robots.txt @@ -1,4 +1,5 @@ User-agent: * Disallow: /ja/ Disallow: /zh-cn/ +Disallow: /pt-br/ Disallow: /fonts/