Guia de Estilo Universal
Defines universal style rules for translating React documentation, covering heading IDs, code blocks, external links, and terminology.
What this file does
Defines universal style rules for translating React documentation, covering heading IDs, code blocks, external links, and terminology.
When to use it
- Starting a new translation of the React docs into any language
- Reviewing a pull request for translated React documentation
- Setting up a style guide for a multi-language documentation project
- Ensuring consistency across translations of technical content
Assumes this stack
Guia de Estilo Universal
Este documento descreve as regras que devem ser aplicadas para todos os idiomas.
Quando estiver se referindo ao próprio React, use o React.
IDs dos Títulos
Todos os títulos possuem IDs explícitos como abaixo:
## Tente React {#try-react}
Não traduza estes IDs! Eles são usado para navegação e quebrarão se o documento for um link externo, como:
Veja a [seção iniciando](/getting-started#try-react) para mais informações.
✅ FAÇA:
## Tente React {#try-react}
❌ NÃO FAÇA:
## Tente React {#tente-react}
Isto quebraria o link acima.
Texto em Blocos de Código
Mantenha o texto em blocos de código sem tradução, exceto para os comentários. Você pode optar por traduzir o texto em strings, mas tenha cuidado para não traduzir strings que se refiram ao código!
Exemplo:
// Example
const element = <h1>Hello, world</h1>;
ReactDOM.render(element, document.getElementById('root'));
✅ FAÇA:
// Exemplo
const element = <h1>Hello, world</h1>;
ReactDOM.render(element, document.getElementById('root'));
✅ PERMITIDO:
// Exemplo
const element = <h1>Olá mundo</h1>;
ReactDOM.render(element, document.getElementById('root'));
❌ NÃO FAÇA:
// Exemplo
const element = <h1>Olá mundo</h1>;
// "root" se refere a um ID de elemento.
// NÃO TRADUZA
ReactDOM.render(element, document.getElementById('raiz'));
❌ DEFINITIVAMENTE NÃO FAÇA:
// Exemplo
const elemento = <h1>Olá mundo</h1>;
ReactDOM.renderizar(elemento, documento.obterElementoPorId('raiz'));
Links Externos
Se um link externo se referir a um artigo no MDN or Wikipedia e se houver uma versão traduzida em seu idioma em uma qualidade decente, opte por usar a versão traduzida.
Exemplo:
React elements are [immutable](https://en.wikipedia.org/wiki/Immutable_object).
✅ OK:
Elementos React são [imutáveis](https://pt.wikipedia.org/wiki/Objeto_imutável).
Para links que não possuem tradução (Stack Overflow, vídeos do YouTube, etc.), simplesmente use o link original.
Traduções Comuns
Sugestões de palavras e termos:
| Palavra/Termo original | Sugestão |
|---|---|
| assertion | asserção |
| at the top level | na raiz |
| browser | navegador |
| bubbling | propagar |
| bug | erro |
| caveats | ressalvas |
| class component | componente de classe |
| class | classe |
| client | cliente |
| client-side | lado do cliente |
| container | contêiner |
| context | contexto |
| controlled component | componente controlado |
| debugging | depuração |
| DOM node | nó do DOM |
| event handler | manipulador de eventos (event handler) |
| function component | componente de função |
| handler | manipulador |
| helper function | função auxiliar |
| high-order components | componente de alta-ordem |
| key | chave |
| library | biblioteca |
| lowercase | minúscula(s) / caixa baixa |
| package | pacote |
| React element | Elemento React |
| React fragment | Fragmento React |
| render | renderizar (verb), renderizado (noun) |
| server | servidor |
| server-side | lado do servidor |
| siblings | irmãos |
| stateful component | componente com estado |
| stateful logic | lógica com estado |
| to assert | afirmar |
| to wrap | encapsular |
| troubleshooting | solução de problemas |
| uncontrolled component | componente não controlado |
| uppercase | maiúscula(s) / caixa alta |
Conteúdo que não deve ser traduzido
- array
- arrow function
- bind
- bundle
- bundler
- callback
- camelCase
- DOM
- event listener
- framework
- hook
- log
- mock
- portal
- props
- ref
- release
- script
- single-page-apps
- state
- string
- string literal
- subscribe
- subscription
- template literal
- timestamps
- UI
- watcher
- widgets
- wrapper
What's inside
5 sections: heading IDs, code block text, external links, common translations table, and untranslated terms list
Change this for your project
- Replace
reactjs/pt-br.react.devwith your own repository name - Replace
mdnandwikipediaURLs with your language's versions - Replace the common translations table with your language's equivalents
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Worth borrowing
- Explicitly listing terms that must never be translated avoids ambiguity
- Providing both allowed and forbidden examples makes rules immediately clear
Related Documents
Glossary for *Artificial Intelligence: A Modern Approach*
Lists and defines hundreds of AI terms from the textbook *Artificial Intelligence: A Modern Approach*, organized alphabetically with cross-references.
ISTQB GLOSSARY V4
Defines 100+ ISTQB glossary terms for the Certified Tester Foundation Level v4 syllabus, organized by chapter.
GLOSSARY
Defines over 40 TypeScript compiler terms, from parser internals to type system concepts like control flow and mapped types.