Skip to content

Commit 7164785

Browse files
committed
fix: grammar
1 parent 21eae90 commit 7164785

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

js-sdk/migration_to_v6.mdx

+11-11
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ next.js'
66
---
77

88
In v6 we introduced a few minor breaking changes, which were mostly necessary for better support of
9-
next.js (and server side rendering in general).
9+
next.js (and server-side rendering in general).
1010

1111
## Updates to cache
1212

13-
Cache no longer returns records as maps.
14-
All methods interacting with cache are now returning plain objects instead of `Map`.
13+
The cache no longer returns records as maps.
14+
All methods interacting with the cache are now returning plain objects instead of `Map`.
1515

1616
```ts
1717
tolgee.loadRecords(): Promise<CacheInternalRecord[]>
@@ -32,15 +32,15 @@ type CacheInternalRecord = {
3232

3333
## Updated `getRequiredRecords`
3434

35-
This function was renamed to `getRequiredDescriptors`, because it's not returning data from cache,
36-
but description (descriptors) of what need to be in cache. Previous name was confusing.
35+
This function was renamed to `getRequiredDescriptors`, because it's not returning data from the cache,
36+
but description (descriptors) of what needs to be in cache. The previous name was confusing.
3737

3838
```ts
3939
tolgee.getRequiredDescriptors(lang?: string, ns?: NsFallback): CacheDescriptorInternal[]
4040
```
4141

42-
Previously the method returned the descriptors that are missing in the cache, but now we are returning
43-
all records that are required to be in the cache, so it works the same regardless what is currently in cache.
42+
Previously the method returned the descriptors that were missing in the cache, but now we are returning
43+
all the missing records regardless of what is currently in the cache.
4444

4545
Previous behavior can be achieved by comparing the cache content with the results of this function.
4646

@@ -62,14 +62,14 @@ You can replace that with `update` event.
6262
tolgee.on('update', ...)
6363
```
6464

65-
If you want to only react to certain namespaces, the event handler recieves an array of events which
66-
led to invocation of `update` event (`update` is derrived from other events).
65+
If you only want to react to certain namespaces, the event handler receives an array of events which
66+
led to the invocation of `update` event (`update` is derived from other events).
6767

6868
```ts
6969
tolgee.on('update', (events) => {
7070
if (events.every(e => (e.type !== 'cache' || e.value.namespace === 'namespace'))) {
7171
handler()
72-
}
72+
}
7373
})
7474
```
7575

@@ -90,7 +90,7 @@ New:
9090

9191
## Vue
9292

93-
`TolgeeProvider` ssr interface is now same as the react one.
93+
`TolgeeProvider` ssr interface is now the same as the react one.
9494

9595
Old:
9696
```html

0 commit comments

Comments
 (0)