Browse Source

Release 4.0 and do "small" refactoring to fix problems with packing (#593)

pull/601/head 4.0.0
Rafał Mikrut 4 months ago committed by GitHub
parent
commit
a0d17fccea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      Cargo.lock
  2. 2
      Changelog.md
  3. 4
      czkawka_cli/Cargo.toml
  4. 2
      czkawka_core/Cargo.toml
  5. 2
      czkawka_core/i18n.toml
  6. 25
      czkawka_core/i18n/cs/czkawka_core.ftl
  7. 25
      czkawka_core/i18n/de/czkawka_core.ftl
  8. 31
      czkawka_core/i18n/en/czkawka_core.ftl
  9. 25
      czkawka_core/i18n/es/czkawka_core.ftl
  10. 25
      czkawka_core/i18n/fr/czkawka_core.ftl
  11. 25
      czkawka_core/i18n/it/czkawka_core.ftl
  12. 25
      czkawka_core/i18n/ja/czkawka_core.ftl
  13. 28
      czkawka_core/i18n/pl/czkawka_core.ftl
  14. 25
      czkawka_core/i18n/pt/czkawka_core.ftl
  15. 25
      czkawka_core/i18n/ru/czkawka_core.ftl
  16. 25
      czkawka_core/i18n/uk/czkawka_core.ftl
  17. 25
      czkawka_core/i18n/zh/czkawka_core.ftl
  18. 16
      czkawka_core/src/big_file.rs
  19. 16
      czkawka_core/src/broken_files.rs
  20. 26
      czkawka_core/src/common_dir_traversal.rs
  21. 30
      czkawka_core/src/common_directory.rs
  22. 12
      czkawka_core/src/duplicate.rs
  23. 2
      czkawka_core/src/lib.rs
  24. 21
      czkawka_core/src/localizer_core.rs
  25. 40
      czkawka_core/src/similar_images.rs
  26. 20
      czkawka_core/src/similar_videos.rs
  27. 16
      czkawka_core/src/temporary.rs
  28. 4
      czkawka_gui/Cargo.toml
  29. 2
      czkawka_gui/i18n.toml
  30. 25
      czkawka_gui/i18n/cs/czkawka_gui.ftl
  31. 25
      czkawka_gui/i18n/de/czkawka_gui.ftl
  32. 29
      czkawka_gui/i18n/en/czkawka_gui.ftl
  33. 25
      czkawka_gui/i18n/es/czkawka_gui.ftl
  34. 25
      czkawka_gui/i18n/fr/czkawka_gui.ftl
  35. 25
      czkawka_gui/i18n/it/czkawka_gui.ftl
  36. 25
      czkawka_gui/i18n/ja/czkawka_gui.ftl
  37. 25
      czkawka_gui/i18n/pl/czkawka_gui.ftl
  38. 25
      czkawka_gui/i18n/pt/czkawka_gui.ftl
  39. 25
      czkawka_gui/i18n/ru/czkawka_gui.ftl
  40. 25
      czkawka_gui/i18n/uk/czkawka_gui.ftl
  41. 0
      czkawka_gui/i18n/zh/czkawka_gui.ftl
  42. 48
      czkawka_gui/src/compute_results.rs
  43. 10
      czkawka_gui/src/connect_things/connect_button_compare.rs
  44. 40
      czkawka_gui/src/connect_things/connect_button_delete.rs
  45. 34
      czkawka_gui/src/connect_things/connect_button_hardlink.rs
  46. 18
      czkawka_gui/src/connect_things/connect_button_move.rs
  47. 6
      czkawka_gui/src/connect_things/connect_button_save.rs
  48. 6
      czkawka_gui/src/connect_things/connect_button_search.rs
  49. 7
      czkawka_gui/src/connect_things/connect_change_language.rs
  50. 36
      czkawka_gui/src/connect_things/connect_popovers.rs
  51. 44
      czkawka_gui/src/connect_things/connect_progress_window.rs
  52. 16
      czkawka_gui/src/connect_things/connect_selection_of_directories.rs
  53. 26
      czkawka_gui/src/connect_things/connect_settings.rs
  54. 20
      czkawka_gui/src/gui_structs/gui_about.rs
  55. 48
      czkawka_gui/src/gui_structs/gui_bottom_buttons.rs
  56. 6
      czkawka_gui/src/gui_structs/gui_compare_images.rs
  57. 6
      czkawka_gui/src/gui_structs/gui_data.rs
  58. 6
      czkawka_gui/src/gui_structs/gui_header.rs
  59. 197
      czkawka_gui/src/gui_structs/gui_main_notebook.rs
  60. 24
      czkawka_gui/src/gui_structs/gui_popovers.rs
  61. 12
      czkawka_gui/src/gui_structs/gui_progress_dialog.rs
  62. 128
      czkawka_gui/src/gui_structs/gui_settings.rs
  63. 81
      czkawka_gui/src/gui_structs/gui_upper_notebook.rs
  64. 13
      czkawka_gui/src/help_functions.rs
  65. 16
      czkawka_gui/src/initialize_gui.rs
  66. 34
      czkawka_gui/src/localizer_gui.rs
  67. 1
      czkawka_gui/src/main.rs
  68. 40
      czkawka_gui/src/saving_loading.rs
  69. 2
      czkawka_gui/ui/about_dialog.glade
  70. 2
      czkawka_gui/ui/main_window.glade
  71. 2
      data/com.github.qarmin.czkawka.metainfo.xml
  72. 1
      i18n/cs/czkawka_core.ftl
  73. 1
      i18n/de/czkawka_core.ftl
  74. 1
      i18n/en/czkawka_core.ftl
  75. 1
      i18n/es/czkawka_core.ftl
  76. 1
      i18n/fr/czkawka_core.ftl
  77. 1
      i18n/it/czkawka_core.ftl
  78. 1
      i18n/ja/czkawka_core.ftl
  79. 1
      i18n/pl/czkawka_core.ftl
  80. 1
      i18n/pt/czkawka_core.ftl
  81. 1
      i18n/ru/czkawka_core.ftl
  82. 1
      i18n/uk/czkawka_core.ftl
  83. 1
      i18n/zh/czkawka_core.ftl
  84. 2
      misc/cargo/PublishCore.sh
  85. 2
      misc/cargo/PublishOther.sh
  86. 2
      snap/snapcraft.yaml

6
Cargo.lock generated

@ -555,7 +555,7 @@ dependencies = [
[[package]]
name = "czkawka_cli"
version = "3.3.1"
version = "4.0.0"
dependencies = [
"czkawka_core",
"img_hash",
@ -564,7 +564,7 @@ dependencies = [
[[package]]
name = "czkawka_core"
version = "3.3.1"
version = "4.0.0"
dependencies = [
"audiotags",
"bincode",
@ -598,7 +598,7 @@ dependencies = [
[[package]]
name = "czkawka_gui"
version = "3.3.1"
version = "4.0.0"
dependencies = [
"chrono",
"crossbeam-channel",

2
Changelog.md

@ -1,4 +1,4 @@
## Version 4.0.0 - ?
## Version 4.0.0 - 20.01.2022r
- Multithreading support for collecting files to check(2/3x speedup on 4 thread processor and SSD) - [#502](https://github.com/qarmin/czkawka/pull/502), [#504](https://github.com/qarmin/czkawka/pull/504)
- Add multiple translations - Polish, Italian, French, German, Russian ... - [#469](https://github.com/qarmin/czkawka/pull/469), [#508](https://github.com/qarmin/czkawka/pull/508), [5be](https://github.com/qarmin/czkawka/commit/5be801e76395855f07ab1da43cdbb8bd0b843834)
- Add support for finding similar videos - [#460](https://github.com/qarmin/czkawka/pull/460)

4
czkawka_cli/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "czkawka_cli"
version = "3.3.1"
version = "4.0.0"
authors = ["Rafał Mikrut <mikrutrafal@protonmail.com>"]
edition = "2018"
description = "CLI frontend of Czkawka"
@ -9,7 +9,7 @@ homepage = "https://github.com/qarmin/czkawka"
repository = "https://github.com/qarmin/czkawka"
[dependencies]
czkawka_core = { path = "../czkawka_core", version = "3.3.1" }
czkawka_core = { path = "../czkawka_core", version = "4.0.0" }
structopt = "0.3.25"
# For enum types

2
czkawka_core/Cargo.toml

@ -1,6 +1,6 @@
[package]
name = "czkawka_core"
version = "3.3.1"
version = "4.0.0"
authors = ["Rafał Mikrut <mikrutrafal@protonmail.com>"]
edition = "2018"
description = "Core of Czkawka app"

2
czkawka_core/i18n.toml

@ -9,5 +9,5 @@ fallback_language = "en"
# (Required) The path to the assets directory.
# The paths inside the assets directory should be structured like so:
# `assets_dir/{language}/{domain}.ftl`
assets_dir = "../i18n"
assets_dir = "i18n"

25
czkawka_core/i18n/cs/czkawka_core.ftl

@ -0,0 +1,25 @@
# Core
core_similarity_very_high = Velmi vysoká
core_similarity_high = Vysoká
core_similarity_medium = Střední
core_similarity_small = Malá
core_similarity_very_small = Velmi malá
core_similarity_minimal = Minimální
core_cannot_open_dir = Nelze otevřít dir { $dir }, důvod { $reason }
core_cannot_read_entry_dir = Nelze číst záznam v adresáři { $dir }, důvod { $reason }
core_cannot_read_metadata_dir = Metadata nelze číst v adresáři { $dir }, důvod { $reason }
core_file_not_utf8_name = Soubor { $name } nemá platný název UTF-8 (některé znaky nemusí být zobrazeny)
core_file_modified_before_epoch = Soubor { $name } se zdá být před Unix Epoch upraven
core_folder_modified_before_epoch = Složka { $name } se zdá být upravena před Unixem Epoch
core_file_no_modification_date = Nelze získat datum úpravy ze souboru { $name }, důvod { $reason }
core_folder_no_modification_date = Nelze získat datum úpravy ze složky { $name }, důvod { $reason }
core_missing_no_chosen_included_directory = Musí být uveden alespoň jeden adresář
core_directory_wildcard_no_supported = Adresáře: Zástupné znaky v cestě nejsou podporovány, ignoruji { $path }
core_directory_relative_path = Adresáře: Zástupné znaky v cestě nejsou podporovány, ignoruji { $path }
core_directory_must_exists = Adresáře: Poskytnutá cesta ke složce musí skončit, ignoruji { $path }
core_directory_must_be_directory = Adresáře: Poskytnutá cesta musí směřovat do adresáře, ignoruje { $path }
core_included_directory_zero_valid_directories = CHYBA zahrnutí adresáře: Nenalezena ani jedna správná cesta k zahrnutí, která je vyžadována
core_excluded_directory_pointless_slash = Adresáře: Vyloučení / je bezúčelné, protože to znamená, že žádné soubory nebudou naskenovány
core_directory_overlap = Adresáře: Všechny adresáře pro vyhledávání se překrývají s vyloučením adresářů
core_ffmpeg_not_found = Nelze najít správnou instalaci FFmpeg
core_ffmpeg_missing_in_snap = Podobná videa v současné době nefungují se snapem, pokud chcete nápovědu sledovat - { $url }

25
czkawka_core/i18n/de/czkawka_core.ftl

@ -0,0 +1,25 @@
# Core
core_similarity_very_high = Sehr Hoch
core_similarity_high = Hoch
core_similarity_medium = Mittel
core_similarity_small = Klein
core_similarity_very_small = Sehr klein
core_similarity_minimal = Minimale
core_cannot_open_dir = Verzeichnis { $dir } kann nicht geöffnet werden, Grund { $reason }
core_cannot_read_entry_dir = Kann Eintrag in Verzeichnis { $dir } nicht lesen, Grund { $reason }
core_cannot_read_metadata_dir = Metadaten können in Verzeichnis { $dir } nicht gelesen werden, Grund { $reason }
core_file_not_utf8_name = Datei { $name } hat keinen gültigen UTF-8-Namen (einige Zeichen dürfen nicht angezeigt werden)
core_file_modified_before_epoch = Datei { $name } scheint vor der Unix-Epoche geändert zu werden
core_folder_modified_before_epoch = Ordner { $name } scheint vor der Unix-Epoche geändert zu werden
core_file_no_modification_date = Konnte das Änderungsdatum von Datei { $name } nicht abrufen, Grund { $reason }
core_folder_no_modification_date = Konnte das Änderungsdatum aus dem Ordner { $name } nicht abrufen, Grund { $reason }
core_missing_no_chosen_included_directory = Mindestens ein Verzeichnis muss angegeben werden
core_directory_wildcard_no_supported = Verzeichnisse: Wildcards im Pfad werden nicht unterstützt, { $path } wird ignoriert
core_directory_relative_path = Verzeichnisse: Relativer Pfad wird nicht unterstützt, { $path } wird ignoriert
core_directory_must_exists = Verzeichnisse: Der angegebene Ordnerpfad muss beendet werden, { $path } wird ignoriert
core_directory_must_be_directory = Verzeichnisse: Der angegebene Pfad muss auf das Verzeichnis zeigen und { $path } ignorieren
core_included_directory_zero_valid_directories = Inklusive Verzeichnis-FEHLER: Nicht einmal einen korrekten Pfad zu inkludiert, der erforderlich ist
core_excluded_directory_pointless_slash = Verzeichnisse: Ausschließen / ist sinnlos, weil es bedeutet, dass keine Dateien gescannt werden
core_directory_overlap = Verzeichnisse: Alle Verzeichnisse zum Suchen von Überlappungen mit ausgeschlossenen Verzeichnissen
core_ffmpeg_not_found = Keine richtige Installation von FFmpeg gefunden
core_ffmpeg_missing_in_snap = Ähnliche Videos funktionieren derzeit nicht mit Snap, wenn du Hilfe möchtest - { $url }

31
czkawka_core/i18n/en/czkawka_core.ftl

@ -0,0 +1,31 @@
# Core
core_similarity_very_high = Very High
core_similarity_high = High
core_similarity_medium = Medium
core_similarity_small = Small
core_similarity_very_small = Very Small
core_similarity_minimal = Minimal
core_cannot_open_dir = Cannot open dir {$dir}, reason {$reason}
core_cannot_read_entry_dir = Cannot read entry in dir {$dir}, reason {$reason}
core_cannot_read_metadata_dir = Cannot read metadata in dir {$dir}, reason {$reason}
core_file_not_utf8_name = File {$name} does not have a valid UTF-8 name (some characters may not be shown)
core_file_modified_before_epoch = File {$name} seems to be modified before Unix Epoch
core_folder_modified_before_epoch = Folder {$name} seems to be modified before Unix Epoch
core_file_no_modification_date = Unable to get modification date from file {$name}, reason {$reason}
core_folder_no_modification_date = Unable to get modification date from folder {$name}, reason {$reason}
core_missing_no_chosen_included_directory = At least one directory must be provided
core_directory_wildcard_no_supported = Directories: Wildcards in path are not supported, ignoring { $path }
core_directory_relative_path = Directories: Relative path are not supported, ignoring { $path }
core_directory_must_exists = Directories: Provided folder path must exist, ignoring { $path }
core_directory_must_be_directory = Directories: Provided path must point at the directory, ignoring { $path }
core_included_directory_zero_valid_directories = Included Directory ERROR: Not found even one correct path to included which is required
core_excluded_directory_pointless_slash = Directories: Excluding / is pointless, because it means that no files will be scanned
core_directory_overlap = Directories: All directories to search overlaps with excluded directories
core_ffmpeg_not_found = Cannot find proper installation of FFmpeg
core_ffmpeg_missing_in_snap = Similar Videos don't work currently with snap, if you want help look at - { $url }
core_saving_to_cache = Saved to file { $number } cache entries
core_loading_from_cache = Loaded from cache { $number } entries

25
czkawka_core/i18n/es/czkawka_core.ftl

@ -0,0 +1,25 @@
# Core
core_similarity_very_high = Muy alta
core_similarity_high = Alta
core_similarity_medium = Medio
core_similarity_small = Pequeño
core_similarity_very_small = Muy pequeño
core_similarity_minimal = Mínimo
core_cannot_open_dir = No se puede abrir el directorio { $dir }, razón { $reason }
core_cannot_read_entry_dir = No se puede leer la entrada en directorio { $dir }, razón { $reason }
core_cannot_read_metadata_dir = No se pueden leer metadatos en el directorio { $dir }, razón { $reason }
core_file_not_utf8_name = El archivo { $name } no tiene un nombre UTF-8 válido (algunos caracteres pueden no mostrarse)
core_file_modified_before_epoch = El archivo { $name } parece ser modificado antes de Unix Epoch
core_folder_modified_before_epoch = La carpeta { $name } parece ser modificada antes del Epoch Unix
core_file_no_modification_date = No se puede obtener la fecha de modificación del archivo { $name }, razón { $reason }
core_folder_no_modification_date = No se puede obtener la fecha de modificación de la carpeta { $name }, razón { $reason }
core_missing_no_chosen_included_directory = Debe proporcionarse al menos un directorio
core_directory_wildcard_no_supported = Directorios: Los comodines en la ruta no son compatibles, ignorando { $path }
core_directory_relative_path = Directorios: No se admite la ruta relativa, ignorando { $path }
core_directory_must_exists = Directorios: La ruta de la carpeta debe salir, ignorando { $path }
core_directory_must_be_directory = Directorios: La ruta proporcionada debe apuntar al directorio, ignorando { $path }
core_included_directory_zero_valid_directories = ERROR del directorio incluido: No se ha encontrado ni una ruta correcta a incluida que es necesaria
core_excluded_directory_pointless_slash = Directorios: Excluyendo / es inútil, ya que no se analizarán archivos
core_directory_overlap = Directorios: Todos los directorios para buscar superposiciones con directorios excluidos
core_ffmpeg_not_found = No se puede encontrar la instalación correcta de FFmpeg
core_ffmpeg_missing_in_snap = Los Videos Similares no funcionan actualmente con el snap, si quieres ayuda mira - { $url }

25
czkawka_core/i18n/fr/czkawka_core.ftl

@ -0,0 +1,25 @@
# Core
core_similarity_very_high = Très haute
core_similarity_high = Haute
core_similarity_medium = Moyenne
core_similarity_small = Basse
core_similarity_very_small = Très basse
core_similarity_minimal = Minimale
core_cannot_open_dir = Impossible d’ouvrir le répertoire { $dir }, raison: { $reason }
core_cannot_read_entry_dir = Impossible de lire l'entrée dans le répertoire { $dir }, raison: { $reason }
core_cannot_read_metadata_dir = Impossible de lire les métadonnées dans le répertoire { $dir }, raison: { $reason }
core_file_not_utf8_name = Le fichier { $name } n'a pas de nom UTF-8 valide (certains caractères ne peuvent pas être affichés)
core_file_modified_before_epoch = Le fichier { $name } semble avoir été modifié avant l'époque Unix
core_folder_modified_before_epoch = Le dossier { $name } semble avoir été modifié avant l'époque Unix
core_file_no_modification_date = Impossible d'obtenir la date de modification du fichier { $name }, raison: { $reason }
core_folder_no_modification_date = Impossible d'obtenir la date de modification du dossier { $name }, raison: { $reason }
core_missing_no_chosen_included_directory = Au moins un répertoire doit être fourni
core_directory_wildcard_no_supported = Répertoires : Les jokers dans le chemin ne sont pas pris en charge, ignorant { $path }
core_directory_relative_path = Répertoires : Le chemin relatif n'est pas pris en charge, ignorant { $path }
core_directory_must_exists = Répertoires : Le chemin du dossier fourni doit se terminer, ignorant { $path }
core_directory_must_be_directory = Répertoires : Le chemin fourni doit pointer dans le répertoire, { $path }
core_included_directory_zero_valid_directories = ERREUR de répertoire inclus : Aucun chemin n'a été trouvé, même un chemin correct à inclure qui est requis
core_excluded_directory_pointless_slash = Répertoires: Exclure / est inutile, car cela signifie qu'aucun fichier ne sera scanné
core_directory_overlap = Répertoires : Tous les répertoires pour rechercher des chevauchements avec des répertoires exclus
core_ffmpeg_not_found = Impossible de trouver une installation correcte de FFmpeg
core_ffmpeg_missing_in_snap = Les vidéos similaires ne fonctionnent pas actuellement avec un instantané, si vous voulez de l'aide - { $url }

25
czkawka_core/i18n/it/czkawka_core.ftl

@ -0,0 +1,25 @@
# Core
core_similarity_very_high = Altissima
core_similarity_high = Alta
core_similarity_medium = Media
core_similarity_small = Piccola
core_similarity_very_small = Piccolissima
core_similarity_minimal = Minima
core_cannot_open_dir = Impossibile aprire cartella { $dir }, motivo { $reason }
core_cannot_read_entry_dir = Impossibile leggere elemento nella cartella { $dir }, ragione { $reason }
core_cannot_read_metadata_dir = Impossibile leggere metadati nella cartella { $dir }, ragione { $reason }
core_file_not_utf8_name = Il file { $name } non ha un nome UTF-8 valido (alcuni caratteri potrebbero non essere mostrati)
core_file_modified_before_epoch = Il file { $name } sembra essere stato modificato prima dell'Epoca Unix
core_folder_modified_before_epoch = La cartella { $name } sembra essere stato modificata prima dell'Epoca Unix
core_file_no_modification_date = Impossibile recuperare data di modifica dal file { $name }, ragione { $reason }
core_folder_no_modification_date = Impossibile recuperare data di modifica dalla cartella { $name }, ragione { $reason }
core_missing_no_chosen_included_directory = Almeno una directory deve essere fornita
core_directory_wildcard_no_supported = Cartelle: i caratteri jolly nel percorso non sono supportati, ignorando { $path }
core_directory_relative_path = Directories: Il percorso relativo non è supportato, ignorando { $path }
core_directory_must_exists = Directories: Il percorso della cartella fornito deve uscire, ignorando { $path }
core_directory_must_be_directory = Directories: Il percorso fornito deve puntare alla directory, ignorando { $path }
core_included_directory_zero_valid_directories = ERRORE Directory incluso: Non trovato nemmeno un percorso corretto incluso che è richiesto
core_excluded_directory_pointless_slash = Cartelle: Escludere / è inutile, perché significa che nessun file verrà scansionato
core_directory_overlap = Directories: Tutte le directory per cercare sovrapposizioni con directory escluse
core_ffmpeg_not_found = Impossibile trovare la corretta installazione di FFmpeg
core_ffmpeg_missing_in_snap = Video simili non funzionano attualmente con snap, se si desidera aiutare a guardare - { $url }

25
czkawka_core/i18n/ja/czkawka_core.ftl

@ -0,0 +1,25 @@
# Core
core_similarity_very_high = 非常に高い
core_similarity_high = 高い
core_similarity_medium = ミディアム
core_similarity_small = 小
core_similarity_very_small = 非常に小さい
core_similarity_minimal = 最小
core_cannot_open_dir = ディレクトリを開くことができません { $dir }、理由 { $reason }
core_cannot_read_entry_dir = Dir { $dir } でエントリを読み込めません、理由 { $reason }
core_cannot_read_metadata_dir = Dir { $dir } でメタデータを読み込めません、理由 { $reason }
core_file_not_utf8_name = ファイル { $name } に有効な UTF-8 名がありません (一部の文字は表示されない可能性があります)
core_file_modified_before_epoch = ファイル { $name } は Unix Epoch より前に変更されているようです
core_folder_modified_before_epoch = フォルダ { $name } は、Unix Epoch の前に変更されているようです
core_file_no_modification_date = ファイル { $name } から変更日を取得できません、理由 { $reason }
core_folder_no_modification_date = フォルダ { $name } から変更日を取得できません、理由 { $reason }
core_missing_no_chosen_included_directory = 少なくとも 1 つのディレクトリを指定する必要があります。
core_directory_wildcard_no_supported = ディレクトリ: パス内のワイルドカードはサポートされていません。 { $path } を無視してください
core_directory_relative_path = ディレクトリ: 相対パスはサポートされていません。 { $path } を無視してください
core_directory_must_exists = ディレクトリ: 指定されたフォルダパスは、 { $path } を無視して終了する必要があります
core_directory_must_be_directory = ディレクトリ: 指定されたパスはディレクトリを指す必要があります。 { $path } を無視します
core_included_directory_zero_valid_directories = 含まれるディレクトリエラー: 必須の正しいパスが1つも見つかりません
core_excluded_directory_pointless_slash = ディレクトリ: ファイルがスキャンされないことを意味するため、除外/無意味です
core_directory_overlap = ディレクトリ: 除外されたディレクトリとオーバーラップを検索するすべてのディレクトリ
core_ffmpeg_not_found = 適切なFFmpegのインストールが見つかりません
core_ffmpeg_missing_in_snap = ヘルプを見たい場合は、現在同様のビデオはスナップでは動作しません - { $url }

28
czkawka_core/i18n/pl/czkawka_core.ftl

@ -0,0 +1,28 @@
# Core
core_similarity_very_high = Bardzo Duże
core_similarity_high = Duże
core_similarity_medium = Średnie
core_similarity_small = Małe
core_similarity_very_small = Bardzo Małe
core_similarity_minimal = Minimalne
core_cannot_open_dir = Nie można otworzyć folderu { $dir }, powód { $reason }
core_cannot_read_entry_dir = Nie można odczytać danych z folderu { $dir }, powód { $reason }
core_cannot_read_metadata_dir = Nie można odczytać metadanych folderu { $dir }, powód { $reason }
core_file_not_utf8_name = Plik { $name } nie posiada nazwy zakodowanej za pomocą UTF-8(niektóre znaki mogą się nie wyświetlać)
core_file_modified_before_epoch = Plik { $name } ma datę modyfikacji sprzed epoki unixa
core_folder_modified_before_epoch = Folder { $name } ma datę modyfikacji sprzed epoki unixa
core_file_no_modification_date = Nie udało się pobrać daty modyfikacji z pliku { $name }, powód { $reason }
core_folder_no_modification_date = Nie udało się pobrać daty modyfikacji z folderu { $name }, powód { $reason }
core_missing_no_chosen_included_directory = Należy podać co najmniej jeden katalog
core_directory_wildcard_no_supported = Katalogi: Wildcard na ścieżce nie są obsługiwane, ignorowanie { $path }
core_directory_relative_path = Katalogi: Ścieżka względna nie jest wspierana, ignorowanie { $path }
core_directory_must_exists = Katalogi: Podana ścieżka do folderu musi istnieć, ignorowanie { $path }
core_directory_must_be_directory = Katalogi: Podana ścieżka musi wskazywać na katalog, ignorowanie { $path }
core_included_directory_zero_valid_directories = Błąd katalogów do przeszukiwania: Nie znaleziono nawet jednej poprawnej ścieżki do przeszukania
core_excluded_directory_pointless_slash = Katalogi: Wykluczanie folderu / jest bezcelowe, ponieważ oznacza to, że żadne pliki nie zostaną sprawdzone
core_directory_overlap = Katalogi: Wszystkie katalogi do wyszukiwania pokrywają się z wykluczonymi
core_ffmpeg_not_found = Nie można odnaleźć poprawnej instalacji FFmpeg
core_ffmpeg_missing_in_snap = Wyszukiwanie podobnych filmów nie działa obecnie w snapach, jeśli chcesz pomóc spójrz na - { $url }
core_saving_to_cache = Saved to file { $number } cache entries
core_loading_from_cache = Loaded from cache { $number } entries

25
czkawka_core/i18n/pt/czkawka_core.ftl

@ -0,0 +1,25 @@
# Core
core_similarity_very_high = Muito alto
core_similarity_high = Alto
core_similarity_medium = Média
core_similarity_small = Pequeno
core_similarity_very_small = Muito Pequeno
core_similarity_minimal = Mínimo
core_cannot_open_dir = Não é possível abrir o diretório { $dir }, razão { $reason }
core_cannot_read_entry_dir = Não é possível ler a entrada no diretório { $dir }, razão { $reason }
core_cannot_read_metadata_dir = Não é possível ler os metadados no diretório { $dir }, razão { $reason }
core_file_not_utf8_name = Arquivo { $name } não tem nome UTF-8 válido (alguns caracteres não podem ser exibidos)
core_file_modified_before_epoch = Arquivo { $name } parece ser modificado antes do Epoch Unix
core_folder_modified_before_epoch = A pasta { $name } parece ser modificada antes do Epoch Unix
core_file_no_modification_date = Não foi possível obter a data de modificação do arquivo { $name }, motivo { $reason }
core_folder_no_modification_date = Não foi possível obter a data de modificação da pasta { $name }, motivo { $reason }
core_missing_no_chosen_included_directory = Pelo menos um diretório deve ser fornecido
core_directory_wildcard_no_supported = Directorias: Caracteres curinga no caminho não são suportados, ignorando { $path }
core_directory_relative_path = Directorias: Caminho relativo não são suportados, ignorando { $path }
core_directory_must_exists = Directórios: Caminho da pasta fornecida deve sair, ignorando { $path }
core_directory_must_be_directory = Diretórios: Caminho fornecido deve apontar para o diretório, ignorando { $path }
core_included_directory_zero_valid_directories = ERRO do Diretório incluído: Não foi encontrado nenhum caminho correto que é necessário incluir
core_excluded_directory_pointless_slash = Directorias: Excluir / não faz sentido, porque significa que nenhum arquivo será escaneado
core_directory_overlap = Diretórios: Todos os diretórios para pesquisar sobreposições com diretórios excluídos
core_ffmpeg_not_found = Instalação adequada do FFmpeg não encontrada
core_ffmpeg_missing_in_snap = Vídeos similares não funcionam atualmente com o snap, se você quiser ajudar a olhar - { $url }

25
czkawka_core/i18n/ru/czkawka_core.ftl

@ -0,0 +1,25 @@
# Core
core_similarity_very_high = Очень высокий
core_similarity_high = Высокий
core_similarity_medium = Средний
core_similarity_small = Маленький
core_similarity_very_small = Очень маленький
core_similarity_minimal = Минимальный
core_cannot_open_dir = Невозможно открыть каталог { $dir }, причина { $reason }
core_cannot_read_entry_dir = Невозможно прочитать запись в директории { $dir }, причина { $reason }
core_cannot_read_metadata_dir = Невозможно прочитать метаданные в директории { $dir }, причина { $reason }
core_file_not_utf8_name = У файла { $name } неверное имя UTF-8 (некоторые символы не могут быть показаны)
core_file_modified_before_epoch = Файл { $name } может быть изменен до начала эпохи Unix
core_folder_modified_before_epoch = Папка { $name } изменяется до начала эпохи Unix
core_file_no_modification_date = Не удается получить дату изменения из файла { $name }, причина { $reason }
core_folder_no_modification_date = Не удается получить дату изменения из папки { $name }, причина { $reason }
core_missing_no_chosen_included_directory = Должен быть указан хотя бы один каталог
core_directory_wildcard_no_supported = Директории: Не поддерживаются шаблоны в директории, игнорируется { $path }
core_directory_relative_path = Директории: Относительный путь не поддерживается, игнорируется { $path }
core_directory_must_exists = Директории: Указанный путь к папке должен быть закрыт, игнорируется { $path }
core_directory_must_be_directory = Директории: Указанный путь должен указывать на директорию, игнорируя { $path }
core_included_directory_zero_valid_directories = Включенный каталог ОШИБКА: Не найден даже один правильный путь к включённому которому требуется
core_excluded_directory_pointless_slash = Директории: Исключение / бессмысленно, потому что ни один файл не будет просканирован
core_directory_overlap = Каталоги: Все директории для поиска совпадают с исключенными каталогами
core_ffmpeg_not_found = Не удается найти надлежащую установку FFmpeg
core_ffmpeg_missing_in_snap = Похожие видео не работают в данный момент, если вы хотите помочь посмотреть - { $url }

25
czkawka_core/i18n/uk/czkawka_core.ftl

@ -0,0 +1,25 @@
# Core
core_similarity_very_high = Дуже високий
core_similarity_high = Високий
core_similarity_medium = Медіум
core_similarity_small = Маленький
core_similarity_very_small = Дуже малий
core_similarity_minimal = Мінімальні
core_cannot_open_dir = Не вдалося відкрити папку { $dir }, причина { $reason }
core_cannot_read_entry_dir = Не вдалося прочитати запис в папці { $dir }, причина { $reason }
core_cannot_read_metadata_dir = Не вдалося прочитати метадані в папці { $dir }, причина { $reason }
core_file_not_utf8_name = Файл { $name } не має припустимого імені UTF-8 (деякі символи не можуть бути показані)
core_file_modified_before_epoch = Файл { $name } Схоже, змінено перед Unix Epoch
core_folder_modified_before_epoch = Папка { $name } здається змінена до Unix Epoch
core_file_no_modification_date = Не вдалося отримати дату модифікації з файлу { $name }, причина { $reason }
core_folder_no_modification_date = Не вдалося отримати дату модифікації з папки { $name }, причина { $reason }
core_missing_no_chosen_included_directory = Необхідно вказати принаймні один каталог
core_directory_wildcard_no_supported = Директорія: Шаблони в шляху не підтримуються, ігноруючи { $path }
core_directory_relative_path = Каталог: Відносний шлях не підтримується, ігноруючи { $path }
core_directory_must_exists = Каталог: Наданий шлях до папки повинен вийти, ігноруючи { $path }
core_directory_must_be_directory = Каталог: Наданий шлях повинен вказувати на каталог, ігноруючи { $path }
core_included_directory_zero_valid_directories = Включена помилка в каталозі: не знайдено навіть один правильний шлях до включеного, який є обов'язковим
core_excluded_directory_pointless_slash = Теки: виключення / без урахування безточних, тому що це означає, що файли не будуть скановані
core_directory_overlap = Каталоги: Усі каталоги для пошуку перетинаються з виключеними каталогами
core_ffmpeg_not_found = Не вдалося знайти правильне встановлення FFmpeg
core_ffmpeg_missing_in_snap = Подібні відео в даний час не працюють з знімком, якщо ви хочете, щоб допомогти вам переглянути - { $url }

25
czkawka_core/i18n/zh/czkawka_core.ftl

@ -0,0 +1,25 @@
# Core
core_similarity_very_high = 非常高
core_similarity_high = 高
core_similarity_medium = 中
core_similarity_small = 小的
core_similarity_very_small = 非常小
core_similarity_minimal = 最小化
core_cannot_open_dir = 无法打开目录 { $dir },因为 { $reason }
core_cannot_read_entry_dir = 无法在目录 { $dir } 中读取条目,因为 { $reason }
core_cannot_read_metadata_dir = 无法读取目录 { $dir } 中的元数据,因为 { $reason }
core_file_not_utf8_name = 文件 { $name } 无效的 UTF-8 名称 (可能无法显示一些字符)
core_file_modified_before_epoch = 文件 { $name } 似乎在 Unix Epoch前被修改
core_folder_modified_before_epoch = 文件夹 { $name } 似乎在Unix Epoch前被修改
core_file_no_modification_date = 无法从文件 { $name } 获取修改日期,因为 { $reason }
core_folder_no_modification_date = 无法从文件夹 { $name } 获取修改日期,因为 { $reason }
core_missing_no_chosen_included_directory = 必须至少提供一个目录
core_directory_wildcard_no_supported = 目录:不支持路径中的通配符,忽略 { $path }
core_directory_relative_path = 目录:不支持相对路径,忽略 { $path }
core_directory_must_exists = 目录:提供的文件夹路径必须退出,忽略 { $path }
core_directory_must_be_directory = 目录:提供的路径必须指向目录,忽略 { $path }
core_included_directory_zero_valid_directories = 包括目录错误:即使找不到一个需要包含的正确路径
core_excluded_directory_pointless_slash = 目录:不包括 / 无意义,因为它意味着没有文件将被扫描
core_directory_overlap = 目录:所有要搜索与排除目录重叠的目录
core_ffmpeg_not_found = 找不到正确安装FFmpeg
core_ffmpeg_missing_in_snap = 类似的视频目前不适用于快照,如果您想要帮助查看- { $url }

16
czkawka_core/src/big_file.rs

@ -20,8 +20,8 @@ use crate::common_extensions::Extensions;
use crate::common_items::ExcludedItems;
use crate::common_messages::Messages;
use crate::common_traits::{DebugPrint, PrintResults, SaveResults};
use crate::fl;
use crate::localizer::generate_translation_hashmap;
use crate::flc;
use crate::localizer_core::generate_translation_hashmap;
#[derive(Debug)]
pub struct ProgressData {
@ -173,7 +173,7 @@ impl BigFile {
let read_dir = match fs::read_dir(&current_folder) {
Ok(t) => t,
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_cannot_open_dir",
generate_translation_hashmap(vec![("dir", current_folder.display().to_string()), ("reason", e.to_string())])
));
@ -186,7 +186,7 @@ impl BigFile {
let entry_data = match entry {
Ok(t) => t,
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_cannot_read_entry_dir",
generate_translation_hashmap(vec![("dir", current_folder.display().to_string()), ("reason", e.to_string())])
));
@ -196,7 +196,7 @@ impl BigFile {
let metadata: Metadata = match entry_data.metadata() {
Ok(t) => t,
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_cannot_read_metadata_dir",
generate_translation_hashmap(vec![("dir", current_folder.display().to_string()), ("reason", e.to_string())])
));
@ -224,7 +224,7 @@ impl BigFile {
let file_name_lowercase: String = match entry_data.file_name().into_string() {
Ok(t) => t,
Err(_inspected) => {
warnings.push(fl!(
warnings.push(flc!(
"core_file_not_utf8_name",
generate_translation_hashmap(vec![("name", entry_data.path().display().to_string())])
));
@ -249,7 +249,7 @@ impl BigFile {
Ok(t) => match t.duration_since(UNIX_EPOCH) {
Ok(d) => d.as_secs(),
Err(_inspected) => {
warnings.push(fl!(
warnings.push(flc!(
"core_file_modified_before_epoch",
generate_translation_hashmap(vec![("name", current_file_name.display().to_string())])
));
@ -257,7 +257,7 @@ impl BigFile {
}
},
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_file_no_modification_date",
generate_translation_hashmap(vec![("name", current_file_name.display().to_string()), ("reason", e.to_string())])
));

16
czkawka_core/src/broken_files.rs

@ -19,8 +19,8 @@ use crate::common_extensions::Extensions;
use crate::common_items::ExcludedItems;
use crate::common_messages::Messages;
use crate::common_traits::*;
use crate::fl;
use crate::localizer::generate_translation_hashmap;
use crate::flc;
use crate::localizer_core::generate_translation_hashmap;
use crate::similar_images::{AUDIO_FILES_EXTENSIONS, IMAGE_RS_BROKEN_FILES_EXTENSIONS, ZIP_FILES_EXTENSIONS};
#[derive(Debug)]
@ -218,7 +218,7 @@ impl BrokenFiles {
let read_dir = match fs::read_dir(&current_folder) {
Ok(t) => t,
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_cannot_open_dir",
generate_translation_hashmap(vec![("dir", current_folder.display().to_string()), ("reason", e.to_string())])
));
@ -231,7 +231,7 @@ impl BrokenFiles {
let entry_data = match entry {
Ok(t) => t,
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_cannot_read_entry_dir",
generate_translation_hashmap(vec![("dir", current_folder.display().to_string()), ("reason", e.to_string())])
));
@ -241,7 +241,7 @@ impl BrokenFiles {
let metadata: Metadata = match entry_data.metadata() {
Ok(t) => t,
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_cannot_read_metadata_dir",
generate_translation_hashmap(vec![("dir", current_folder.display().to_string()), ("reason", e.to_string())])
));
@ -269,7 +269,7 @@ impl BrokenFiles {
let file_name_lowercase: String = match entry_data.file_name().into_string() {
Ok(t) => t,
Err(_inspected) => {
warnings.push(fl!(
warnings.push(flc!(
"core_file_not_utf8_name",
generate_translation_hashmap(vec![("name", entry_data.path().display().to_string())])
));
@ -298,7 +298,7 @@ impl BrokenFiles {
Ok(t) => match t.duration_since(UNIX_EPOCH) {
Ok(d) => d.as_secs(),
Err(_inspected) => {
warnings.push(fl!(
warnings.push(flc!(
"core_file_modified_before_epoch",
generate_translation_hashmap(vec![("name", current_file_name.display().to_string())])
));
@ -306,7 +306,7 @@ impl BrokenFiles {
}
},
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_file_no_modification_date",
generate_translation_hashmap(vec![("name", current_file_name.display().to_string()), ("reason", e.to_string())])
));

26
czkawka_core/src/common_dir_traversal.rs

@ -14,8 +14,8 @@ use rayon::prelude::*;
use crate::common_directory::Directories;
use crate::common_extensions::Extensions;
use crate::common_items::ExcludedItems;
use crate::fl;
use crate::localizer::generate_translation_hashmap;
use crate::flc;
use crate::localizer_core::generate_translation_hashmap;
#[derive(Debug)]
pub struct ProgressData {
@ -372,7 +372,7 @@ where
let read_dir = match fs::read_dir(&current_folder) {
Ok(t) => t,
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_cannot_open_dir",
generate_translation_hashmap(vec![("dir", current_folder.display().to_string()), ("reason", e.to_string())])
));
@ -385,7 +385,7 @@ where
let entry_data = match entry {
Ok(t) => t,
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_cannot_read_entry_dir",
generate_translation_hashmap(vec![("dir", current_folder.display().to_string()), ("reason", e.to_string())])
));
@ -395,7 +395,7 @@ where
let metadata: Metadata = match entry_data.metadata() {
Ok(t) => t,
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_cannot_read_metadata_dir",
generate_translation_hashmap(vec![("dir", current_folder.display().to_string()), ("reason", e.to_string())])
));
@ -436,7 +436,7 @@ where
Ok(t) => match t.duration_since(UNIX_EPOCH) {
Ok(d) => d.as_secs(),
Err(_inspected) => {
warnings.push(fl!(
warnings.push(flc!(
"core_folder_modified_before_epoch",
generate_translation_hashmap(vec![("name", current_folder.display().to_string())])
));
@ -444,7 +444,7 @@ where
}
},
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_folder_no_modification_date",
generate_translation_hashmap(vec![("name", current_folder.display().to_string()), ("reason", e.to_string())])
));
@ -460,7 +460,7 @@ where
let file_name_lowercase: String = match entry_data.file_name().into_string() {
Ok(t) => t,
Err(_inspected) => {
warnings.push(fl!(
warnings.push(flc!(
"core_file_not_utf8_name",
generate_translation_hashmap(vec![("name", entry_data.path().display().to_string())])
));
@ -487,7 +487,7 @@ where
Ok(t) => match t.duration_since(UNIX_EPOCH) {
Ok(d) => d.as_secs(),
Err(_inspected) => {
warnings.push(fl!(
warnings.push(flc!(
"core_file_modified_before_epoch",
generate_translation_hashmap(vec![("name", current_file_name.display().to_string())])
));
@ -495,7 +495,7 @@ where
}
},
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_file_no_modification_date",
generate_translation_hashmap(vec![("name", current_file_name.display().to_string()), ("reason", e.to_string())])
));
@ -521,7 +521,7 @@ where
let file_name_lowercase: String = match entry_data.file_name().into_string() {
Ok(t) => t,
Err(_inspected) => {
warnings.push(fl!(
warnings.push(flc!(
"core_file_not_utf8_name",
generate_translation_hashmap(vec![("name", entry_data.path().display().to_string())])
));
@ -581,7 +581,7 @@ where
Ok(t) => match t.duration_since(UNIX_EPOCH) {
Ok(d) => d.as_secs(),
Err(_inspected) => {
warnings.push(fl!(
warnings.push(flc!(
"core_file_modified_before_epoch",
generate_translation_hashmap(vec![("name", current_file_name.display().to_string())])
));
@ -589,7 +589,7 @@ where
}
},
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_file_no_modification_date",
generate_translation_hashmap(vec![("name", current_file_name.display().to_string()), ("reason", e.to_string())])
));

30
czkawka_core/src/common_directory.rs

@ -3,8 +3,8 @@ use std::time::SystemTime;
use crate::common::Common;
use crate::common_messages::Messages;
use crate::fl;
use crate::localizer::generate_translation_hashmap;
use crate::flc;
use crate::localizer_core::generate_translation_hashmap;
#[derive(Clone, Default)]
pub struct Directories {
@ -27,7 +27,7 @@ impl Directories {
let start_time: SystemTime = SystemTime::now();
if included_directory.is_empty() {
text_messages.errors.push(fl!("core_missing_no_chosen_included_directory"));
text_messages.errors.push(flc!("core_missing_no_chosen_included_directory"));
return false;
}
@ -36,7 +36,7 @@ impl Directories {
let mut checked_directories: Vec<PathBuf> = Vec::new();
for directory in directories {
if directory.to_string_lossy().contains('*') {
text_messages.warnings.push(fl!(
text_messages.warnings.push(flc!(
"core_directory_wildcard_no_supported",
generate_translation_hashmap(vec![("path", directory.display().to_string())])
));
@ -45,7 +45,7 @@ impl Directories {
#[cfg(not(target_family = "windows"))]
if directory.is_relative() {
text_messages.warnings.push(fl!(
text_messages.warnings.push(flc!(
"core_directory_relative_path",
generate_translation_hashmap(vec![("path", directory.display().to_string())])
));
@ -53,7 +53,7 @@ impl Directories {
}
#[cfg(target_family = "windows")]
if directory.is_relative() && !directory.starts_with("\\") {
text_messages.warnings.push(fl!(
text_messages.warnings.push(flc!(
"core_directory_relative_path",
generate_translation_hashmap(vec![("path", directory.display().to_string())])
));
@ -61,14 +61,14 @@ impl Directories {
}
if !directory.exists() {
text_messages.warnings.push(fl!(
text_messages.warnings.push(flc!(
"core_directory_must_exists",
generate_translation_hashmap(vec![("path", directory.display().to_string())])
));
continue;
}
if !directory.is_dir() {
text_messages.warnings.push(fl!(
text_messages.warnings.push(flc!(
"core_directory_must_be_directory",
generate_translation_hashmap(vec![("path", directory.display().to_string())])
));
@ -78,7 +78,7 @@ impl Directories {
}
if checked_directories.is_empty() {
text_messages.warnings.push(fl!("core_included_directory_zero_valid_directories"));
text_messages.warnings.push(flc!("core_included_directory_zero_valid_directories"));
return false;
}
@ -101,11 +101,11 @@ impl Directories {
for directory in directories {
let directory_as_string = directory.to_string_lossy();
if directory_as_string == "/" {
text_messages.errors.push(fl!("core_excluded_directory_pointless_slash"));
text_messages.errors.push(flc!("core_excluded_directory_pointless_slash"));
break;
}
if directory_as_string.contains('*') {
text_messages.warnings.push(fl!(
text_messages.warnings.push(flc!(
"core_directory_wildcard_no_supported",
generate_translation_hashmap(vec![("path", directory.display().to_string())])
));
@ -113,7 +113,7 @@ impl Directories {
}
#[cfg(not(target_family = "windows"))]
if directory.is_relative() {
text_messages.warnings.push(fl!(
text_messages.warnings.push(flc!(
"core_directory_relative_path",
generate_translation_hashmap(vec![("path", directory.display().to_string())])
));
@ -121,7 +121,7 @@ impl Directories {
}
#[cfg(target_family = "windows")]
if directory.is_relative() && !directory.starts_with("\\") {
text_messages.warnings.push(fl!(
text_messages.warnings.push(flc!(
"core_directory_relative_path",
generate_translation_hashmap(vec![("path", directory.display().to_string())])
));
@ -133,7 +133,7 @@ impl Directories {
continue;
}
if !directory.is_dir() {
text_messages.warnings.push(fl!(
text_messages.warnings.push(flc!(
"core_directory_must_be_directory",
generate_translation_hashmap(vec![("path", directory.display().to_string())])
));
@ -276,7 +276,7 @@ impl Directories {
}
if self.included_directories.is_empty() {
text_messages.errors.push(fl!("core_directory_overlap"));
text_messages.errors.push(flc!("core_directory_overlap"));
return false;
}

12
czkawka_core/src/duplicate.rs

@ -26,6 +26,8 @@ use crate::common_extensions::Extensions;
use crate::common_items::ExcludedItems;
use crate::common_messages::Messages;
use crate::common_traits::*;
use crate::flc;
use crate::localizer_core::generate_translation_hashmap;
#[derive(PartialEq, Eq, Clone, Debug, Copy)]
pub enum HashType {
@ -1277,7 +1279,9 @@ pub fn save_hashes_to_file(hashmap: &BTreeMap<String, FileEntry>, text_messages:
}
}
text_messages.messages.push(format!("Properly saved to file {} cache entries.", how_much));
text_messages
.messages
.push(flc!("core_saving_to_cache", generate_translation_hashmap(vec![("number", how_much.to_string())])));
}
}
pub fn load_hashes_from_file(text_messages: &mut Messages, delete_outdated_cache: bool, type_of_hash: &HashType, is_prehash: bool) -> Option<BTreeMap<u64, Vec<FileEntry>>> {
@ -1352,9 +1356,9 @@ pub fn load_hashes_from_file(text_messages: &mut Messages, delete_outdated_cache
}
}
text_messages.messages.push(format!(
"Properly loaded {} cache entries.",
hashmap_loaded_entries.values().map(|e| e.len()).sum::<usize>()
text_messages.messages.push(flc!(
"core_loading_from_cache",
generate_translation_hashmap(vec![("number", hashmap_loaded_entries.values().map(|e| e.len()).sum::<usize>().to_string())])
));
return Some(hashmap_loaded_entries);

2
czkawka_core/src/lib.rs

@ -22,6 +22,6 @@ pub mod common_extensions;
pub mod common_items;
pub mod common_messages;
pub mod common_traits;
pub mod localizer;
pub mod localizer_core;
pub const CZKAWKA_VERSION: &str = env!("CARGO_PKG_VERSION");

21
czkawka_core/src/localizer.rs → czkawka_core/src/localizer_core.rs

@ -8,10 +8,10 @@ use once_cell::sync::Lazy;
use rust_embed::RustEmbed;
#[derive(RustEmbed)]
#[folder = "../i18n/"]
#[folder = "i18n/"]
struct Localizations;
pub static LANGUAGE_LOADER: Lazy<FluentLanguageLoader> = Lazy::new(|| {
pub static LANGUAGE_LOADER_CORE: Lazy<FluentLanguageLoader> = Lazy::new(|| {
let loader: FluentLanguageLoader = fluent_language_loader!();
loader.load_fallback_language(&Localizations).expect("Error while loading fallback language");
@ -20,19 +20,19 @@ pub static LANGUAGE_LOADER: Lazy<FluentLanguageLoader> = Lazy::new(|| {
});
#[macro_export]
macro_rules! fl {
macro_rules! flc {
($message_id:literal) => {{
i18n_embed_fl::fl!($crate::localizer::LANGUAGE_LOADER, $message_id)
i18n_embed_fl::fl!($crate::localizer_core::LANGUAGE_LOADER_CORE, $message_id)
}};
($message_id:literal, $($args:expr),*) => {{
i18n_embed_fl::fl!($crate::localizer::LANGUAGE_LOADER, $message_id, $($args), *)
i18n_embed_fl::fl!($crate::localizer_core::LANGUAGE_LOADER_CORE, $message_id, $($args), *)
}};
}
// Get the `Localizer` to be used for localizing this library.
pub fn localizer() -> Box<dyn Localizer> {
Box::from(DefaultLocalizer::new(&*LANGUAGE_LOADER, &Localizations))
pub fn localizer_core() -> Box<dyn Localizer> {
Box::from(DefaultLocalizer::new(&*LANGUAGE_LOADER_CORE, &Localizations))
}
pub fn generate_translation_hashmap(vec: Vec<(&'static str, String)>) -> HashMap<&'static str, String> {
@ -42,3 +42,10 @@ pub fn generate_translation_hashmap(vec: Vec<(&'static str, String)>) -> HashMap
}
hashmap
}
pub fn fnc_get_similarity_very_high() -> String {
flc!("core_similarity_very_high")
}
pub fn fnc_get_similarity_minimal() -> String {
flc!("core_similarity_minimal")
}

40
czkawka_core/src/similar_images.rs

@ -24,8 +24,8 @@ use crate::common_extensions::Extensions;
use crate::common_items::ExcludedItems;
use crate::common_messages::Messages;
use crate::common_traits::{DebugPrint, PrintResults, SaveResults};
use crate::fl;
use crate::localizer::generate_translation_hashmap;
use crate::flc;
use crate::localizer_core::generate_translation_hashmap;
pub const RAW_IMAGE_EXTENSIONS: [&str; 24] = [
".mrw", ".arw", ".srf", ".sr2", ".mef", ".orf", ".srw", ".erf", ".kdc", ".kdc", ".dcs", ".rw2", ".raf", ".dcr", ".dng", ".pef", ".crw", ".iiq", ".3fr", ".nrw", ".nef", ".mos",
@ -346,7 +346,7 @@ impl SimilarImages {
let read_dir = match fs::read_dir(&current_folder) {
Ok(t) => t,
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_cannot_open_dir",
generate_translation_hashmap(vec![("dir", current_folder.display().to_string()), ("reason", e.to_string())])
));
@ -359,7 +359,7 @@ impl SimilarImages {
let entry_data = match entry {
Ok(t) => t,
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_cannot_read_entry_dir",
generate_translation_hashmap(vec![("dir", current_folder.display().to_string()), ("reason", e.to_string())])
));
@ -369,7 +369,7 @@ impl SimilarImages {
let metadata: Metadata = match entry_data.metadata() {
Ok(t) => t,
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_cannot_read_metadata_dir",
generate_translation_hashmap(vec![("dir", current_folder.display().to_string()), ("reason", e.to_string())])
));
@ -397,7 +397,7 @@ impl SimilarImages {
let file_name_lowercase: String = match entry_data.file_name().into_string() {
Ok(t) => t,
Err(_inspected) => {
warnings.push(fl!(
warnings.push(flc!(
"core_file_not_utf8_name",
generate_translation_hashmap(vec![("name", entry_data.path().display().to_string())])
));
@ -425,7 +425,7 @@ impl SimilarImages {
Ok(t) => match t.duration_since(UNIX_EPOCH) {
Ok(d) => d.as_secs(),
Err(_inspected) => {
warnings.push(fl!(
warnings.push(flc!(
"core_file_modified_before_epoch",
generate_translation_hashmap(vec![("name", current_file_name.display().to_string())])
));
@ -433,7 +433,7 @@ impl SimilarImages {
}
},
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_file_no_modification_date",
generate_translation_hashmap(vec![("name", current_file_name.display().to_string()), ("reason", e.to_string())])
));
@ -1149,17 +1149,17 @@ pub fn get_string_from_similarity(similarity: &Similarity, hash_size: u8) -> Str
// #[cfg(debug_assertions)]
// {
// if *h <= SIMILAR_VALUES[index_preset][0] {
// format!("{} {}", fl!("core_similarity_very_high"), *h)
// format!("{} {}", flc!("core_similarity_very_high"), *h)
// } else if *h <= SIMILAR_VALUES[index_preset][1] {
// format!("{} {}", fl!("core_similarity_high"), *h)
// format!("{} {}", flc!("core_similarity_high"), *h)
// } else if *h <= SIMILAR_VALUES[index_preset][2] {
// format!("{} {}", fl!("core_similarity_medium"), *h)
// format!("{} {}", flc!("core_similarity_medium"), *h)
// } else if *h <= SIMILAR_VALUES[index_preset][3] {
// format!("{} {}", fl!("core_similarity_small"), *h)
// format!("{} {}", flc!("core_similarity_small"), *h)
// } else if *h <= SIMILAR_VALUES[index_preset][4] {
// format!("{} {}", fl!("core_similarity_very_small"), *h)
// format!("{} {}", flc!("core_similarity_very_small"), *h)
// } else if *h <= SIMILAR_VALUES[index_preset][5] {
// format!("{} {}", fl!("core_similarity_minimal"), *h)
// format!("{} {}", flc!("core_similarity_minimal"), *h)
// } else {
// panic!();
// }
@ -1167,17 +1167,17 @@ pub fn get_string_from_similarity(similarity: &Similarity, hash_size: u8) -> Str
// #[cfg(not(debug_assertions))]
{
if *h <= SIMILAR_VALUES[index_preset][0] {
fl!("core_similarity_very_high")
flc!("core_similarity_very_high")
} else if *h <= SIMILAR_VALUES[index_preset][1] {
fl!("core_similarity_high")
flc!("core_similarity_high")
} else if *h <= SIMILAR_VALUES[index_preset][2] {
fl!("core_similarity_medium")
flc!("core_similarity_medium")
} else if *h <= SIMILAR_VALUES[index_preset][3] {
fl!("core_similarity_small")
flc!("core_similarity_small")
} else if *h <= SIMILAR_VALUES[index_preset][4] {
fl!("core_similarity_very_small")
flc!("core_similarity_very_small")
} else if *h <= SIMILAR_VALUES[index_preset][5] {
fl!("core_similarity_minimal")
flc!("core_similarity_minimal")
} else {
panic!();
}

20
czkawka_core/src/similar_videos.rs

@ -23,8 +23,8 @@ use crate::common_extensions::Extensions;
use crate::common_items::ExcludedItems;
use crate::common_messages::Messages;
use crate::common_traits::{DebugPrint, PrintResults, SaveResults};
use crate::fl;
use crate::localizer::generate_translation_hashmap;
use crate::flc;
use crate::localizer_core::generate_translation_hashmap;
use crate::similar_images::VIDEO_FILES_EXTENSIONS;
pub const MAX_TOLERANCE: i32 = 20;
@ -197,8 +197,8 @@ impl SimilarVideos {
/// Public function used by CLI to search for empty folders
pub fn find_similar_videos(&mut self, stop_receiver: Option<&Receiver<()>>, progress_sender: Option<&futures::channel::mpsc::UnboundedSender<ProgressData>>) {
if !check_if_ffmpeg_is_installed() {
self.text_messages.errors.push(fl!("core_ffmpeg_not_found"));
self.text_messages.errors.push(fl!(
self.text_messages.errors.push(flc!("core_ffmpeg_not_found"));
self.text_messages.errors.push(flc!(
"core_ffmpeg_missing_in_snap",
generate_translation_hashmap(vec![("url", "https://github.com/snapcrafters/ffmpeg/issues/73".to_string())])
));
@ -285,7 +285,7 @@ impl SimilarVideos {
let read_dir = match fs::read_dir(&current_folder) {
Ok(t) => t,
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_cannot_open_dir",
generate_translation_hashmap(vec![("dir", current_folder.display().to_string()), ("reason", e.to_string())])
));
@ -298,7 +298,7 @@ impl SimilarVideos {
let entry_data = match entry {
Ok(t) => t,
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_cannot_read_entry_dir",
generate_translation_hashmap(vec![("dir", current_folder.display().to_string()), ("reason", e.to_string())])
));
@ -308,7 +308,7 @@ impl SimilarVideos {
let metadata: Metadata = match entry_data.metadata() {
Ok(t) => t,
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_cannot_read_metadata_dir",
generate_translation_hashmap(vec![("dir", current_folder.display().to_string()), ("reason", e.to_string())])
));
@ -336,7 +336,7 @@ impl SimilarVideos {
let file_name_lowercase: String = match entry_data.file_name().into_string() {
Ok(t) => t,
Err(_inspected) => {
warnings.push(fl!(
warnings.push(flc!(
"core_file_not_utf8_name",
generate_translation_hashmap(vec![("name", entry_data.path().display().to_string())])
));
@ -363,7 +363,7 @@ impl SimilarVideos {
Ok(t) => match t.duration_since(UNIX_EPOCH) {
Ok(d) => d.as_secs(),
Err(_inspected) => {
warnings.push(fl!(
warnings.push(flc!(
"core_file_modified_before_epoch",
generate_translation_hashmap(vec![("name", current_file_name.display().to_string())])
));
@ -371,7 +371,7 @@ impl SimilarVideos {
}
},
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_file_no_modification_date",
generate_translation_hashmap(vec![("name", current_file_name.display().to_string()), ("reason", e.to_string())])
));

16
czkawka_core/src/temporary.rs

@ -16,8 +16,8 @@ use crate::common_directory::Directories;
use crate::common_items::ExcludedItems;
use crate::common_messages::Messages;
use crate::common_traits::*;
use crate::fl;
use crate::localizer::generate_translation_hashmap;
use crate::flc;
use crate::localizer_core::generate_translation_hashmap;
#[derive(Debug)]
pub struct ProgressData {
@ -175,7 +175,7 @@ impl Temporary {
let read_dir = match fs::read_dir(&current_folder) {
Ok(t) => t,
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_cannot_open_dir",
generate_translation_hashmap(vec![("dir", current_folder.display().to_string()), ("reason", e.to_string())])
));
@ -188,7 +188,7 @@ impl Temporary {
let entry_data = match entry {
Ok(t) => t,
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_cannot_read_entry_dir",
generate_translation_hashmap(vec![("dir", current_folder.display().to_string()), ("reason", e.to_string())])
));
@ -198,7 +198,7 @@ impl Temporary {
let metadata: Metadata = match entry_data.metadata() {
Ok(t) => t,
Err(e) => {
warnings.push(fl!(
warnings.push(flc!(
"core_cannot_read_metadata_dir",
generate_translation_hashmap(vec![("dir", current_folder.display().to_string()), ("reason", e.to_string())])
));
@ -226,7 +226,7 @@ impl Temporary {
let file_name_lowercase: String = match entry_data.file_name().into_string() {
Ok(t) => t,
Err(_inspected) => {
warnings.push(fl!(
warnings.push(flc!(
"core_file_not_utf8_name",
generate_translation_hashmap(vec!