feat(ocr): add PREPROCESSING_PAGE progress translation and i18n strings
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,8 @@ vi.mock('$lib/paraglide/messages.js', () => ({
|
||||
`${count} Blöcke erstellt, ${skipped} Seite(n) übersprungen`,
|
||||
ocr_status_analyzing_page: ({ current, total }: { current: string; total: string }) =>
|
||||
`Seite ${current} von ${total} wird analysiert…`,
|
||||
ocr_status_preprocessing_page: ({ current, total }: { current: string; total: string }) =>
|
||||
`Seite ${current} von ${total} wird aufbereitet…`,
|
||||
ocr_status_error: () => 'OCR fehlgeschlagen'
|
||||
}
|
||||
}));
|
||||
@@ -68,6 +70,13 @@ describe('translateOcrProgress', () => {
|
||||
expect(result.totalPages).toBe(5);
|
||||
});
|
||||
|
||||
it('translates PREPROCESSING_PAGE with current and total', () => {
|
||||
const result = translateOcrProgress('PREPROCESSING_PAGE:3:10');
|
||||
expect(result.message).toBe('Seite 3 von 10 wird aufbereitet…');
|
||||
expect(result.currentPage).toBe(3);
|
||||
expect(result.totalPages).toBe(10);
|
||||
});
|
||||
|
||||
it('translates ERROR', () => {
|
||||
expect(translateOcrProgress('ERROR').message).toBe('OCR fehlgeschlagen');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user