UNPKG

lingotags

Version:

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![npm version](https://img.shields.io/npm/v/lingotags.svg)](https://www.npmjs.com/package/lingotags)

27 lines 1.58 kB
import { TranslationMatch } from "../types/types"; export declare function getGlobalKeyCounter(): number; export declare function setGlobalKeyCounter(value: number): void; export declare function escapeJson(str: string): string; export declare function logVerbose(verbose: boolean, message: string): void; export declare function writeOutputFile(outputFile: string, output: Record<string, TranslationMatch[]>): void; export declare function generateUniqueKey(): string; export declare function extractTagContent(html: string): string; export declare function extractTagName(html: string): string; export declare function getRelativePath(absolutePath: string): string; export declare function shouldProcessElement(rawHtml: string): boolean; export declare function processFileContent(fileContent: string, searchPatterns: RegExp[]): { modifiedContent: string; matches: TranslationMatch[]; originalContent: string; }; export declare function writeManifest(manifestPath: string | undefined, initialKeyCounter: number, fileChanges: Array<{ filePath: string; original: string; modified: string; }>): void; export declare function revertFromManifest(manifestPath?: string): void; export declare function findMaxExistingKey(content: string): number; export declare function initializeKeyCounter(files: string[]): void; export declare function importTranslations(localeFile: string): Record<string, string>; export declare function exportTranslations(localeFile: string, translations: Record<string, string>, merge?: boolean): void; //# sourceMappingURL=utils.d.ts.map