@ikas/storefront-next 4.0.0-alpha.21 → 4.0.0-alpha.23
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/package.json +12 -12
- package/src/api/uploadTheme.ts +4 -0
- package/src/utils/i18n.ts +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront-next",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.23",
|
|
4
4
|
"description": "Next.js specific functions for ikas storefront themes.",
|
|
5
5
|
"author": "Umut Ozan Yıldırım",
|
|
6
6
|
"license": "ISC",
|
|
@@ -17,23 +17,23 @@
|
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"next": "12.0.7",
|
|
20
|
-
"@ikas/storefront-config": "^4.0.0-alpha.
|
|
21
|
-
"@ikas/storefront-providers": "^4.0.0-alpha.
|
|
22
|
-
"@ikas/storefront-models": "^4.0.0-alpha.
|
|
23
|
-
"@ikas/storefront-api": "^4.0.0-alpha.
|
|
24
|
-
"@ikas/storefront-assets": "^4.0.0-alpha.
|
|
20
|
+
"@ikas/storefront-config": "^4.0.0-alpha.23",
|
|
21
|
+
"@ikas/storefront-providers": "^4.0.0-alpha.23",
|
|
22
|
+
"@ikas/storefront-models": "^4.0.0-alpha.23",
|
|
23
|
+
"@ikas/storefront-api": "^4.0.0-alpha.23",
|
|
24
|
+
"@ikas/storefront-assets": "^4.0.0-alpha.23",
|
|
25
25
|
"axios": "^0.21.0",
|
|
26
26
|
"lodash": "^4.17.21",
|
|
27
27
|
"archiver": "^5.3.0",
|
|
28
28
|
"cors": "^2.8.5"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@ikas/storefront-cmd": "^4.0.0-alpha.
|
|
32
|
-
"@ikas/storefront-config": "^4.0.0-alpha.
|
|
33
|
-
"@ikas/storefront-providers": "^4.0.0-alpha.
|
|
34
|
-
"@ikas/storefront-models": "^4.0.0-alpha.
|
|
35
|
-
"@ikas/storefront-api": "^4.0.0-alpha.
|
|
36
|
-
"@ikas/storefront-assets": "^4.0.0-alpha.
|
|
31
|
+
"@ikas/storefront-cmd": "^4.0.0-alpha.23",
|
|
32
|
+
"@ikas/storefront-config": "^4.0.0-alpha.23",
|
|
33
|
+
"@ikas/storefront-providers": "^4.0.0-alpha.23",
|
|
34
|
+
"@ikas/storefront-models": "^4.0.0-alpha.23",
|
|
35
|
+
"@ikas/storefront-api": "^4.0.0-alpha.23",
|
|
36
|
+
"@ikas/storefront-assets": "^4.0.0-alpha.23",
|
|
37
37
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
38
38
|
"@rollup/plugin-commonjs": "^22.0.0",
|
|
39
39
|
"@rollup/plugin-json": "^4.1.0",
|
package/src/api/uploadTheme.ts
CHANGED
|
@@ -4,6 +4,8 @@ import archiver from "archiver";
|
|
|
4
4
|
import { NextApiRequest, NextApiResponse } from "next";
|
|
5
5
|
import axios from "axios";
|
|
6
6
|
|
|
7
|
+
//@ts-ignore
|
|
8
|
+
import CheckoutDE from "@ikas/storefront-assets/checkout/de.js";
|
|
7
9
|
//@ts-ignore
|
|
8
10
|
import CheckoutEN from "@ikas/storefront-assets/checkout/en.js";
|
|
9
11
|
//@ts-ignore
|
|
@@ -290,6 +292,8 @@ function readLocalizationFiles(): Promise<Record<string, any>> {
|
|
|
290
292
|
|
|
291
293
|
if (strippedLocale === "tr") {
|
|
292
294
|
locales[strippedLocale]["checkout-page"] = CheckoutTR;
|
|
295
|
+
} else if (strippedLocale === "de") {
|
|
296
|
+
locales[strippedLocale]["checkout-page"] = CheckoutDE;
|
|
293
297
|
} else {
|
|
294
298
|
locales[strippedLocale]["checkout-page"] = CheckoutEN;
|
|
295
299
|
}
|
package/src/utils/i18n.ts
CHANGED
|
@@ -42,6 +42,12 @@ export class I18NFileReader {
|
|
|
42
42
|
"@ikas/storefront-assets/checkout/tr.js"
|
|
43
43
|
);
|
|
44
44
|
checkoutTranslation = imported.default;
|
|
45
|
+
} else if (this.locale === "de") {
|
|
46
|
+
const imported = await import(
|
|
47
|
+
//@ts-ignore
|
|
48
|
+
"@ikas/storefront-assets/checkout/de.js"
|
|
49
|
+
);
|
|
50
|
+
checkoutTranslation = imported.default;
|
|
45
51
|
} else {
|
|
46
52
|
const imported = await import(
|
|
47
53
|
//@ts-ignore
|