Skip to content

Commit 85e2ce3

Browse files
authored
Adding Portuguese version for Code Standards, Code, and Documentation. (#2343)
1 parent 1366bbe commit 85e2ce3

File tree

5 files changed

+370
-30
lines changed

5 files changed

+370
-30
lines changed

packages/docs/site/docs/main/contributing/documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ If you are familiar with markdown, you can [fork](https://docs.github.com/en/pul
2121
The process of creating a branch to open new PRs with translated pages on the [WordPress/wordpress-playground](https://github.com/WordPress/wordpress-playground) repository is the same than contributing to other WordPress repositories such as gutenberg:
2222
https://developer.wordpress.org/block-editor/contributors/code/git-workflow/
2323

24-
The documentation files (`.md` files) are stored in Playground's GitHub repository, [under `/packages/docs/site/docs`](https://github.com/WordPress/wordpress-playground/tree/trunk/packages/docs/site/docs).
24+
The documentation files (`.md` files) are stored in Playground's GitHub repository, [under `/packages/docs/site/docs`](https://github.com/WordPress/wordpress-playground/tree/trunk/packages/docs/site/docs) for English and [`/packages/docs/site/i18n`](https://github.com/WordPress/wordpress-playground/tree/trunk/packages/docs/site/i18n) for other languages.
2525

2626
### Edit in the browser
2727

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"label": "Contribuindo"
3+
}
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
---
2+
slug: /contributing/code
3+
---
4+
5+
<!--
6+
# Code contributions
7+
-->
8+
9+
# Contribuições de código
10+
11+
<!--
12+
Like all WordPress projects, Playground uses GitHub to manage code and track issues. The main repository is at [https://github.com/WordPress/wordpress-playground](https://github.com/WordPress/wordpress-playground) and the Playground Tools repository is at [https://github.com/WordPress/playground-tools/](https://github.com/WordPress/playground-tools/).
13+
-->
14+
15+
Como todos os projetos WordPress, o Playground usa o GitHub para gerenciar o código e rastrear problemas. O repositório principal está em [https://github.com/WordPress/wordpress-playground](https://github.com/WordPress/wordpress-playground) e o repositório de Ferramentas do Playground está em [https://github.com/WordPress/playground-tools/](https://github.com/WordPress/playground-tools/).
16+
17+
<!--
18+
:::info Contribute to Playground Tools
19+
20+
This guide includes links to the main repository, but all the steps and options apply for both. If you're interested in the plugins or local development tools—start there.
21+
22+
:::
23+
-->
24+
25+
:::info Contribua para as Ferramentas do Playground
26+
27+
Este guia inclui links para o repositório principal, mas todos os passos e opções se aplicam a ambos. Se você estiver interessado nos plugins ou nas ferramentas de desenvolvimento local, comece por aí.
28+
29+
:::
30+
31+
<!--
32+
Browse [the list of open issues](https://github.com/wordpress/wordpress-playground/issues) to find what to work on. The [`Good First Issue`](https://github.com/wordpress/wordpress-playground/issues?q=is%3Aopen+is%3Aissue+label%3A%22Good+First+Issue%22) label is a recommended starting point for first-time contributors.
33+
-->
34+
35+
Navegue pela [lista de issues abertas](https://github.com/wordpress/wordpress-playground/issues) para encontrar no que trabalhar. A etiqueta [`Good First Issue`](https://github.com/wordpress/wordpress-playground/issues?q=is%3Aopen+is%3Aissue+label%3A%22Good+First+Issue%22) é um ponto de partida recomendado para contribuidores de primeira viagem.
36+
37+
<!--
38+
Be sure to review the following resources before you begin:
39+
-->
40+
41+
Certifique-se de revisar os seguintes recursos antes de começar:
42+
43+
<!--
44+
- [Coding principles](/contributing/coding-standards)
45+
- [Architecture](/developers/architecture)
46+
- [Vision and Philosophy](https://github.com/WordPress/wordpress-playground/issues/472)
47+
- [WordPress Playground Roadmap](https://github.com/WordPress/wordpress-playground/issues/525)
48+
-->
49+
50+
- [Princípios de codificação](/contributing/coding-standards)
51+
- [Arquitetura](/developers/architecture)
52+
- [Visão e Filosofia](https://github.com/WordPress/wordpress-playground/issues/472)
53+
- [Roteiro do WordPress Playground](https://github.com/WordPress/wordpress-playground/issues/525)
54+
55+
<!--
56+
## Contribute Pull Requests
57+
-->
58+
59+
## Contribuir com Pull Requests
60+
61+
<!--
62+
[Fork the Playground repository](https://github.com/WordPress/wordpress-playground/fork) and clone it to your local machine. To do that, copy and paste these commands into your terminal:
63+
-->
64+
65+
[Faça um fork do repositório do Playground](https://github.com/WordPress/wordpress-playground/fork) e clone-o para sua máquina local. Para fazer isso, copie e cole estes comandos em seu terminal:
66+
67+
```bash
68+
git clone -b trunk --single-branch --depth 1 --recurse-submodules
69+
70+
# substitua `SEU-NOME-DE-USUARIO-GITHUB` pelo seu nome de usuário do GitHub:
71+
[email protected]:SEU-NOME-DE-USUARIO-GITHUB/wordpress-playground.git
72+
cd wordpress-playground
73+
npm install
74+
```
75+
76+
<!--
77+
Create a branch, make changes, and test it locally by running the following command:
78+
-->
79+
80+
Crie uma branch, faça as alterações e teste-a localmente executando o seguinte comando:
81+
82+
```bash
83+
npm run dev
84+
```
85+
86+
<!--
87+
Playground will open in a new browser tab and refresh automatically with each change.
88+
-->
89+
90+
O Playground será aberto em uma nova aba do navegador e será atualizado automaticamente a cada alteração.
91+
92+
<!--
93+
When your'e ready, commit the changes and submit a Pull Request.
94+
-->
95+
96+
Quando estiver pronto, faça o commit das alterações e envie um Pull Request.
97+
98+
<!--
99+
:::info Formatting
100+
101+
We handle code formatting and linting automatically. Relax, type away, and let the machines do the work.
102+
103+
:::
104+
-->
105+
106+
:::info Formatação
107+
108+
Nós lidamos com a formatação de código e o linting automaticamente. Relaxe, digite e deixe as máquinas fazerem o trabalho.
109+
110+
:::
111+
112+
<!--
113+
### Running a local Multisite
114+
-->
115+
116+
### Executando um Multisite local
117+
118+
<!--
119+
WordPress Multisite has a few [restrictions when run locally](https://developer.wordpress.org/advanced-administration/multisite/prepare-network/#restrictions). If you plan to test a Multisite network using Playground's `enableMultisite` step, make sure you either change `wp-now`'s default port or set a local test domain running via HTTPS.
120+
-->
121+
122+
O WordPress Multisite tem algumas [restrições quando executado localmente](https://developer.wordpress.org/advanced-administration/multisite/prepare-network/#restrictions). Se você planeja testar uma rede Multisite usando o passo `enableMultisite` do Playground, certifique-se de alterar a porta padrão do `wp-now` ou definir um domínio de teste local executado via HTTPS.
123+
124+
<!--
125+
To change `wp-now`'s default port to the one supported by WordPress Multisite, run it using the `--port=80` flag:
126+
-->
127+
128+
Para alterar a porta padrão do `wp-now` para a suportada pelo WordPress Multisite, execute-o usando a flag `--port=80`:
129+
130+
```bash
131+
npx @wp-now/wp-now start --port=80
132+
```
133+
134+
<!--
135+
There are a few ways to set up a local test domain, including editing your `hosts` file. If you're unsure how to do that, we suggest installing [Laravel Valet](https://laravel.com/docs/11.x/valet) and then running the following command:
136+
-->
137+
138+
Existem algumas maneiras de configurar um domínio de teste local, incluindo a edição do seu arquivo `hosts`. Se você não tiver certeza de como fazer isso, sugerimos instalar o [Laravel Valet](https://laravel.com/docs/11.x/valet) e, em seguida, executar o seguinte comando:
139+
140+
```bash
141+
valet proxy playground.test http://127.0.0.1:5400 --secure
142+
```
143+
144+
<!--
145+
Your dev server is now available on https://playground.test.
146+
-->
147+
148+
Seu servidor de desenvolvimento agora está disponível em https://playground.test.
149+
150+
<!--
151+
## Debugging
152+
-->
153+
154+
## Depuração
155+
156+
<!--
157+
### Use VS Code and Chrome
158+
-->
159+
160+
### Use o VS Code e o Chrome
161+
162+
<!--
163+
If you're using VS Code and have Chrome installed, you can debug Playground in the code editor:
164+
-->
165+
166+
Se você estiver usando o VS Code e tiver o Chrome instalado, poderá depurar o Playground no editor de código:
167+
168+
<!--
169+
- Open the project folder in VS Code.
170+
- Select Run > Start Debugging from the main menu or press `F5`/`fn`+`F5`.
171+
-->
172+
173+
- Abra a pasta do projeto no VS Code.
174+
- Selecione Executar > Iniciar Depuração no menu principal ou pressione `F5`/`fn`+`F5`.
175+
176+
<!--
177+
### Debugging PHP
178+
-->
179+
180+
### Depurando o PHP
181+
182+
<!--
183+
Playground logs PHP errors in the browser console after every PHP request.
184+
-->
185+
186+
O Playground registra os erros do PHP no console do navegador após cada solicitação PHP.

packages/docs/site/i18n/pt-BR/docusaurus-plugin-content-docs/current/main/contributing/coding-standards.md

Lines changed: 47 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,95 +4,115 @@ slug: /contributing/coding-standards
44

55
<!--
66
# Coding principles
7-
8-
## Error messages
9-
10-
A good error message tells the user what to do next. Any ambiguity in errors thrown by Playground public APIs will prompt the developers to open issues.
117
-->
128

139
# Princípios de codificação
1410

11+
<!--
12+
## Error messages
13+
-->
14+
1515
## Mensagens de erro
1616

17-
Uma boa mensagem de erro informa ao usuário o que fazer a seguir. Qualquer ambiguidade nos erros lançados pelas APIs públicas do Playground levará os desenvolvedores a abrir issues.
17+
<!--
18+
A good error message informs the user of the following steps to take. Any ambiguity in errors thrown by Playground public APIs will prompt the developers to open issues.
19+
-->
20+
21+
Uma boa mensagem de erro informa o usuário sobre os próximos passos a serem seguidos. Qualquer ambiguidade nos erros lançados pelas APIs públicas do Playground levará os desenvolvedores a abrir issues.
1822

1923
<!--
2024
Consider a network error, for example—can we infer the type of error and display a relevant message summarizing the next steps?
25+
-->
26+
27+
Considere um erro de rede, por exemplo: podemos inferir o tipo de erro e exibir uma mensagem relevante resumindo os próximos passos?
2128

29+
<!--
2230
- **Network error**: "Your internet connection twitched. Try to reload the page.
2331
- **404**: "Could not find the file".
2432
- **403**: "The server blocked access to the file".
25-
- **CORS**: clarify it's a browser security feature and add a link to a detailed explanation (on MDN or another reliable source). Suggest the user move their file somewhere else, like raw.githubusercontent.com, and link to a resource explaining how to set up CORS headers on their servers.
33+
- **CORS**: clarify it's a browser security feature and add a link to a detailed explanation (on MDN or another reliable source). Suggest the user move their file somewhere else, like `raw.githubusercontent.com`, and link to a resource explaining how to set up CORS headers on their servers.
2634
-->
2735

28-
Considere um erro de rede, por exemplo: podemos inferir o tipo de erro e exibir uma mensagem relevante resumindo os próximos passos?
29-
3036
- **Erro de rede**: "Sua conexão com a internet oscilou. Tente recarregar a página."
3137
- **404**: "Não foi possível encontrar o arquivo".
3238
- **403**: "O servidor bloqueou o acesso ao arquivo".
33-
- **CORS**: esclareça que é um recurso de segurança do navegador e adicione um link para uma explicação detalhada (no MDN ou outra fonte confiável). Sugira que o usuário mova o arquivo para outro lugar, como raw.githubusercontent.com, e crie um link para um recurso que explique como configurar os cabeçalhos CORS em seus servidores.
39+
- **CORS**: esclareça que é um recurso de segurança do navegador e adicione um link para uma explicação detalhada (no MDN ou outra fonte confiável). Sugira que o usuário mova o arquivo para outro lugar, como `raw.githubusercontent.com`, e adicione um link para um recurso explicando como configurar os cabeçalhos CORS em seus servidores.
3440

3541
<!--
3642
We handle code formatting and linting automatically. Relax, type away, and let the machines do the work.
3743
-->
3844

39-
Lidamos com a formatação e o linting do código automaticamente. Relaxe, digite e deixe as máquinas fazerem o trabalho.
45+
Nós lidamos com a formatação de código e o linting automaticamente. Relaxe, digite e deixe as máquinas fazerem o trabalho.
4046

4147
<!--
4248
## Public API
43-
44-
Playground aims to keep the narrowest possible API scope.
4549
-->
4650

4751
## API Pública
4852

53+
<!--
54+
Playground aims to keep the narrowest possible API scope.
55+
-->
56+
4957
O Playground visa manter o escopo de API o mais restrito possível.
5058

5159
<!--
5260
Public APIs are easy to add and hard to remove. It only takes one PR to introduce a new API, but it may take a thousand to remove it, especially if other projects have already consumed it.
61+
-->
62+
63+
APIs públicas são fáceis de adicionar e difíceis de remover. Basta um PR para introduzir uma nova API, mas pode ser necessário mil para removê-la, especialmente se outros projetos já a consumiram.
5364

65+
<!--
5466
- Don't expose unnecessary functions, classes, constants, or other components.
5567
-->
5668

57-
APIs públicas são fáceis de adicionar e difíceis de remover. Leva apenas um PR para introduzir uma nova API, mas pode levar mil para removê-la, especialmente se outros projetos já a consumiram.
58-
5969
- Não exponha funções, classes, constantes ou outros componentes desnecessários.
6070

6171
<!--
6272
## Blueprints
63-
64-
Blueprints are the primary way to interact with Playground. These JSON files describe a set of steps that Playground executes in order.
6573
-->
6674

6775
## Blueprints
6876

77+
<!--
78+
Blueprints are the primary way to interact with Playground. These JSON files describe a set of steps that Playground executes in order.
79+
-->
80+
6981
Blueprints são a principal forma de interagir com o Playground. Estes arquivos JSON descrevem um conjunto de passos que o Playground executa em ordem.
7082

7183
<!--
7284
### Guidelines
85+
-->
7386

87+
### Diretrizes
88+
89+
<!--
7490
Blueprint steps should be **concise and focused**. They should do one thing and do it well.
91+
-->
92+
93+
Os passos de um Blueprint devem ser **concisos e focados**. Devem fazer uma coisa e fazê-la bem.
7594

95+
<!--
7696
- If you need to create a new step, try refactoring an existing one first.
7797
- If that's not enough, ensure the new step delivers a new capability. Don't replicate the functionality of existing steps.
7898
- Assume the step would be called more than once.
7999
- Assume it would run in a specific order.
80100
- Add unit tests to verify that.
81101
-->
82102

83-
### Diretrizes
84-
85-
Os passos do Blueprint devem ser **concisos e focados**. Eles devem fazer uma coisa e fazê-la bem.
86-
87-
- Se você precisar criar um novo passo, tente refatorar um existente primeiro.
88-
- Se isso não for suficiente, garanta que o novo passo entregue uma nova capacidade. Não replique a funcionalidade de passos existentes.
89-
- Assuma que o passo será chamado mais de uma vez.
90-
- Assuma que ele será executado em uma ordem específica.
103+
- Se precisar criar um novo passo, tente refatorar um existente primeiro.
104+
- Se isso não for suficiente, garanta que o novo passo ofereça uma nova capacidade. Não replique a funcionalidade de passos existentes.
105+
- Suponha que o passo será chamado mais de uma vez.
106+
- Suponha que ele será executado em uma ordem específica.
91107
- Adicione testes unitários para verificar isso.
92108

93109
<!--
94110
Blueprints should be **intuitive and straightforward**.
111+
-->
112+
113+
Blueprints devem ser **intuitivos e diretos**.
95114

115+
<!--
96116
- Don't require arguments that can be optional.
97117
- Use plain argument. For example, `slug` instead of `path`.
98118
- Define constants in virtual JSON files—don't modify PHP files.
@@ -101,11 +121,9 @@ Blueprints should be **intuitive and straightforward**.
101121
- Provide a usage example in the doc string. It's automatically reflected in the docs.
102122
-->
103123

104-
Blueprints devem ser **intuitivos e diretos**.
105-
106-
- Não exija argumentos que podem ser opcionais.
124+
- Não exija argumentos que possam ser opcionais.
107125
- Use argumentos simples. Por exemplo, `slug` em vez de `path`.
108-
- Defina constantes em arquivos JSON virtuaisnão modifique arquivos PHP.
126+
- Defina constantes em arquivos JSON virtuaisnão modifique arquivos PHP.
109127
- Defina um tipo TypeScript para o Blueprint. É assim que o Playground gera seu esquema JSON.
110128
- Escreva uma função para lidar com um passo do Blueprint. Aceite o argumento do tipo que você definiu.
111-
- Forneça um exemplo de uso na docstring. Ele é refletido automaticamente na documentação.
129+
- Forneça um exemplo de uso na doc string. Ele é refletido automaticamente nos documentos.

0 commit comments

Comments
 (0)