chore(i18n): finish translating code comments and scripts to English
CI / Format and clippy (push) Successful in 1m57s
CI / Dependency audit (push) Successful in 13s
CI / Check desktop app (Linux) (push) Successful in 3m54s
CI / Tests (Linux) (push) Failing after 7m25s
Release / Create release (push) Successful in 6s
Release / CLI (linux-aarch64) (push) Successful in 1m48s
Release / CLI (linux-x86_64) (push) Successful in 2m39s
Release / Desktop app (linux-aarch64) (push) Successful in 10m9s
Release / Desktop app (linux-x86_64) (push) Successful in 12m20s
Release / Desktop app (windows) (push) Successful in 7m32s
Release / Build latest.json (push) Successful in 5s

Completes the English-only standardization for code, comments, scripts
and CI templates (UI/CLI-facing strings stay bilingual pt-BR/en,
untouched). Covers the remaining crates/, apps/gui/ui/ and
apps/gui/src-tauri/ comments, .gitea/ workflow and template comments,
.githooks/ hooks, and the scripts/ source comments for the files
already renamed in a prior commit (check.sh, generate-logo.py,
install-hooks.sh).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VAyr8d7HuAdUGB6aA5xmDD
This commit is contained in:
Lucas RayanandClaude Sonnet 5 committed 2026-10-30 20:43:02 -03:00
1 parent da212e6926
commit 6328220c60
129 files changed
+1961 -1834

No files matched your search

+18 -18
View File
@@ -1,8 +1,8 @@
//! AFF4 (Advanced Forensic Format 4, padrão v1.0): contêiner ZIP com metadados em Turtle.
//! AFF4 (Advanced Forensic Format 4, v1.0 standard): ZIP container with Turtle RDF metadata.
//!
//! Leitura de imagens lineares e mapeadas (inclusive esparsas), com blocos comprimidos por
//! snappy, deflate, LZ4 ou sem compressão. Gravação de uma imagem linear com blocos snappy.
//! Conjuntos em vários volumes (spanned/striped) não são suportados.
//! Reads linear and mapped images (including sparse ranges), with chunks compressed via
//! snappy, deflate, LZ4, or stored uncompressed. Writes linear images with snappy chunks.
//! Multi-volume sets (spanned/striped) are not supported.
use crate::error::{Error, Result};
use crate::hashing::MultiHasher;
@@ -15,7 +15,7 @@ use std::path::Path;
use std::sync::Mutex;
pub fn is_aff4(head: &[u8]) -> bool {
// ZIP local file header + primeiro nome "container.description" ou "version.txt".
// ZIP local file header + first entry named "container.description" or "version.txt".
head.len() > 50
&& head.starts_with(b"PK\x03\x04")
&& (find(&head[30..head.len().min(80)], b"container.description")
@@ -80,7 +80,7 @@ impl Turtle<'_> {
}
tok.to_string()
}
/// Um termo: <iri>, "literal"[^^tipo], nome:prefixado ou `a`.
/// A Turtle term: <iri>, "literal"[^^type], prefixed:name, or `a`.
fn term(&mut self) -> Option<String> {
self.ws();
let c = *self.b.get(self.i)?;
@@ -123,7 +123,7 @@ impl Turtle<'_> {
{
self.i += 1;
}
// ponto final de sentença colado ao termo
// trailing statement period attached to the term
let mut e = self.i;
if e > s && self.b[e - 1] == b'.' {
e -= 1;
@@ -165,7 +165,7 @@ fn parse_turtle(text: &str) -> HashMap<String, Resource> {
t.prefixes.insert(name, iri);
continue;
}
// sujeito
// subject
let Some(subj) =
(if t.b[t.i] == b':' && t.b.get(t.i + 1).map_or(true, |c| c.is_ascii_whitespace()) {
t.i += 1;
@@ -200,7 +200,7 @@ fn parse_turtle(text: &str) -> HashMap<String, Resource> {
Some(b';') => {
t.i += 1;
t.ws();
// ";" final antes de "."
// trailing ";" before "."
if t.b.get(t.i) == Some(&b'.') {
t.i += 1;
break;
@@ -217,7 +217,7 @@ fn parse_turtle(text: &str) -> HashMap<String, Resource> {
out
}
// ------------------------------------------------------------------ leitor
// ------------------------------------------------------------------ reader
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
enum Method {
@@ -265,7 +265,7 @@ pub struct Aff4Source {
targets: Vec<Target>,
map: Vec<MapEntry>,
size: u64,
/// Metadados legíveis: caso, examinador, notas, hashes.
/// Human-readable metadata: case, examiner, notes, hashes.
pub info: HashMap<String, String>,
cache: Mutex<Option<(usize, u64, Vec<u8>)>>,
index_cache: Mutex<HashMap<(usize, u64), std::sync::Arc<Vec<u8>>>>,
@@ -344,7 +344,7 @@ impl Aff4Source {
}
}
let data_urn = image.get(&ds).unwrap().to_string();
// Hashes gravados no fluxo de dados (ou no mapa).
// Hashes recorded on the data stream (or map).
for r in res
.values()
.filter(|r| r.get(&format!("{NS}hash")).is_some())
@@ -443,7 +443,7 @@ impl Aff4Source {
})
}
/// MD5 do primeiro fluxo de blocos (o que o AFF4 grava em `aff4:hash`), para conferir a integridade.
/// MD5 of the first bevy stream (stored by AFF4 in `aff4:hash`) for integrity verification.
pub fn verify_stream_md5(&self) -> Result<Option<bool>> {
let Some(want) = self.info.get("md5").cloned() else {
return Ok(None);
@@ -604,7 +604,7 @@ impl Source for Aff4Source {
let pos = offset + done as u64;
let i = self.map.partition_point(|e| e.start + e.len <= pos);
let Some(e) = self.map.get(i).filter(|e| e.start <= pos) else {
// vão do mapa: zeros até a próxima entrada
// map gap: zeros up to the next entry
let next = self.map.get(i).map(|e| e.start).unwrap_or(self.size);
let n = ((next - pos) as usize).min(want - done);
buf[done..done + n].fill(0);
@@ -626,7 +626,7 @@ impl Source for Aff4Source {
}
}
// ------------------------------------------------------------------ gravação
// ------------------------------------------------------------------ writer
#[derive(Debug, Clone)]
pub struct Aff4Options {
@@ -703,7 +703,7 @@ fn esc(s: &str) -> String {
.replace('\n', "\\n")
}
/// Grava uma imagem AFF4 linear (um fluxo de blocos snappy) de `src`.
/// Writes a linear AFF4 image (single snappy bevy stream) from `src`.
pub fn write_aff4(
src: &dyn Source,
dest: &Path,
@@ -776,11 +776,11 @@ pub fn write_aff4(
}
}
hasher.update(b);
// bloco curto (último) é guardado como está; comprimido só se ficar menor
// short (final) chunk is stored as-is; compressed only if smaller
let comp = enc_snap
.compress_vec(b)
.map_err(|e| Error::msg(e.to_string()))?;
// Só um bloco cheio pode ficar sem compressão (comprimento == tamanho do bloco).
// Only a full chunk can be stored uncompressed (length == chunk_size).
let data: &[u8] = if want as u64 == chunk && comp.len() >= want {
b
} else {