Skip to content

Add support to pt-br #2065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ source/_data/banners.yml
#
source/ja
source/zh-cn
source/pt-br

1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/'
Expand Down
10 changes: 7 additions & 3 deletions copy-english-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const getLanguageName = (short) => {
const names = {
ja: 'Japanese',
'zh-cn': 'Chinese',
'pt-br': 'Portuguese Brazil',
}

if (!names[short]) {
Expand Down Expand Up @@ -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)

Expand All @@ -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}`
Expand All @@ -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([
Expand Down Expand Up @@ -107,6 +109,8 @@ const copyUntranslatedDocs = () => {
return copyAllEnglishDocsNotTranslatedTo('ja')
.then(() => {
return copyAllEnglishDocsNotTranslatedTo('zh-cn')
}).then(() => {
return copyAllEnglishDocsNotTranslatedTo('pt-br')
})

}
Expand Down
1 change: 1 addition & 0 deletions cypress/integration/main_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/')
})
}
})
Expand Down
1 change: 1 addition & 0 deletions robots.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
User-agent: *
Disallow: /ja/
Disallow: /zh-cn/
Disallow: /pt-br/
Disallow: /fonts/
1 change: 1 addition & 0 deletions source/_data/languages.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
en: English
ja: 日本語
zh-cn: 简体中文
pt-br: Português Brazil
95 changes: 95 additions & 0 deletions source/pt-br/guides/overview/why-cypress.md
Original file line number Diff line number Diff line change
@@ -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 %}
214 changes: 214 additions & 0 deletions themes/cypress/languages/pt-br.yml
Original file line number Diff line number Diff line change
@@ -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: Visão Geral
why-cypress: Por que Cypress?
getting-started: Introdução
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
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: Testes Condicionais
test-runner: O Test Runner
dashboard: Dashboard
dashboard-introduction: Introdução
projects: Projetos
runs: Runs
organizations: Organizações
users: Usuários
github-integration: Integração com GitHub
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 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: 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: Ferramentas incluídas
assertions: Asserções
best-practices: Boas Práticas
trade-offs: Trade-offs
changelog: Changelog
roadmap: Roteiro
tooling: Ferramentas
intelligent-code-completion: Conclusão Inteligente de Código
plugins-guide: Plugins
reporters: Reporters
typescript-support: TypeScript
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: Índice
commands: Comandos
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: Catalogo de Eventos
assertions: Asserções
all-assertions: Todas Asserções
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: Escrevendo um Plugin
preprocessors-api: Pré-processadores
browser-launch-api: Browser Launching
configuration-api: Configuração
version: version
arch: arch
browser: browser
platform: platform
selector-playground-api: SelectorPlayground
screenshot-api: Screenshot
after-screenshot-api: After Screenshot
spec: spec
examples:
examples: Exemplos
recipes: Tutoriais
tutorials: Tutoriais em Vídeo
applications: Aplicações
docker: Docker
media: Media
courses-media: Cursos
webinars-media: Webinars
blogs-media: Blogs
talks-media: Palestras
podcasts-media: Podcasts
screencasts-media: Screencasts
workshop: Workshop
faq:
questions: FAQ
general-questions-faq: Perguntas gerais
using-cypress-faq: Usando Cypress
dashboard-faq: Dashboard
company-faq: Empresa