Skip to content

Commit 3237e9d

Browse files
authored
Merge pull request #259 from Elmerf/elmerf/id-guide-migration-part-2
docs(id): Penerjemahan pada berkas guide/migration - Part 2
2 parents 72c92d5 + e5541c9 commit 3237e9d

File tree

3 files changed

+51
-51
lines changed

3 files changed

+51
-51
lines changed

src/guide/migration/keycode-modifiers.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@ badges:
33
- breaking
44
---
55

6-
# KeyCode Modifiers <MigrationBadges :badges="$frontmatter.badges" />
6+
# Pengubah KeyCode <MigrationBadges :badges="$frontmatter.badges" />
77

8-
## Overview
8+
## Gambaran Umum
99

10-
Here is a quick summary of what has changed:
10+
Berikut adalah ringkasan singkat tentang apa yang telah berubah:
1111

12-
- **BREAKING**: Using numbers, i.e. keyCodes, as `v-on` modifiers is no longer supported
13-
- **BREAKING**: `config.keyCodes` is no longer supported
12+
- **MERUSAK**: Pengunaan angka-angka, contoh. keyCodes, sebagai pengubah `v-on` tidak lagi didukung
13+
- **MERUSAK**: `config.keyCodes` tidak lagi didukung
1414

15-
## 2.x Syntax
15+
## 2.x Sintaksis
1616

17-
In Vue 2, `keyCodes` were supported as a way to modify a `v-on` method.
17+
Pada Vue 2, `keyCodes` didukung sebagai satu cara untuk mengubah suatu metode `v-on`.
1818

1919
```html
20-
<!-- keyCode version -->
20+
<!-- versi keyCode -->
2121
<input v-on:keyup.13="submit" />
2222

23-
<!-- alias version -->
23+
<!-- versi alias -->
2424
<input v-on:keyup.enter="submit" />
2525
```
2626

27-
In addition, you could define your own aliases via the global `config.keyCodes` option.
27+
Tambahan, Anda dapat mendefinisikan alias Anda sendiri melalui opsi global `config.keyCodes`.
2828

2929
```js
3030
Vue.config.keyCodes = {
@@ -33,40 +33,40 @@ Vue.config.keyCodes = {
3333
```
3434

3535
```html
36-
<!-- keyCode version -->
36+
<!-- versi keyCode -->
3737
<input v-on:keyup.112="showHelpText" />
3838

39-
<!-- custom alias version -->
39+
<!-- versi alias kustom -->
4040
<input v-on:keyup.f1="showHelpText" />
4141
```
4242

43-
## 3.x Syntax
43+
## 3.x Sintaksis
4444

45-
Since [`KeyboardEvent.keyCode` has been deprecated](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode), it no longer makes sense for Vue 3 to continue supporting this as well. As a result, it is now recommended to use the kebab-case name for any key you want to use as a modifier.
45+
Dikarenakan [`KeyboardEvent.keyCode` telah usang](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode), sangat tidak masuk akal jika Vue 3 tetap mendukung hal ini. Sebagai gantinya, direkomendasikan untuk penggunaan nama kebab-case untuk semua key yang Anda akan gunakan sebagai pengubah.
4646

4747
```html
48-
<!-- Vue 3 Key Modifier on v-on -->
48+
<!-- Pengubah Vue 3 Key pada v-on -->
4949
<input v-on:keyup.page-down="nextPage">
5050

51-
<!-- Matches both q and Q -->
51+
<!-- kedua q dan Q cocok -->
5252
<input v-on:keypress.q="quit">
5353
```
5454

55-
As a result, this means that `config.keyCodes` is now also deprecated and will no longer be supported.
55+
Hasilnya, hal ini berarti bahwa `config.keyCodes` juga telah usang dan tidak lagi didukung.
5656

57-
## Migration Strategy
57+
## Strategi dalam Migrasi
5858

59-
For those using `keyCode` in their codebase, we recommend converting them to their kebab-cased named equivalents.
59+
Untuk semua yang memakai `keyCode` pada codebase kalian, kami merekomendasikan pengubahaan `keyCode` menjadi penamaan kebab-cased yang setara.
6060

61-
The keys for some punctuation marks can just be included literally. e.g. For the `,` key:
61+
keys sebagai tanda baca dapat dituliskan secara literal. contoh. untuk key `,`:
6262

6363
```html
6464
<input v-on:keypress.,="commaPress">
6565
```
6666

67-
Limitations of the syntax prevent certain characters from being matched, such as `"`, `'`, `/`, `=`, `>`, and `.`. For those characters you should check `event.key` inside the listener instead.
67+
Limitasi dari sintaksis mencegah beberapa karakter untuk dicocokan, seperti `"`, `'`, `/`, `=`, `>`, dan `.`. Sebagai gantinya, untuk karakter-karakter tersebut Anda dapat cek `event.key` di dalam listener.
6868

69-
[Migration build flags:](migration-build.html#compat-configuration)
69+
[Flag build migrasi:](migration-build.html#compat-configuration)
7070

7171
- `CONFIG_KEY_CODES`
7272
- `V_ON_KEYCODE_MODIFIER`
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
title: $listeners removed
2+
title: Penghapusan $listeners
33
badges:
44
- breaking
55
---
66

7-
# `$listeners` removed <MigrationBadges :badges="$frontmatter.badges" />
7+
# `$listeners` telah dihapus <MigrationBadges :badges="$frontmatter.badges" />
88

9-
## Overview
9+
## Gambaran Umum
1010

11-
The `$listeners` object has been removed in Vue 3. Event listeners are now part of `$attrs`:
11+
Objek `$listeners` telah dihapuskan pada Vue 3. Event listeners sekarang bagian dari `$attrs`:
1212

1313
```js
1414
{
@@ -17,10 +17,10 @@ The `$listeners` object has been removed in Vue 3. Event listeners are now part
1717
}
1818
```
1919

20-
## 2.x Syntax
20+
## 2.x Sintaksis
2121

22-
In Vue 2, you can access attributes passed to your components with `this.$attrs`, and event listeners with `this.$listeners`.
23-
In combination with `inheritAttrs: false`, they allow the developer to apply these attributes and listeners to some other element instead of the root element:
22+
Pada Vue 2, Anda dapat mengakses atribut-atribut yang disuguhkan ke komponen-komponen Anda melalui `this.$attrs`, dan event listeners dengan `this.$listeners`.
23+
Pengkombinasian dengan `inheritAttrs: false`, mereka membolehkan para pengembang untuk mengaplikasikan atribut-atribut dan listener-listener ini ke semua elemen lain daripada ke elemen root:
2424

2525
```html
2626
<template>
@@ -35,9 +35,9 @@ In combination with `inheritAttrs: false`, they allow the developer to apply the
3535
</script>
3636
```
3737

38-
## 3.x Syntax
38+
## 3.x Sintaksis
3939

40-
In Vue 3's virtual DOM, event listeners are now just attributes, prefixed with `on`, and as such are part of the `$attrs` object, so `$listeners` has been removed.
40+
Pada Vue 3's virtual DOM, event listeners sekarang hanyalah sebuah atribut, diawali dengan `on`, dan merupakan bagian dari objek `$attrs`, sehingga `$listeners` telah dihapuskan.
4141

4242
```vue
4343
<template>
@@ -52,7 +52,7 @@ export default {
5252
</script>
5353
```
5454

55-
If this component received an `id` attribute and a `v-on:close` listener, the `$attrs` object will now look like this:
55+
jika komponen ini mendapatkan sebuah atribut `id` dan sebuah listener `v-on:close`, objek `$attrs` sekarang akan tampak seperti ini:
5656

5757
```js
5858
{
@@ -61,16 +61,16 @@ If this component received an `id` attribute and a `v-on:close` listener, the `$
6161
}
6262
```
6363

64-
## Migration Strategy
64+
## Strategi Migrasi
6565

66-
Remove all usages of `$listeners`.
66+
Hapus semua penggunaan dari `$listeners`.
6767

68-
[Migration build flag: `INSTANCE_LISTENERS`](migration-build.html#compat-configuration)
68+
[Flag build Migrasi: `INSTANCE_LISTENERS`](migration-build.html#compat-configuration)
6969

70-
## See also
70+
## Baca juga
7171

7272
- [Relevant RFC](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0031-attr-fallthrough.md)
73-
- [Migration guide - `$attrs`includes `class` & `style` ](./attrs-includes-class-style.md)
74-
- [Migration guide - Changes in the Render Functions API](./render-function-api.md)
75-
- [Migration guide - New Emits Option](./emits-option.md)
76-
- [Migration guide - `.native` modifier removed](./v-on-native-modifier-removed.md)
73+
- [Panduan Migrasi - `$attrs` memuat `class` & `style` ](./attrs-includes-class-style.md)
74+
- [Panduan Migrasi - Perubahan pada Render Functions API](./render-function-api.md)
75+
- [Panduan Migrasi - Opsi baru Emits](./emits-option.md)
76+
- [Panduan Migrasi - Pengubah `.native` dihapuskan](./v-on-native-modifier-removed.md)
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
title: Props Default Function this Access
2+
title: Akses Props Fungsi Bawaan this
33
badges:
44
- breaking
55
---
66

7-
# Props Default Function `this` Access <MigrationBadges :badges="$frontmatter.badges" />
7+
# Akses Props Fungsi Bawaan `this` <MigrationBadges :badges="$frontmatter.badges" />
88

9-
Props default value factory functions no longer have access to `this`.
9+
Nilai bawaan props fungsi-fungsi factory tidak lagi memilki akses terhadap `this`.
1010

11-
Instead:
11+
Melainkan:
1212

13-
- Raw props received by the component are passed to the default function as argument;
13+
- Raw props didapatkan dari komponen yang dilewatkan menuju fungsi bawaan sebagai argumen;
1414

15-
- The [inject](../composition-api-provide-inject.md) API can be used inside default functions.
15+
- [inject](../composition-api-provide-inject.md) API dapat digunakan di dalam fungsi-fungsi bawaan.
1616

1717
```js
1818
import { inject } from 'vue'
@@ -21,16 +21,16 @@ export default {
2121
props: {
2222
theme: {
2323
default (props) {
24-
// `props` is the raw values passed to the component,
25-
// before any type / default coercions
26-
// can also use `inject` to access injected properties
24+
// `props` merupakan nilai raw dilewatkan menuju komponen,
25+
// sebelum dilakukan type / default coercions
26+
// dapat juga menggunaan `inject` untuk mengakses properti yang diinjeksikan
2727
return inject('theme', 'default-theme')
2828
}
2929
}
3030
}
3131
}
3232
```
3333

34-
## Migration Strategy
34+
## Stategi Migrasi
3535

36-
[Migration build flag: `PROPS_DEFAULT_THIS`](migration-build.html#compat-configuration)
36+
[Flag build migrasi: `PROPS_DEFAULT_THIS`](migration-build.html#compat-configuration)

0 commit comments

Comments
 (0)