@graphcommerce/lingui-next 6.2.0-canary.7 → 6.2.0-canary.71
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 +128 -0
- package/components/LinguiProvider.tsx +0 -8
- package/config.js +1 -13
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,133 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 6.2.0-canary.71
|
|
4
|
+
|
|
5
|
+
## 6.2.0-canary.70
|
|
6
|
+
|
|
7
|
+
## 6.2.0-canary.69
|
|
8
|
+
|
|
9
|
+
## 6.2.0-canary.68
|
|
10
|
+
|
|
11
|
+
## 6.2.0-canary.67
|
|
12
|
+
|
|
13
|
+
## 6.2.0-canary.66
|
|
14
|
+
|
|
15
|
+
## 6.2.0-canary.65
|
|
16
|
+
|
|
17
|
+
## 6.2.0-canary.64
|
|
18
|
+
|
|
19
|
+
## 6.2.0-canary.63
|
|
20
|
+
|
|
21
|
+
## 6.2.0-canary.62
|
|
22
|
+
|
|
23
|
+
## 6.2.0-canary.61
|
|
24
|
+
|
|
25
|
+
## 6.2.0-canary.60
|
|
26
|
+
|
|
27
|
+
## 6.2.0-canary.59
|
|
28
|
+
|
|
29
|
+
## 6.2.0-canary.58
|
|
30
|
+
|
|
31
|
+
## 6.2.0-canary.57
|
|
32
|
+
|
|
33
|
+
## 6.2.0-canary.56
|
|
34
|
+
|
|
35
|
+
## 6.2.0-canary.55
|
|
36
|
+
|
|
37
|
+
## 6.2.0-canary.54
|
|
38
|
+
|
|
39
|
+
## 6.2.0-canary.53
|
|
40
|
+
|
|
41
|
+
## 6.2.0-canary.52
|
|
42
|
+
|
|
43
|
+
## 6.2.0-canary.51
|
|
44
|
+
|
|
45
|
+
## 6.2.0-canary.50
|
|
46
|
+
|
|
47
|
+
## 6.2.0-canary.49
|
|
48
|
+
|
|
49
|
+
## 6.2.0-canary.48
|
|
50
|
+
|
|
51
|
+
## 6.2.0-canary.47
|
|
52
|
+
|
|
53
|
+
## 6.2.0-canary.46
|
|
54
|
+
|
|
55
|
+
## 6.2.0-canary.45
|
|
56
|
+
|
|
57
|
+
## 6.2.0-canary.44
|
|
58
|
+
|
|
59
|
+
## 6.2.0-canary.43
|
|
60
|
+
|
|
61
|
+
## 6.2.0-canary.42
|
|
62
|
+
|
|
63
|
+
## 6.2.0-canary.41
|
|
64
|
+
|
|
65
|
+
## 6.2.0-canary.40
|
|
66
|
+
|
|
67
|
+
## 6.2.0-canary.39
|
|
68
|
+
|
|
69
|
+
## 6.2.0-canary.38
|
|
70
|
+
|
|
71
|
+
## 6.2.0-canary.37
|
|
72
|
+
|
|
73
|
+
## 6.2.0-canary.36
|
|
74
|
+
|
|
75
|
+
## 6.2.0-canary.35
|
|
76
|
+
|
|
77
|
+
## 6.2.0-canary.34
|
|
78
|
+
|
|
79
|
+
## 6.2.0-canary.33
|
|
80
|
+
|
|
81
|
+
## 6.2.0-canary.32
|
|
82
|
+
|
|
83
|
+
## 6.2.0-canary.31
|
|
84
|
+
|
|
85
|
+
## 6.2.0-canary.30
|
|
86
|
+
|
|
87
|
+
## 6.2.0-canary.29
|
|
88
|
+
|
|
89
|
+
## 6.2.0-canary.28
|
|
90
|
+
|
|
91
|
+
## 6.2.0-canary.27
|
|
92
|
+
|
|
93
|
+
## 6.2.0-canary.26
|
|
94
|
+
|
|
95
|
+
## 6.2.0-canary.25
|
|
96
|
+
|
|
97
|
+
## 6.2.0-canary.24
|
|
98
|
+
|
|
99
|
+
## 6.2.0-canary.23
|
|
100
|
+
|
|
101
|
+
## 6.2.0-canary.22
|
|
102
|
+
|
|
103
|
+
## 6.2.0-canary.21
|
|
104
|
+
|
|
105
|
+
## 6.2.0-canary.20
|
|
106
|
+
|
|
107
|
+
## 6.2.0-canary.19
|
|
108
|
+
|
|
109
|
+
## 6.2.0-canary.18
|
|
110
|
+
|
|
111
|
+
## 6.2.0-canary.17
|
|
112
|
+
|
|
113
|
+
## 6.2.0-canary.16
|
|
114
|
+
|
|
115
|
+
## 6.2.0-canary.15
|
|
116
|
+
|
|
117
|
+
## 6.2.0-canary.14
|
|
118
|
+
|
|
119
|
+
## 6.2.0-canary.13
|
|
120
|
+
|
|
121
|
+
## 6.2.0-canary.12
|
|
122
|
+
|
|
123
|
+
## 6.2.0-canary.11
|
|
124
|
+
|
|
125
|
+
## 6.2.0-canary.10
|
|
126
|
+
|
|
127
|
+
## 6.2.0-canary.9
|
|
128
|
+
|
|
129
|
+
## 6.2.0-canary.8
|
|
130
|
+
|
|
3
131
|
## 6.2.0-canary.7
|
|
4
132
|
|
|
5
133
|
## 6.2.0-canary.6
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { storefrontConfig, storefrontConfigDefault } from '@graphcommerce/next-ui'
|
|
2
2
|
import { i18n, Messages } from '@lingui/core'
|
|
3
3
|
import { I18nProvider, I18nProviderProps } from '@lingui/react'
|
|
4
|
-
import { nl, en, fr } from 'make-plural/plurals'
|
|
5
4
|
import React, { useMemo } from 'react'
|
|
6
5
|
import { MessageLoader, SyncMessageLoader } from '../types'
|
|
7
6
|
|
|
@@ -12,13 +11,6 @@ export type LinguiProviderProps = Omit<I18nProviderProps, 'i18n'> & {
|
|
|
12
11
|
locale: string
|
|
13
12
|
}
|
|
14
13
|
|
|
15
|
-
// todo: Load these plurals with a loader, however dynamic imports doesn't support tree shaking so loading them dynamically will load all locales.
|
|
16
|
-
i18n.loadLocaleData({
|
|
17
|
-
nl: { plurals: nl },
|
|
18
|
-
fr: { plurals: fr },
|
|
19
|
-
en: { plurals: en },
|
|
20
|
-
})
|
|
21
|
-
|
|
22
14
|
export const localeConfig = (locale: string = storefrontConfigDefault().locale) =>
|
|
23
15
|
storefrontConfig(locale)?.linguiLocale ?? locale?.split('-')[0]
|
|
24
16
|
|
package/config.js
CHANGED
|
@@ -13,6 +13,7 @@ const { isMonorepo } = require('@graphcommerce/next-config')
|
|
|
13
13
|
function linguiNextConfig(config) {
|
|
14
14
|
const { locales, ...otherConfig } = config
|
|
15
15
|
return {
|
|
16
|
+
orderBy: 'messageId',
|
|
16
17
|
locales: isMonorepo()
|
|
17
18
|
? ['en', 'nl', 'fr', 'de', 'es', 'it']
|
|
18
19
|
: config.locales.map((l) => l?.split('-')[0]),
|
|
@@ -29,19 +30,6 @@ function linguiNextConfig(config) {
|
|
|
29
30
|
exclude: ['**/node_modules/!(@graphcommerce)/**'],
|
|
30
31
|
},
|
|
31
32
|
],
|
|
32
|
-
extractBabelOptions: {
|
|
33
|
-
presets: [
|
|
34
|
-
[
|
|
35
|
-
'next/babel',
|
|
36
|
-
{
|
|
37
|
-
'preset-react': {
|
|
38
|
-
runtime: 'automatic',
|
|
39
|
-
importSource: '@emotion/react',
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
],
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
33
|
sourceLocale: 'en',
|
|
46
34
|
...otherConfig,
|
|
47
35
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/lingui-next",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "6.2.0-canary.
|
|
5
|
+
"version": "6.2.0-canary.71",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"scripts": {
|
|
8
8
|
"dev": "tsc -W"
|
|
@@ -15,18 +15,18 @@
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@graphcommerce/next-config": "6.2.0-canary.
|
|
19
|
-
"make-plural": "6.2.2"
|
|
18
|
+
"@graphcommerce/next-config": "6.2.0-canary.71"
|
|
20
19
|
},
|
|
21
20
|
"devDependencies": {
|
|
22
|
-
"@graphcommerce/eslint-config-pwa": "6.2.0-canary.
|
|
23
|
-
"@graphcommerce/prettier-config-pwa": "6.2.0-canary.
|
|
24
|
-
"@graphcommerce/typescript-config-pwa": "6.2.0-canary.
|
|
25
|
-
"@lingui/conf": "^
|
|
21
|
+
"@graphcommerce/eslint-config-pwa": "6.2.0-canary.71",
|
|
22
|
+
"@graphcommerce/prettier-config-pwa": "6.2.0-canary.71",
|
|
23
|
+
"@graphcommerce/typescript-config-pwa": "6.2.0-canary.71",
|
|
24
|
+
"@lingui/conf": "^4.2.1"
|
|
26
25
|
},
|
|
27
26
|
"peerDependencies": {
|
|
28
|
-
"@lingui/
|
|
29
|
-
"@lingui/
|
|
27
|
+
"@lingui/core": "^4.2.1",
|
|
28
|
+
"@lingui/react": "^4.2.1",
|
|
29
|
+
"@lingui/macro": "^4.2.1",
|
|
30
30
|
"next": "^13.2.0",
|
|
31
31
|
"react": "^18.2.0",
|
|
32
32
|
"react-dom": "^18.2.0"
|