(filepath: string)
| 350 | } |
| 351 | |
| 352 | async function resolveTranslationContext(filepath: string): Promise<TranslationContext | null> { |
| 353 | const lang = getLocaleFromFilepath(filepath); |
| 354 | if (!lang) return null; |
| 355 | const filename = filepath.split('/').pop()!; |
| 356 | const indexName = getIndexName(filename); |
| 357 | if (!indexName) return null; |
| 358 | const enPath = getEnglishSourcePath(filepath); |
| 359 | if (!enPath) return null; |
| 360 | const enData = await readFileContent(enPath); |
| 361 | return { lang, indexName, enMap: buildIndexMap(enData) }; |
| 362 | } |
| 363 | |
| 364 | // --- Translation Handlers --- |
| 365 |
no test coverage detected