@@ -6,7 +6,7 @@ use czkawka_core::progress_data::{CurrentStage, ProgressData};
66use humansize:: { BINARY , format_size} ;
77use slint:: ComponentHandle ;
88
9- use crate :: { MainWindow , ProgressToSend } ;
9+ use crate :: { MainWindow , ProgressToSend , flk } ;
1010
1111pub fn connect_progress_gathering ( app : & MainWindow , progress_receiver : Receiver < ProgressData > ) {
1212 let a = app. as_weak ( ) ;
@@ -35,14 +35,14 @@ pub fn connect_progress_gathering(app: &MainWindow, progress_receiver: Receiver<
3535
3636fn progress_save_load_cache ( item : & ProgressData ) -> ProgressToSend {
3737 let step_name = match item. sstage {
38- CurrentStage :: SameMusicCacheLoadingTags => "Loading tags cache" ,
39- CurrentStage :: SameMusicCacheLoadingFingerprints => "Loading fingerprints cache" ,
40- CurrentStage :: SameMusicCacheSavingTags => "Saving tags cache" ,
41- CurrentStage :: SameMusicCacheSavingFingerprints => "Saving fingerprints cache" ,
42- CurrentStage :: DuplicatePreHashCacheLoading => "Loading prehash cache" ,
43- CurrentStage :: DuplicatePreHashCacheSaving => "Saving prehash cache" ,
44- CurrentStage :: DuplicateCacheLoading => "Loading hash cache" ,
45- CurrentStage :: DuplicateCacheSaving => "Saving hash cache" ,
38+ CurrentStage :: SameMusicCacheLoadingTags => flk ! ( "rust_loading_tags_cache" ) ,
39+ CurrentStage :: SameMusicCacheLoadingFingerprints => flk ! ( "rust_loading_fingerprints_cache" ) ,
40+ CurrentStage :: SameMusicCacheSavingTags => flk ! ( "rust_saving_tags_cache" ) ,
41+ CurrentStage :: SameMusicCacheSavingFingerprints => flk ! ( "rust_saving_fingerprints_cache" ) ,
42+ CurrentStage :: DuplicatePreHashCacheLoading => flk ! ( "rust_loading_prehash_cache" ) ,
43+ CurrentStage :: DuplicatePreHashCacheSaving => flk ! ( "rust_saving_prehash_cache" ) ,
44+ CurrentStage :: DuplicateCacheLoading => flk ! ( "rust_loading_hash_cache" ) ,
45+ CurrentStage :: DuplicateCacheSaving => flk ! ( "rust_saving_hash_cache" ) ,
4646 _ => unreachable ! ( ) ,
4747 } ;
4848 let ( all_progress, current_progress, current_progress_size) = common_get_data ( item) ;
@@ -56,20 +56,14 @@ fn progress_save_load_cache(item: &ProgressData) -> ProgressToSend {
5656
5757fn progress_collect_items ( item : & ProgressData , files : bool ) -> ProgressToSend {
5858 let step_name = match item. sstage {
59- CurrentStage :: DuplicateScanningName => {
60- format ! ( "Scanning name of {} file" , item. entries_checked)
61- }
62- CurrentStage :: DuplicateScanningSizeName => {
63- format ! ( "Scanning size and name of {} file" , item. entries_checked)
64- }
65- CurrentStage :: DuplicateScanningSize => {
66- format ! ( "Scanning size of {} file" , item. entries_checked)
67- }
59+ CurrentStage :: DuplicateScanningName => flk ! ( "rust_scanning_name" , entries_checked = item. entries_checked) ,
60+ CurrentStage :: DuplicateScanningSizeName => flk ! ( "rust_scanning_size_name" , entries_checked = item. entries_checked) ,
61+ CurrentStage :: DuplicateScanningSize => flk ! ( "rust_scanning_size" , entries_checked = item. entries_checked) ,
6862 _ => {
6963 if files {
70- format ! ( "Scanning {} file" , item. entries_checked)
64+ flk ! ( "rust_scanning_file" , entries_checked = item. entries_checked)
7165 } else {
72- format ! ( "Scanning {} folder" , item. entries_checked)
66+ flk ! ( "rust_scanning_folder" , entries_checked = item. entries_checked)
7367 }
7468 }
7569 } ;
@@ -86,17 +80,17 @@ fn progress_default(item: &ProgressData) -> ProgressToSend {
8680 let items_stats = format ! ( "{}/{}" , item. entries_checked, item. entries_to_check) ;
8781 let size_stats = format ! ( "{}/{}" , format_size( item. bytes_checked, BINARY ) , format_size( item. bytes_to_check, BINARY ) ) ;
8882 let step_name = match item. sstage {
89- CurrentStage :: SameMusicReadingTags => format ! ( "Checked tags of { items_stats}" ) ,
90- CurrentStage :: SameMusicCalculatingFingerprints => format ! ( "Checked content of { items_stats} ({ size_stats})" ) ,
91- CurrentStage :: SameMusicComparingTags => format ! ( "Compared tags of { items_stats}" ) ,
92- CurrentStage :: SameMusicComparingFingerprints => format ! ( "Compared content of { items_stats}" ) ,
93- CurrentStage :: SimilarImagesCalculatingHashes => format ! ( "Hashed of { items_stats} image ({ size_stats})" ) ,
94- CurrentStage :: SimilarImagesComparingHashes => format ! ( "Compared { items_stats} image hash" ) ,
95- CurrentStage :: SimilarVideosCalculatingHashes => format ! ( "Hashed of { items_stats} video" ) ,
96- CurrentStage :: BrokenFilesChecking => format ! ( "Checked { items_stats} file ({ size_stats})" ) ,
97- CurrentStage :: BadExtensionsChecking => format ! ( "Checked { items_stats} file" ) ,
98- CurrentStage :: DuplicatePreHashing => format ! ( "Analyzed partial hash of { items_stats} files ({ size_stats})" ) ,
99- CurrentStage :: DuplicateFullHashing => format ! ( "Analyzed full hash of { items_stats} files ({ size_stats})" ) ,
83+ CurrentStage :: SameMusicReadingTags => flk ! ( "rust_checked_tags" , items_stats = items_stats) ,
84+ CurrentStage :: SameMusicCalculatingFingerprints => flk ! ( "rust_checked_content" , items_stats = items_stats, size_stats = size_stats ) ,
85+ CurrentStage :: SameMusicComparingTags => flk ! ( "rust_compared_tags" , items_stats = items_stats) ,
86+ CurrentStage :: SameMusicComparingFingerprints => flk ! ( "rust_compared_content" , items_stats = items_stats) ,
87+ CurrentStage :: SimilarImagesCalculatingHashes => flk ! ( "rust_hashed_images" , items_stats = items_stats, size_stats = size_stats) ,
88+ CurrentStage :: SimilarImagesComparingHashes => flk ! ( "rust_compared_image_hashes" , items_stats = items_stats ) ,
89+ CurrentStage :: SimilarVideosCalculatingHashes => flk ! ( "rust_hashed_videos" , items_stats = items_stats ) ,
90+ CurrentStage :: BrokenFilesChecking => flk ! ( "rust_checked_files" , items_stats = items_stats , size_stats = size_stats ) ,
91+ CurrentStage :: BadExtensionsChecking => flk ! ( "rust_checked_files_bad_extensions" , items_stats = items_stats ) ,
92+ CurrentStage :: DuplicatePreHashing => flk ! ( "rust_analyzed_partial_hash" , items_stats = items_stats, size_stats = size_stats) ,
93+ CurrentStage :: DuplicateFullHashing => flk ! ( "rust_analyzed_full_hash" , items_stats = items_stats, size_stats = size_stats) ,
10094
10195 _ => unreachable ! ( ) ,
10296 } ;
0 commit comments