Guia de Estilo Universal
Defines translation rules for a Portuguese version of the TypeScript React cheatsheet, covering code blocks, external links, and terminology.
What this file does
Defines translation rules for a Portuguese version of the TypeScript React cheatsheet, covering code blocks, external links, and terminology.
When to use it
- Translating the TypeScript React cheatsheet into Portuguese
- Contributing to the react-pt repository
- Establishing a style guide for a Portuguese tech translation project
Assumes this stack
Guia de Estilo Universal
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 |
| browser | navegador |
| bubbling | propagar |
| bug | erro |
| 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 |
| 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
Se deseja agregar algo que falta, abra um issue.
What's inside
4 sections: code block rules, external link guidelines, common translations table, and untranslatable terms list
Change this for your project
- Replace
typescript-cheatsheets/react-ptwith your own repository name in the issue link - Replace
pt-BRandpt.wikipedia.orgURLs with your target language equivalents
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Worth borrowing
- Separating translatable strings from code identifiers in code blocks
- Using a table for consistent term translations across a project
Related Documents
Glossary
Collects advanced deep learning terms not covered in introductory glossaries, with brief definitions and links to papers.
专有词汇翻译记录
Records Chinese translations of OpenGL and graphics programming terms for consistent use across a translation project.
Glossary
Defines retrieval, chunking, embedding, search, reranking, and synthesis terms with formulas, examples, and metric comparisons for RAG experiments.
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.