mirror of
https://github.com/lobehub/lobehub
synced 2026-04-21 17:47:27 +00:00
This commit introduces new localization paths, adds new localization files, adds new settings and descriptions, generates a table of contents, modifies file imports and exports, and defines types for localization resources. Changes: - Updated localization paths - Added new localization files - Added new settings and descriptions - Generated a table of contents - Modified file imports and exports - Defined types for localization resources
12 lines
352 B
JavaScript
12 lines
352 B
JavaScript
import fs from 'node:fs';
|
|
import { resolve } from 'node:path';
|
|
|
|
import i18nConfig from '../.i18nrc.js';
|
|
import resources from '../src/locales/resources/zh_CN.ts';
|
|
|
|
for (const [ns, value] of Object.entries(resources)) {
|
|
fs.writeFileSync(
|
|
resolve(i18nConfig.output, i18nConfig.entryLocale, `${ns}.json`),
|
|
JSON.stringify(value, null, 2),
|
|
);
|
|
}
|