import { type SourceFilesModel } from '@crowdin/crowdin-api-client'; /** * Map of project names to their Crowdin ids. Can be retrieved by going to the * project's dashboard in Crowdin and looking on the right side panel for ID: * XXXXXX next to "Details". */ export declare const crowdinProjectIds: { website: string; app: string; dmc: string; emails: string; }; /** * Where a translated file lands, relative to the language folder. Every Waha * project maps a language's Crowdin three-letter code onto its Waha id, which * is why translations download straight into `crowdin/{wahaLanguageId}`. */ export declare const CROWDIN_TRANSLATION_PATTERN = "%three_letters_code%/%original_file_name%"; interface DownloadTranslationsParams { /** * The id of the project to download translations for. Can either be taken * from crowdinProjectIds or retrieved from a specific foundations, topics, or * question curriculum. */ projectId: string; /** * The folder where translations are stored. Source translations are assumed * to be stored in `translationsFolder/eng/{sourcePattern}`. */ translationsFolder: string; /** The Crowdin personal access token to use for authentication. */ token: string; /** * Glob matching the source files to download translations for, relative to * `translationsFolder/eng`. Defaults to the JSON files every other project * uses; the drip emails are markdown. */ sourcePattern?: string; } /** * Downloads translations from Crowdin for a given project ID and source path. */ export declare function downloadTranslations({ projectId, translationsFolder, token, sourcePattern, }: DownloadTranslationsParams): void; interface UploadSourceParams { /** The id of the project to upload to, from `crowdinProjectIds`. */ projectId: string; /** * Absolute path to the source file to upload, somewhere under a `crowdin/` * directory (e.g. `/path/to/project/crowdin/eng/app_interface_text.json`, * or `/path/to/project/crowdin/foo.md` for a project that keeps sources at * the root). The path Crowdin sees is everything after `crowdin/`. */ source: string; /** The Crowdin personal access token to use for authentication. */ token: string; /** * Label to attach, created if Crowdin has not seen it before. Only applies * to new keys, which is what makes version tagging work. */ label?: string; /** Parser and import settings, for files needing more than the defaults. */ fileSettings?: { type?: SourceFilesModel.FileType; importOptions?: SourceFilesModel.ImportOptions; }; } /** Uploads a source file to Crowdin, creating it or replacing its contents. */ export declare function uploadSource({ projectId, source, token, label, fileSettings, }: UploadSourceParams): Promise; export {};