@terrafirmagreg-team/kit 1.2.1 → 1.2.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@terrafirmagreg-team/kit",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Fumadocs content engine",
|
|
6
6
|
"license": "LGPL-3.0-only",
|
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
"./src/components/*.tsx",
|
|
20
20
|
"./src/components/*/index.tsx",
|
|
21
21
|
"./src/components/*/index.ts"
|
|
22
|
-
]
|
|
23
|
-
"./locales": "./src/locales.ts"
|
|
22
|
+
]
|
|
24
23
|
},
|
|
25
24
|
"dependencies": {
|
|
26
25
|
"@base-ui/react": "^1.9.0",
|
|
@@ -28,8 +27,8 @@
|
|
|
28
27
|
"@terrafirmagreg-team/data": "1.2.1",
|
|
29
28
|
"@terrafirmagreg-team/mdx": "1.2.1",
|
|
30
29
|
"@terrafirmagreg-team/sites": "1.2.1",
|
|
31
|
-
"@terrafirmagreg-team/translate": "1.2.
|
|
32
|
-
"@terrafirmagreg-team/ui": "1.2.
|
|
30
|
+
"@terrafirmagreg-team/translate": "1.2.3",
|
|
31
|
+
"@terrafirmagreg-team/ui": "1.2.2",
|
|
33
32
|
"fumadocs-core": "16.17.8",
|
|
34
33
|
"lucide-react": "^0.577.0",
|
|
35
34
|
"server-only": "^0.0.1",
|
|
@@ -11,7 +11,10 @@ import { sectionDatasets } from '@terrafirmagreg-team/kit/lib/datasets';
|
|
|
11
11
|
import { sectionUrl } from '@terrafirmagreg-team/sites/location';
|
|
12
12
|
import { canonicalUrl } from '@terrafirmagreg-team/kit/lib/urls';
|
|
13
13
|
import type { DatasetLanding, SectionKey } from '@terrafirmagreg-team/kit/types';
|
|
14
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
localeLoader,
|
|
16
|
+
registerLocaleRenderer,
|
|
17
|
+
} from '@terrafirmagreg-team/kit/lib/locale/renderer';
|
|
15
18
|
import { langContent } from '@terrafirmagreg-team/translate/server';
|
|
16
19
|
|
|
17
20
|
interface DatasetPageParams {
|
|
@@ -23,6 +26,12 @@ export function createDatasetLandingPage<S extends SectionKey>(
|
|
|
23
26
|
section: S,
|
|
24
27
|
render: (page: DatasetLanding) => ReactNode,
|
|
25
28
|
) {
|
|
29
|
+
registerLocaleRenderer(section, {
|
|
30
|
+
resolve: async (slug, lang) =>
|
|
31
|
+
resolveDatasetLanding(section, slug, lang, await sectionDatasets(section)),
|
|
32
|
+
render: (page) => render(page as DatasetLanding),
|
|
33
|
+
});
|
|
34
|
+
|
|
26
35
|
async function Page({ params }: DatasetPageParams) {
|
|
27
36
|
const { slug } = await params;
|
|
28
37
|
const datasets = await sectionDatasets(section);
|
package/src/locales/en_us.json
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"Failed to copy(ui.copy_error)": "Failed to copy",
|
|
3
|
-
"Select dataset(ui.select_dataset)": "Select dataset",
|
|
4
|
-
"Select section(ui.select_section)": "Select section",
|
|
5
|
-
"View as Markdown(ui.view_markdown)": "View as Markdown",
|
|
6
|
-
"latest(ui.version_latest)": "latest"
|
|
7
|
-
}
|
package/src/locales/ru_ru.json
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"Failed to copy(ui.copy_error)": "Не удалось скопировать",
|
|
3
|
-
"Select dataset(ui.select_dataset)": "Выберите набор данных",
|
|
4
|
-
"Select section(ui.select_section)": "Выберите раздел",
|
|
5
|
-
"View as Markdown(ui.view_markdown)": "Просмотр Markdown",
|
|
6
|
-
"latest(ui.version_latest)": "последняя"
|
|
7
|
-
}
|