You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/docs/site/docs/main/contributing/documentation.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ If you are familiar with markdown, you can [fork](https://docs.github.com/en/pul
21
21
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:
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.
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:
-[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:
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.
Copy file name to clipboardExpand all lines: packages/docs/site/i18n/pt-BR/docusaurus-plugin-content-docs/current/main/contributing/coding-standards.md
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.
11
7
-->
12
8
13
9
# Princípios de codificação
14
10
11
+
<!--
12
+
## Error messages
13
+
-->
14
+
15
15
## Mensagens de erro
16
16
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.
18
22
19
23
<!--
20
24
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?
21
28
29
+
<!--
22
30
- **Network error**: "Your internet connection twitched. Try to reload the page.
23
31
- **404**: "Could not find the file".
24
32
- **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.
26
34
-->
27
35
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
-
30
36
-**Erro de rede**: "Sua conexão com a internet oscilou. Tente recarregar a página."
31
37
-**404**: "Não foi possível encontrar o arquivo".
32
38
-**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.
34
40
35
41
<!--
36
42
We handle code formatting and linting automatically. Relax, type away, and let the machines do the work.
37
43
-->
38
44
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.
40
46
41
47
<!--
42
48
## Public API
43
-
44
-
Playground aims to keep the narrowest possible API scope.
45
49
-->
46
50
47
51
## API Pública
48
52
53
+
<!--
54
+
Playground aims to keep the narrowest possible API scope.
55
+
-->
56
+
49
57
O Playground visa manter o escopo de API o mais restrito possível.
50
58
51
59
<!--
52
60
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.
53
64
65
+
<!--
54
66
- Don't expose unnecessary functions, classes, constants, or other components.
55
67
-->
56
68
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
-
59
69
- Não exponha funções, classes, constantes ou outros componentes desnecessários.
60
70
61
71
<!--
62
72
## 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.
65
73
-->
66
74
67
75
## Blueprints
68
76
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
+
69
81
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.
70
82
71
83
<!--
72
84
### Guidelines
85
+
-->
73
86
87
+
### Diretrizes
88
+
89
+
<!--
74
90
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.
75
94
95
+
<!--
76
96
- If you need to create a new step, try refactoring an existing one first.
77
97
- If that's not enough, ensure the new step delivers a new capability. Don't replicate the functionality of existing steps.
78
98
- Assume the step would be called more than once.
79
99
- Assume it would run in a specific order.
80
100
- Add unit tests to verify that.
81
101
-->
82
102
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.
91
107
- Adicione testes unitários para verificar isso.
92
108
93
109
<!--
94
110
Blueprints should be **intuitive and straightforward**.
111
+
-->
112
+
113
+
Blueprints devem ser **intuitivos e diretos**.
95
114
115
+
<!--
96
116
- Don't require arguments that can be optional.
97
117
- Use plain argument. For example, `slug` instead of `path`.
98
118
- Define constants in virtual JSON files—don't modify PHP files.
@@ -101,11 +121,9 @@ Blueprints should be **intuitive and straightforward**.
101
121
- Provide a usage example in the doc string. It's automatically reflected in the docs.
102
122
-->
103
123
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.
107
125
- Use argumentos simples. Por exemplo, `slug` em vez de `path`.
108
-
- Defina constantes em arquivos JSON virtuais — não modifique arquivos PHP.
126
+
- Defina constantes em arquivos JSON virtuais—não modifique arquivos PHP.
109
127
- Defina um tipo TypeScript para o Blueprint. É assim que o Playground gera seu esquema JSON.
110
128
- 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