/** * UI18n Translation Status Management System * Core component for manual review workflow - maintains translation entry states */ export type TranslationStatus = 'machine' | 'reviewed' | 'locked'; export type QualityScore = number; export interface TranslationEntry { key: string; originalText: string; translatedText: string; status: TranslationStatus; language: string; metadata: TranslationMetadata; } export interface TranslationMetadata { status: TranslationStatus; createdAt: string; updatedAt: string; statusChangedAt: string; aiGenerated?: boolean; aiProvider?: string; aiConfidence?: number; aiModel?: string; reviewer?: string; reviewedAt?: string; reviewNotes?: string; qualityScore?: QualityScore; version: number; previousVersions?: Array<{ version: number; text: string; status: TranslationStatus; changedAt: string; changedBy: string; }>; context?: string; category?: string; priority?: 'low' | 'medium' | 'high' | 'critical'; tags?: string[]; lockedBy?: string; lockedAt?: string; lockReason?: string; } export interface StatusChangeEvent { key: string; language: string; fromStatus: TranslationStatus; toStatus: TranslationStatus; timestamp: string; userId?: string; reason?: string; batch?: boolean; batchId?: string; } export interface ReviewAssignment { id: string; assignedTo: string; assignedBy: string; assignedAt: string; dueDate?: string; language: string; keys: string[]; status: 'pending' | 'in_progress' | 'completed' | 'cancelled'; priority: 'low' | 'medium' | 'high' | 'urgent'; notes?: string; completedAt?: string; progress: { total: number; completed: number; reviewed: number; locked: number; }; } export declare class TranslationStatusManager { private projectPath; private statusCache; private changeHistory; constructor(projectPath: string); /** * Load translation entries for a specific language */ loadLanguageEntries(language: string): Promise>; /** * Get translation entry by key and language */ getEntry(key: string, language: string): Promise; /** * Update translation status with validation and history tracking */ updateStatus(key: string, language: string, newStatus: TranslationStatus, options?: { userId?: string; reason?: string; reviewNotes?: string; qualityScore?: QualityScore; batchId?: string; }): Promise<{ success: boolean; message: string; previousStatus?: TranslationStatus; error?: string; }>; /** * Batch update multiple entries */ batchUpdateStatus(updates: Array<{ key: string; language: string; newStatus: TranslationStatus; reviewNotes?: string; qualityScore?: QualityScore; }>, options?: { userId?: string; reason?: string; }): Promise<{ success: boolean; message: string; results: Array<{ key: string; language: string; success: boolean; error?: string; }>; batchId: string; }>; /** * Get entries by status */ getEntriesByStatus(language: string, status: TranslationStatus): Promise; /** * Get entries requiring review (machine translated but not reviewed) */ getEntriesRequiringReview(language: string): Promise; /** * Get review statistics for a language */ getReviewStatistics(language: string): Promise<{ total: number; machine: number; reviewed: number; locked: number; reviewProgress: number; qualityAverage?: number; }>; /** * Validate status transitions */ private validateStatusTransition; /** * Create default metadata for new entries */ private createDefaultMetadata; /** * Get original text from source language */ private getOriginalText; /** * Save language entries back to file */ private saveLanguageEntries; /** * Save change history */ private saveChangeHistory; /** * Load change history from disk */ loadChangeHistory(): Promise; /** * Get change history for specific entry */ getEntryHistory(key: string, language: string): Promise; /** * Clear cache and reload from disk */ clearCache(): Promise; } //# sourceMappingURL=translation-status-manager.d.ts.map