-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translate Bahasa Indonesia dari : Component Registration #62
Conversation
type: guide | ||
order: 101 | ||
--- | ||
|
||
> This page assumes you've already read the [Components Basics](components.html). Read that first if you are new to components. | ||
> Halaman ini menganggap anda telah membaca [Komponen Dasar](components.html). Baca itu dahulu jika anda baru pada komponen. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
halaman ini menganggap anda telah membaca => halaman ini berasumsi bahwa anda sudah membaca
|
||
When registering a component, it will always be given a name. For example, in the global registration we've seen so far: | ||
Ketika mendaftarkan sebuah komponen, itu akan diberi sebuah nama. Sebagai contoh, didalam sebuah daftar global kita telah melihat: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ketika mendaftarkan sebuah komponen, itu akan diberi sebuah nama => Ketika mendaftarkan komponen, itu akan selalu diberi nama
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sebagai contoh, didalam sebuah daftar global kita telah melihat: => Misalnya, dalam pendaftaran global yang telah kita lihat sejauh ini:
|
||
```js | ||
Vue.component('my-component-name', { /* ... */ }) | ||
``` | ||
|
||
The component's name is the first argument of `Vue.component`. | ||
Nama sebuah komponen adalah argumen pertama dari `Vue.component`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nama sebuah komponen => Nama komponen
``` | ||
|
||
When defining a component with PascalCase, you can use either case when referencing its custom element. That means both `<my-component-name>` and `<MyComponentName>` are acceptable. Note, however, that only kebab-case names are valid directly in the DOM (i.e. non-string templates). | ||
Ketika mendefinisikan sebuah komponen dengan *PascalCase*, anda dapat menggunakan kedua hal ketika memberi referensi ke *custom* elemenya. Itu berarti, kedua `<nama-komponen-saya>` dan `<NamaKomponenSaya>` dapat diterima. Catatan, meskipun hanya nama *kebab-case* yang valid secara langsung di DOM (contoh : *templates non-string*). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ketika mendefinisikan sebuah komponen => Ketika mendefinisikan komponen
tolong sebelum membuat PR, hasil translatenya di baca lagi dari atas sampai bawah, buat mastiin aja, apakah hasil translate kita udah terlihat natural atau belum. |
well, thank you checkingnya mas @logustra 😉, mungkin bahasa saya terlalu baku 🤣 . kayanya mas @mazipan / mas @nusendra masih liburan wkkw, gonna fix this soon after admin need to change status. Update : |
type: guide | ||
order: 101 | ||
--- | ||
|
||
> This page assumes you've already read the [Components Basics](components.html). Read that first if you are new to components. | ||
> Halaman ini berasumsi anda telah membaca [Komponen Dasar](components.html). Baca itu dahulu jika anda baru pada komponen. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
semua kata anda -> ganti Anda, capital A
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Baca halaman itu terlebih dahulu bila Anda belum mengerti komponen
|
||
When registering a component, it will always be given a name. For example, in the global registration we've seen so far: | ||
Ketika mendaftarkan sebuah komponen, itu akan selalu diberi nama. Misalnya, dalam sebuah daftar global yang kita lihat sejauh ini: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ketika mendaftarkan sebuah komponen, selalu berikan nama. Misalnya, untuk sebuah registrasi global kita akan melihat seperti berikut:
|
||
The name you give a component may depend on where you intend to use it. When using a component directly in the DOM (as opposed to in a string template or [single-file component](single-file-components.html)), we strongly recommend following the [W3C rules](https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name) for custom tag names (all-lowercase, must contain a hyphen). This helps you avoid conflicts with current and future HTML elements. | ||
Nama yang anda berikan ke komponen mungkin tergantung pada dimana anda akan menggunakanya. Ketika menggunakan komponen secara langsung didalam DOM ( sebagai lawan didalam *template string* atau [komponen *single-file*](single-file-components.html)), kita sangat merekomendasikan untuk mengikuti [aturan W3C](https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name) untuk membuat nama tag *custom* (semuanya huruf kecil, harus berisi tanda penghubung). Ini membantu anda untuk menghindari konflik dengan elemen HTML sekarang dan kedepanya. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
menggunakannya -> double huruf n
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didalam -> di dalam
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
komponen single-file -> berkas komponen tunggal (single file component)
|
||
You can see other recommendations for component names in the [Style Guide](../style-guide/#Base-component-names-strongly-recommended). | ||
Anda bisa melihat rekomendasi lainya untuk nama nama komponen di [Aturan Gaya](../style-guide/#Base-component-names-strongly-recommended). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aturan Gaya -> Panduan Gaya
}) | ||
``` | ||
|
||
These components are **globally registered**. That means they can be used in the template of any root Vue instance (`new Vue`) created after registration. For example: | ||
Komponen ini **teregistrasi secara global**. Itu berarti mereka dapat digunakan didalam *template* dari semua *root Vue Instance* (`new Vue`) dibuat setelah diregistrasi. Sebagai contoh: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didalam -> di dalam
|
||
```js | ||
var ComponentA = { /* ... */ } | ||
var ComponentB = { /* ... */ } | ||
var ComponentC = { /* ... */ } | ||
``` | ||
|
||
Then define the components you'd like to use in a `components` option: | ||
Lalu tetapkan komponen komponen yang akan anda gunakan di pilihan `components` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
di opsi komponen
@@ -94,9 +94,9 @@ new Vue({ | |||
}) | |||
``` | |||
|
|||
For each property in the `components` object, the key will be the name of the custom element, while the value will contain the options object for the component. | |||
Untuk setiap properti didalam objek `components`, kuncinya akan menjadi nama dari elemen *custom*, ketika nilai akan berisi pilihan objek dari komponen tersebut. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Di cek lagi banyak yang nulisnya "didalam" harusnya "di dalam"
|
||
Note that **locally registered components are _not_ also available in subcomponents**. For example, if you wanted `ComponentA` to be available in `ComponentB`, you'd have to use: | ||
Catat bahwa **komponen yang terdaftar secara lokal juga _tidak_ terdapat di dalam _subkomponen_**. Sebagai contoh, jika anda ingin `Component A` terdapat di dalam `Component B`, anda harus menggunakan: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sub komponen
@@ -109,7 +109,7 @@ var ComponentB = { | |||
} | |||
``` | |||
|
|||
Or if you're using ES2015 modules, such as through Babel and Webpack, that might look more like: | |||
Atau jika anda tertarik menggunakan modul ES2015, seperti melewati Babel dan Webpack, itu akan lebih terlihat seperti: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kata tertarik dihapus aja.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seperti melewati -> seperti menggunakan
@@ -122,20 +122,20 @@ export default { | |||
} | |||
``` | |||
|
|||
Note that in ES2015+, placing a variable name like `ComponentA` inside an object is shorthand for `ComponentA: ComponentA`, meaning the name of the variable is both: | |||
Cata bahwa di ES2015+, menempatkan nama variabel seperti `ComponentA` didalam *shorthand* objek untuk`ComponentA: ComponentA`, berarti nama dari kedua variabel adalah: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cata -> Catat
Updated mas @mazipan 😉 |
Hasil translate bahasa indonesia untuk halaman : Component Registration 🚀