next-translate 2.6.1 → 2.6.2

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
@@ -18,7 +18,7 @@
18
18
  <a href="https://github.com/aralroca/next-translate/actions?query=workflow%3ACI" alt="Tests status">
19
19
  <img src="https://github.com/aralroca/next-translate/workflows/CI/badge.svg" /></a>
20
20
  <a href="https://twitter.com/intent/follow?screen_name=aralroca">
21
- <img src="https://img.shields.io/twitter/follow/aralroca?style=social&logo=twitter"
21
+ <img src="https://img.shields.io/twitter/follow/aralroca?style=social&logo=x"
22
22
  alt="follow on Twitter"></a>
23
23
 
24
24
  </div>
@@ -1151,6 +1151,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
1151
1151
  </tr>
1152
1152
  <tr>
1153
1153
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/crs1138"><img src="https://avatars.githubusercontent.com/u/1313681?v=4?s=100" width="100px;" alt="Honza"/><br /><sub><b>Honza</b></sub></a><br /><a href="#maintenance-crs1138" title="Maintenance">🚧</a></td>
1154
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/BandhiyaHardik"><img src="https://avatars.githubusercontent.com/u/110784317?v=4?s=100" width="100px;" alt="HardikBandhiya"/><br /><sub><b>HardikBandhiya</b></sub></a><br /><a href="https://github.com/aralroca/next-translate/commits?author=BandhiyaHardik" title="Documentation">📖</a></td>
1155
+ <td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/timotew/"><img src="https://avatars.githubusercontent.com/u/12928383?v=4?s=100" width="100px;" alt="Tim O. Peters"/><br /><sub><b>Tim O. Peters</b></sub></a><br /><a href="https://github.com/aralroca/next-translate/commits?author=timotew" title="Code">💻</a></td>
1154
1156
  </tr>
1155
1157
  </tbody>
1156
1158
  </table>
@@ -53,7 +53,7 @@ function I18nProvider(_a) {
53
53
  var lang = lng || parentLang || locale || defaultLocale || '';
54
54
  var config = __assign(__assign({}, internal.config), newConfig);
55
55
  var localesToIgnore = config.localesToIgnore || ['default'];
56
- var ignoreLang = localesToIgnore.includes(lang);
56
+ var ignoreLang = !lang || localesToIgnore.includes(lang);
57
57
  var pluralRules = new Intl.PluralRules(ignoreLang ? undefined : lang);
58
58
  var t = (0, transCore_1.default)({ config: config, allNamespaces: allNamespaces, pluralRules: pluralRules, lang: lang });
59
59
  return (react_1.default.createElement(context_1.default.Provider, { value: { lang: lang, t: t } },
@@ -9,7 +9,7 @@ function createTranslation(defaultNS) {
9
9
  var _a;
10
10
  var _b = (_a = globalThis.__NEXT_TRANSLATE__) !== null && _a !== void 0 ? _a : {}, lang = _b.lang, namespaces = _b.namespaces, config = _b.config;
11
11
  var localesToIgnore = config.localesToIgnore || ['default'];
12
- var ignoreLang = localesToIgnore.includes(lang);
12
+ var ignoreLang = !lang || localesToIgnore.includes(lang);
13
13
  var t = (0, transCore_1.default)({
14
14
  config: config,
15
15
  allNamespaces: namespaces,
@@ -24,7 +24,7 @@ export default function I18nProvider(_a) {
24
24
  var lang = lng || parentLang || locale || defaultLocale || '';
25
25
  var config = __assign(__assign({}, internal.config), newConfig);
26
26
  var localesToIgnore = config.localesToIgnore || ['default'];
27
- var ignoreLang = localesToIgnore.includes(lang);
27
+ var ignoreLang = !lang || localesToIgnore.includes(lang);
28
28
  var pluralRules = new Intl.PluralRules(ignoreLang ? undefined : lang);
29
29
  var t = transCore({ config: config, allNamespaces: allNamespaces, pluralRules: pluralRules, lang: lang });
30
30
  return (React.createElement(I18nContext.Provider, { value: { lang: lang, t: t } },
@@ -4,7 +4,7 @@ export default function createTranslation(defaultNS) {
4
4
  var _a;
5
5
  var _b = (_a = globalThis.__NEXT_TRANSLATE__) !== null && _a !== void 0 ? _a : {}, lang = _b.lang, namespaces = _b.namespaces, config = _b.config;
6
6
  var localesToIgnore = config.localesToIgnore || ['default'];
7
- var ignoreLang = localesToIgnore.includes(lang);
7
+ var ignoreLang = !lang || localesToIgnore.includes(lang);
8
8
  var t = transCore({
9
9
  config: config,
10
10
  allNamespaces: namespaces,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-translate",
3
- "version": "2.6.1",
3
+ "version": "2.6.2",
4
4
  "description": "Tiny and powerful i18n tools (Next plugin + API) to translate your Next.js pages.",
5
5
  "license": "MIT",
6
6
  "keywords": [