@lingui/cli
Version:
Lingui CLI to extract messages, compile catalogs, and manage translation workflows
16 lines (15 loc) • 464 B
JavaScript
import { getCatalogs } from "./catalog/getCatalogs.js";
/**
* Return paths of catalogs to watch
*/
export async function getPathsForCompileWatcher(config) {
const catalogs = await getCatalogs(config);
const paths = new Set();
config.locales.forEach((locale) => {
catalogs.forEach((catalog) => {
const filename = catalog.getFilename(locale);
paths.add(filename);
});
});
return { paths: [...paths] };
}