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
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:
1 parent
da212e6926
commit
6328220c60
129 files changed
+1961
-1834
No files matched your search
@@ -1,7 +1,7 @@
|
||||
use guara_core::jpegscan::*;
|
||||
|
||||
fn photo(w: u16, h: u16) -> Vec<u8> {
|
||||
// Imagem "natural": gradientes suaves + textura + bordas.
|
||||
// Synthetic natural-looking test image: smooth gradients + texture + geometric edges.
|
||||
let mut rgb = Vec::with_capacity(w as usize * h as usize * 3);
|
||||
let mut x = 0x9E3779B97F4A7C15u64;
|
||||
for yy in 0..h as i32 {
|
||||
@@ -35,7 +35,7 @@ fn decodes_whole_image_and_ends_at_eoi() {
|
||||
let d = decode(&h, &j, State::start(&h), u32::MAX, 0);
|
||||
assert_eq!(d.stop, Stop::Done);
|
||||
assert_eq!(d.dc.len() as u32, h.total_mcus());
|
||||
// O que sobra depois do último MCU é o EOI.
|
||||
// Only the 2-byte EOI marker (`FF D9`) remains after decoding all MCUs.
|
||||
let tail = &j[d.state.pos.min(j.len())..];
|
||||
assert!(
|
||||
tail.windows(2).any(|w| w == [0xFF, 0xD9]),
|
||||
@@ -48,9 +48,9 @@ fn decodes_whole_image_and_ends_at_eoi() {
|
||||
fn detects_break_and_resumes_with_the_right_continuation() {
|
||||
let j = photo(1024, 768);
|
||||
let h = parse_header(&j).unwrap();
|
||||
let cut = 12 * 4096; // quebra no limite de cluster
|
||||
let cut = 12 * 4096; // simulate a fragmentation break on a 4 KiB cluster boundary
|
||||
assert!(j.len() > cut + 8192, "imagem pequena demais: {}", j.len());
|
||||
// Dados estranhos no lugar do resto.
|
||||
// Splice foreign pseudo-random bytes (without `0xFF` markers) after the cut point.
|
||||
let mut x = 12345u64;
|
||||
let junk: Vec<u8> = (0..40_000)
|
||||
.map(|_| {
|
||||
@@ -64,16 +64,16 @@ fn detects_break_and_resumes_with_the_right_continuation() {
|
||||
broken.extend_from_slice(&junk);
|
||||
let d = decode(&h, &broken, State::start(&h), u32::MAX, 512);
|
||||
assert_ne!(d.stop, Stop::Done);
|
||||
// Decodificação segue o lixo por um tempo; mas a quebra aparece pelo erro ou pela descontinuidade.
|
||||
// Decoding continues into the foreign cluster briefly, then triggers a Huffman error or DC jump.
|
||||
let mcu_break = first_discontinuity(&h, &d.dc);
|
||||
// MCUs bons: os decodificados ao fim do cluster `cut`.
|
||||
// Last valid checkpoint at the end of the first fragment (`cut`).
|
||||
let good = d
|
||||
.snaps
|
||||
.iter()
|
||||
.rfind(|s| s.pos <= cut)
|
||||
.expect("snapshot antes da quebra")
|
||||
.clone();
|
||||
// Retomada com a continuação verdadeira reproduz a decodificação inteira.
|
||||
// Resuming from that checkpoint with the true second fragment reconstructs the entire image.
|
||||
let mut joined = j[..cut].to_vec();
|
||||
joined.extend_from_slice(&j[cut..]);
|
||||
let r = decode(&h, &joined, good.clone(), u32::MAX, 0);
|
||||
|
||||
Reference in new issue
Block a user