diff --git a/src/image_catalog.c b/src/image_catalog.c index 7b2db7a..c546168 100644 --- a/src/image_catalog.c +++ b/src/image_catalog.c @@ -162,22 +162,22 @@ validate_file( { char *path = join_path(originals_path, filename); if (!path) { - set_error(error_message, error_message_size, "Erreur : chemin d'image trop long."); + set_error(error_message, error_message_size, "Error: image path is too long."); return false; } struct stat info; if (lstat(path, &info) != 0) { free(path); - set_error(error_message, error_message_size, "Erreur : image du manifeste absente."); + set_error(error_message, error_message_size, "Error: manifest image is missing."); return false; } free(path); if (S_ISLNK(info.st_mode) || !S_ISREG(info.st_mode)) { - set_error(error_message, error_message_size, "Erreur : image du manifeste non régulière."); + set_error(error_message, error_message_size, "Error: manifest image is not a regular file."); return false; } if (info.st_size < 0 || (uintmax_t)info.st_size != (uintmax_t)expected_size) { - set_error(error_message, error_message_size, "Erreur : taille d'image incohérente."); + set_error(error_message, error_message_size, "Error: inconsistent image size."); return false; } return true; @@ -195,7 +195,7 @@ parse_line( char *first_tab = strchr(line, '\t'); char *second_tab = first_tab ? strchr(first_tab + 1, '\t') : NULL; if (!first_tab || !second_tab || strchr(second_tab + 1, '\t')) { - set_error(error_message, error_message_size, "Erreur : ligne de manifeste invalide."); + set_error(error_message, error_message_size, "Error: invalid manifest line."); return false; } *first_tab = '\0'; @@ -206,23 +206,23 @@ parse_line( uint64_t size_bytes; if (!valid_filename(filename)) { - set_error(error_message, error_message_size, "Erreur : nom d'image invalide dans le manifeste."); + set_error(error_message, error_message_size, "Error: invalid image name in manifest."); return false; } if (!source_path[0]) { - set_error(error_message, error_message_size, "Erreur : chemin source vide dans le manifeste."); + set_error(error_message, error_message_size, "Error: empty source path in manifest."); return false; } if (!parse_size(size_text, &size_bytes)) { - set_error(error_message, error_message_size, "Erreur : taille invalide dans le manifeste."); + set_error(error_message, error_message_size, "Error: invalid size in manifest."); return false; } if (filename_exists(catalog, filename)) { - set_error(error_message, error_message_size, "Erreur : image dupliquée dans le manifeste."); + set_error(error_message, error_message_size, "Error: duplicate image in manifest."); return false; } if (catalog->total_size > UINT64_MAX - size_bytes) { - set_error(error_message, error_message_size, "Erreur : taille totale du catalogue trop grande."); + set_error(error_message, error_message_size, "Error: total catalog size is too large."); return false; } if (!validate_file( @@ -235,7 +235,7 @@ parse_line( return false; } if (!append_entry(catalog, filename, source_path, size_bytes)) { - set_error(error_message, error_message_size, "Erreur : mémoire insuffisante pour le catalogue."); + set_error(error_message, error_message_size, "Error: insufficient memory for the catalog."); return false; } return true; @@ -250,45 +250,45 @@ lardon3d_image_catalog_load( { set_error(error_message, error_message_size, ""); if (!state || !state->project_loaded || !state->project_path[0]) { - set_error(error_message, error_message_size, "Aucun projet chargé."); + set_error(error_message, error_message_size, "No project loaded."); return NULL; } Lardon3DImageCatalog *catalog = calloc(1, sizeof(*catalog)); if (!catalog) { - set_error(error_message, error_message_size, "Erreur : mémoire insuffisante pour le catalogue."); + set_error(error_message, error_message_size, "Error: insufficient memory for the catalog."); return NULL; } char *images_path = join_path(state->project_path, "images"); char *originals_path = images_path ? join_path(images_path, "originals") : NULL; char *manifest_path = images_path ? join_path(images_path, "manifest.tsv") : NULL; if (!images_path || !originals_path || !manifest_path) { - set_error(error_message, error_message_size, "Erreur : chemin du catalogue trop long."); + set_error(error_message, error_message_size, "Error: catalog path is too long."); goto failure; } int descriptor = open(manifest_path, O_RDONLY | O_NOFOLLOW); if (descriptor < 0) { if (errno == ENOENT) { - set_error(error_message, error_message_size, "Aucune image importée."); + set_error(error_message, error_message_size, "No imported image."); free(images_path); free(originals_path); free(manifest_path); return catalog; } - set_error(error_message, error_message_size, "Erreur : impossible d'ouvrir manifest.tsv."); + set_error(error_message, error_message_size, "Error: unable to open manifest.tsv."); goto failure; } struct stat manifest_info; if (fstat(descriptor, &manifest_info) != 0 || !S_ISREG(manifest_info.st_mode)) { (void)close(descriptor); - set_error(error_message, error_message_size, "Erreur : manifest.tsv n'est pas régulier."); + set_error(error_message, error_message_size, "Error: manifest.tsv is not a regular file."); goto failure; } FILE *file = fdopen(descriptor, "r"); if (!file) { (void)close(descriptor); - set_error(error_message, error_message_size, "Erreur : impossible de lire manifest.tsv."); + set_error(error_message, error_message_size, "Error: unable to read manifest.tsv."); goto failure; } @@ -298,11 +298,11 @@ lardon3d_image_catalog_load( bool valid = length >= 0 && strcmp(line, "filename\tsize_bytes\tsource_path\n") == 0; if (!valid) { - set_error(error_message, error_message_size, "Erreur : en-tête de manifest.tsv invalide."); + set_error(error_message, error_message_size, "Error: invalid manifest.tsv header."); } while (valid && (length = getline(&line, &capacity, file)) >= 0) { if (length == 0 || line[(size_t)length - 1] != '\n') { - set_error(error_message, error_message_size, "Erreur : ligne tronquée dans manifest.tsv."); + set_error(error_message, error_message_size, "Error: truncated line in manifest.tsv."); valid = false; break; } @@ -316,13 +316,13 @@ lardon3d_image_catalog_load( error_message_size )) { if (!error_message || !error_message_size || !error_message[0]) { - set_error(error_message, error_message_size, "Erreur : ligne de manifeste invalide."); + set_error(error_message, error_message_size, "Error: invalid manifest line."); } valid = false; } } if (ferror(file) || fclose(file) != 0) { - set_error(error_message, error_message_size, "Erreur : lecture de manifest.tsv impossible."); + set_error(error_message, error_message_size, "Error: unable to read manifest.tsv."); valid = false; } free(line); diff --git a/src/image_view.c b/src/image_view.c index 9ae73e7..7017a13 100644 --- a/src/image_view.c +++ b/src/image_view.c @@ -279,7 +279,7 @@ lardon3d_image_view_set_filter( (void)snprintf( error_message, error_message_size, - "Erreur : filtre invalide." + "Error: invalid filter." ); } return false; @@ -290,7 +290,7 @@ lardon3d_image_view_set_filter( (void)snprintf( error_message, error_message_size, - "Erreur : filtre trop long." + "Error: filter is too long." ); } return false; @@ -300,7 +300,7 @@ lardon3d_image_view_set_filter( (void)snprintf( error_message, error_message_size, - "Erreur : mémoire insuffisante pour la vue." + "Error: insufficient memory for the view." ); } return false; @@ -368,16 +368,16 @@ lardon3d_image_view_sort_name(Lardon3DImageSort sort) { switch (sort) { case LARDON3D_IMAGE_SORT_NAME_ASC: - return "Nom croissant"; + return "Name ascending"; case LARDON3D_IMAGE_SORT_NAME_DESC: - return "Nom décroissant"; + return "Name descending"; case LARDON3D_IMAGE_SORT_SIZE_ASC: - return "Taille croissante"; + return "Size ascending"; case LARDON3D_IMAGE_SORT_SIZE_DESC: - return "Taille décroissante"; + return "Size descending"; case LARDON3D_IMAGE_SORT_IMPORT_ORDER: default: - return "Ordre d'import"; + return "Import order"; } } diff --git a/src/import.c b/src/import.c index 8a8f626..17cb3b6 100644 --- a/src/import.c +++ b/src/import.c @@ -106,7 +106,7 @@ trim_source_path( ) { if (!input) { - set_status(state, "Erreur : dossier source vide."); + set_status(state, "Error: source directory is empty."); return false; } @@ -121,11 +121,11 @@ trim_source_path( size_t length = (size_t)(end - start); if (length == 0) { - set_status(state, "Erreur : dossier source vide."); + set_status(state, "Error: source directory is empty."); return false; } if (length >= PATH_MAX) { - set_status(state, "Erreur : chemin source trop long."); + set_status(state, "Error: source path is too long."); return false; } (void)memcpy(output, start, length); @@ -153,7 +153,7 @@ resolve_source_path( } } - set_status(state, "Erreur : chemin source trop long ou inaccessible."); + set_status(state, "Error: source path is too long or inaccessible."); return false; } @@ -192,7 +192,7 @@ candidate_list_append( : candidates->capacity * 2; if (capacity < candidates->capacity || capacity > SIZE_MAX / sizeof(*candidates->items)) { - set_status(state, "Erreur : trop de fichiers à importer."); + set_status(state, "Error: too many files to import."); return false; } void *items = realloc( @@ -200,7 +200,7 @@ candidate_list_append( capacity * sizeof(*candidates->items) ); if (!items) { - set_status(state, "Erreur : mémoire insuffisante pour l'import."); + set_status(state, "Error: insufficient memory for import."); return false; } candidates->items = items; @@ -215,7 +215,7 @@ candidate_list_append( filename ); if (written < 0 || (size_t)written >= sizeof(candidate->filename)) { - set_status(state, "Erreur : nom de fichier trop long."); + set_status(state, "Error: filename is too long."); return false; } candidate->created = false; @@ -232,24 +232,24 @@ ensure_originals_directory( { if (!join_path(images_path, state->project_path, "images") || !join_path(originals_path, images_path, "originals")) { - set_status(state, "Erreur : chemin du projet trop long."); + set_status(state, "Error: project path is too long."); return false; } struct stat info; if (lstat(images_path, &info) != 0 || !S_ISDIR(info.st_mode)) { - set_status(state, "Erreur : dossier images absent ou invalide."); + set_status(state, "Error: images directory is missing or invalid."); return false; } if (lstat(originals_path, &info) == 0) { if (!S_ISDIR(info.st_mode)) { - set_status(state, "Erreur : images/originals n'est pas un dossier."); + set_status(state, "Error: images/originals is not a directory."); return false; } return true; } if (errno != ENOENT || mkdir(originals_path, 0755) != 0) { - set_status(state, "Erreur : impossible de créer images/originals."); + set_status(state, "Error: unable to create images/originals."); return false; } return true; @@ -303,7 +303,7 @@ manifest_begin( images_path, ".manifest.tsv.tmp.XXXXXX" )) { - set_status(state, "Erreur : chemin du manifeste trop long."); + set_status(state, "Error: manifest path is too long."); return false; } @@ -316,18 +316,18 @@ manifest_begin( struct stat info; if (fstat(previous_descriptor, &info) != 0 || !S_ISREG(info.st_mode)) { (void)close(previous_descriptor); - set_status(state, "Erreur : manifest.tsv invalide."); + set_status(state, "Error: invalid manifest.tsv."); return false; } previous = fdopen(previous_descriptor, "r"); if (!previous) { (void)close(previous_descriptor); - set_status(state, "Erreur : impossible de lire manifest.tsv."); + set_status(state, "Error: unable to read manifest.tsv."); return false; } writer->previous_exists = true; } else if (errno != ENOENT) { - set_status(state, "Erreur : impossible de lire manifest.tsv."); + set_status(state, "Error: unable to read manifest.tsv."); return false; } @@ -336,7 +336,7 @@ manifest_begin( if (previous) { (void)fclose(previous); } - set_status(state, "Erreur : impossible de préparer manifest.tsv."); + set_status(state, "Error: unable to prepare manifest.tsv."); return false; } writer->file = fdopen(descriptor, "w"); @@ -346,7 +346,7 @@ manifest_begin( (void)fclose(previous); } manifest_abort(writer); - set_status(state, "Erreur : impossible d'écrire manifest.tsv."); + set_status(state, "Error: unable to write manifest.tsv."); return false; } @@ -373,7 +373,7 @@ manifest_begin( if (!success) { manifest_abort(writer); - set_status(state, "Erreur : manifest.tsv invalide ou illisible."); + set_status(state, "Error: manifest.tsv is invalid or unreadable."); } return success; } @@ -446,7 +446,7 @@ manifest_commit(Lardon3DAppState *state, ManifestWriter *writer) } if (!success) { (void)unlink(writer->temporary_path); - set_status(state, "Erreur : impossible de mettre à jour manifest.tsv."); + set_status(state, "Error: unable to update manifest.tsv."); } return success; } @@ -602,7 +602,7 @@ analyze_source_directory( { DIR *directory = opendir(absolute_source); if (!directory) { - set_status(state, "Erreur : impossible d'ouvrir le dossier source."); + set_status(state, "Error: unable to open source directory."); return false; } @@ -616,7 +616,7 @@ analyze_source_directory( struct dirent *entry = readdir(directory); if (!entry) { if (errno != 0) { - set_status(state, "Erreur : lecture du dossier source impossible."); + set_status(state, "Error: unable to read source directory."); success = false; } break; @@ -628,7 +628,7 @@ analyze_source_directory( char source_path[PATH_MAX]; if (!join_path(source_path, absolute_source, entry->d_name)) { - set_status(state, "Erreur : chemin source trop long."); + set_status(state, "Error: source path is too long."); success = false; break; } @@ -645,7 +645,7 @@ analyze_source_directory( if (has_forbidden_manifest_character(entry->d_name)) { set_status( state, - "Erreur : nom de fichier incompatible avec le manifeste." + "Error: filename is incompatible with the manifest." ); success = false; break; @@ -653,7 +653,7 @@ analyze_source_directory( char destination_path[PATH_MAX]; if (!join_path(destination_path, originals_path, entry->d_name)) { - set_status(state, "Erreur : chemin destination trop long."); + set_status(state, "Error: destination path is too long."); success = false; break; } @@ -664,7 +664,7 @@ analyze_source_directory( } if (closedir(directory) != 0) { - set_status(state, "Erreur : fermeture du dossier source impossible."); + set_status(state, "Error: unable to close source directory."); success = false; } return success; @@ -711,27 +711,25 @@ fail_import( (void)snprintf( state->status_message, sizeof(state->status_message), - "Import annulé : %zu copie%s retirée%s après erreur (%s).", + "Import cancelled: %zu %s removed after error (%s).", removed, - removed == 1 ? "" : "s", - removed == 1 ? "" : "s", + removed == 1 ? "copy" : "copies", reason ); } else if (result->copied > 0) { (void)snprintf( state->status_message, sizeof(state->status_message), - "Erreur critique : %zu copie%s conservée%s sans manifeste (%s).", + "Critical error: %zu %s retained without manifest (%s).", result->copied, - result->copied == 1 ? "" : "s", - result->copied == 1 ? "" : "s", + result->copied == 1 ? "copy" : "copies", reason ); } else { (void)snprintf( state->status_message, sizeof(state->status_message), - "Erreur d'import : %s.", + "Import error: %s.", reason ); } @@ -754,7 +752,7 @@ cancel_import( (void)snprintf( state->status_message, sizeof(state->status_message), - "Import annulé : %zu sur %zu fichiers traités.", + "Import cancelled: %zu of %zu files processed.", processed, result->admissible_found ); @@ -788,7 +786,7 @@ lardon3d_import_directory_batch( struct stat source_info; if (lstat(absolute_source, &source_info) != 0 || !S_ISDIR(source_info.st_mode)) { - set_status(state, "Erreur : dossier source absent ou invalide."); + set_status(state, "Error: source directory is missing or invalid."); return LARDON3D_IMPORT_FAILED; } char images_path[PATH_MAX], originals_path[PATH_MAX]; @@ -804,7 +802,7 @@ lardon3d_import_directory_batch( DIR *directory = opendir(absolute_source); if (!directory) { manifest_abort(&manifest); - set_status(state, "Erreur : impossible d'ouvrir le dossier source."); + set_status(state, "Error: unable to open source directory."); return LARDON3D_IMPORT_FAILED; } CandidateList created = {0}; @@ -888,8 +886,8 @@ lardon3d_import_directory_batch( manifest_abort(&manifest); (void)rollback_created_files(&created, originals_path); free(created.items); - set_status(state, cancelled ? "Import annulé à une frontière sûre." - : "Erreur pendant un lot d'import."); + set_status(state, cancelled ? "Import cancelled at a safe boundary." + : "Error during an import batch."); return cancelled ? LARDON3D_IMPORT_CANCELLED : LARDON3D_IMPORT_FAILED; } if (!manifest_commit(state, &manifest)) { @@ -899,7 +897,7 @@ lardon3d_import_directory_batch( } free(created.items); *complete = result->processed == result->admissible_found; - set_status(state, *complete ? "Import terminé." : "Lot d'import publié."); + set_status(state, *complete ? "Import completed." : "Import batch published."); publish_progress(control, result, result->processed, state->status_message); return LARDON3D_IMPORT_SUCCEEDED; } @@ -919,7 +917,7 @@ lardon3d_import_directory_controlled( publish_progress(control, result, 0, "Analyse du dossier source..."); if (!state->project_loaded) { - set_status(state, "Aucun projet chargé."); + set_status(state, "No project loaded."); publish_progress(control, result, 0, state->status_message); return LARDON3D_IMPORT_FAILED; } @@ -935,19 +933,19 @@ lardon3d_import_directory_controlled( return LARDON3D_IMPORT_FAILED; } if (has_forbidden_manifest_character(absolute_source)) { - set_status(state, "Erreur : chemin source incompatible avec le manifeste."); + set_status(state, "Error: source path is incompatible with the manifest."); publish_progress(control, result, 0, state->status_message); return LARDON3D_IMPORT_FAILED; } struct stat source_directory_info; if (lstat(absolute_source, &source_directory_info) != 0) { - set_status(state, "Erreur : dossier source inexistant."); + set_status(state, "Error: source directory does not exist."); publish_progress(control, result, 0, state->status_message); return LARDON3D_IMPORT_FAILED; } if (!S_ISDIR(source_directory_info.st_mode)) { - set_status(state, "Erreur : la source n'est pas un dossier."); + set_status(state, "Error: source is not a directory."); publish_progress(control, result, 0, state->status_message); return LARDON3D_IMPORT_FAILED; } @@ -956,7 +954,7 @@ lardon3d_import_directory_controlled( char originals_path[PATH_MAX]; if (!join_path(images_path, state->project_path, "images") || !join_path(originals_path, images_path, "originals")) { - set_status(state, "Erreur : chemin du projet trop long."); + set_status(state, "Error: project path is too long."); publish_progress(control, result, 0, state->status_message); return LARDON3D_IMPORT_FAILED; } @@ -978,7 +976,7 @@ lardon3d_import_directory_controlled( } if (analysis_cancelled) { free(candidates.items); - set_status(state, "Import annulé : 0 fichier traité."); + set_status(state, "Import cancelled: 0 files processed."); publish_progress(control, result, 0, state->status_message); return LARDON3D_IMPORT_CANCELLED; } @@ -986,7 +984,7 @@ lardon3d_import_directory_controlled( if (import_is_cancelled(control)) { free(candidates.items); - set_status(state, "Import annulé : 0 fichier traité."); + set_status(state, "Import cancelled: 0 files processed."); publish_progress(control, result, 0, state->status_message); return LARDON3D_IMPORT_CANCELLED; } @@ -1079,7 +1077,7 @@ lardon3d_import_directory_controlled( source_path )) { success = false; - failure_reason = "écriture du manifeste impossible"; + failure_reason = "unable to write manifest"; break; } ++processed; @@ -1129,7 +1127,7 @@ lardon3d_import_directory_controlled( state, result, removed, - "mise à jour du manifeste impossible" + "unable to update manifest" ); publish_progress(control, result, processed, state->status_message); return LARDON3D_IMPORT_FAILED; @@ -1139,13 +1137,11 @@ lardon3d_import_directory_controlled( (void)snprintf( state->status_message, sizeof(state->status_message), - "Import terminé : %zu copiée%s, %zu déjà présente%s.", + "Import completed: %zu copied, %zu already present.", result->copied, - result->copied == 1 ? "" : "s", - result->already_present, - result->already_present == 1 ? "" : "s" + result->already_present ); - publish_progress(control, result, processed, "Import terminé."); + publish_progress(control, result, processed, "Import completed."); return LARDON3D_IMPORT_SUCCEEDED; } @@ -1187,7 +1183,7 @@ lardon3d_import_directory_batch_to_scanset( struct stat directory_info; if (lstat(source, &directory_info) != 0 || !S_ISDIR(directory_info.st_mode) || S_ISLNK(directory_info.st_mode)) { - set_status(state, "Erreur : dossier source absent ou invalide."); + set_status(state, "Error: source directory is missing or invalid."); return LARDON3D_IMPORT_FAILED; } DIR *directory = opendir(source); @@ -1254,15 +1250,15 @@ lardon3d_import_directory_batch_to_scanset( legacy_manifest_active = false; } if (cancelled) { - set_status(state, "Import annulé à une frontière sûre."); + set_status(state, "Import cancelled at a safe boundary."); return LARDON3D_IMPORT_CANCELLED; } if (!success) { - set_status(state, "Erreur pendant un lot d'import."); + set_status(state, "Error during an import batch."); return LARDON3D_IMPORT_FAILED; } *complete = !remaining; - set_status(state, *complete ? "Import terminé." : "Lot d'import publié."); + set_status(state, *complete ? "Import completed." : "Import batch published."); publish_progress(control, result, result->processed, state->status_message); return LARDON3D_IMPORT_SUCCEEDED; } diff --git a/src/layout.c b/src/layout.c index 5ac2bea..bb8e2b2 100644 --- a/src/layout.c +++ b/src/layout.c @@ -60,7 +60,7 @@ draw_text(int row, int column, int available, const char *text) static void draw_too_small(int rows, int columns) { - static const char message[] = "Terminal trop petit"; + static const char message[] = "Terminal too small"; int row = rows > 0 ? rows / 2 : 0; int column = columns > (int)(sizeof(message) - 1) ? (columns - (int)(sizeof(message) - 1)) / 2 @@ -86,24 +86,24 @@ screen_title(Lardon3DScreen screen) { switch (screen) { case LARDON3D_SCREEN_PROJECTS: - return "Projets"; + return "Projects"; case LARDON3D_SCREEN_IMPORT: return "Import"; case LARDON3D_SCREEN_VIEWER: return "Viewer"; case LARDON3D_SCREEN_HELP: - return "Aide / contrats runtime"; + return "Help / runtime contracts"; case LARDON3D_SCREEN_TASKS: - return "Tâches"; + return "Tasks"; case LARDON3D_SCREEN_RESOURCES: - return "Ressources / Governor"; + return "Resources / Governor"; case LARDON3D_SCREEN_OPTICS: - return "Profils optiques immuables"; + return "Immutable optical profiles"; case LARDON3D_SCREEN_SSD: - return "SSD externe"; + return "External SSD"; case LARDON3D_SCREEN_HOME: default: - return "Observatoire Lardon3D"; + return "Lardon3D Observatory"; } } @@ -116,26 +116,26 @@ screen_footer( Lardon3DTuiKeyContract keys = lardon3d_tui_key_contract( interaction_mode); if (keys.enter && keys.escape && keys.f10) { - return "F10 SSD | Enter valider | ESC annuler"; + return "F10 SSD | Enter confirm | ESC cancel"; } if (keys.cancel_import && keys.f10) { - return "F10 SSD | X annuler l'import | Q/ESC désactivés"; + return "F10 SSD | X cancel import | Q/ESC disabled"; } switch (screen) { case LARDON3D_SCREEN_PROJECTS: - return "F10 SSD | N Nouveau O Ouvrir C Fermer | ESC Accueil F7 Optique Q"; + return "F10 SSD | N New O Open C Close | ESC Home F7 Optics Q"; case LARDON3D_SCREEN_IMPORT: - return "F10 SSD | I Importer R Recharger S Tri/Filtre X Effacer | ESC Q"; + return "F10 SSD | I Import R Reload S Sort/Filter X Clear | ESC Q"; case LARDON3D_SCREEN_TASKS: - return "F10 SSD | ↑/↓ P pause R reprise C annuler | ESC F6 Ressources Q"; + return "F10 SSD | ↑/↓ P pause R resume C cancel | ESC F6 Resources Q"; case LARDON3D_SCREEN_RESOURCES: - return "F10 SSD | Observation seule: CPU/GPU/batch par Governor | ESC Q"; + return "F10 SSD | Observation only: CPU/GPU/batch by Governor | ESC Q"; case LARDON3D_SCREEN_OPTICS: - return "F10 SSD | TAB ↑/↓ [ première ] suivante B/L/C V/A/G/K/E R retry ESC Q"; + return "F10 SSD | TAB ↑/↓ [ first ] next B/L/C V/A/G/K/E R retry ESC Q"; case LARDON3D_SCREEN_SSD: - return "F10 SSD | activer/drainer/annuler drain (asynchrone) | ESC Q"; + return "F10 SSD | enable/drain/cancel drain (asynchronous) | ESC Q"; default: - return "F10 SSD | F1 Aide F2 Projets F3 Import F4 Viewer F5 Tâches F6 Ressources Q"; + return "F10 SSD | F1 Help F2 Projects F3 Import F4 Viewer F5 Tasks F6 Resources Q"; } } @@ -233,8 +233,8 @@ static void draw_project_line(const Lardon3DAppState *state, int row, int columns) { char line[512]; - (void)snprintf(line, sizeof(line), "Projet: %.120s%s%.370s", - state->project_loaded ? state->project_name : "aucun", + (void)snprintf(line, sizeof(line), "Project: %.120s%s%.370s", + state->project_loaded ? state->project_name : "none", state->project_loaded ? " " : "", state->project_loaded ? state->project_path : ""); draw_text(row, 2, columns - 4, line); @@ -267,7 +267,7 @@ draw_home( int active_row = start + 6; if (!runtime->active_task_known) { draw_text_style(active_row, 2, columns - 4, - "Tâche active: aucune", LARDON3D_TUI_SEMANTIC_DIM, palette); + "Active task: none", LARDON3D_TUI_SEMANTIC_DIM, palette); return; } const Lardon3DTaskObservation *task = @@ -302,7 +302,7 @@ draw_home( (unsigned long long)task->id, task->name); } else { (void)snprintf(line, sizeof(line), - "scientifique indéterminé | #%llu %.18s", + "scientific unknown | #%llu %.18s", (unsigned long long)task->id, task->name); } } else { @@ -337,15 +337,15 @@ draw_home( if (runtime->active_progress.throughput_known) { (void)snprintf(throughput, sizeof(throughput), runtime->active_progress.runtime_percentage - ? "%.1f%%/s" : "%.1f unité/s", + ? "%.1f%%/s" : "%.1f unit/s", runtime->active_progress.units_per_second); } else { (void)snprintf(throughput, sizeof(throughput), "UNKNOWN"); } (void)snprintf(line, sizeof(line), - "Durée %s | ETA %s | débit %s%s", elapsed, eta, throughput, + "Elapsed %s | ETA %s | throughput %s%s", elapsed, eta, throughput, runtime->active_progress.resumed_prefix_excluded - ? " | préfixe repris exclu" : ""); + ? " | resumed prefix excluded" : ""); draw_text(active_row + 2, 2, columns - 4, line); } } @@ -353,9 +353,9 @@ draw_home( static void draw_projects(const char *input_text, const char *input_label, int columns) { - draw_text(5, 4, columns - 6, "N : Nouveau projet"); - draw_text(6, 4, columns - 6, "O : Ouvrir un projet"); - draw_text(7, 4, columns - 6, "C : Fermer le projet"); + draw_text(5, 4, columns - 6, "N: New project"); + draw_text(6, 4, columns - 6, "O: Open a project"); + draw_text(7, 4, columns - 6, "C: Close project"); draw_input_field(input_text, input_label, 9, columns); } @@ -363,19 +363,19 @@ static void draw_catalog(const Lardon3DAppState *state, int rows, int columns) { if (!state->project_loaded || !state->image_view || !state->image_catalog) { - draw_text(5, 4, columns - 6, "Aucun projet chargé."); + draw_text(5, 4, columns - 6, "No project loaded."); return; } size_t count = lardon3d_image_view_count(state->image_view); size_t total = lardon3d_image_catalog_count(state->image_catalog); char line[512]; - (void)snprintf(line, sizeof(line), "Images visibles: %zu / %zu | Tri: %s", + (void)snprintf(line, sizeof(line), "Visible images: %zu / %zu | Sort: %s", count, total, lardon3d_image_view_sort_name( lardon3d_image_view_sort(state->image_view))); draw_text(4, 2, columns - 4, line); const char *filter = lardon3d_image_view_filter(state->image_view); - (void)snprintf(line, sizeof(line), "Filtre: %s", - filter[0] ? filter : "aucun"); + (void)snprintf(line, sizeof(line), "Filter: %s", + filter[0] ? filter : "none"); draw_text(5, 2, columns - 4, line); size_t visible = rows > 12 ? (size_t)(rows - 12) : 1; size_t offset = lardon3d_image_view_offset(state->image_view); @@ -407,7 +407,7 @@ draw_import( if (snapshot && snapshot->status == LARDON3D_IMPORT_TASK_RUNNING) { char line[256]; (void)snprintf(line, sizeof(line), - "Import: %zu/%zu | copiés %zu | présents %zu | ignorés %zu", + "Import: %zu/%zu | copied %zu | present %zu | skipped %zu", snapshot->processed, snapshot->total, snapshot->copied, snapshot->already_present, snapshot->ignored); draw_text_style(5, 2, columns - 4, line, @@ -427,7 +427,7 @@ draw_import( } if (percent > 100) percent = 100; draw_progress_bar(7, 2, columns - 4, percent, palette); - draw_text(9, 2, columns - 4, "X : annuler l'import"); + draw_text(9, 2, columns - 4, "X: cancel import"); } else if (input_text) { draw_input_field(input_text, input_label, 5, columns); } else { @@ -446,18 +446,18 @@ draw_tasks( { char line[512]; (void)snprintf(line, sizeof(line), - "Total %zu | running %zu | pending %zu | terminal cumulées %zu", + "Total %zu | running %zu | pending %zu | terminal cumulative %zu", runtime->task_summary.total, runtime->task_summary.running, runtime->task_summary.pending, runtime->task_summary.completed); draw_text(4, 2, columns - 4, line); if (runtime->task_count == 0) { - draw_text_style(6, 4, columns - 6, "Aucune tâche retenue.", + draw_text_style(6, 4, columns - 6, "No retained task.", LARDON3D_TUI_SEMANTIC_DIM, palette); return; } if (selected >= runtime->task_count) selected = runtime->task_count - 1; const Lardon3DTaskObservation *chosen = &runtime->tasks[selected]; - (void)snprintf(line, sizeof(line), "Sélection #%llu %s | %s | %s", + (void)snprintf(line, sizeof(line), "Selection #%llu %s | %s | %s", (unsigned long long)chosen->id, chosen->name, chosen->has_task_kind ? chosen->task_kind : "untyped", lardon3d_task_state_name(chosen->state)); @@ -472,7 +472,7 @@ draw_tasks( : LARDON3D_TUI_SEMANTIC_CPU), palette); if (chosen->durable_progress_known) { (void)snprintf(line, sizeof(line), - "Progression durable: %llu/%llu%s", + "Durable progress: %llu/%llu%s", (unsigned long long)chosen->durable_completed, (unsigned long long)chosen->durable_total, chosen->state == TASK_COMPLETED @@ -485,10 +485,10 @@ draw_tasks( : LARDON3D_TUI_SEMANTIC_NORMAL, palette); } else if (chosen->has_task_kind) { draw_text_style(7, 2, columns - 4, - "Progression scientifique: indéterminée", + "Scientific progress: unknown", LARDON3D_TUI_SEMANTIC_WARNING, palette); } else { - (void)snprintf(line, sizeof(line), "Progression runtime: %u%%", + (void)snprintf(line, sizeof(line), "Runtime progress: %u%%", chosen->progress); draw_text(7, 2, columns - 4, line); } @@ -576,7 +576,7 @@ format_external_storage_summary( (void)snprintf(line, capacity, "Governor SSD %s | alloc %s | scratch total/free %s/%s | leases %zu", status, - resource->scratch_new_allocations_allowed ? "oui" : "non", + resource->scratch_new_allocations_allowed ? "yes" : "no", scratch_total, scratch_free, resource->scratch_leases); } @@ -590,7 +590,7 @@ draw_resources( { if (!resource->valid) { draw_text_style(5, 4, columns - 6, - "Ressources système indisponibles (UNKNOWN).", + "System resources unavailable (UNKNOWN).", LARDON3D_TUI_SEMANTIC_WARNING, palette); char external[512]; format_external_storage_summary( @@ -615,22 +615,22 @@ draw_resources( resource->cpu_admitted); } (void)snprintf(line, sizeof(line), - "CPU active/admis/disponible: %u/%s/%u (hôte %u) | utilisation %s", + "CPU active/admitted/available: %u/%s/%u (host %u) | utilization %s", resource->cpu_active, admitted, resource->cpu_available, resource->cpu_logical_total, - resource->cpu_utilization_known ? "connue" : "UNKNOWN"); + resource->cpu_utilization_known ? "known" : "UNKNOWN"); draw_text_style(6, 2, columns - 4, line, LARDON3D_TUI_SEMANTIC_CPU, palette); if (viewport == LARDON3D_TUI_VIEWPORT_FULL) { if (resource->cpu_utilization_known) { (void)snprintf(line, sizeof(line), - "CPU raison: %s | utilisation %u.%02u%%", + "CPU reason: %s | utilization %u.%02u%%", resource->cpu_reason, resource->cpu_utilization_basis_points / 100U, resource->cpu_utilization_basis_points % 100U); } else { (void)snprintf(line, sizeof(line), - "CPU raison: %s | utilisation UNKNOWN", + "CPU reason: %s | utilization UNKNOWN", resource->cpu_reason); } draw_text(7, 4, columns - 6, line); @@ -645,14 +645,14 @@ draw_resources( } (void)snprintf(line, sizeof(line), "GPU %s | slots active/dispo %u/%u | busy %s | backend %s", - resource->gpu_present ? "présent" : "absent", + resource->gpu_present ? "present" : "absent", resource->gpu_slots_active, resource->gpu_slots_available, gpu_busy, lardon3d_tui_gpu_backend_name(resource->gpu_backend)); draw_text_style(viewport == LARDON3D_TUI_VIEWPORT_FULL ? 9 : 7, 2, columns - 4, line, LARDON3D_TUI_SEMANTIC_GPU, palette); if (viewport == LARDON3D_TUI_VIEWPORT_FULL) { - (void)snprintf(line, sizeof(line), "GPU raison: %s", + (void)snprintf(line, sizeof(line), "GPU reason: %s", resource->gpu_backend_reason); draw_text(10, 4, columns - 6, line); } @@ -662,7 +662,7 @@ draw_resources( format_bytes(resource->ram_reserve_bytes, reserve); format_bytes(resource->ram_reserved_bytes, reserved); (void)snprintf(line, sizeof(line), - "RAM total %s | MemAvailable %s | réserve %s | réservée Task %s", + "RAM total %s | MemAvailable %s | reserve %s | Task reserved %s", total, available, reserve, reserved); draw_text(viewport == LARDON3D_TUI_VIEWPORT_FULL ? 11 : 8, 2, columns - 4, line); @@ -672,13 +672,13 @@ draw_resources( format_bytes(resource->swap_used_bytes, swap_used); if (resource->swap_delta_known) { (void)snprintf(line, sizeof(line), - "Swap total %s | utilisé %s | delta in/out %llu/%llu pages", + "Swap total %s | used %s | delta in/out %llu/%llu pages", swap_total, swap_used, (unsigned long long)resource->swap_pages_in_delta, (unsigned long long)resource->swap_pages_out_delta); } else { (void)snprintf(line, sizeof(line), - "Swap total %s | utilisé %s | delta in/out UNKNOWN", + "Swap total %s | used %s | delta in/out UNKNOWN", swap_total, swap_used); } } else { @@ -702,7 +702,7 @@ draw_resources( resource->helper_limit); } (void)snprintf(line, sizeof(line), - "Contrat: batch %s | inflight %s | helpers %s | I/O active/dispo %u/%u", + "Contract: batch %s | inflight %s | helpers %s | I/O active/available %u/%u", batch, inflight, helpers, resource->io_active, resource->io_available); draw_text(14, 2, columns - 4, line); @@ -737,17 +737,17 @@ draw_resources( external_swap_used); } (void)snprintf(line, sizeof(line), - "Governor SSD swap total/used %s/%s | identité %.120s", + "Governor SSD swap total/used %s/%s | identity %.120s", external_swap_total, external_swap_used, resource->external_storage_registered ? resource->external_storage_identity : "UNKNOWN"); draw_text(17, 2, columns - 4, line); - (void)snprintf(line, sizeof(line), "SSD raison: %.220s", + (void)snprintf(line, sizeof(line), "SSD reason: %.220s", resource->external_storage_registered ? resource->external_storage_reason : "UNREGISTERED"); draw_text(18, 2, columns - 4, line); draw_text(20, 2, columns - 4, - "Les choix CPU/GPU/batch sont observés; aucun réglage utilisateur normal."); + "CPU/GPU/batch choices are observed; no normal user tuning."); } } @@ -775,17 +775,17 @@ draw_ssd( const Lardon3DSsdSnapshot *ssd = &runtime->ssd; char line[640]; if (!runtime->ssd_controller_available) { - draw_text_style(4, 2, columns - 4, "Etat: UNKNOWN", + draw_text_style(4, 2, columns - 4, "State: UNKNOWN", LARDON3D_TUI_SEMANTIC_WARNING, palette); if (operation && operation->running) { (void)snprintf(line, sizeof(line), - "Opération asynchrone: %s (ncurses reste réactif)", + "Asynchronous operation: %s (ncurses remains responsive)", lardon3d_tui_ssd_action_name(operation->action)); draw_text_style(5, 2, columns - 4, line, LARDON3D_TUI_SEMANTIC_WARNING, palette); } draw_text(7, 2, columns - 4, - "Contrôleur/télémétrie SSD indisponible; identité, swap, scratch et usage UNKNOWN."); + "SSD controller/telemetry unavailable; identity, swap, scratch and usage UNKNOWN."); return; } bool telemetry_actionable = !operation @@ -802,7 +802,7 @@ draw_ssd( /* The async owner is exact operation state, not inferred device state. It * is the only way ENABLING can remain visible while the synchronous * controller holds its mutex through bounded side-effect verification. */ - (void)snprintf(line, sizeof(line), "Etat: %s%s", + (void)snprintf(line, sizeof(line), "State: %s%s", lardon3d_ssd_state_name(displayed_state), displayed_state == LARDON3D_SSD_SAFE_TO_UNPLUG ? " — SAFE TO UNPLUG" : ""); @@ -810,7 +810,7 @@ draw_ssd( ssd_semantic(displayed_state), palette); if (operation && operation->running) { (void)snprintf(line, sizeof(line), - "Opération asynchrone: %s (ncurses reste réactif)", + "Asynchronous operation: %s (ncurses remains responsive)", lardon3d_tui_ssd_action_name(operation->action)); draw_text_style(5, 2, columns - 4, line, LARDON3D_TUI_SEMANTIC_WARNING, palette); @@ -822,10 +822,10 @@ draw_ssd( * booleans are observations. Rendering them as inactive/unmounted * would turn validation failure into guessed physical state. */ draw_text_style(7, 2, columns - 4, - "UNKNOWN — télémétrie invalide: identité, lien, swap, scratch, mount et usage.", + "UNKNOWN — invalid telemetry: identity, link, swap, scratch, mount and usage.", LARDON3D_TUI_SEMANTIC_ERROR, palette); draw_text(9, 2, columns - 4, - "Contrôle F10 désactivé jusqu'à une observation bornée valide."); + "F10 control disabled until a valid bounded observation is available."); return; } char link_speed[64]; @@ -836,17 +836,17 @@ draw_ssd( (void)snprintf(link_speed, sizeof(link_speed), "UNKNOWN"); } (void)snprintf(line, sizeof(line), - "Modèle: %s | série: %s | lien: %s", + "Model: %s | serial: %s | link: %s", ssd->model_known ? ssd->model : "UNKNOWN", ssd->serial_known ? ssd->serial : "UNKNOWN", link_speed); draw_text_style(7, 2, columns - 4, line, LARDON3D_TUI_SEMANTIC_SSD, palette); - (void)snprintf(line, sizeof(line), "Identité stable Drive: %s", + (void)snprintf(line, sizeof(line), "Stable Drive identity: %s", ssd->drive_identity[0] ? ssd->drive_identity : "UNKNOWN"); draw_text(8, 2, columns - 4, line); (void)snprintf(line, sizeof(line), - "Paire exacte: %s | swap UUID %s | scratch UUID %s", + "Exact pair: %s | swap UUID %s | scratch UUID %s", ssd->pairing_valid ? "VALID" : "INVALID/UNKNOWN", ssd->swap_uuid[0] ? ssd->swap_uuid : "UNKNOWN", ssd->scratch_uuid[0] ? ssd->scratch_uuid : "UNKNOWN"); @@ -861,7 +861,7 @@ draw_ssd( format_bytes(ssd->swap_used_bytes, swap_used); } (void)snprintf(line, sizeof(line), - "Swap: %s | total %s | utilisé %s", + "Swap: %s | total %s | used %s", ssd->swap_active ? "ACTIVE" : "INACTIVE", swap_total, swap_used); draw_text(10, 2, columns - 4, line); @@ -881,19 +881,19 @@ draw_ssd( ssd->scratch_lease_count, ssd->scratch_lease_capacity); draw_text(11, 2, columns - 4, line); (void)snprintf(line, sizeof(line), - "Drain demandé: %s | raison: %s", - ssd->drain_requested ? "oui" : "non", + "Drain requested: %s | reason: %s", + ssd->drain_requested ? "yes" : "no", ssd->reason[0] ? ssd->reason : "UNKNOWN"); draw_text_style(12, 2, columns - 4, line, ssd->state == LARDON3D_SSD_ERROR ? LARDON3D_TUI_SEMANTIC_ERROR : LARDON3D_TUI_SEMANTIC_NORMAL, palette); draw_text(14, 2, columns - 4, - "F10 agit uniquement sur la paire Drive/UUID validée; jamais de format/repair/poweroff."); + "F10 acts only on the validated Drive/UUID pair; never format/repair/poweroff."); draw_text(15, 2, columns - 4, - "Le swap/SSD reste une sécurité/scratch physique, jamais de la RAM scientifique."); + "Swap/SSD remains safety/physical scratch, never scientific RAM."); } else { - (void)snprintf(line, sizeof(line), "Raison: %s", + (void)snprintf(line, sizeof(line), "Reason: %s", ssd->reason[0] ? ssd->reason : "UNKNOWN"); draw_text_style(6, 2, columns - 4, line, ssd->state == LARDON3D_SSD_ERROR @@ -904,7 +904,7 @@ draw_ssd( ssd->swap_active ? "ACTIVE" : "INACTIVE", ssd->scratch_mounted ? "MOUNTED" : "UNMOUNTED", ssd->scratch_lease_count, - ssd->drain_requested ? "oui" : "non"); + ssd->drain_requested ? "yes" : "no"); draw_text(10, 2, columns - 4, line); } } @@ -950,14 +950,14 @@ draw_optics( if (!optics || !optics->project_bound) { const char *message = optics && optics->message[0] ? optics->message - : "Aucun Project DB lié; aucun profil ou assignation n'est deviné."; + : "No Project DB bound; no profile or assignment is guessed."; draw_text_style(5, 4, columns - 6, message, optics && optics->message[0] ? LARDON3D_TUI_SEMANTIC_ERROR : LARDON3D_TUI_SEMANTIC_WARNING, palette); if (optics && optics->message[0]) { draw_text(7, 4, columns - 6, - "R : réessayer explicitement la liaison Project DB."); + "R: explicitly retry Project DB binding."); } return; } @@ -972,20 +972,20 @@ draw_optics( ? (optics->selected_configuration < optics->configuration_count ? optics->selected_configuration : 0) : 0; (void)snprintf(line, sizeof(line), - "Body [%zu/%zu affichés%s]: %s %s — %s", + "Body [%zu/%zu shown%s]: %s %s — %s", optics->body_count ? body + 1 : 0, optics->body_count, - optics->bodies_have_next ? ", suite" : "", + optics->bodies_have_next ? ", more" : "", optics->body_count ? optics->bodies[body].manufacturer : "UNKNOWN", optics->body_count ? optics->bodies[body].model : "", - optics->body_count ? optics->bodies[body].name : "aucun"); + optics->body_count ? optics->bodies[body].name : "none"); draw_text(4, 2, columns - 4, line); (void)snprintf(line, sizeof(line), - "Lens [%zu/%zu affichés%s]: %s %s — %s (%s)", + "Lens [%zu/%zu shown%s]: %s %s — %s (%s)", optics->lens_count ? lens + 1 : 0, optics->lens_count, - optics->lenses_have_next ? ", suite" : "", + optics->lenses_have_next ? ", more" : "", optics->lens_count ? optics->lenses[lens].manufacturer : "UNKNOWN", optics->lens_count ? optics->lenses[lens].model : "", - optics->lens_count ? optics->lenses[lens].name : "aucun", + optics->lens_count ? optics->lenses[lens].name : "none", optics->lens_count ? lens_interface_name(optics->lenses[lens].interface_kind) : "UNKNOWN"); @@ -999,24 +999,24 @@ draw_optics( &optics->configurations[configuration]; if (selected->has_focal_length) { (void)snprintf(line, sizeof(line), - "Config [%zu/%zu affichés%s] #%llu body #%llu lens #%llu focal %u µm", + "Config [%zu/%zu shown%s] #%llu body #%llu lens #%llu focal %u µm", configuration + 1, optics->configuration_count, - optics->configurations_have_next ? ", suite" : "", + optics->configurations_have_next ? ", more" : "", (unsigned long long)selected->optical_configuration_id, (unsigned long long)selected->camera_body_profile_id, (unsigned long long)selected->lens_profile_id, selected->focal_length_um); } else { (void)snprintf(line, sizeof(line), - "Config [%zu/%zu affichés%s] #%llu body #%llu lens #%llu focal ABSENT", + "Config [%zu/%zu shown%s] #%llu body #%llu lens #%llu focal ABSENT", configuration + 1, optics->configuration_count, - optics->configurations_have_next ? ", suite" : "", + optics->configurations_have_next ? ", more" : "", (unsigned long long)selected->optical_configuration_id, (unsigned long long)selected->camera_body_profile_id, (unsigned long long)selected->lens_profile_id); } } else { - (void)snprintf(line, sizeof(line), "Config: aucune"); + (void)snprintf(line, sizeof(line), "Config: none"); } draw_text(6, 2, columns - 4, line); if (optics->calibration_count > 0) { @@ -1026,15 +1026,15 @@ draw_optics( const Lardon3DOpticalCalibrationProfile *calibration = &optics->calibrations[selected]; (void)snprintf(line, sizeof(line), - "Pane %s | calibration [%zu/%zu affichées%s] #%llu %.28s v%u", + "Pane %s | calibration [%zu/%zu shown%s] #%llu %.28s v%u", optics_pane_name(optics->active_pane), selected + 1, optics->calibration_count, - optics->calibrations_have_next ? ", suite" : "", + optics->calibrations_have_next ? ", more" : "", (unsigned long long)calibration->calibration_profile_id, calibration->name, calibration->profile_version); } else { (void)snprintf(line, sizeof(line), - "Pane %s | calibration candidate: aucune", + "Pane %s | calibration candidate: none", optics_pane_name(optics->active_pane)); } draw_text(7, 2, columns - 4, line); @@ -1056,17 +1056,17 @@ draw_optics( draw_text_style(8, 2, columns - 4, line, semantic, palette); } else { draw_text_style(8, 2, columns - 4, - "Capture: non inspecté (V); unresolved reste absence d'assignation.", + "Capture: not inspected (V); unresolved remains no assignment.", LARDON3D_TUI_SEMANTIC_DIM, palette); } (void)snprintf(line, sizeof(line), - "Calibrations compatibles: %zu | sélection: %s", + "Compatible calibrations: %zu | selection: %s", optics->calibration_count, - optics->capture_selection_found ? "explicite" : "aucune/ambiguë"); + optics->capture_selection_found ? "explicit" : "none/ambiguous"); draw_text(9, 2, columns - 4, line); if (optics->metadata_lookup_performed) { (void)snprintf(line, sizeof(line), - "Métadonnées exactes: body %s | lens %s", + "Exact metadata: body %s | lens %s", optics->metadata_body_found ? "MATCH" : "UNRESOLVED", optics->metadata_lens_found ? "MATCH" : "UNRESOLVED"); draw_text(10, 2, columns - 4, line); @@ -1077,9 +1077,9 @@ draw_optics( draw_text(13, 2, columns - 4, "C config focal mm/? V inspect capture A assign capture G task:group"); draw_text(14, 2, columns - 4, - "K sélection calibration E metadata exact [ première page ] page suivante R retry"); + "K select calibration E exact metadata [ first page ] next page R retry"); draw_text_style(16, 2, columns - 4, - "Immutable: modifier = créer une nouvelle version/configuration.", + "Immutable: modify = create a new version/configuration.", LARDON3D_TUI_SEMANTIC_WARNING, palette); } } @@ -1092,24 +1092,24 @@ draw_help( ) { draw_text(4, 2, columns - 4, - "F1 aide, F2 projets, F3 import, F4 viewer futur, F5 tâches, F6 ressources,"); + "F1 help, F2 projects, F3 import, F4 future viewer, F5 tasks, F6 resources,"); draw_text(5, 2, columns - 4, - "F7 profils optiques, F10 SSD; ESC accueil; Q quitter."); + "F7 optical profiles, F10 SSD; ESC home; Q quit."); draw_text_style(7, 2, columns - 4, - "Vert=healthy, jaune=warning/throttled, rouge=error, cyan=GPU, bleu=CPU, magenta=SSD.", + "Green=healthy, yellow=warning/throttled, red=error, cyan=GPU, blue=CPU, magenta=SSD.", LARDON3D_TUI_SEMANTIC_HEALTHY, palette); draw_text(8, 2, columns - 4, - "Sans couleur/peu de paires, les libellés et bold/dim conservent le sens."); + "Without color/few color pairs, labels and bold/dim preserve meaning."); if (viewport == LARDON3D_TUI_VIEWPORT_FULL) { draw_text(10, 2, columns - 4, - "La TUI observe des snapshots bornés >=1s; aucun worker ne touche ncurses."); + "The TUI observes bounded snapshots >=1s; no worker touches ncurses."); draw_text(11, 2, columns - 4, - "Le Governor choisit CPU/GPU/batch. La TUI ne modifie ni admission ni science."); + "The Governor selects CPU/GPU/batch. The TUI changes neither admission nor science."); draw_text(12, 2, columns - 4, - "Dense (future) reste NOT_APPLICABLE; aucune étape future n'est RUNNING."); + "Dense (future) remains NOT_APPLICABLE; no future stage is RUNNING."); } else { draw_text(10, 2, columns - 4, - "Governor choisit les ressources; Dense future reste NOT_APPLICABLE."); + "Governor selects resources; future Dense remains NOT_APPLICABLE."); } } @@ -1170,7 +1170,7 @@ lardon3d_layout_draw_runtime( break; case LARDON3D_SCREEN_VIEWER: draw_text_style(6, 4, columns - 8, - "Viewer Vulkan: PLANNED, aucun travail scientifique actif.", + "Vulkan viewer: PLANNED, no active scientific work.", LARDON3D_TUI_SEMANTIC_DIM, palette); break; case LARDON3D_SCREEN_HOME: diff --git a/src/project.c b/src/project.c index 7186bd5..966750c 100644 --- a/src/project.c +++ b/src/project.c @@ -58,7 +58,7 @@ static void set_database_status(Lardon3DAppState *state, Lardon3DProjectDb *data } else if (open_error) { (void)snprintf(detail, sizeof(detail), "%s", open_error); } - (void)snprintf(state->status_message, sizeof(state->status_message), "Erreur project.db : %.220s", + (void)snprintf(state->status_message, sizeof(state->status_message), "project.db error: %.220s", detail[0] ? detail : fallback); } @@ -72,7 +72,7 @@ static void clear_catalog(Lardon3DAppState *state) { static bool normalize_name(Lardon3DAppState *state, const char *input, char *output, size_t output_size) { if (!input) { - set_status(state, "Erreur : le nom du projet est vide."); + set_status(state, "Error: project name is empty."); return false; } @@ -88,21 +88,21 @@ static bool normalize_name(Lardon3DAppState *state, const char *input, char *out size_t length = (size_t)(end - start); if (length == 0) { - set_status(state, "Erreur : le nom du projet est vide."); + set_status(state, "Error: project name is empty."); return false; } if (length >= output_size) { - set_status(state, "Erreur : le nom du projet est trop long."); + set_status(state, "Error: project name is too long."); return false; } if ((length == 1 && start[0] == '.') || (length == 2 && start[0] == '.' && start[1] == '.')) { - set_status(state, "Erreur : nom de projet interdit."); + set_status(state, "Error: forbidden project name."); return false; } for (const char *character = start; character < end; ++character) { if (*character == '/' || *character == '\\' || iscntrl((unsigned char)*character)) { - set_status(state, "Erreur : nom de projet interdit."); + set_status(state, "Error: forbidden project name."); return false; } } @@ -153,19 +153,19 @@ static bool resolve_projects_root(Lardon3DAppState *state, char root[PATH_MAX]) const char *configured = getenv("LARDON3D_PROJECTS_ROOT"); if (configured && configured[0]) { if (configured[0] != '/' || !copy_path(root, PATH_MAX, configured)) { - set_status(state, "Erreur : répertoire racine invalide."); + set_status(state, "Error: invalid project root directory."); return false; } } else { const char *home = getenv("HOME"); if (!home || home[0] != '/') { - set_status(state, "Erreur : HOME est absent ou invalide."); + set_status(state, "Error: HOME is missing or invalid."); return false; } int written = snprintf(root, PATH_MAX, "%s/Documents/Lardon/Projets3D", home); if (written < 0 || (size_t)written >= PATH_MAX) { - set_status(state, "Erreur : chemin racine trop long."); + set_status(state, "Error: root path is too long."); return false; } } @@ -189,22 +189,22 @@ static bool ensure_directory(Lardon3DAppState *state, const char *path, struct stat info; if (lstat(path, &info) == 0) { if (!S_ISDIR(info.st_mode)) { - set_status(state, "Erreur : un élément du chemin n'est pas un dossier."); + set_status(state, "Error: a path component is not a directory."); return false; } return true; } if (errno != ENOENT || created->count >= MAX_CREATED_DIRECTORIES) { - set_status(state, "Erreur : impossible de préparer le répertoire racine."); + set_status(state, "Error: unable to prepare the root directory."); return false; } if (mkdir(path, 0755) != 0) { - set_status(state, "Erreur : impossible de créer un dossier."); + set_status(state, "Error: unable to create a directory."); return false; } if (!copy_path(created->paths[created->count], sizeof(created->paths[created->count]), path)) { (void)rmdir(path); - set_status(state, "Erreur : chemin de dossier trop long."); + set_status(state, "Error: directory path is too long."); return false; } ++created->count; @@ -215,7 +215,7 @@ static bool ensure_directory_tree(Lardon3DAppState *state, const char *path, CreatedDirectories *created) { char partial[PATH_MAX]; if (!copy_path(partial, sizeof(partial), path)) { - set_status(state, "Erreur : chemin racine trop long."); + set_status(state, "Error: root path is too long."); return false; } @@ -239,13 +239,13 @@ static bool write_project_ini(Lardon3DAppState *state, const char *project_path, char final_path[PATH_MAX]; if (!join_path(final_path, sizeof(final_path), project_path, "project.ini") || !join_path(temporary_path, sizeof(temporary_path), project_path, ".project.ini.tmp.XXXXXX")) { - set_status(state, "Erreur : chemin de project.ini trop long."); + set_status(state, "Error: project.ini path is too long."); return false; } int descriptor = mkstemp(temporary_path); if (descriptor < 0) { - set_status(state, "Erreur : impossible de créer project.ini."); + set_status(state, "Error: unable to create project.ini."); return false; } @@ -253,7 +253,7 @@ static bool write_project_ini(Lardon3DAppState *state, const char *project_path, if (!file) { (void)close(descriptor); (void)unlink(temporary_path); - set_status(state, "Erreur : impossible d'écrire project.ini."); + set_status(state, "Error: unable to write project.ini."); return false; } @@ -273,7 +273,7 @@ static bool write_project_ini(Lardon3DAppState *state, const char *project_path, } if (!success) { (void)unlink(temporary_path); - set_status(state, "Erreur : impossible d'écrire project.ini."); + set_status(state, "Error: unable to write project.ini."); } return success; } @@ -283,7 +283,7 @@ bool lardon3d_project_create(Lardon3DAppState *state, const char *name) { return false; } if (state->project_loaded || state->project_db) { - set_status(state, "Erreur : un projet est déjà ouvert."); + set_status(state, "Error: a project is already open."); return false; } @@ -298,11 +298,11 @@ bool lardon3d_project_create(Lardon3DAppState *state, const char *name) { return false; } if (!generate_stable_id(stable_id)) { - set_status(state, "Erreur : impossible de créer l'identité du projet."); + set_status(state, "Error: unable to create project identity."); return false; } if (!join_path(project_path, sizeof(project_path), root, normalized_name)) { - set_status(state, "Erreur : chemin du projet trop long."); + set_status(state, "Error: project path is too long."); return false; } @@ -315,7 +315,7 @@ bool lardon3d_project_create(Lardon3DAppState *state, const char *name) { struct stat info; if (lstat(project_path, &info) == 0 || errno != ENOENT) { cleanup_directories(&created); - set_status(state, "Erreur : ce projet existe déjà."); + set_status(state, "Error: this project already exists."); return false; } if (!ensure_directory(state, project_path, &created)) { @@ -329,7 +329,7 @@ bool lardon3d_project_create(Lardon3DAppState *state, const char *name) { for (size_t index = 0; index < sizeof(subdirectories) / sizeof(subdirectories[0]); ++index) { char path[PATH_MAX]; if (!join_path(path, sizeof(path), project_path, subdirectories[index])) { - set_status(state, "Erreur : chemin de dossier trop long."); + set_status(state, "Error: directory path is too long."); cleanup_directories(&created); return false; } @@ -349,7 +349,7 @@ bool lardon3d_project_create(Lardon3DAppState *state, const char *name) { if (!join_path(database_path, sizeof(database_path), project_path, "project.db") || !join_path(ini_path, sizeof(ini_path), project_path, "project.ini")) { cleanup_directories(&created); - set_status(state, "Erreur : chemin de base projet trop long."); + set_status(state, "Error: project database path is too long."); return false; } Lardon3DProjectDb *database = NULL; @@ -384,7 +384,7 @@ bool lardon3d_project_create(Lardon3DAppState *state, const char *name) { (void)copy_path(state->project_name, sizeof(state->project_name), normalized_name); (void)copy_path(state->project_path, sizeof(state->project_path), project_path); (void)snprintf(state->project_stable_id, sizeof(state->project_stable_id), "%s", stable_id); - (void)snprintf(state->status_message, sizeof(state->status_message), "Projet créé : %s", + (void)snprintf(state->status_message, sizeof(state->status_message), "Project created: %s", state->project_name); return true; } @@ -392,21 +392,21 @@ bool lardon3d_project_create(Lardon3DAppState *state, const char *name) { static bool read_project_ini(Lardon3DAppState *state, const char *path, ProjectMetadata *metadata) { int descriptor = open(path, O_RDONLY | O_NOFOLLOW); if (descriptor < 0) { - set_status(state, "Erreur : project.ini est absent ou inaccessible."); + set_status(state, "Error: project.ini is missing or inaccessible."); return false; } struct stat info; if (fstat(descriptor, &info) != 0 || !S_ISREG(info.st_mode)) { (void)close(descriptor); - set_status(state, "Erreur : project.ini n'est pas un fichier régulier."); + set_status(state, "Error: project.ini is not a regular file."); return false; } FILE *file = fdopen(descriptor, "r"); if (!file) { (void)close(descriptor); - set_status(state, "Erreur : impossible de lire project.ini."); + set_status(state, "Error: unable to read project.ini."); return false; } @@ -483,7 +483,7 @@ static bool read_project_ini(Lardon3DAppState *state, const char *path, ProjectM } if (!valid || !section_found || !name_found || !version_found || (metadata->version == 2 && !stable_id_found) || (metadata->version == 1 && stable_id_found)) { - set_status(state, "Erreur : project.ini invalide."); + set_status(state, "Error: invalid project.ini."); return false; } return true; @@ -494,7 +494,7 @@ bool lardon3d_project_open(Lardon3DAppState *state, const char *directory_name) return false; } if (state->project_loaded || state->project_db) { - set_status(state, "Erreur : un projet est déjà ouvert."); + set_status(state, "Error: a project is already open."); return false; } @@ -512,13 +512,13 @@ bool lardon3d_project_open(Lardon3DAppState *state, const char *directory_name) if (!join_path(project_path, sizeof(project_path), root, normalized_directory) || !join_path(ini_path, sizeof(ini_path), project_path, "project.ini") || !join_path(database_path, sizeof(database_path), project_path, "project.db")) { - set_status(state, "Erreur : chemin du projet trop long."); + set_status(state, "Error: project path is too long."); return false; } struct stat info; if (lstat(project_path, &info) != 0 || !S_ISDIR(info.st_mode)) { - set_status(state, "Erreur : dossier projet absent ou invalide."); + set_status(state, "Error: project directory is missing or invalid."); return false; } @@ -530,12 +530,12 @@ bool lardon3d_project_open(Lardon3DAppState *state, const char *directory_name) bool database_existed = false; if (lstat(database_path, &info) == 0) { if (!S_ISREG(info.st_mode)) { - set_status(state, "Erreur : project.db n'est pas un fichier régulier."); + set_status(state, "Error: project.db is not a regular file."); return false; } database_existed = true; } else if (errno != ENOENT) { - set_status(state, "Erreur : project.db est inaccessible."); + set_status(state, "Error: project.db is inaccessible."); return false; } @@ -606,7 +606,7 @@ bool lardon3d_project_open(Lardon3DAppState *state, const char *directory_name) } if (database_result != LARDON3D_PROJECT_DB_OK) { if (database_result == LARDON3D_PROJECT_DB_CONSTRAINT) { - set_status(state, "Erreur : identité project.ini/project.db incohérente."); + set_status(state, "Error: inconsistent project.ini/project.db identity."); } else { set_database_status(state, database, database_error, "initialisation impossible"); } @@ -631,11 +631,11 @@ bool lardon3d_project_open(Lardon3DAppState *state, const char *directory_name) (void)lardon3d_project_resume_recoverable_tasks(state, lardon3d_task_kind_registry_production(), &summary); (void)snprintf(state->status_message, sizeof(state->status_message), - "Projet ouvert — %zu tâche(s) reprise(s), %zu ignorée(s), %zu en échec%s.", + "Project opened — %zu task(s) resumed, %zu skipped, %zu failed%s.", summary.resumed, summary.skipped, summary.failed, - summary.queue_full ? ", fenêtre de reprise saturée" : ""); + summary.queue_full ? ", recovery window saturated" : ""); } else { - (void)snprintf(state->status_message, sizeof(state->status_message), "Projet ouvert : %s", + (void)snprintf(state->status_message, sizeof(state->status_message), "Project opened: %s", state->project_name); } return true; @@ -647,7 +647,7 @@ void lardon3d_project_close(Lardon3DAppState *state) { } if (!state->project_loaded) { - set_status(state, "Aucun projet à fermer."); + set_status(state, "No project to close."); return; } @@ -659,7 +659,7 @@ void lardon3d_project_close(Lardon3DAppState *state) { state->project_path[0] = '\0'; state->project_stable_id[0] = '\0'; store_recovery_summary(state, NULL); - set_status(state, "Projet fermé."); + set_status(state, "Project closed."); } static bool checkpoint_paths(const Lardon3DAppState *state, uint64_t task_id, diff --git a/src/runtime_session.c b/src/runtime_session.c index 19dd9a5..99d1333 100644 --- a/src/runtime_session.c +++ b/src/runtime_session.c @@ -28,7 +28,7 @@ lardon3d_runtime_project_boundary( if (!state->task_queue) { (void)snprintf(state->status_message, sizeof(state->status_message), - "Erreur : impossible de recréer la file de tâches."); + "Error: unable to recreate the task queue."); return false; } return true; diff --git a/src/tui.c b/src/tui.c index 9f04176..cbc11cb 100644 --- a/src/tui.c +++ b/src/tui.c @@ -126,7 +126,7 @@ reload_catalog(Lardon3DAppState *state, bool announce_success) (void)snprintf( state->status_message, sizeof(state->status_message), - "Erreur : impossible de construire la vue des images." + "Error: unable to build the image view." ); lardon3d_image_view_destroy(state->image_view); state->image_view = NULL; @@ -165,7 +165,7 @@ reload_catalog(Lardon3DAppState *state, bool announce_success) (void)snprintf( state->status_message, sizeof(state->status_message), - "Catalogue rechargé : %zu image%s.", + "Catalog reloaded: %zu image%s.", lardon3d_image_view_count(state->image_view), lardon3d_image_view_count(state->image_view) == 1 ? "" : "s" ); @@ -212,7 +212,7 @@ reset_project_session(Lardon3DAppState *state, TuiRuntime *runtime) if (!runtime->observer) { (void)snprintf(state->status_message, sizeof(state->status_message), - "Erreur : impossible de recréer l'observateur runtime."); + "Error: unable to recreate the runtime observer."); runtime->fatal_error = true; state->running = false; return false; @@ -231,17 +231,17 @@ input_label(InputMode mode) case INPUT_IMPORT_DIRECTORY: return "Dossier source :"; case INPUT_IMAGE_FILTER: - return "Filtre :"; + return "Filter:"; case INPUT_OPTICS_CREATE_BODY: return "Body immutable: manufacturer|model|name"; case INPUT_OPTICS_CREATE_LENS: return "Lens: interface|range|min_mm|max_mm|maker|model|name"; case INPUT_OPTICS_CREATE_CONFIGURATION: - return "Focale entière mm, ou ? pour absence explicite"; + return "Integer focal length in mm, or ? for explicit absence"; case INPUT_OPTICS_INSPECT_CAPTURE: - return "Capture ID à inspecter :"; + return "Capture ID to inspect:"; case INPUT_OPTICS_ASSIGN_CAPTURE: - return "Capture ID à assigner :"; + return "Capture ID to assign:"; case INPUT_OPTICS_ASSIGN_GROUP: return "Campaign Task ID:group ID :"; case INPUT_OPTICS_LOOKUP_METADATA: @@ -477,7 +477,7 @@ complete_optics_input( if (!runtime->optics_database) { (void)snprintf(state->status_message, sizeof(state->status_message), - "Aucun Project DB lié; aucune identité optique n'est devinée."); + "No Project DB bound; no optical identity is guessed."); input->mode = INPUT_NONE; return false; } @@ -533,7 +533,7 @@ complete_optics_input( } else { (void)snprintf(state->status_message, sizeof(state->status_message), - "Focale invalide: entier positif en millimètres ou ?."); + "Invalid focal length: positive integer in millimetres or ?."); } } else if (input->mode == INPUT_OPTICS_INSPECT_CAPTURE || input->mode == INPUT_OPTICS_ASSIGN_CAPTURE) { @@ -577,7 +577,7 @@ complete_optics_input( } else { (void)snprintf(state->status_message, sizeof(state->status_message), - "Format métadonnées invalide: make|model|lens_make|lens_model."); + "Invalid metadata format: make|model|lens_make|lens_model."); } } if (model_called) { @@ -601,7 +601,7 @@ start_import_task( (void)snprintf( state->status_message, sizeof(state->status_message), - "Erreur : impossible de créer la tâche d'import." + "Error: unable to create the import task." ); input->mode = INPUT_NONE; return false; @@ -652,15 +652,15 @@ handle_active_input( } if (key == 27) { - const char *message = "Création du projet annulée."; + const char *message = "Project creation cancelled."; if (input->mode == INPUT_PROJECT_OPEN) { - message = "Ouverture du projet annulée."; + message = "Project opening cancelled."; } else if (input->mode == INPUT_IMPORT_DIRECTORY) { - message = "Import annulé."; + message = "Import cancelled."; } else if (input->mode == INPUT_IMAGE_FILTER) { - message = "Filtre annulé."; + message = "Filter cancelled."; } else if (is_optics_input(input->mode)) { - message = "Opération optique annulée."; + message = "Optics operation cancelled."; } input->mode = INPUT_NONE; (void)snprintf( @@ -695,13 +695,13 @@ handle_active_input( (void)snprintf( state->status_message, sizeof(state->status_message), - "Aucune image ne correspond au filtre." + "No image matches the filter." ); } else { (void)snprintf( state->status_message, sizeof(state->status_message), - "Filtre appliqué : %.230s", + "Filter applied: %.230s", input->text ); } @@ -742,7 +742,7 @@ handle_active_input( (void)snprintf( state->status_message, sizeof(state->status_message), - "Erreur : filtre trop long." + "Error: filter is too long." ); return true; } @@ -750,7 +750,7 @@ handle_active_input( (void)snprintf( state->status_message, sizeof(state->status_message), - "Erreur : saisie optique trop longue." + "Error: optics input is too long." ); input->mode = INPUT_NONE; input->text[0] = '\0'; @@ -766,7 +766,7 @@ handle_active_input( (void)snprintf( state->status_message, sizeof(state->status_message), - "Erreur : chemin source trop long." + "Error: source path is too long." ); } else { if (reset_project_session(state, runtime) @@ -810,7 +810,7 @@ handle_ssd_key( if (!runtime->ssd_operation) { (void)snprintf(state->status_message, sizeof(state->status_message), - "Contrôleur SSD indisponible; état UNKNOWN, aucune action."); + "SSD controller unavailable; state UNKNOWN, no action."); return true; } (void)lardon3d_tui_ssd_async_poll( @@ -818,7 +818,7 @@ handle_ssd_key( if (runtime->ssd_operation_snapshot.running) { (void)snprintf(state->status_message, sizeof(state->status_message), - "Opération SSD %s déjà en cours.", + "SSD operation %s already running.", lardon3d_tui_ssd_action_name( runtime->ssd_operation_snapshot.action)); return true; @@ -827,7 +827,7 @@ handle_ssd_key( || !runtime->ssd_operation_snapshot.controller_snapshot_actionable) { (void)snprintf(state->status_message, sizeof(state->status_message), - "Télémétrie SSD indéterminée/invalide; contrôle désactivé."); + "SSD telemetry unknown/invalid; control disabled."); return true; } Lardon3DTuiSsdAction action; @@ -836,18 +836,18 @@ handle_ssd_key( if (!lardon3d_tui_ssd_action_for_snapshot(current, &action)) { (void)snprintf(state->status_message, sizeof(state->status_message), - "Aucune transition SSD sûre depuis %s.", + "No safe SSD transition from %s.", lardon3d_ssd_state_name(current->state)); return true; } if (!lardon3d_tui_ssd_async_request(runtime->ssd_operation, action)) { (void)snprintf(state->status_message, sizeof(state->status_message), - "Impossible de lancer l'opération SSD bornée."); + "Unable to start the bounded SSD operation."); return true; } (void)snprintf(state->status_message, sizeof(state->status_message), - "SSD %s lancé hors du thread ncurses.", + "SSD %s started outside the ncurses thread.", lardon3d_tui_ssd_action_name(action)); return true; } @@ -885,15 +885,15 @@ handle_task_key( operation = "reprise"; result = lardon3d_task_queue_resume(state->task_queue, task_id); } else if (key == 'c' || key == 'C') { - operation = "annulation"; + operation = "cancellation"; result = lardon3d_task_queue_cancel(state->task_queue, task_id); } if (!operation) { return false; } (void)snprintf(state->status_message, sizeof(state->status_message), - "Tâche #%llu: %s %s.", (unsigned long long)task_id, - operation, result ? "demandée" : "refusée/indisponible"); + "Task #%llu: %s %s.", (unsigned long long)task_id, + operation, result ? "requested" : "rejected/unavailable"); return true; } @@ -967,7 +967,7 @@ handle_normal_input( (void)snprintf( state->status_message, sizeof(state->status_message), - "Quitter est désactivé pendant l'import." + "Quit is disabled during import." ); } else if (key == 27) { (void)snprintf( @@ -1129,7 +1129,7 @@ handle_normal_input( (void)snprintf( state->status_message, sizeof(state->status_message), - "Aucun projet chargé." + "No project loaded." ); return true; } @@ -1148,7 +1148,7 @@ handle_normal_input( (void)snprintf( state->status_message, sizeof(state->status_message), - "Aucun projet chargé." + "No project loaded." ); } else { (void)reload_catalog(state, true); @@ -1203,7 +1203,7 @@ handle_normal_input( (void)snprintf( state->status_message, sizeof(state->status_message), - "Filtre effacé." + "Filter cleared." ); } return true; diff --git a/tests/test_image_catalog.c b/tests/test_image_catalog.c index 0dace7c..a56405b 100644 --- a/tests/test_image_catalog.c +++ b/tests/test_image_catalog.c @@ -175,7 +175,7 @@ run_test(void) ); CHECK(catalog); CHECK(lardon3d_image_catalog_count(catalog) == 0); - CHECK(strcmp(error, "Aucune image importée.") == 0); + CHECK(strcmp(error, "No imported image.") == 0); CHECK(lardon3d_image_catalog_get(catalog, 0) == NULL); lardon3d_image_catalog_destroy(catalog); lardon3d_image_catalog_destroy(NULL); diff --git a/tests/test_match_result.c b/tests/test_match_result.c index e563b83..6cc2ad4 100644 --- a/tests/test_match_result.c +++ b/tests/test_match_result.c @@ -54,7 +54,9 @@ static bool create_v9_database(const char *path) { static const char sql[] = "PRAGMA foreign_keys=OFF;BEGIN IMMEDIATE;" /* This database is a true v9 fixture, not a current database whose - metadata alone was relabelled while additive v20-v23 objects survived. */ + metadata alone was relabelled while additive v20-v25 objects survived. */ + "DROP TABLE IF EXISTS feature_extract_batch_tasks;" + "DROP TABLE IF EXISTS raw_development_batch_tasks;" "DROP TABLE IF EXISTS capture_calibration_selections;" "DROP TABLE IF EXISTS optical_calibration_profiles;" "DROP TABLE IF EXISTS capture_optical_configurations;" diff --git a/tests/test_matcher_task.c b/tests/test_matcher_task.c index e2e627a..381f7e8 100644 --- a/tests/test_matcher_task.c +++ b/tests/test_matcher_task.c @@ -360,6 +360,16 @@ static bool downgrade_project_to_historical_v10(const char *database_path) { } static const char sql[] = "PRAGMA foreign_keys=OFF;BEGIN IMMEDIATE;" + "DROP TABLE IF EXISTS feature_extract_batch_tasks;" + "DROP TABLE IF EXISTS raw_development_batch_tasks;" + "DROP TABLE IF EXISTS selected_execution_items;" + "DROP TABLE IF EXISTS selected_executions;" + "DROP TABLE IF EXISTS raw_development_tasks;" + "DROP TABLE IF EXISTS capture_source_assets;" + "DROP TABLE IF EXISTS photo_quality_triage_results;" + "DROP TABLE IF EXISTS photo_quality_triage_tasks;" + "DROP TABLE IF EXISTS acquisition_campaign_captures;" + "DROP TABLE IF EXISTS acquisition_campaign_tasks;" "DROP TABLE IF EXISTS capture_calibration_selections;" "DROP TABLE IF EXISTS optical_calibration_profiles;" "DROP TABLE IF EXISTS capture_optical_configurations;" diff --git a/tests/test_optical_profiles.c b/tests/test_optical_profiles.c index a7468dc..d8b03f0 100644 --- a/tests/test_optical_profiles.c +++ b/tests/test_optical_profiles.c @@ -1147,6 +1147,7 @@ static bool downgrade_to_v22_fixture(const char *path) { return raw_sql( path, "PRAGMA foreign_keys=OFF;BEGIN IMMEDIATE;" + "DROP TABLE IF EXISTS feature_extract_batch_tasks;" "DROP TABLE raw_development_batch_tasks;" "DROP TABLE capture_calibration_selections;" "DROP TABLE optical_calibration_profiles;" diff --git a/tests/test_project.c b/tests/test_project.c index c35f79d..a61c237 100644 --- a/tests/test_project.c +++ b/tests/test_project.c @@ -338,7 +338,7 @@ run_test(void) CHECK(write_ini(ini_path, "Projet Cycle", "A0000000000000000000000000000000", 2)); CHECK(!lardon3d_project_open(&state, "Projet Cycle")); CHECK(!state.project_loaded && !state.project_db); - CHECK(strstr(state.status_message, "project.ini invalide") != NULL); + CHECK(strstr(state.status_message, "invalid project.ini") != NULL); CHECK(write_ini(ini_path, "Projet Cycle", "", 1)); CHECK(lardon3d_project_open(&state, "Projet Cycle")); CHECK(strcmp(state.project_stable_id, stable_id) == 0); diff --git a/tests/test_tui_layout.c b/tests/test_tui_layout.c index 401a13e..694df6a 100644 --- a/tests/test_tui_layout.c +++ b/tests/test_tui_layout.c @@ -303,7 +303,7 @@ run_test(void) &operation, &optics, 0, &palette, LARDON3D_TUI_INTERACTION_IDLE, 30, 100); CHECK(row_contains(16, 100, "Governor SSD IN_USE")); - CHECK(row_contains(16, 100, "alloc non")); + CHECK(row_contains(16, 100, "alloc no")); CHECK(row_contains(16, 100, "leases 2")); CHECK(row_contains(17, 100, "swap total/used")); CHECK(resizeterm(15, 60) == OK); @@ -370,15 +370,15 @@ run_test(void) lardon3d_layout_draw_runtime(&state, "project", "name", NULL, &runtime, &operation, &optics, 0, &palette, LARDON3D_TUI_INTERACTION_TEXT_INPUT, 30, 100); - CHECK(row_contains(28, 100, "Enter valider")); - CHECK(row_contains(28, 100, "ESC annuler")); - CHECK(!row_contains(28, 100, "Q quitter")); + CHECK(row_contains(28, 100, "Enter confirm")); + CHECK(row_contains(28, 100, "ESC cancel")); + CHECK(!row_contains(28, 100, "Q quit")); CHECK(resizeterm(15, 60) == OK); lardon3d_layout_draw_runtime(&state, "project", "name", NULL, &runtime, &operation, &optics, 0, &palette, LARDON3D_TUI_INTERACTION_TEXT_INPUT, 15, 60); CHECK(row_contains(13, 60, "F10 SSD")); - CHECK(row_contains(13, 60, "Enter valider")); + CHECK(row_contains(13, 60, "Enter confirm")); state.screen = LARDON3D_SCREEN_IMPORT; Lardon3DImportTaskSnapshot import = { @@ -390,15 +390,15 @@ run_test(void) lardon3d_layout_draw_runtime(&state, NULL, "", &import, &runtime, &operation, &optics, 0, &palette, LARDON3D_TUI_INTERACTION_IMPORT_RUNNING, 30, 100); - CHECK(row_contains(28, 100, "X annuler l'import")); + CHECK(row_contains(28, 100, "X cancel import")); CHECK(row_contains(28, 100, "Q/ESC")); - CHECK(row_contains(9, 100, "X : annuler")); + CHECK(row_contains(9, 100, "X: cancel")); CHECK(resizeterm(15, 60) == OK); lardon3d_layout_draw_runtime(&state, NULL, "", &import, &runtime, &operation, &optics, 0, &palette, LARDON3D_TUI_INTERACTION_IMPORT_RUNNING, 15, 60); CHECK(row_contains(13, 60, "F10 SSD")); - CHECK(row_contains(13, 60, "X annuler")); + CHECK(row_contains(13, 60, "X cancel")); state.screen = LARDON3D_SCREEN_TASKS; CHECK(resizeterm(30, 100) == OK); @@ -426,8 +426,8 @@ run_test(void) lardon3d_layout_draw_runtime(&state, NULL, "", NULL, &runtime, &operation, &optics, 0, &palette, LARDON3D_TUI_INTERACTION_IDLE, 30, 100); - CHECK(screen_contains(30, 100, "Progression scientifique")); - CHECK(!screen_contains(30, 100, "Progression runtime")); + CHECK(screen_contains(30, 100, "Scientific progress")); + CHECK(!screen_contains(30, 100, "Runtime progress")); state.screen = LARDON3D_SCREEN_HOME; runtime.active_task_known = true; @@ -448,7 +448,7 @@ run_test(void) &operation, &optics, 0, &palette, LARDON3D_TUI_INTERACTION_IDLE, 30, 100); CHECK(screen_contains(30, 100, "2.5%/s")); - CHECK(!screen_contains(30, 100, "2.5 unité/s")); + CHECK(!screen_contains(30, 100, "2.5 unit/s")); state.screen = LARDON3D_SCREEN_OPTICS; optics = (Lardon3DTuiOpticsSnapshot) {0}; @@ -458,7 +458,7 @@ run_test(void) &operation, &optics, 0, &palette, LARDON3D_TUI_INTERACTION_IDLE, 30, 100); CHECK(screen_contains(30, 100, "BUSY")); - CHECK(screen_contains(30, 100, "R :")); + CHECK(screen_contains(30, 100, "R:")); CHECK(screen_contains(30, 100, "Project DB")); optics = (Lardon3DTuiOpticsSnapshot) { @@ -474,10 +474,10 @@ run_test(void) lardon3d_layout_draw_runtime(&state, NULL, "", NULL, &runtime, &operation, &optics, 0, &palette, LARDON3D_TUI_INTERACTION_IDLE, 30, 100); - CHECK(screen_contains(30, 100, "1/16 affich")); - CHECK(screen_contains(30, 100, ", suite")); - CHECK(screen_contains(30, 100, "[ premi")); - CHECK(screen_contains(30, 100, "] page suivante")); + CHECK(screen_contains(30, 100, "1/16 shown")); + CHECK(screen_contains(30, 100, ", more")); + CHECK(screen_contains(30, 100, "[ first")); + CHECK(screen_contains(30, 100, "] next page")); /* The legacy symbol accepts only baseline-sized objects. This call also * proves a NULL task array with a nonzero count is safely treated empty. */ @@ -494,7 +494,7 @@ run_test(void) CHECK(screen_contains(30, 100, "#55")); lardon3d_layout_draw(&state, NULL, "", NULL, NULL, 1, &legacy_summary, &legacy_resources, 30, 100); - CHECK(screen_contains(30, 100, "Aucune t")); + CHECK(screen_contains(30, 100, "No retained")); CHECK(resizeterm(14, 59) == OK); lardon3d_layout_draw_runtime(&state, NULL, "", NULL, &runtime, @@ -502,7 +502,7 @@ run_test(void) 14, 59); char line[60] = {0}; CHECK(mvwinnstr(stdscr, 7, 0, line, 59) != ERR); - CHECK(strstr(line, "Terminal trop petit") != NULL); + CHECK(strstr(line, "Terminal too small") != NULL); (void)endwin(); delscreen(screen);