opral / inlang-sdk

0 stars 0 forks source link

replace `exportFiles.path` with `exportFiles.name` #217

Closed samuelstroschein closed 1 month ago

samuelstroschein commented 1 month ago

The path is useless for web apps. Renaming the prop to name makes more sense and doesn't require deriving the path from the settings.

toBeImportedFiles should then probably also be localPathPattern to account for both im- and export.

    return Object.entries(result).map(([locale, messages]) => ({
        locale,
        content: new TextEncoder().encode(JSON.stringify(unflatten(messages), undefined, "\t") + "\n"),
        // TODO the path should be configurable
        path: `mock/${locale}.json`,