UNPKG

@sap-ux/i18n

Version:
20 lines 1.02 kB
import type { CdsEnvironment, NewI18nEntry } from '../../types'; import type { Editor } from 'mem-fs-editor'; /** * Create new i18n entries to an existing file or in a new file if one does not exist. * * @param root project root, where i18n folder should reside if no i18n file exists * @param path absolute path to cds file for which translation should be maintained * @param newI18nEntries new i18n entries that will be maintained * @param env CDS environment configuration * @param fs optional `mem-fs-editor` instance. If provided, `mem-fs-editor` api is used instead of `fs` of node * @returns boolean or exception * @description To create new entries, if tries: * ```markdown * 1. `.json` file * 2. `.properties` file, if failed for `.json` file * 3. `.csv` file if failed for `.properties` file * ``` */ export declare function createCapI18nEntries(root: string, path: string, newI18nEntries: NewI18nEntry[], env: CdsEnvironment, fs?: Editor): Promise<boolean>; //# sourceMappingURL=create.d.ts.map