* MCP Server 2.0 - Updated application version from 2.23.14 to 2.24.0 in package.json. - MCP Server improved with new features - Migrated functionality from Dev Tools to MCP Server - Improved getMonitoringProvider not to crash application when misconfigured
22 lines
581 B
TypeScript
22 lines
581 B
TypeScript
import { findWorkspaceRoot } from '@kit/mcp-server/env';
|
|
import {
|
|
createKitTranslationsDeps,
|
|
createKitTranslationsService,
|
|
} from '@kit/mcp-server/translations';
|
|
|
|
export type Translations = {
|
|
base_locale: string;
|
|
locales: string[];
|
|
namespaces: string[];
|
|
translations: Record<string, Record<string, Record<string, string>>>;
|
|
};
|
|
|
|
export async function loadTranslations(): Promise<Translations> {
|
|
const rootPath = findWorkspaceRoot(process.cwd());
|
|
const service = createKitTranslationsService(
|
|
createKitTranslationsDeps(rootPath),
|
|
);
|
|
|
|
return service.list();
|
|
}
|