@intlayer/docs 7.0.8 → 7.0.9-canary.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 +4 -4
- package/dist/cjs/generated/frequentQuestions.entry.cjs +19 -0
- package/dist/cjs/generated/frequentQuestions.entry.cjs.map +1 -1
- package/dist/esm/generated/frequentQuestions.entry.mjs +19 -0
- package/dist/esm/generated/frequentQuestions.entry.mjs.map +1 -1
- package/dist/types/generated/frequentQuestions.entry.d.ts +1 -0
- package/dist/types/generated/frequentQuestions.entry.d.ts.map +1 -1
- package/docs/ar/readme.md +3 -3
- package/docs/de/readme.md +5 -5
- package/docs/en/readme.md +6 -6
- package/docs/en-GB/readme.md +3 -3
- package/docs/es/readme.md +3 -3
- package/docs/fr/readme.md +3 -3
- package/docs/hi/readme.md +3 -3
- package/docs/id/readme.md +3 -3
- package/docs/it/readme.md +3 -3
- package/docs/ja/readme.md +3 -3
- package/docs/ko/readme.md +3 -3
- package/docs/pl/intlayer_with_nextjs_15.md +36 -37
- package/docs/pl/readme.md +3 -3
- package/docs/pt/readme.md +3 -3
- package/docs/ru/readme.md +3 -3
- package/docs/tr/readme.md +3 -3
- package/docs/vi/readme.md +3 -3
- package/docs/zh/readme.md +3 -3
- package/frequent_questions/ar/package_version_error.md +132 -0
- package/frequent_questions/de/package_version_error.md +132 -0
- package/frequent_questions/en/package_version_error.md +153 -0
- package/frequent_questions/en-GB/package_version_error.md +132 -0
- package/frequent_questions/es/package_version_error.md +132 -0
- package/frequent_questions/fr/package_version_error.md +132 -0
- package/frequent_questions/hi/package_version_error.md +132 -0
- package/frequent_questions/id/package_version_error.md +132 -0
- package/frequent_questions/it/package_version_error.md +132 -0
- package/frequent_questions/ja/package_version_error.md +132 -0
- package/frequent_questions/ko/package_version_error.md +132 -0
- package/frequent_questions/pl/package_version_error.md +132 -0
- package/frequent_questions/pt/package_version_error.md +132 -0
- package/frequent_questions/ru/package_version_error.md +132 -0
- package/frequent_questions/tr/package_version_error.md +132 -0
- package/frequent_questions/vi/package_version_error.md +132 -0
- package/frequent_questions/zh/package_version_error.md +132 -0
- package/package.json +14 -14
- package/src/generated/frequentQuestions.entry.ts +19 -0
package/docs/it/readme.md
CHANGED
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
</a>
|
|
23
23
|
<a href="https://github.com/aymericzip/intlayer/stargazers" target="_blank"><img src="https://img.shields.io/github/stars/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logo=github&logoColor=FFD700" alt="Stelle GitHub" height="24"/>
|
|
24
24
|
</a>
|
|
25
|
-
<a href="https://www.npmjs.org/package/intlayer" target="_blank"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="download mensili" height="24"/>
|
|
25
|
+
<a href="https://www.npmjs.org/package/intlayer" target="_blank"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="download mensili" height="24"/>
|
|
26
26
|
</a>
|
|
27
|
-
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="licenza"/>
|
|
27
|
+
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="licenza"/>
|
|
28
28
|
</a>
|
|
29
|
-
<a href="https://github.com/aymericzip/intlayer/commits/main"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="ultimo commit"/>
|
|
29
|
+
<a href="https://github.com/aymericzip/intlayer/commits/main"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="ultimo commit"/>
|
|
30
30
|
</a>
|
|
31
31
|
</p>
|
|
32
32
|
|
package/docs/ja/readme.md
CHANGED
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
</a>
|
|
23
23
|
<a href="https://github.com/aymericzip/intlayer/stargazers" target="_blank"><img src="https://img.shields.io/github/stars/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logo=github&logoColor=FFD700" alt="GitHub スター" height="24"/>
|
|
24
24
|
</a>
|
|
25
|
-
<a href="https://www.npmjs.org/package/intlayer" target="_blank"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="月間ダウンロード数" height="24"/>
|
|
25
|
+
<a href="https://www.npmjs.org/package/intlayer" target="_blank"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="月間ダウンロード数" height="24"/>
|
|
26
26
|
</a>
|
|
27
|
-
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="ライセンス"/>
|
|
27
|
+
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="ライセンス"/>
|
|
28
28
|
</a>
|
|
29
|
-
<a href="https://github.com/aymericzip/intlayer/commits/main"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="最終コミット"/>
|
|
29
|
+
<a href="https://github.com/aymericzip/intlayer/commits/main"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="最終コミット"/>
|
|
30
30
|
</a>
|
|
31
31
|
</p>
|
|
32
32
|
|
package/docs/ko/readme.md
CHANGED
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
</a>
|
|
23
23
|
<a href="https://github.com/aymericzip/intlayer/stargazers" target="_blank"><img src="https://img.shields.io/github/stars/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logo=github&logoColor=FFD700" alt="GitHub 스타" height="24"/>
|
|
24
24
|
</a>
|
|
25
|
-
<a href="https://www.npmjs.org/package/intlayer" target="_blank"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="월간 다운로드" height="24"/>
|
|
25
|
+
<a href="https://www.npmjs.org/package/intlayer" target="_blank"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="월간 다운로드" height="24"/>
|
|
26
26
|
</a>
|
|
27
|
-
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="라이선스"/>
|
|
27
|
+
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="라이선스"/>
|
|
28
28
|
</a>
|
|
29
|
-
<a href="https://github.com/aymericzip/intlayer/commits/main"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="마지막 커밋"/>
|
|
29
|
+
<a href="https://github.com/aymericzip/intlayer/commits/main"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="마지막 커밋"/>
|
|
30
30
|
</a>
|
|
31
31
|
</p>
|
|
32
32
|
|
|
@@ -852,11 +852,6 @@ module.exports = metadataContent;
|
|
|
852
852
|
},
|
|
853
853
|
},
|
|
854
854
|
},
|
|
855
|
-
};
|
|
856
|
-
"es": "Generado por create next app",
|
|
857
|
-
},
|
|
858
|
-
},
|
|
859
|
-
},
|
|
860
855
|
};
|
|
861
856
|
```
|
|
862
857
|
|
|
@@ -953,41 +948,42 @@ const { getIntlayer, getMultilingualUrls } = require("intlayer");
|
|
|
953
948
|
const generateMetadata = async ({ params }) => {
|
|
954
949
|
const { locale } = await params;
|
|
955
950
|
|
|
956
|
-
const metadata = getIntlayer("page-metadata", locale);
|
|
951
|
+
const metadata = getIntlayer("page-metadata", locale);
|
|
957
952
|
|
|
958
|
-
/**
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
const multilingualUrls = getMultilingualUrls("/");
|
|
974
|
-
const localizedUrl = multilingualUrls[locale];
|
|
975
|
-
|
|
976
|
-
return {
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
};
|
|
953
|
+
/**
|
|
954
|
+
* Generuje obiekt zawierający wszystkie adresy URL dla każdej lokalizacji.
|
|
955
|
+
*
|
|
956
|
+
* Przykład:
|
|
957
|
+
* ```ts
|
|
958
|
+
* getMultilingualUrls('/about');
|
|
959
|
+
*
|
|
960
|
+
* // Zwraca
|
|
961
|
+
* // {
|
|
962
|
+
* // en: '/about',
|
|
963
|
+
* // fr: '/fr/about',
|
|
964
|
+
* // es: '/es/about'
|
|
965
|
+
* // }
|
|
966
|
+
* ```
|
|
967
|
+
*/
|
|
968
|
+
const multilingualUrls = getMultilingualUrls("/");
|
|
969
|
+
const localizedUrl = multilingualUrls[locale];
|
|
970
|
+
|
|
971
|
+
return {
|
|
972
|
+
...metadata,
|
|
973
|
+
alternates: {
|
|
974
|
+
canonical: localizedUrl,
|
|
975
|
+
languages: { ...multilingualUrls, "x-default": "/" },
|
|
976
|
+
},
|
|
977
|
+
openGraph: {
|
|
978
|
+
url: localizedUrl,
|
|
979
|
+
},
|
|
980
|
+
};
|
|
986
981
|
};
|
|
987
982
|
|
|
988
983
|
module.exports = { generateMetadata };
|
|
989
984
|
|
|
990
|
-
// ... Reszta kodu
|
|
985
|
+
// ... Reszta kodu
|
|
986
|
+
````
|
|
991
987
|
|
|
992
988
|
> Zauważ, że funkcja `getIntlayer` importowana z `next-intlayer` zwraca Twoją zawartość opakowaną w `IntlayerNode`, co umożliwia integrację z edytorem wizualnym. Natomiast funkcja `getIntlayer` importowana z `intlayer` zwraca Twoją zawartość bezpośrednio, bez dodatkowych właściwości.
|
|
993
989
|
|
|
@@ -1571,7 +1567,7 @@ const Link = ({ href, children, ...props }) => {
|
|
|
1571
1567
|
#### Jak to działa
|
|
1572
1568
|
|
|
1573
1569
|
- **Wykrywanie linków zewnętrznych**:
|
|
1574
|
-
Funkcja pomocnicza `checkIsExternalLink` określa, czy URL jest zewnętrzny. Linki zewnętrzne pozostają niezmienione, ponieważ nie wymagają lokalizacji.
|
|
1570
|
+
Funkcja pomocnicza `checkIsExternalLink` określa, czy URL jest zewnętrzny. Linki zewnętrzne pozostają niezmienione, ponieważ nie wymagają lokalizacji.
|
|
1575
1571
|
|
|
1576
1572
|
- **Pobieranie bieżącej lokalizacji**:
|
|
1577
1573
|
Hook `useLocale` dostarcza aktualną lokalizację (np. `fr` dla języka francuskiego).
|
|
@@ -1698,4 +1694,7 @@ Aby uzyskać więcej informacji na temat korzystania z rozszerzenia, zapoznaj si
|
|
|
1698
1694
|
### Idź dalej
|
|
1699
1695
|
|
|
1700
1696
|
Aby pójść dalej, możesz zaimplementować [edytor wizualny](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/intlayer_visual_editor.md) lub wyodrębnić swoją zawartość, korzystając z [CMS](https://github.com/aymericzip/intlayer/blob/main/docs/docs/pl/intlayer_CMS.md).
|
|
1701
|
-
|
|
1697
|
+
|
|
1698
|
+
```
|
|
1699
|
+
|
|
1700
|
+
```
|
package/docs/pl/readme.md
CHANGED
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
</a>
|
|
23
23
|
<a href="https://github.com/aymericzip/intlayer/stargazers" target="_blank"><img src="https://img.shields.io/github/stars/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logo=github&logoColor=FFD700" alt="Gwiazdy GitHub" height="24"/>
|
|
24
24
|
</a>
|
|
25
|
-
<a href="https://www.npmjs.org/package/intlayer" target="_blank"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="miesięczne pobrania" height="24"/>
|
|
25
|
+
<a href="https://www.npmjs.org/package/intlayer" target="_blank"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="miesięczne pobrania" height="24"/>
|
|
26
26
|
</a>
|
|
27
|
-
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="licencja"/>
|
|
27
|
+
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="licencja"/>
|
|
28
28
|
</a>
|
|
29
|
-
<a href="https://github.com/aymericzip/intlayer/commits/main"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="ostatni commit"/>
|
|
29
|
+
<a href="https://github.com/aymericzip/intlayer/commits/main"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="ostatni commit"/>
|
|
30
30
|
</a>
|
|
31
31
|
</p>
|
|
32
32
|
|
package/docs/pt/readme.md
CHANGED
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
</a>
|
|
23
23
|
<a href="https://github.com/aymericzip/intlayer/stargazers" target="_blank"><img src="https://img.shields.io/github/stars/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logo=github&logoColor=FFD700" alt="Estrelas no GitHub" height="24"/>
|
|
24
24
|
</a>
|
|
25
|
-
<a href="https://www.npmjs.org/package/intlayer" target="_blank"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="downloads mensais" height="24"/>
|
|
25
|
+
<a href="https://www.npmjs.org/package/intlayer" target="_blank"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="downloads mensais" height="24"/>
|
|
26
26
|
</a>
|
|
27
|
-
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="licença"/>
|
|
27
|
+
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="licença"/>
|
|
28
28
|
</a>
|
|
29
|
-
<a href="https://github.com/aymericzip/intlayer/commits/main"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="último commit"/>
|
|
29
|
+
<a href="https://github.com/aymericzip/intlayer/commits/main"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="último commit"/>
|
|
30
30
|
</a>
|
|
31
31
|
</p>
|
|
32
32
|
|
package/docs/ru/readme.md
CHANGED
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
</a>
|
|
23
23
|
<a href="https://github.com/aymericzip/intlayer/stargazers" target="_blank"><img src="https://img.shields.io/github/stars/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logo=github&logoColor=FFD700" alt="Звезды GitHub" height="24"/>
|
|
24
24
|
</a>
|
|
25
|
-
<a href="https://www.npmjs.org/package/intlayer" target="_blank"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="ежемесячные загрузки" height="24"/>
|
|
25
|
+
<a href="https://www.npmjs.org/package/intlayer" target="_blank"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="ежемесячные загрузки" height="24"/>
|
|
26
26
|
</a>
|
|
27
|
-
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="лицензия"/>
|
|
27
|
+
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="лицензия"/>
|
|
28
28
|
</a>
|
|
29
|
-
<a href="https://github.com/aymericzip/intlayer/commits/main"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="последний коммит"/>
|
|
29
|
+
<a href="https://github.com/aymericzip/intlayer/commits/main"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="последний коммит"/>
|
|
30
30
|
</a>
|
|
31
31
|
</p>
|
|
32
32
|
|
package/docs/tr/readme.md
CHANGED
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
</a>
|
|
23
23
|
<a href="https://github.com/aymericzip/intlayer/stargazers" target="_blank"><img src="https://img.shields.io/github/stars/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logo=github&logoColor=FFD700" alt="GitHub Yıldızları" height="24"/>
|
|
24
24
|
</a>
|
|
25
|
-
<a href="https://www.npmjs.org/package/intlayer" target="_blank"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="aylık indirmeler" height="24"/>
|
|
25
|
+
<a href="https://www.npmjs.org/package/intlayer" target="_blank"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="aylık indirmeler" height="24"/>
|
|
26
26
|
</a>
|
|
27
|
-
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="lisans"/>
|
|
27
|
+
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="lisans"/>
|
|
28
28
|
</a>
|
|
29
|
-
<a href="https://github.com/aymericzip/intlayer/commits/main"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="son commit"/>
|
|
29
|
+
<a href="https://github.com/aymericzip/intlayer/commits/main"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="son commit"/>
|
|
30
30
|
</a>
|
|
31
31
|
</p>
|
|
32
32
|
|
package/docs/vi/readme.md
CHANGED
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
</a>
|
|
23
23
|
<a href="https://github.com/aymericzip/intlayer/stargazers" target="_blank"><img src="https://img.shields.io/github/stars/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logo=github&logoColor=FFD700" alt="Số sao trên GitHub" height="24"/>
|
|
24
24
|
</a>
|
|
25
|
-
<a href="https://www.npmjs.org/package/intlayer" target="_blank"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="lượt tải hàng tháng" height="24"/>
|
|
25
|
+
<a href="https://www.npmjs.org/package/intlayer" target="_blank"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="lượt tải hàng tháng" height="24"/>
|
|
26
26
|
</a>
|
|
27
|
-
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="giấy phép"/>
|
|
27
|
+
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="giấy phép"/>
|
|
28
28
|
</a>
|
|
29
|
-
<a href="https://github.com/aymericzip/intlayer/commits/main"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="lần cam kết cuối cùng"/>
|
|
29
|
+
<a href="https://github.com/aymericzip/intlayer/commits/main"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="lần cam kết cuối cùng"/>
|
|
30
30
|
</a>
|
|
31
31
|
</p>
|
|
32
32
|
|
package/docs/zh/readme.md
CHANGED
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
</a>
|
|
23
23
|
<a href="https://github.com/aymericzip/intlayer/stargazers" target="_blank"><img src="https://img.shields.io/github/stars/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logo=github&logoColor=FFD700" alt="GitHub 星标" height="24"/>
|
|
24
24
|
</a>
|
|
25
|
-
<a href="https://www.npmjs.org/package/intlayer" target="_blank"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="月下载量" height="24"/>
|
|
25
|
+
<a href="https://www.npmjs.org/package/intlayer" target="_blank"><img src="https://img.shields.io/npm/dm/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="月下载量" height="24"/>
|
|
26
26
|
</a>
|
|
27
|
-
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="许可证"/>
|
|
27
|
+
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="许可证"/>
|
|
28
28
|
</a>
|
|
29
|
-
<a href="https://github.com/aymericzip/intlayer/commits/main"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000" alt="最新提交"/>
|
|
29
|
+
<a href="https://github.com/aymericzip/intlayer/commits/main"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="最新提交"/>
|
|
30
30
|
</a>
|
|
31
31
|
</p>
|
|
32
32
|
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2025-05-20
|
|
3
|
+
updatedAt: 2025-06-29
|
|
4
|
+
title: أحصل على خطأ متعلق بالحزم الفرعية @intlayer/*
|
|
5
|
+
description: إصلاح الخطأ المتعلق بالحزم الفرعية @intlayer/*.
|
|
6
|
+
keywords:
|
|
7
|
+
- @intlayer/*
|
|
8
|
+
- الحزم الفرعية
|
|
9
|
+
- intlayer
|
|
10
|
+
slugs:
|
|
11
|
+
- frequent-questions
|
|
12
|
+
- package-version-error
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# أحصل على خطأ متعلق بالحزم الفرعية `@intlayer/*`
|
|
16
|
+
|
|
17
|
+
عادةً ما تحدث هذه المشكلة بعد تحديث حزم Intlayer.
|
|
18
|
+
|
|
19
|
+
مثال على رسالة الخطأ:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
Error: Cannot find module '@intlayer/types'
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
TypeError: (0 , __intlayer_config_client.colorize) is not a function
|
|
27
|
+
|
|
28
|
+
at import { colorize } from '@intlayer/config';
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
✖ ERROR No matching export in "node_modules/@intlayer/config/dist/esm/client.mjs" for import "clearModuleCache"
|
|
33
|
+
|
|
34
|
+
node_modules/@intlayer/unmerged-dictionaries-entry/dist/esm/index.mjs:3:9:
|
|
35
|
+
3 | import { clearModuleCache, configESMxCJSRequire } from "@intlayer/config";
|
|
36
|
+
| ~~~~~~~~~~~~~~~~
|
|
37
|
+
|
|
38
|
+
✖ خطأ لا يوجد تصدير مطابق في "node_modules/@intlayer/config/dist/esm/client.mjs" للاستيراد "configESMxCJSRequire"
|
|
39
|
+
|
|
40
|
+
node_modules/@intlayer/unmerged-dictionaries-entry/dist/esm/index.mjs:3:27:
|
|
41
|
+
3 | import { clearModuleCache, configESMxCJSRequire } from "@intlayer/config";
|
|
42
|
+
| ~~~~~~~~~~~~~~~~~~~~
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## السبب
|
|
46
|
+
|
|
47
|
+
الحزم الأساسية مثل `intlayer`، `react-intlayer`، `react-native-intlayer`، `vue-intlayer` تعيد استخدام نفس الحزم الفرعية مثل `@intlayer/config`، `@intlayer/core`، `@intlayer/types` لتجنب تكرار الكود.
|
|
48
|
+
|
|
49
|
+
بين إصدارين، لا يتم ضمان أن تكون التصديرات في الحزم الفرعية هي نفسها. للحد من هذه المشكلة، يقوم intlayer بتثبيت إصدار الحزم الفرعية ليتطابق مع إصدار الحزمة الرئيسية.
|
|
50
|
+
|
|
51
|
+
> مثال: `intlayer@1.0.0` يستخدم `@intlayer/config@1.0.0`، `@intlayer/core@1.0.0`، `@intlayer/types@1.0.0`
|
|
52
|
+
|
|
53
|
+
> (باستثناء `@intlayer/swc`)، الحزم الفرعية `@intlayer/*` ليست مخصصة للاستخدام المباشر. لذلك نوصي بعدم تثبيتها مباشرة.
|
|
54
|
+
|
|
55
|
+
## الحل
|
|
56
|
+
|
|
57
|
+
1. تأكد من أن إصدارات الحزمة الرئيسية والحزم الفرعية هي نفسها.
|
|
58
|
+
|
|
59
|
+
```json5
|
|
60
|
+
{
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"intlayer": "7.0.1",
|
|
63
|
+
"react-intlayer": "7.0.0", // إصدار خاطئ، يجب أن يكون 7.0.1
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"intlayer-editor": "7.0.1",
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
2. حاول إزالة ملف القفل ومجلد node_modules وأعد تثبيت التبعيات.
|
|
72
|
+
|
|
73
|
+
أحيانًا، يحتفظ مدير الحزم بإصدار قديم من الحزم الفرعية في ملف القفل ضمن الكاش. لإصلاح ذلك، يمكنك محاولة إزالة ملف القفل ومجلد node_modules وأعد تثبيت التبعيات.
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
rm -rf package-lock.json node_modules
|
|
77
|
+
npm install
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
3. تحقق من التثبيت العالمي
|
|
81
|
+
|
|
82
|
+
نوصي بتثبيت `intlayer` أو `intlayer-cli` بشكل عالمي للوصول إلى أوامر CLI. إذا لم يكن الإصدار العالمي هو نفسه الإصدار المحلي، قد يعتبر مدير الحزم الإصدار خاطئًا.
|
|
83
|
+
|
|
84
|
+
**تحقق مما إذا كانت الحزمة مثبتة عالميًا**
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npm list -g --depth=0
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npm list -g --depth=0 | grep intlayer
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
yarn global list
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
pnpm list -g --depth=0
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**إصلاح تعارضات التبعيات العالمية المحتملة**
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
npm uninstall -g intlayer intlayer-cli
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
yarn global remove intlayer intlayer-cli
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
pnpm remove -g intlayer intlayer-cli
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
5. حاول تنظيف الكاش
|
|
117
|
+
|
|
118
|
+
في بعض البيئات مثل docker، أو github actions، أو منصات استضافة الويب مثل Vercel، قد يكون هناك كاش موجود. يمكنك محاولة تنظيف الكاش وإعادة محاولة التثبيت.
|
|
119
|
+
|
|
120
|
+
يمكنك أيضًا محاولة تنظيف كاش مدير الحزم الخاص بك باستخدام الأمر التالي:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
npm cache clean --force
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
yarn cache clean
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
pnpm cache clean
|
|
132
|
+
```
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2025-05-20
|
|
3
|
+
updatedAt: 2025-06-29
|
|
4
|
+
title: Ich erhalte einen Fehler im Zusammenhang mit Sub-Paketen `@intlayer/*`
|
|
5
|
+
description: Fehlerbehebung im Zusammenhang mit Sub-Paketen `@intlayer/*`.
|
|
6
|
+
keywords:
|
|
7
|
+
- @intlayer/*
|
|
8
|
+
- Sub-Pakete
|
|
9
|
+
- intlayer
|
|
10
|
+
slugs:
|
|
11
|
+
- frequent-questions
|
|
12
|
+
- package-version-error
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Ich erhalte einen Fehler im Zusammenhang mit Sub-Paketen `@intlayer/*`
|
|
16
|
+
|
|
17
|
+
Dieses Problem tritt normalerweise nach einem Update der Intlayer-Pakete auf.
|
|
18
|
+
|
|
19
|
+
Beispiel für eine Fehlermeldung:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
Error: Cannot find module '@intlayer/types'
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
TypeError: (0 , __intlayer_config_client.colorize) is not a function
|
|
27
|
+
|
|
28
|
+
at import { colorize } from '@intlayer/config';
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
✖ ERROR Kein passender Export in "node_modules/@intlayer/config/dist/esm/client.mjs" für den Import "clearModuleCache"
|
|
33
|
+
|
|
34
|
+
node_modules/@intlayer/unmerged-dictionaries-entry/dist/esm/index.mjs:3:9:
|
|
35
|
+
3 | import { clearModuleCache, configESMxCJSRequire } from "@intlayer/config";
|
|
36
|
+
| ~~~~~~~~~~~~~~~~
|
|
37
|
+
|
|
38
|
+
✖ FEHLER Kein passender Export in "node_modules/@intlayer/config/dist/esm/client.mjs" für den Import "configESMxCJSRequire"
|
|
39
|
+
|
|
40
|
+
node_modules/@intlayer/unmerged-dictionaries-entry/dist/esm/index.mjs:3:27:
|
|
41
|
+
3 | import { clearModuleCache, configESMxCJSRequire } from "@intlayer/config";
|
|
42
|
+
| ~~~~~~~~~~~~~~~~~~~~
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Grund
|
|
46
|
+
|
|
47
|
+
Basispakete wie `intlayer`, `react-intlayer`, `react-native-intlayer`, `vue-intlayer` verwenden dieselben Sub-Pakete wie `@intlayer/config`, `@intlayer/core`, `@intlayer/types` erneut, um Code-Duplikationen zu vermeiden.
|
|
48
|
+
|
|
49
|
+
Zwischen zwei Versionen ist nicht garantiert, dass die Exporte der Sub-Pakete gleich sind. Um dieses Problem zu begrenzen, fixiert intlayer die Version der Sub-Pakete auf die Version des Hauptpakets.
|
|
50
|
+
|
|
51
|
+
> Beispiel: `intlayer@1.0.0` verwendet `@intlayer/config@1.0.0`, `@intlayer/core@1.0.0`, `@intlayer/types@1.0.0`
|
|
52
|
+
|
|
53
|
+
> (Außer `@intlayer/swc`) sind `@intlayer/*` Sub-Pakete nicht für die direkte Verwendung gedacht. Daher empfehlen wir, diese nicht direkt zu installieren.
|
|
54
|
+
|
|
55
|
+
## Lösung
|
|
56
|
+
|
|
57
|
+
1. Stellen Sie sicher, dass die Versionen des Hauptpakets und der Sub-Pakete identisch sind.
|
|
58
|
+
|
|
59
|
+
```json5
|
|
60
|
+
{
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"intlayer": "7.0.1",
|
|
63
|
+
"react-intlayer": "7.0.0", // Falsche Version, es sollte 7.0.1 sein
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"intlayer-editor": "7.0.1",
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
2. Versuchen Sie, die Lockdatei und den node_modules-Ordner zu entfernen und die Abhängigkeiten neu zu installieren.
|
|
72
|
+
|
|
73
|
+
Manchmal behält der Paketmanager eine alte Version der Sub-Pakete im Cache der Lockdatei. Um dies zu beheben, können Sie versuchen, die Lockdatei und den node_modules-Ordner zu entfernen und die Abhängigkeiten neu zu installieren.
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
rm -rf package-lock.json node_modules
|
|
77
|
+
npm install
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
3. Überprüfen Sie die globale Installation
|
|
81
|
+
|
|
82
|
+
Wir empfehlen, `intlayer` oder `intlayer-cli` global zu installieren, um auf die CLI-Befehle zugreifen zu können. Wenn die globale Version nicht mit der lokalen Version übereinstimmt, kann der Paketmanager die falsche Version verwenden.
|
|
83
|
+
|
|
84
|
+
**Überprüfen, ob ein Paket global installiert ist**
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npm list -g --depth=0
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npm list -g --depth=0 | grep intlayer
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
yarn global list
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
pnpm list -g --depth=0
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Beheben Sie mögliche globale Abhängigkeitskonflikte**
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
npm uninstall -g intlayer intlayer-cli
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
yarn global remove intlayer intlayer-cli
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
pnpm remove -g intlayer intlayer-cli
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
5. Versuchen Sie, den Cache zu bereinigen
|
|
117
|
+
|
|
118
|
+
In einigen Umgebungen wie Docker, GitHub Actions oder Webhosting-Plattformen wie Vercel kann ein Cache vorhanden sein. Sie können versuchen, den Cache zu bereinigen und die Installation erneut durchzuführen.
|
|
119
|
+
|
|
120
|
+
Sie können auch versuchen, den Cache Ihres Paketmanagers mit folgendem Befehl zu bereinigen:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
npm cache clean --force
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
yarn cache clean
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
pnpm cache clean
|
|
132
|
+
```
|