| 144 | }); |
| 145 | |
| 146 | function validateConfig(i18nConfig: I18nConfig | null) { |
| 147 | if (!i18nConfig) { |
| 148 | throw new CLIError({ |
| 149 | message: |
| 150 | "i18n.json not found. Please run `lingo.dev init` to initialize the project.", |
| 151 | docUrl: "i18nNotFound", |
| 152 | }); |
| 153 | } |
| 154 | if (!i18nConfig.buckets || !Object.keys(i18nConfig.buckets).length) { |
| 155 | throw new CLIError({ |
| 156 | message: |
| 157 | "No buckets found in i18n.json. Please add at least one bucket containing i18n content.", |
| 158 | docUrl: "bucketNotFound", |
| 159 | }); |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | function displaySummary(results: any[]) { |
| 164 | if (results.length === 0) return; |