@graphcommerce/docs 4.6.1 → 4.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/feature-list.md +1 -1
- package/framework/translations.md +24 -12
- package/getting-started/create.md +2 -2
- package/package.json +2 -2
- package/readme.md +1 -1
- package/roadmap.md +0 -1
- package/upgrading.md +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,60 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 4.6.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1443](https://github.com/graphcommerce-org/graphcommerce/pull/1443) [`c4c86df1e`](https://github.com/graphcommerce-org/graphcommerce/commit/c4c86df1e8c74956b2ae76ab1a88c496fced4790) Thanks [@timhofman](https://github.com/timhofman)! - Missing or outdated resolutions results in build errors
|
|
8
|
+
|
|
9
|
+
* [#1451](https://github.com/graphcommerce-org/graphcommerce/pull/1451) [`f698ff85d`](https://github.com/graphcommerce-org/graphcommerce/commit/f698ff85df6bb0922288471bb3c81856091b8061) Thanks [@paales](https://github.com/paales)! - Removed all occurences of @lingui/macro and moved to @lingui/macro / @lingui/core in preparation to move to swc.
|
|
10
|
+
|
|
11
|
+
Since we've removed @lingui/macro, all occurences need to be replaced with @lingui/core and @lingui/react.
|
|
12
|
+
|
|
13
|
+
All occurences of `<Trans>` and `t` need to be replaced:
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { Trans, t } from '@lingui/macro'
|
|
17
|
+
|
|
18
|
+
function MyComponent() {
|
|
19
|
+
const foo = 'bar'
|
|
20
|
+
return (
|
|
21
|
+
<div aria-label={t`Account ${foo}`}>
|
|
22
|
+
<Trans>My Translation {foo}</Trans>
|
|
23
|
+
</div>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Needs to be replaced with:
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
import { Trans } from '@lingui/react'
|
|
32
|
+
import { i18n } from '@lingui/core'
|
|
33
|
+
|
|
34
|
+
function MyComponent() {
|
|
35
|
+
const foo = 'bar'
|
|
36
|
+
return (
|
|
37
|
+
<div aria-label={i18n._(/* i18n */ `Account {foo}`, { foo })}>
|
|
38
|
+
<Trans key='My Translation {foo}' values={{ foo }}></Trans>
|
|
39
|
+
</div>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
[More examples for Trans](https://lingui.js.org/ref/macro.html#examples-of-jsx-macros) and [more examples for `t`](https://lingui.js.org/ref/macro.html#examples-of-js-macros)
|
|
45
|
+
|
|
46
|
+
## 4.6.3
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- [#1417](https://github.com/graphcommerce-org/graphcommerce/pull/1417) [`d57e4b782`](https://github.com/graphcommerce-org/graphcommerce/commit/d57e4b7828e9fed2cf6ac8164203b26a4427ef80) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Update installation instructions
|
|
51
|
+
|
|
52
|
+
## 4.6.2
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- [#1404](https://github.com/graphcommerce-org/graphcommerce/pull/1404) [`58e2251f5`](https://github.com/graphcommerce-org/graphcommerce/commit/58e2251f586a276cdb5971c8511ada50fa00994c) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - order
|
|
57
|
+
|
|
3
58
|
## 4.6.1
|
|
4
59
|
|
|
5
60
|
### Patch Changes
|
package/feature-list.md
CHANGED
|
@@ -218,7 +218,7 @@ Black checkbox is a feature unaffected by GraphCommerce
|
|
|
218
218
|
average order value.
|
|
219
219
|
- [ ] Show pricing tiers. — [Todo]
|
|
220
220
|
- [x] Present product ratings and reviews.
|
|
221
|
-
- [
|
|
221
|
+
- [x] Provide an option to add products to a wish list.
|
|
222
222
|
- [ ] Add Facebook, Twitter, and email links to share products. — [Todo]
|
|
223
223
|
|
|
224
224
|
### Checkout
|
|
@@ -26,12 +26,12 @@ msgstr "cancelado"
|
|
|
26
26
|
|
|
27
27
|
The msgid is the message being translated. In
|
|
28
28
|
/node_modules/@graphcommerce/magento-cart/components/EmptyCart/EmptyCart.tsx,
|
|
29
|
-
you can see
|
|
29
|
+
you can see that the first msgid is passed as a the id prop to the <Trans>
|
|
30
30
|
component:
|
|
31
31
|
|
|
32
|
-
```
|
|
32
|
+
```tsx
|
|
33
33
|
<FullPageMessage
|
|
34
|
-
title={<Trans
|
|
34
|
+
title={<Trans id="Your cart is empty" />}
|
|
35
35
|
...
|
|
36
36
|
>
|
|
37
37
|
```
|
|
@@ -57,20 +57,31 @@ Refresh to see your changes updated
|
|
|
57
57
|
## Adding translations to custom component
|
|
58
58
|
|
|
59
59
|
If you're building a component, you can wrap the strings you want to translate
|
|
60
|
-
in the `<Trans>`
|
|
60
|
+
in the `<Trans>` component:
|
|
61
61
|
|
|
62
|
-
```
|
|
62
|
+
```tsx
|
|
63
63
|
<Typography variant='h3'>
|
|
64
|
-
<Trans
|
|
64
|
+
<Trans id='Call us now' />
|
|
65
65
|
</Typography>
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
+
To translate a string:
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
<PageMeta title={i18n._(/* i18n */ `Blog`)} />
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
_The `/* i18n */` comment is required for `lingui extract` to work properly_
|
|
75
|
+
|
|
68
76
|
Add Linqui to the component's imports:
|
|
69
77
|
|
|
70
|
-
```
|
|
71
|
-
import {
|
|
78
|
+
```tsx
|
|
79
|
+
import { Trans } from '@lingui/react'
|
|
80
|
+
import { i18n } from '@lingui/core'
|
|
72
81
|
```
|
|
73
82
|
|
|
83
|
+
## Generating translation files with all translations
|
|
84
|
+
|
|
74
85
|
Run `yarn lingui`. All new (missing) translations will be added to translations
|
|
75
86
|
files:
|
|
76
87
|
|
|
@@ -184,11 +195,12 @@ msgstr ""
|
|
|
184
195
|
|
|
185
196
|
```
|
|
186
197
|
|
|
187
|
-
5. Add your translations
|
|
198
|
+
5. Add your translations in the newly created .po file. Run the app and use the
|
|
188
199
|
store switcher to navigate to your new storeview.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
200
|
+
|
|
201
|
+
> Tip: [Github copilot ↗](https://copilot.github.com/) provides very accurate
|
|
202
|
+
> suggestions in VS Code with the
|
|
203
|
+
> [Github copilot extention ↗](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot).
|
|
192
204
|
|
|
193
205
|
### Magento Locale codes
|
|
194
206
|
|
|
@@ -67,11 +67,11 @@ https://user-images.githubusercontent.com/1251986/158647122-dc57002f-a9c2-4661-a
|
|
|
67
67
|
|
|
68
68
|
1. `git clone git@github.com:graphcommerce-org/graphcommerce.git`
|
|
69
69
|
2. `mkdir my-project`
|
|
70
|
-
3. `cp -R graphcommerce/examples/magento-graphcms/. my-project`
|
|
70
|
+
3. `cp -R graphcommerce/examples/magento-graphcms/. my-project && rm -rf graphcommerce`
|
|
71
71
|
4. `cd my-project`
|
|
72
72
|
5. `cp -R .env.example .env`
|
|
73
73
|
6. `rm CHANGELOG.md`
|
|
74
|
-
7. `rm -
|
|
74
|
+
7. `rm -rf node_modules && rm -rf .next`
|
|
75
75
|
|
|
76
76
|
Edit /package.json. Delete `"scripts": {...}` and rename `scripts_local` to
|
|
77
77
|
`scripts`:
|
package/package.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"name": "@graphcommerce/docs",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/docs",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce/docs",
|
|
5
|
-
"version": "4.6.
|
|
5
|
+
"version": "4.6.4",
|
|
6
6
|
"sideEffects": true,
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@graphcommerce/prettier-config-pwa": "^4.0.
|
|
8
|
+
"@graphcommerce/prettier-config-pwa": "^4.0.6"
|
|
9
9
|
},
|
|
10
10
|
"prettier": "@graphcommerce/prettier-config-pwa"
|
|
11
11
|
}
|
package/readme.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
menu: Overview
|
|
3
|
-
order: getting-started,framework, upgrading, contributing, roadmap
|
|
3
|
+
order: getting-started,framework, upgrading, feature-list, contributing, roadmap
|
|
4
4
|
metaTitle: Start React, Next.js Magento PWA development here - GraphCommerce
|
|
5
5
|
metaDescription:
|
|
6
6
|
'GraphCommerce is the open-source PWA Studio Magento 2 alternative.
|
package/roadmap.md
CHANGED
|
@@ -10,7 +10,6 @@ The following overview contains the status of items on the GraphCommerce roadmap
|
|
|
10
10
|
## In progress
|
|
11
11
|
|
|
12
12
|
- [ ] Adyen payment service (Braintree, Mollie, already implemented)
|
|
13
|
-
- [ ] Wishlist
|
|
14
13
|
- [ ] PageBuilder support
|
|
15
14
|
- [ ] Fetch Magento image sizes (probe-image-size)
|
|
16
15
|
|
package/upgrading.md
CHANGED
|
@@ -74,7 +74,8 @@ Compare your local /package.json with the example's
|
|
|
74
74
|
[remove PSP's](./getting-started/create.md#remove-unused-psps) your backend
|
|
75
75
|
doesn't support.
|
|
76
76
|
2. Replace your local `devDependencies` with the example's `devDependencies`
|
|
77
|
-
3. Replace your local `
|
|
77
|
+
3. Replace your local `resolutions` with the example's `resolutions`
|
|
78
|
+
4. Replace your local `scripts` with the example's `scripts_local`
|
|
78
79
|
|
|
79
80
|
After updating the package.json file, run the following to install the latest
|
|
80
81
|
packages:
|