File tree Expand file tree Collapse file tree
packages/twenty-sdk/src/cli/utilities/i18n Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { readdir } from 'node:fs/promises' ;
22import path from 'path' ;
33
4- import {
5- ensureDir ,
6- pathExists ,
7- readJson ,
8- writeJson ,
9- } from '@/cli/utilities/file/fs-utils' ;
4+ import { ensureDir , readJson , writeJson } from '@/cli/utilities/file/fs-utils' ;
105import { collectTranslatableStrings } from '@/cli/utilities/i18n/collect-translatable-strings' ;
116import { LOCALES_DIR } from '@/cli/utilities/i18n/constants' ;
127import { type Manifest } from 'twenty-shared/application' ;
@@ -37,12 +32,9 @@ export const extractApplicationTranslations = async ({
3732
3833 await writeJson ( path . join ( localesDir , `${ SOURCE_LOCALE } .json` ) , sourceCatalog ) ;
3934
40- const existingLocaleFiles = ( await pathExists ( localesDir ) )
41- ? ( await readdir ( localesDir ) ) . filter (
42- ( entry ) =>
43- entry . endsWith ( '.json' ) && entry !== `${ SOURCE_LOCALE } .json` ,
44- )
45- : [ ] ;
35+ const existingLocaleFiles = ( await readdir ( localesDir ) ) . filter (
36+ ( entry ) => entry . endsWith ( '.json' ) && entry !== `${ SOURCE_LOCALE } .json` ,
37+ ) ;
4638
4739 for ( const localeFile of existingLocaleFiles ) {
4840 const filePath = path . join ( localesDir , localeFile ) ;
You can’t perform that action at this time.
0 commit comments