@prezly/theme-kit-nextjs 4.3.3 → 4.3.5-alpha.0

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/README.md CHANGED
@@ -71,23 +71,12 @@ module.exports = {
71
71
  If you want to support multi-language in your theme, you'll need to make additional changes to the file:
72
72
 
73
73
  ```js
74
- const { DUMMY_DEFAULT_LOCALE } = require('@prezly/theme-kit-nextjs');
75
- const locales = require('@prezly/theme-kit-nextjs/core/localeConfig');
74
+ const i18nConfig = require('@prezly/theme-kit-nextjs/i18nConfig');
76
75
 
77
76
  module.exports = {
78
77
  /* ...your next config... */
79
78
 
80
- i18n: {
81
- // These are all the locales you want to support in
82
- // your application
83
- locales: [...locales, DUMMY_DEFAULT_LOCALE],
84
- // This is the default locale you want to be used when visiting
85
- // a non-locale prefixed path e.g. `/media`
86
- // We use Pseudo locale used for localization testing, to reliably determine if we need to fallback to the default newsroom language
87
- defaultLocale: DUMMY_DEFAULT_LOCALE,
88
- // Default locale detection is disabled, since the locales would be determined by Prezly API
89
- localeDetection: false,
90
- },
79
+ i18n: i18nConfig,
91
80
  };
92
81
  ```
93
82
 
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // @ts-expect-error
4
+ // eslint-disable-next-line import/no-unresolved
5
+ const locales = require('@prezly/theme-kit-core/localeConfig');
6
+ // eslint-disable-next-line import/no-unresolved
7
+ const { DUMMY_DEFAULT_LOCALE } = require('./intl/locale.js');
8
+ /** @type {import('next').NextConfig['i18n']} */
9
+ const i18nConfig = {
10
+ // These are all the locales you want to support in
11
+ // your application
12
+ locales: [...locales, DUMMY_DEFAULT_LOCALE],
13
+ // This is the default locale you want to be used when visiting
14
+ // a non-locale prefixed path e.g. `/hello`
15
+ // We use Pseudo locale used for localization testing, to reliably determine if we need to fallback to the default newsroom language
16
+ defaultLocale: DUMMY_DEFAULT_LOCALE,
17
+ // Default locale detection is disabled, since the locales would be determined by Prezly API
18
+ localeDetection: false,
19
+ };
20
+ module.exports = i18nConfig;
21
+ //# sourceMappingURL=i18nConfig.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18nConfig.cjs","sourceRoot":"","sources":["../../src/i18nConfig.cjs"],"names":[],"mappings":";;AAAA,mBAAmB;AACnB,gDAAgD;AAChD,MAAM,OAAO,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AAE/D,gDAAgD;AAChD,MAAM,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAE7D,gDAAgD;AAChD,MAAM,UAAU,GAAG;IACf,mDAAmD;IACnD,mBAAmB;IACnB,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,oBAAoB,CAAC;IAC3C,+DAA+D;IAC/D,2CAA2C;IAC3C,oIAAoI;IACpI,aAAa,EAAE,oBAAoB;IACnC,4FAA4F;IAC5F,eAAe,EAAE,KAAK;CACzB,CAAC;AAEF,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ export = i18nConfig;
2
+ /** @type {import('next').NextConfig['i18n']} */
3
+ declare const i18nConfig: import('next').NextConfig['i18n'];
@@ -0,0 +1,20 @@
1
+ // @ts-expect-error
2
+ // eslint-disable-next-line import/no-unresolved
3
+ const locales = require('@prezly/theme-kit-core/localeConfig');
4
+ // eslint-disable-next-line import/no-unresolved
5
+ const { DUMMY_DEFAULT_LOCALE } = require('./intl/locale.js');
6
+ /** @type {import('next').NextConfig['i18n']} */
7
+ const i18nConfig = {
8
+ // These are all the locales you want to support in
9
+ // your application
10
+ locales: [...locales, DUMMY_DEFAULT_LOCALE],
11
+ // This is the default locale you want to be used when visiting
12
+ // a non-locale prefixed path e.g. `/hello`
13
+ // We use Pseudo locale used for localization testing, to reliably determine if we need to fallback to the default newsroom language
14
+ defaultLocale: DUMMY_DEFAULT_LOCALE,
15
+ // Default locale detection is disabled, since the locales would be determined by Prezly API
16
+ localeDetection: false,
17
+ };
18
+ module.exports = i18nConfig;
19
+ export {};
20
+ //# sourceMappingURL=i18nConfig.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18nConfig.cjs","sourceRoot":"","sources":["../../src/i18nConfig.cjs"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,gDAAgD;AAChD,MAAM,OAAO,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AAE/D,gDAAgD;AAChD,MAAM,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAE7D,gDAAgD;AAChD,MAAM,UAAU,GAAG;IACf,mDAAmD;IACnD,mBAAmB;IACnB,OAAO,EAAE,CAAC,GAAG,OAAO,EAAE,oBAAoB,CAAC;IAC3C,+DAA+D;IAC/D,2CAA2C;IAC3C,oIAAoI;IACpI,aAAa,EAAE,oBAAoB;IACnC,4FAA4F;IAC5F,eAAe,EAAE,KAAK;CACzB,CAAC;AAEF,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC"}