import type { Expression, PatternElement, Resource, Attribute } from '@fluent/syntax'; declare const SMARTLING_CSV_HEADER: string[]; type CSVRow = { [K in (typeof SMARTLING_CSV_HEADER)[number]]: string; }; /** * * Extracts text from the elements of a pattern by recursively traversing the elements. * */ export declare function extractTextFromElements(elements: PatternElement[]): string; export declare function extractTextFromPlaceable(expression: Expression): string; /** * This function extracts the attributes from the message and returns them as a string. * */ export declare function extractAttributesAsString(attributes: Attribute[]): string; /** * This function parses the FTL file and returns the CSV rows. * */ export declare function parseFTLToCSV(filePath: string): CSVRow[]; export declare function saveToCSV(rows: CSVRow[], outputFilePath: string): void; /** * This function uploads the file to Smartling once is converted to a CSV file. * * @param filePath */ export declare function uploadTranslationsFileToSmartling(filePath: string): Promise; /** * This function converts the FTL file to a CSV file. * */ export declare function convertFtlToCsv(filePath: string): string; export declare function uploadTranslationsFiles(): Promise; /** * Reads a .ftl file and returns its content as a Fluent Resource. * * If `INJECT_PLACEHOLDER_WORKAROUND` is true, applies a workaround to the resource. * * @param absolutePath the absolute path of the .ftl file. * @returns the content of the .ftl file as a Fluent Resource. */ export declare function getResourceFromFtlFile(absolutePath: string): Resource; /** * A workaround for a Smartling bug. * * Smartling doesn't support messages with attributes but without a value. * This function adds a placeholder value to such messages. * * The naming of the function is intentionally bad to remove it ASAP once bug is fixed on * Smartling side. * * @param {Resource} resource - The resource to be modified */ export declare function injectPlaceholderValueWorkaround(resource: Resource): void; export declare function upload(): Promise; export {};