Skip to content

Universal Style Guide

Resi Respati edited this page Apr 26, 2023 · 8 revisions

Panduan Penulisan Universal (Bahasa Indonesia)

Berikut adalah panduan penulisan yang berlaku bagi seluruh situs terjemahan react.dev.

Silakan merujuk ke halaman Glosarium pada wiki id.react.dev. Halaman wiki tersebut berisi daftar glosarium beserta terjemahannya.

Referensi panduan penulisan Bahasa Indonesia lainnya yang dapat digunakan adalah:

Heading ID

Setiap heading pada halaman reactjs.org memiliki ID seperti berikut:

## Try React {/*try-react*/}

Jangan menerjemahkan ID-nya! ID yang diterjemahkan akan merusak navigasi dalam situs.

Lihat [bagian permulaan](/getting-started#try-react) untuk info lebih lanjut.

✅ LAKUKAN:

## Mencoba React {/*try-react*/}

❌ JANGAN LAKUKAN:

## Mencoba React {/*mencoba-react*/}

Ini akan merusak tautan di atas.

Teks dalam Blok Kode

Anda dapat menerjemahkan teks di dalam string & komentar kode, namun berhati-hatilah supaya tidak menerjemahkan bagian dari kode secara tidak sengaja!

Contoh:

// Example
const element = <h1>Hello, world</h1>;
ReactDOM.render(element, document.getElementById('root'));

✅ LAKUKAN:

// Contoh
const element = <h1>Halo, dunia</h1>;
ReactDOM.render(element, document.getElementById('root'));

❌ JANGAN LAKUKAN:

// Contoh
const element = <h1>Halo, dunia</h1>;
// "root" merujuk kepada ID elemen.
// JANGAN DITERJEMAHKAN
ReactDOM.render(element, document.getElementById('induk'));

❌ SANGAT TIDAK BOLEH DILAKUKAN:

// Contoh
const elemen = <h1>Halo, dunia</h1>;
ReactDOM.render(elemen, dokumen.dapatkanElemenBerdasarkanId('induk'));

Tautan Eksternal

Apabila tautan eksternal merujuk kepada artikel referensi seperti di MDN atau Wikipedia, dan versi bahasa Indonesia dari artikel tersebut yang berkualitas cukup bagus tersedia, lebih baik merujuk kepada tautan versi bahasa Indonesia tersebut.

Contoh:

This helps prevent [XSS (cross-site-scripting)](https://en.wikipedia.org/wiki/Cross-site_scripting) attacks.

✅ OK:

Ini membantu menghindari serangan [XSS (*cross-site-scripting*)](https://id.wikipedia.org/wiki/XSS).

Untuk tautan yang tidak memiliki versi ekuivalen di bahasa Indonesia (Stack Overflow, video YouTube, dll.), cukup gunakan tautan versi bahasa Inggris.


Universal Style Guide (English)

This repo describes rules that should be applied to all languages.

NOTE TO MAINTAINERS: You may want to translate this guide so that it can be more accessible to your translators.

Heading IDs

All headings have explicit IDs like this:

## Try React {#try-react}

Do not translate these IDs! They are used for navigation and will break if the document is referred to externally, i.e.:

See the [beginning section](/getting-started#try-react) for more information.

✅ DO:

## Prueba React {#try-react}

❌ DON'T:

## Prueba React {#prueba-react}

This will break the link above.

Text in Code Blocks

You may translate text in strings & comments, but be careful not to translate strings that refer to code!

Example:

// Example
const element = <h1>Hello, world</h1>;
ReactDOM.render(element, document.getElementById('root'));

✅ DO:

// Ejemplo
const element = <h1>Hola mundo</h1>;
ReactDOM.render(element, document.getElementById('root'));

❌ DON'T:

// Ejemplo
const element = <h1>Hola mundo</h1>;
// "root" refers to an element ID.
// DO NOT TRANSLATE
ReactDOM.render(element, document.getElementById('raíz'));

❌ DEFINITELY DON'T:

// Ejemplo
const elemento = <h1>Hola mundo</h1>;
ReactDOM.hacer(elemento, documento.obtenerElementoPorId('raíz'));

External Links

If an external link is to an article in a reference like MDN or Wikipedia, and a version of that article exists in your language that is of decent quality, consider linking to that version instead.

Example:

React elements are [immutable](https://en.wikipedia.org/wiki/Immutable_object).

✅ OK:

Los elementos de React son [inmutables](https://es.wikipedia.org/wiki/Objeto_inmutable).

For links that have no equivalent (Stack Overflow, YouTube videos, etc.), just use the English link.

Clone this wiki locally