Skip to content

Commit 40d59de

Browse files
wendyadimazipan
authored andcommitted
Translation for migrating vue page (#78)
* Translation for migrating vue page * Fix wording 15 March
1 parent 6b79a13 commit 40d59de

File tree

1 file changed

+34
-28
lines changed

1 file changed

+34
-28
lines changed

src/v2/guide/migration-vuex.md

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,99 @@
11
---
2-
title: Migration from Vuex 0.6.x to 1.0
2+
title: Migrasi dari Vuex 0.6.x ke 1.0
33
type: guide
44
order: 703
55
---
66

7-
> Vuex 2.0 is released, but this guide only covers the migration to 1.0? Is that a typo? Also, it looks like Vuex 1.0 and 2.0 were released simultaneously. What's going on? Which one should I use and what's compatible with Vue 2.0?
87

9-
Both Vuex 1.0 and 2.0:
8+
> Vuex 2.0 sudah di-release, tapi kenapa petunjuk ini hanya mencakup migrasi ke 1.0? Apakah itu typo? Dan sepertinya Vuex 1.0 dan 2.0 di-release bersamaan. Apa yang terjadi? Yang mana yang harus saya pakai dan apa saja yang cocok dengan Vue 2.0?
109
11-
- fully support both Vue 1.0 and 2.0
12-
- will be maintained for the foreseeable future
10+
Baik Vuex 1.0 atau 2.0 sama-sama:
1311

14-
They have slightly different target users however.
12+
- secara penuh mendukung Vue 1.0 dan 2.0
13+
- akan dimaintain untuk waktu yang terjangkau
1514

16-
__Vuex 2.0__ is a radical redesign and simplification of the API, for those who are starting new projects or want to be on the cutting edge of client-side state management. __It is not covered by this migration guide__, so you should check out [the Vuex 2.0 docs](https://vuex.vuejs.org/en/index.html) if you'd like to learn more about it.
15+
Namun keduanya memiliki sedikit perbedaan pada target pengguna.
1716

18-
__Vuex 1.0__ is mostly backwards-compatible, so requires very few changes to upgrade. It is recommended for those with large existing codebases or who want the smoothest possible upgrade path to Vue 2.0. This guide is dedicated to facilitating that process, but only includes migration notes. For the complete usage guide, see [the Vuex 1.0 docs](https://github.com/vuejs/vuex/tree/1.0/docs/en).
17+
__Vuex 2.0__ berisi perubahan radikal terhadap desain dan simplifikasi API, untuk mereka yang memulai proyek baru atau ingin performa yang lebih baik dalam manajemen *state* di sisi client. __ Hal tersebut tidak dibahas dalam petunjuk migrasi ini__, jadi Anda harus mengecek [the Vuex 2.0 docs](https://vuex.vuejs.org/en/index.html) jika Anda ingin mempelajarinya lebih lanjut.
1918

20-
## `store.watch` with String Property Path <sup>replaced</sup>
2119

22-
`store.watch` now only accept functions. So for example, you would have to replace:
20+
Kebanyakan API __Vuex 1.0__ sudah kompatibel kebelakang, jadi hanya butuh sedkit perubahan untuk melakukan *upgrade*. __Vuex 1.0__ direkomendasikan untuk mereka yang memiliki basis kode yang besar atau mereka yang ingin -*upgrade* ke Vue 2.0 dengan proses yang lebih mulus. Petunjuk ini didedikasikan untuk memfasilitasi proses tersebut, namun hanya mencantumkan catatan migrasi. Untuk petunjuk penggunaan yang lebih lengkap, lihat [the Vuex 1.0 docs](https://github.com/vuejs/vuex/tree/1.0/docs/en).
21+
22+
23+
## `store.watch` dengan Properti String Path <sup>diganti</sup>
24+
25+
`store.watch` sekarang hanya menerima fungsi. Sebagai contoh, Anda harus mengganti:
2326

2427
``` js
2528
store.watch('user.notifications', callback)
2629
```
2730

28-
with:
31+
dengan:
2932

3033
``` js
3134
store.watch(
32-
// When the returned result changes...
35+
// Saat hasil yang dikembalikan berganti...
3336
function (state) {
3437
return state.user.notifications
3538
},
36-
// Run this callback
39+
// Jalankan callback ini
3740
callback
3841
)
3942
```
4043

41-
This gives you more complete control over the reactive properties you'd like to watch.
44+
Hal ini memberikan Anda kontrol yang lebih lengkap terhapdap properti yang reaktif yang ingin Anda amati (*watch*):
4245

4346
{% raw %}
4447
<div class="upgrade-path">
45-
<h4>Upgrade Path</h4>
48+
<h4>Jalan *Upgrade*</h4>
4649
<p>Run the <a href="https://github.com/vuejs/vue-migration-helper">migration helper</a> on your codebase to find examples of <code>store.watch</code> with a string as the first argument.</p>
4750
</div>
4851
{% endraw %}
4952

50-
## Store's Event Emitter <sup>removed</sup>
53+
## Emiter Event Store <sup>dihapus</sup>
5154

52-
The store instance no longer exposes the event emitter interface (`on`, `off`, `emit`). If you were previously using the store as a global event bus, [see this section](migration.html#dispatch-and-broadcast-removed) for migration instructions.
5355

54-
Instead of using this interface to watch events emitted by the store itself (e.g. `store.on('mutation', callback)`), a new method `store.subscribe` is introduced. Typical usage inside a plugin would be:
56+
*Instance* dari store tidak lagi mengekspos interface "event emitter" (`on`, `off`, `emit`). Jika Anda menggunakan store sebagai *global event bus*, [lihat bagian ini](migration.html#dispatch-and-broadcast-removed) untuk instruksi migrasi.
57+
58+
Ketimbang menggunakan interface ini untuk memantau even yang dikeluarkan oleh store (contoh: `store.on('mutation', callback)`), Vue menganalkan sebuah method baru `store.subscribe`. Penggunaan umum dalam sebuah plugin akan seperti:
5559

5660
``` js
5761
var myPlugin = store => {
5862
store.subscribe(function (mutation, state) {
59-
// Do something...
63+
// Lakukan sesuatu...
6064
})
6165
}
6266

6367
```
6468

65-
See example [the plugins docs](https://github.com/vuejs/vuex/blob/1.0/docs/en/plugins.md) for more info.
69+
Lihat contoh [dokumentasi plugins](https://github.com/vuejs/vuex/blob/1.0/docs/en/plugins.md) untuk info lebih lanjut.
70+
6671

6772
{% raw %}
6873
<div class="upgrade-path">
69-
<h4>Upgrade Path</h4>
70-
<p>Run the <a href="https://github.com/vuejs/vue-migration-helper">migration helper</a> on your codebase to find examples of <code>store.on</code>, <code>store.off</code>, and <code>store.emit</code>.</p>
74+
<h4>Jalur *Upgrade*</h4>
75+
<p>Jalankan <a href="https://github.com/vuejs/vue-migration-helper">pembantu migrasi</a> dalam basis kode anda untuk menemukan contoh dari <code>store.on</code>, <code>store.off</code>, dan <code>store.emit</code>.</p>
7176
</div>
7277
{% endraw %}
7378

74-
## Middlewares <sup>replaced</sup>
79+
## Middlewares <sup>diganti</sup>
7580

76-
Middlewares are replaced by plugins. A plugin is a function that receives the store as the only argument, and can listen to the mutation event on the store:
81+
*Middlewares* digantikan dengan plugins. Sebuah plugin adalah fungsi yang menerima store sebagai satu-satunya argumen, dan dapat mendengarkan perubahan *event* yang terjadi dalam store.
7782

7883
``` js
7984
const myPlugins = store => {
8085
store.subscribe('mutation', (mutation, state) => {
81-
// Do something...
86+
// Lakukan sesuatu...
8287
})
8388
}
8489
```
8590

86-
For more details, see [the plugins docs](https://github.com/vuejs/vuex/blob/1.0/docs/en/plugins.md).
91+
Untuk detail yang lebih jelas, lihat [dokumentasi plugins](https://github.com/vuejs/vuex/blob/1.0/docs/en/plugins.md).
92+
8793

8894
{% raw %}
8995
<div class="upgrade-path">
90-
<h4>Upgrade Path</h4>
91-
<p>Run the <a href="https://github.com/vuejs/vue-migration-helper">migration helper</a> on your codebase to find examples of the <code>middlewares</code> option on a store.</p>
96+
<h4>Jalur Upgrade</h4>
97+
<p>Jalankan <a href="https://github.com/vuejs/vue-migration-helper">pembantu migrasi</a> dalam basis kode Anda untuk menemukan contoh dari opsi <code>middlewares</code> di atas "store".</p>
9298
</div>
9399
{% endraw %}

0 commit comments

Comments
 (0)