diff --git a/AGENTS.md b/AGENTS.md
index e842724d7..b3fcb0222 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -109,9 +109,16 @@ Parity is measured, not guessed: `crates/engine/catalog/menus.txt` lists the inc
- Drive it: JSON lines over TCP, e.g. `{"id":1,"method":"engine.execute","params":{"command":"track.new","params":{"count":2,"format":"stereo"}}}`, then `{"id":2,"method":"ui.screenshot","params":{"path":"/tmp/shot.png"}}`. Methods: `crates/ui-egui/src/control.rs`, docs: `docs/control-protocol.md`.
- Offscreen UI render (no window, no focus stealing): `cargo run -p soundcraft-ui-egui --example ui_shot -- out.png [script.jsonl]`.
- Headless: `soundcraft-cli run --demo --cmd 'mix.volume={"track":"Kick","db":-6}' --bounce out.wav`; MCP: `soundcraft-cli mcp [--connect PORT]`.
-- **For UI work, look at the result** (render, read the PNG) and compare with `plan/protools/screenshots/`.
+- **Language / localization:** the interface is English by default; Brazilian Portuguese
+ (`pt-BR`) is selected under `Setup › Appearance › Language` (or the `ui.language` command with
+ `{"language":"pt-BR"}`). The pt-BR catalog is complete for every fixed UI string — tests cover
+ placeholder parity, unique keys and source coverage, and the `cargo test` suite passes.
+- Commands: build `cargo build -p soundcraft --bin soundcraft`; test
+ `cargo test -p soundcraft --bin soundcraft`; run `DISPLAY=:0 ./target/debug/soundcraft`. The
+ `cargo xtask ci` gate runs formatting, clippy, tests, assets, layering and the WebAssembly build.
+- Parallel agents: separate `CARGO_TARGET_DIR` per agent; edit only the crates you own; write
+ manifests atomically; delete your target dir when done (disk).
- Shell gotcha: `mv`/`cp` are aliased interactive here — use `/bin/mv -f` / `/bin/cp -f`.
-- Parallel agents: separate `CARGO_TARGET_DIR` per agent; edit only the crates you own; write manifests atomically; delete your target dir when done (disk).
## Quality gates (before every commit)
`cargo xtask ci` = fmt check, `clippy --workspace --all-targets -D warnings`, tests, assets, layers, wasm check. Commit after each arc of work that builds; one topic per commit.
diff --git a/README.md b/README.md
index afb8f3d6d..7d518d664 100644
--- a/README.md
+++ b/README.md
@@ -263,8 +263,18 @@ SoundCraft is **pre-alpha**: it covers 94 % of the incumbent's menu items (measu
its features by presence, and is roughly 40 % of the way to replacing it for real work: record,
edit, mix and bounce work end to end, but choosing an audio interface and buffer size,
recording MIDI from a controller and session interchange (AAF/OMF) are still missing, and those
-are the alpha checklist. Translations are missing too. The status, the stage and our effort
-estimates are in [`ROADMAP.md`](ROADMAP.md); the full assessment is in
+are the alpha checklist.
+
+**Translations:** the Brazilian Portuguese (`pt-BR`) catalog is **100 % complete** for every fixed
+UI string found in the current source — menus, dialogs and buttons, tooltips (including those
+localized inside buttons and toggles), accessibility names, the Edit-window status bar, the
+remove-session question, formatted messages, engine error templates and engine error text at display
+time. All these entries are covered by a test, placeholders match, keys are unique, and the
+`pt-BR` catalog is chosen automatically when `ui.language` is `pt-BR` (or "Portuguese (Brazil)")
+under `Setup › Appearance`. Engine errors keep their run-time values and a decimal comma in
+`pt-BR`. The remaining localization work is a native-speaker (human) review of wording plus CJK /
+Devanagari / Arabic font fallbacks and RTL layout — not new UI translation. The status, the stage
+and our effort estimates are in [`ROADMAP.md`](ROADMAP.md); the full assessment is in
[`docs/target-app-parity.md`](docs/target-app-parity.md), the ranked list of what's missing in
[`docs/gaps.md`](docs/gaps.md), and the menu-by-menu comparison in
[`docs/parity-checklist.md`](docs/parity-checklist.md). Bug reports and wish lists are
diff --git a/ROADMAP.md b/ROADMAP.md
index 749918c6d..a25a45bae 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -50,7 +50,7 @@ measures readiness and adds hardware, localization and field bug reports.
| UI/UX fidelity | ~55 % | 60–100 | [ui-parity.md](docs/ui-parity.md) |
| File formats | ~40 % | 70–120 | [file-format-parity.md](docs/file-format-parity.md) |
| Hardware (interfaces, MIDI, surfaces, sync) | ~12 % | 110–180 | [hardware-parity.md](docs/hardware-parity.md) |
-| Localization | ~12 % (1 of Pro Tools' 8 languages) | 70–110 | [localization-parity.md](docs/localization-parity.md) |
+| Localization | ~12 % (1 of Pro Tools' 8 languages; English and pt-BR fixed UI strings, no CJK/RTL font fallback or native review) | 70–110 | [localization-parity.md](docs/localization-parity.md) |
| Performance | ~35 % (unmeasured) | 40–70 | [hardware-parity.md](docs/hardware-parity.md#performance) |
| Stability | ~45 % | 50–80 | [gaps.md](docs/gaps.md) |
| Platforms | ~65 % (5 platforms built, macOS exercised) | 20–40 | [gaps.md](docs/gaps.md) |
@@ -89,14 +89,14 @@ Weights and evidence per row: [target-app-parity.md](docs/target-app-parity.md#f
| Hindi | hi | none | 0 % |
| Arabic | ar | none | 0 % |
| French | fr | none (PR #143 open) | 0 % |
-| Portuguese | pt | none | 0 % |
+| Portuguese (Brazil) | pt-BR | full — 100 % of fixed UI strings; tests pass | 100 % (native-speaker review pending) |
| Indonesian | id | none | 0 % |
| Japanese | ja | none | 0 % |
| German | de | none | 0 % |
| Korean | ko | none | 0 % |
| Vietnamese | vi | none | 0 % |
-Other languages shipped: 0. Detail: [localization-parity.md](docs/localization-parity.md).
+Other languages shipped: 0 complete. Brazilian Portuguese covers the fixed UI strings (100 %), with native-speaker review, CJK/RTL font fallbacks and script shaping still pending. Detail: [localization-parity.md](docs/localization-parity.md).
## Upcoming
@@ -180,6 +180,7 @@ mutated and truncated movies. Field reports from the first public week are track
| Date | Change | Summary |
|---|---|---|
+| 2026-11-05 | trivial | Languages table: Brazilian Portuguese (pt-BR) near complete for fixed UI strings via PR #1346; needs native review. Estimates unchanged |
| 2026-10-25 | trivial | Progress log: Cancel Zoom Toggle; readiness estimates unchanged |
| 2026-10-25 | trivial | Progress log: side panels in dock columns; readiness estimates unchanged |
| 2026-10-25 | trivial | Progress log: Auto Pan stereo balance; readiness estimates unchanged |
diff --git a/apps/soundcraft-web/src/web.rs b/apps/soundcraft-web/src/web.rs
index aac7cef65..d7208883e 100644
--- a/apps/soundcraft-web/src/web.rs
+++ b/apps/soundcraft-web/src/web.rs
@@ -2,6 +2,8 @@
use soundcraft_engine::{Engine, io};
use soundcraft_ui_egui::dialogs::Dialog;
+use soundcraft_ui_egui::localization::{self, Language};
+use soundcraft_ui_egui::localized_format;
use soundcraft_ui_egui::sampler_window::SampleRead;
use soundcraft_ui_egui::{Services, SoundApp};
use std::cell::RefCell;
@@ -12,10 +14,19 @@ use wasm_bindgen::JsCast as _;
const CANVAS_ID: &str = "soundcraft_canvas";
const LOADING_ID: &str = "soundcraft_loading";
+/// The language the browser asks for, for text shown before or outside a running app.
+fn browser_language() -> Language {
+ web_sys::window().and_then(|w| w.navigator().language()).and_then(|tag| Language::parse(&tag)).unwrap_or_default()
+}
+
pub fn start() {
eframe::WebLogger::init(log::LevelFilter::Info).ok();
io::set_deliver(download);
wasm_bindgen_futures::spawn_local(async {
+ let _language = localization::enter(browser_language());
+ if let Some(el) = web_sys::window().and_then(|w| w.document()).and_then(|d| d.get_element_by_id(LOADING_ID)) {
+ el.set_text_content(Some(localization::text("Loading SoundCraft…")));
+ }
let Some(document) = web_sys::window().and_then(|w| w.document()) else {
log::error!("no document");
return;
@@ -48,7 +59,11 @@ pub fn start() {
if let Some(el) = document.get_element_by_id(LOADING_ID) {
match result {
Ok(()) => el.remove(),
- Err(e) => el.set_inner_html(&format!("
SoundCraft failed to start: {e:?}
A browser with WebGPU or WebGL2 is required.
")),
+ Err(e) => el.set_text_content(Some(&format!(
+ "{} {}",
+ localized_format!("SoundCraft failed to start: {}", format!("{e:?}")),
+ localization::text("A browser with WebGPU or WebGL2 is required.")
+ ))),
}
}
});
@@ -92,11 +107,11 @@ impl Purpose {
}
}
- fn filter(self) -> (&'static str, Vec<&'static str>) {
+ fn filter(self) -> (String, Vec<&'static str>) {
match self {
- Self::Session => ("SoundCraft Session", SESSION_EXTS.to_vec()),
- Self::Audio => ("Audio", craft_audio::DECODE_EXTENSIONS.to_vec()),
- Self::Midi => ("MIDI", MIDI_EXTS.to_vec()),
+ Self::Session => (localization::text("SoundCraft Session").to_owned(), SESSION_EXTS.to_vec()),
+ Self::Audio => (localization::text("Audio").to_owned(), craft_audio::DECODE_EXTENSIONS.to_vec()),
+ Self::Midi => (localization::text("MIDI").to_owned(), MIDI_EXTS.to_vec()),
}
}
}
@@ -126,9 +141,12 @@ impl WebShell {
let Some(purpose) = purpose else { return };
self.app.dialogs.open = None;
let (inbox, ctx) = (self.inbox.clone(), ctx.clone());
+ let (label, exts) = {
+ let _language = localization::enter(self.app.ui.language);
+ purpose.filter()
+ };
wasm_bindgen_futures::spawn_local(async move {
- let (label, exts) = purpose.filter();
- let Some(file) = rfd::AsyncFileDialog::new().add_filter(label, &exts).pick_file().await else { return };
+ let Some(file) = rfd::AsyncFileDialog::new().add_filter(&label, &exts).pick_file().await else { return };
let bytes = file.read().await;
inbox.borrow_mut().push((purpose, file.file_name(), bytes));
ctx.request_repaint();
@@ -165,6 +183,7 @@ impl WebShell {
}
fn handle(&mut self, purpose: Purpose, name: String, bytes: Vec) {
+ let _language = localization::enter(self.app.ui.language);
let e = &mut self.app.engine;
let at = e.session().edit.selection.start.max(0);
let result = match purpose {
@@ -174,15 +193,15 @@ impl WebShell {
Purpose::Audio => {
let before = e.session_arc();
io::import_audio_bytes(e, &name, &bytes, None, None, at).map(|_| {
- e.push_undo("Import Audio", before);
- format!("Imported {name}")
+ e.push_undo(localization::text("Import Audio"), before);
+ localized_format!("Imported {name}", name = name)
})
}
Purpose::Midi => {
let before = e.session_arc();
io::import_midi_bytes(e, &bytes, at, true).map(|_| {
- e.push_undo("Import MIDI", before);
- format!("Imported {name}")
+ e.push_undo(localization::text("Import MIDI"), before);
+ localized_format!("Imported {name}", name = name)
})
}
};
@@ -221,7 +240,8 @@ impl eframe::App for WebShell {
/// Hand a saved or exported file to the person as a download named `name` (the engine's delivery
/// hook on the web).
fn download(name: &str, bytes: &[u8]) -> Result<(), String> {
- let js = |e: wasm_bindgen::JsValue| format!("download failed: {e:?}");
+ let _language = localization::enter(browser_language());
+ let js = |e: wasm_bindgen::JsValue| localized_format!("Download failed: {}", format!("{e:?}"));
let window = web_sys::window().ok_or("no window")?;
let document = window.document().ok_or("no document")?;
let parts = js_sys::Array::of1(&js_sys::Uint8Array::from(bytes));
diff --git a/crates/ui-egui/locales/pt-BR/mod.rs b/crates/ui-egui/locales/pt-BR/mod.rs
new file mode 100644
index 000000000..ae02947fa
--- /dev/null
+++ b/crates/ui-egui/locales/pt-BR/mod.rs
@@ -0,0 +1,2316 @@
+/// Returns the Brazilian Portuguese translation for a source-language UI string.
+pub(super) fn translate(source: &str) -> Option<&'static str> {
+ Some(match source {
+ "+ Marker" => "+ Marcador",
+ "+ Selection" => "+ Seleção",
+ "+" => "+",
+ "/" => "/",
+ "0 dB" => "0 dB",
+ "CLAP" => "CLAP",
+ "VST3" => "VST3",
+ "bpm" => "BPM",
+ "·" => "·",
+ "−" => "−",
+ "−∞" => "−∞",
+ "⬆" => "⬆",
+ "" => "",
+ "About SoundCraft" => "Sobre o SoundCraft",
+ "Add" => "Adicionar",
+ "Add a row below" => "Adicionar uma linha abaixo",
+ "Adds ±1 LSB triangular dither when writing 16- or 24-bit files. Leave it off when the master chain already dithers." => {
+ "Adiciona dither triangular de ±1 LSB ao gravar arquivos de 16 ou 24 bits. Deixe desativado se a cadeia master já aplicar dither."
+ }
+ "All" => "Tudo",
+ "All audio clips checked" => "Todos os clipes de áudio verificados",
+ "All audio clips have loaded media within source bounds." => "Todos os clipes de áudio têm mídia carregada dentro dos limites da origem.",
+ "An open-source digital audio workstation from the ArtCraft team." => {
+ "Uma estação de trabalho de áudio digital de código aberto da equipe ArtCraft."
+ }
+ "Analyses the edit selection on the selected tracks." => "Analisa a seleção de edição nas faixas selecionadas.",
+ "Analyze" => "Analisar",
+ "Appearance" => "Aparência",
+ "Applies across the edit selection (constant: at the insertion point; scale: factor = end / start; stretch: factor = start / end)." => {
+ "Aplica-se à seleção de edição (constante: no ponto de inserção; escala: fator = fim / início; alongamento: fator = início / fim)."
+ }
+ "Applies to the selected MIDI clips (or those under the selection)." => {
+ "Aplica-se aos clipes MIDI selecionados (ou aos que estão sob a seleção)."
+ }
+ "Apply" => "Aplicar",
+ "Apply to selected tracks (Shift: selected clips)" => "Aplicar às faixas selecionadas (Shift: clipes selecionados)",
+ "Audio system" => "Sistema de áudio",
+ "Audio Track" => "Faixa de áudio",
+ "Audio Units" => "Unidades de áudio",
+ "Auto Rename…" => "Renomear automaticamente…",
+ "Auto-update configuration" => "Atualizar configuração automaticamente",
+ "bar(s)" => "compasso(s)",
+ "Bars per system" => "Compassos por sistema",
+ "Beat Analysis" => "Análise de batidas",
+ "Beat Detective" => "Detecção de batidas",
+ "BED" => "CAMADA BASE",
+ "Big Counter" => "Contador grande",
+ "Bit Depth" => "Profundidade de bits",
+ "Bounces the edit selection, or the whole session when nothing is selected." => {
+ "Renderiza a seleção de edição ou a sessão inteira quando nada está selecionado."
+ }
+ "Browse…" => "Procurar…",
+ "Buffer size" => "Tamanho do buffer",
+ "Built-in" => "Integrados",
+ "Busses" => "Buses",
+ "Bypass" => "Ignorar",
+ "Cancel" => "Cancelar",
+ "Check for Updates" => "Verificar atualizações",
+ "Check for Updates…" => "Verificar atualizações…",
+ "Company" => "Empresa",
+ "Commits" => "Commits",
+ "Lines +/−" => "Linhas +/−",
+ "% of all commits" => "% de todos os commits",
+ "Checks loaded media only, not files on disk, signal levels, plugins or routing." => {
+ "Verifica apenas a mídia carregada, não os arquivos no disco, níveis de sinal, plugins ou roteamento."
+ }
+ "Clear" => "Limpar",
+ "Clear Recent" => "Limpar recentes",
+ "Clear…" => "Limpar…",
+ "Click" => "Clique",
+ "Click a take (or the selection) to promote it to the main playlist" => {
+ "Clique em uma tomada (ou na seleção) para promovê-la à playlist principal"
+ }
+ "Click keys to step-enter notes into the selected MIDI clip at the insertion point." => {
+ "Clique nas teclas para inserir notas passo a passo no clipe MIDI selecionado, no ponto de inserção."
+ }
+ "Click: open instrument · right-click: change" => "Clique: abrir instrumento · botão direito: alterar",
+ "Clip effects gain (dB)" => "Ganho dos efeitos do clipe (dB)",
+ "Clip end pad ms" => "Margem no fim do clipe (ms)",
+ "Clip start pad ms" => "Margem no início do clipe (ms)",
+ "Close Plugin Editor" => "Fechar editor do plugin",
+ "Columns beside the track headers: inserts, sends, I/O…" => "Colunas ao lado dos cabeçalhos das faixas: inserts, envios, E/S…",
+ "Composer" => "Compositor",
+ "Create" => "Criar",
+ "Curve" => "Curva",
+ "Delay (ticks)" => "Atraso (ticks)",
+ "Delay compensation" => "Compensação de atraso",
+ "Delete" => "Excluir",
+ "Delete Group" => "Excluir grupo",
+ "Delete Unused..." => "Excluir não usados...",
+ "DESTINATION" => "DESTINO",
+ "Discard" => "Descartar",
+ "Dither (TPDF)" => "Dither (TPDF)",
+ "Don't Save" => "Não salvar",
+ "Double-click to import audio/MIDI at the insertion point or open a session." => {
+ "Clique duas vezes para importar áudio/MIDI no ponto de inserção ou abrir uma sessão."
+ }
+ "Drag to change the tempo (Shift: fine steps), or click to type it" => {
+ "Arraste para alterar o andamento (Shift: ajustes finos) ou clique para digitá-lo"
+ }
+ "Drop an audio file here" => "Solte um arquivo de áudio aqui",
+ "Drop an audio file on this window" => "Solte um arquivo de áudio nesta janela",
+ "Dual-licensed MIT OR Apache-2.0. Made with Rust and egui." => "Licença dupla MIT ou Apache-2.0. Feito com Rust e egui.",
+ "Duplicate..." => "Duplicar...",
+ "Duration" => "Duração",
+ "Duration %" => "Duração %",
+ "Edit group" => "Editar grupo",
+ "Edit Parameters…" => "Editar parâmetros…",
+ "Elastic Audio" => "Áudio elástico",
+ "Enabled parameters" => "Parâmetros habilitados",
+ "End" => "Fim",
+ "Extract" => "Extrair",
+ "File" => "Arquivo",
+ "Format" => "Formato",
+ "Grab bag" => "Diversos",
+ "Grid" => "Grade",
+ "Identify Beat: selection is" => "Identificar batida: a seleção tem",
+ "in" => "em",
+ "Includes alternate takes and muted clips. Refresh after editing." => {
+ "Inclui tomadas alternativas e clipes silenciados. Atualize após editar."
+ }
+ "Input" => "Entrada",
+ "Input device" => "Dispositivo de entrada",
+ "Instrument" => "Instrumento",
+ "Interface scale" => "Escala da interface",
+ "Language" => "Idioma",
+ "Never" => "Nunca",
+ "Only During Playback" => "Apenas durante a reprodução",
+ "Always" => "Sempre",
+ "Reduce visual effects" => "Reduzir efeitos visuais",
+ "Legato" => "Legato",
+ "Length ratio" => "Proporção de duração",
+ "Level" => "Nível",
+ "Load and edit sounds in the plugin's own editor." => "Carregue e edite sons no editor próprio do plugin.",
+ "Load Sample…" => "Carregar amostra…",
+ "Loop Length" => "Duração do loop",
+ "Loop Until End of Session or Next Clip" => "Repetir até o fim da sessão ou o próximo clipe",
+ "Main output" => "Saída principal",
+ "MIDI Operations" => "Operações MIDI",
+ "MIDI Real-Time Properties" => "Propriedades MIDI em tempo real",
+ "Min strip duration ms" => "Duração mínima do trecho (ms)",
+ "Minimal" => "Mínimo",
+ "Mix group" => "Grupo de mixagem",
+ "Mix in Separate Window" => "Mixagem em janela separada",
+ "Modify Group…" => "Modificar grupo…",
+ "Move to Folder" => "Mover para pasta",
+ "Name" => "Nome",
+ "Name:" => "Nome:",
+ "new" => "novo",
+ "New Bus" => "Novo bus",
+ "new bus..." => "novo bus...",
+ "New Configuration…" => "Nova configuração…",
+ "New Group…" => "Novo grupo…",
+ "New..." => "Novo...",
+ "No background tasks are running." => "Nenhuma tarefa em segundo plano está em execução.",
+ "No contributor data was built into this copy." => "Esta versão não inclui dados de colaboradores.",
+ "no insert" => "sem insert",
+ "No model credits were built into this copy." => "Esta versão não inclui créditos dos modelos.",
+ "No object tracks. Use the Object view in the Mix window to route tracks as objects." => {
+ "Não há faixas de objetos. Use a visualização Objeto na janela Mix para rotear faixas como objetos."
+ }
+ "No parameters." => "Nenhum parâmetro.",
+ "No Recent Sessions" => "Nenhuma sessão recente",
+ "Non-destructive, applied at playback to the selected MIDI tracks." => {
+ "Não destrutivo; aplicado durante a reprodução às faixas MIDI selecionadas."
+ }
+ "Normalize to -0.1 dBFS" => "Normalizar para -0,1 dBFS",
+ "Notation view of the MIDI clip; edit notes in the MIDI Editor or Event List." => {
+ "Visualização em partitura do clipe MIDI; edite as notas no Editor MIDI ou na Lista de eventos."
+ }
+ "Number of Loops" => "Número de repetições",
+ "Open Plugin Editor" => "Abrir editor do plugin",
+ "Open Recent" => "Abrir recentes",
+ "Operation" => "Operação",
+ "Original Time Stamp" => "Registro de data e hora original",
+ "Output" => "Saída",
+ "Output device" => "Dispositivo de saída",
+ "OK" => "OK",
+ "Outputs" => "Saídas",
+ "Pan" => "Panorama",
+ "Parent folder" => "Pasta superior",
+ "Paste" => "Colar",
+ "Peak dB" => "Pico (dB)",
+ "Place on New Track" => "Colocar em nova faixa",
+ "Place on Selected Track" => "Colocar na faixa selecionada",
+ "Play (Space)" => "Reproduzir (Espaço)",
+ "Playlists" => "Playlists",
+ "Post-roll" => "Pós-roll",
+ "Pre-fader" => "Pré-fader",
+ "Pre-roll" => "Pré-roll",
+ "Presets v" => "Predefinições v",
+ "Processes selected clips offline" => "Processa os clipes selecionados offline",
+ "Quantize" => "Quantizar",
+ "Quantize to the grid" => "Quantizar para a grade",
+ "Quit" => "Sair",
+ "Recall" => "Recuperar",
+ "Reconnect audio device" => "Reconectar dispositivo de áudio",
+ "Record (F12 or Cmd+Space)" => "Gravar (F12 ou Cmd+Espaço)",
+ "Recover" => "Recuperar",
+ "Recover Unsaved Work" => "Recuperar trabalho não salvo",
+ "Reduce motion" => "Reduzir animações",
+ "Refresh devices" => "Atualizar dispositivos",
+ "Refresh Report" => "Atualizar relatório",
+ "Remove from Folder" => "Remover da pasta",
+ "Remove send" => "Remover envio",
+ "Remove this row" => "Remover esta linha",
+ "Rename bus…" => "Renomear bus…",
+ "Rename..." => "Renomear...",
+ "Rename…" => "Renomear…",
+ "Render" => "Renderizar",
+ "Renderer" => "Renderizador",
+ "Replace" => "Substituir",
+ "Renders and AudioSuite processes run to completion before returning." => {
+ "Renderizações e processos do AudioSuite são concluídos antes de retornar."
+ }
+ "Reopen the audio devices with these settings" => "Reabrir os dispositivos de áudio com estas configurações",
+ "Reset" => "Redefinir",
+ "Reverse the order" => "Inverter a ordem",
+ "Revert" => "Reverter",
+ "Route as an immersive object or to the bed" => "Rotear como objeto imersivo ou para a camada base",
+ "Sample rate" => "Taxa de amostragem",
+ "Sample Rate" => "Taxa de amostragem",
+ "Save" => "Salvar",
+ "Scan CLAP" => "Procurar CLAP",
+ "Scan VST3" => "Procurar VST3",
+ "Score Editor" => "Editor de partitura",
+ "Scroll Into View" => "Rolar até a faixa",
+ "Search" => "Pesquisar",
+ "Search commands…" => "Pesquisar comandos…",
+ "Select a MIDI clip or MIDI track." => "Selecione um clipe ou uma faixa MIDI.",
+ "Select a MIDI clip." => "Selecione um clipe MIDI.",
+ "Select an audio clip." => "Selecione um clipe de áudio.",
+ "Select an instrument track" => "Selecione uma faixa de instrumento",
+ "Select Tracks in Group" => "Selecionar faixas do grupo",
+ "Semitones" => "Semitons",
+ "Sensitivity" => "Sensibilidade",
+ "Separate" => "Separar",
+ "Separate clips at detected beats" => "Separar clipes nas batidas detectadas",
+ "Session Audio Health" => "Integridade do áudio da sessão",
+ "Session comments" => "Comentários da sessão",
+ "Session Info" => "Informações da sessão",
+ "Session rate" => "Taxa da sessão",
+ "Set Tempo" => "Definir andamento",
+ "Set the session tempo from the beats" => "Definir o andamento da sessão com base nas batidas",
+ "Show" => "Mostrar",
+ "Show Edit and Mix at once, e.g. one per monitor" => "Mostrar Edit e Mix ao mesmo tempo, por exemplo, uma em cada monitor",
+ "Show grid lines" => "Mostrar linhas da grade",
+ "Show in the Mix window" => "Mostrar na janela Mix",
+ "Show track names" => "Mostrar nomes das faixas",
+ "Smart Tool (F6+F7 / F7+F8)" => "Ferramenta inteligente (F6+F7 / F7+F8)",
+ "Sort" => "Ordenar",
+ "SoundCraft" => "SoundCraft",
+ "Spot to where it was recorded" => "Posicionar no ponto em que foi gravado",
+ "Start" => "Início",
+ "Start from the demo session" => "Começar pela sessão de demonstração",
+ "Stop (Space)" => "Parar (Espaço)",
+ "Stop recording first" => "Pare a gravação primeiro",
+ "Strength %" => "Intensidade %",
+ "Suffix" => "Sufixo",
+ "Swing %" => "Swing %",
+ "Table" => "Tabela",
+ "Tempo Operations" => "Operações de andamento",
+ "Text for naming the clips that editing makes from the selected clips:" => {
+ "Texto para nomear os clipes criados ao editar os clipes selecionados:"
+ }
+ "The mix runs in 512-sample blocks; the buffer size sets the device's own latency." => {
+ "A mixagem é processada em blocos de 512 amostras; o tamanho do buffer define a latência do dispositivo."
+ }
+ "Theme" => "Tema",
+ "Thin All" => "Simplificar tudo",
+ "This plugin has no editor of its own, or it is not loaded" => "Este plugin não tem editor próprio ou não está carregado",
+ "Threshold dB" => "Limiar (dB)",
+ "Time Operations" => "Operações de tempo",
+ "Time Scale" => "Escala de tempo",
+ "Timecode burn-in" => "Sobreposição de timecode",
+ "Timecode Rate" => "Taxa de timecode",
+ "Title" => "Título",
+ "Track Color" => "Cor da faixa",
+ "Track Height" => "Altura da faixa",
+ "Track options" => "Opções da faixa",
+ "Track tint in the Edit window" => "Tonalidade das faixas na janela Edit",
+ "Tracks" => "Faixas",
+ "Transport" => "Transporte",
+ "Transpose" => "Transpor",
+ "Unknown label" => "Rótulo desconhecido",
+ "Update check is not supported in the web browser." => "A verificação de atualizações não é compatível com o navegador.",
+ "Use" => "Usar",
+ "User presets need the desktop app." => "As predefinições do usuário exigem o aplicativo para desktop.",
+ "Uses the edit selection." => "Usa a seleção de edição.",
+ "Vel +10" => "Velocidade +10",
+ "Vel −10" => "Velocidade −10",
+ "Velocity +" => "Velocidade +",
+ "Video" => "Vídeo",
+ "Video Universe" => "Universo de vídeo",
+ "Voice: dyn plays the track, off makes it inactive" => "Voz: dyn reproduz a faixa; off a desativa",
+ "Workspace" => "Área de trabalho",
+ "Write automation for the selected tracks:" => "Gravar automação nas faixas selecionadas:",
+ "Write to Current" => "Gravar na atual",
+ "Write to Notes" => "Gravar nas notas",
+ "front" => "frente",
+ "Sub" => "Sub",
+ "Nudge" => "Deslocamento",
+ "Count Off" => "Contagem inicial",
+ "Meter" => "Compasso",
+ "Tempo" => "Andamento",
+ "MIDI in: all" => "Entrada MIDI: todas",
+ "MIDI EDITOR" => "EDITOR MIDI",
+ "Velocity" => "Velocidade",
+ "movie missing from session" => "vídeo ausente da sessão",
+ "Video Track Offline" => "Faixa de vídeo indisponível",
+ "media offline" => "mídia indisponível",
+ "No Video track — File › Import › Video…" => "Nenhuma faixa de vídeo — Arquivo › Importar › Vídeo…",
+ "" => "",
+ " (alternate playlist)" => " (playlist alternativa)",
+ "Active audio end time is unknown (invalid session sample rate)" => {
+ "O fim do áudio ativo é desconhecido (taxa de amostragem da sessão inválida)"
+ }
+ "No engine" => "Sem mecanismo de áudio",
+ "default buffer" => "buffer padrão",
+ "Bus name: {name}" => "Nome do bus: {name}",
+ "Model" => "Modelo",
+ "Version" => "Versão",
+ "🔍 Find clips" => "🔍 Localizar clipes",
+ "Not available yet." => "Ainda não disponível.",
+ "no instrument" => "sem instrumento",
+ "Search inputs…" => "Buscar entradas…",
+ "Search outputs…" => "Buscar saídas…",
+ "Zoom preset (click to recall, Cmd-click to store)" => "Predefinição de zoom (clique para recuperar, Cmd-clique para gravar)",
+ "Commands Keyboard Focus (single-key editing)" => "Foco do teclado nos comandos (edição com uma tecla)",
+ "16-bit" => "16 bits",
+ "24-bit" => "24 bits",
+ "32-bit float" => "32 bits (ponto flutuante)",
+ "clip" => "clipe",
+ "file" => "arquivo",
+ _ => return menu_translate(source),
+ })
+}
+
+/// Translates the formatted messages, whose templates are chosen at run time.
+fn menu_translate(source: &str) -> Option<&'static str> {
+ Some(match source {
+ "1" => "1",
+ "1st Order Ambisonics" => "Ambissonia de 1ª ordem",
+ "2" => "2",
+ "2nd Order Ambisonics" => "Ambissonia de 2ª ordem",
+ "3" => "3",
+ "3rd Order Ambisonics" => "Ambissonia de 3ª ordem",
+ "4" => "4",
+ "4th Order Ambisonics" => "Ambissonia de 4ª ordem",
+ "5" => "5",
+ "5.0" => "5.0",
+ "5.0.2" => "5.0.2",
+ "5.0.4" => "5.0.4",
+ "5.1" => "5.1",
+ "5.1.2" => "5.1.2",
+ "5.1.4" => "5.1.4",
+ "5th Order Ambisonics" => "Ambissonia de 5ª ordem",
+ "6.0" => "6.0",
+ "6.1" => "6.1",
+ "6th Order Ambisonics" => "Ambissonia de 6ª ordem",
+ "7.0" => "7.0",
+ "7.0 SDDS" => "7.0 SDDS",
+ "7.0.2" => "7.0.2",
+ "7.0.4" => "7.0.4",
+ "7.0.6" => "7.0.6",
+ "7.1" => "7.1",
+ "7.1 SDDS" => "7.1 SDDS",
+ "7.1.2" => "7.1.2",
+ "7.1.4" => "7.1.4",
+ "7.1.6" => "7.1.6",
+ "7th Order Ambisonics" => "Ambissonia de 7ª ordem",
+ "9.0.4" => "9.0.4",
+ "9.0.6" => "9.0.6",
+ "9.1.4" => "9.1.4",
+ "9.1.6" => "9.1.6",
+ "AFL (After Fader Listen)" => "AFL (escuta pós-fader)",
+ "ARA Note Overlay" => "Sobreposição de notas ARA",
+ "ARA Plugins" => "Plugins ARA",
+ "Ableton Link" => "Ableton Link",
+ "Activate HEAT" => "Ativar HEAT",
+ "Add Key Change..." => "Adicionar mudança de tonalidade...",
+ "After Playback" => "Após a reprodução",
+ "All Automation" => "Toda a automação",
+ "All MIDI Notes Off" => "Desligar todas as notas MIDI",
+ "All Marker Rulers" => "Todas as réguas de marcadores",
+ "Arrange" => "Organizar",
+ "At Selection" => "Na seleção",
+ "At Transients" => "Nos transientes",
+ "Audio as MIDI" => "Áudio como MIDI",
+ "Audio..." => "Áudio...",
+ "AudioSuite" => "AudioSuite",
+ "Auto-Spot Clips" => "Posicionar clipes automaticamente",
+ "Auto-Update Active Configuration" => "Atualizar configuração ativa automaticamente",
+ "Automation" => "Automação",
+ "Automation Follows Edit" => "Automação acompanha a edição",
+ "BF-76" => "BF-76",
+ "Bars|Beats" => "Compassos|Tempos",
+ "Bounce Mix..." => "Renderizar mixagem...",
+ "Bounce..." => "Renderizar...",
+ "Bring to Front" => "Trazer para frente",
+ "Bypass Inserts" => "Ignorar inserts",
+ "Calibration Mode" => "Modo de calibração",
+ "Can't Redo" => "Não é possível refazer",
+ "Can't Undo" => "Não é possível desfazer",
+ "Capture..." => "Capturar...",
+ "Cascade" => "Em cascata",
+ "Center Playhead" => "Centralizar cursor de reprodução",
+ "Change Duration..." => "Alterar duração...",
+ "Change Edit to Match Timeline" => "Alterar edição para corresponder à linha do tempo",
+ "Change Meter..." => "Alterar compasso...",
+ "Change Timeline to Match Edit" => "Alterar linha do tempo para corresponder à edição",
+ "Change Track Width" => "Alterar largura da faixa",
+ "Change Velocity..." => "Alterar velocidade...",
+ "Channel Name" => "Nome do canal",
+ "Channel Strip" => "Canal de mixagem",
+ "Chord Symbols" => "Símbolos de acordes",
+ "Clear All Clip Indicators" => "Limpar todos os indicadores de clipe",
+ "Clear Special" => "Limpar especial",
+ "Clear Trim Automation" => "Limpar automação de trim",
+ "Click/Countoff..." => "Metrônomo/contagem inicial...",
+ "Clip" => "Clipe",
+ "Clip Effects" => "Efeitos do clipe",
+ "Clip Effects Status" => "Status dos efeitos do clipe",
+ "Clip Gain" => "Ganho do clipe",
+ "Clip Gain Info" => "Informações do ganho do clipe",
+ "Clip Gain Line" => "Linha de ganho do clipe",
+ "Clip Groups..." => "Grupos de clipes...",
+ "Clip List" => "Lista de clipes",
+ "Close All Workspaces" => "Fechar todas as áreas de trabalho",
+ "Close Session" => "Fechar sessão",
+ "Close Window" => "Fechar janela",
+ "Coalesce Clip Gain to Volume Automation" => "Converter ganho do clipe em automação de volume",
+ "Coalesce Pan Guide Automation" => "Consolidar automação-guia de panorama",
+ "Coalesce Trim Automation" => "Consolidar automação de trim",
+ "Coalesce VCA Controller Automation" => "Consolidar automação do controlador VCA",
+ "Coalesce Volume Automation to Clip Gain" => "Converter automação de volume em ganho do clipe",
+ "Collaboration" => "Colaboração",
+ "Color Palette" => "Paleta de cores",
+ "Comments" => "Comentários",
+ "comments" => "comentários",
+ "Commit..." => "Consolidar...",
+ "Composite Playlist" => "Playlist composta",
+ "Configurations" => "Configurações",
+ "Conform to Tempo" => "Ajustar ao andamento",
+ "Consolidate" => "Consolidar",
+ "Constant..." => "Constante...",
+ "Continuous" => "Contínuo",
+ "Convert Aux to Routing Folder" => "Converter auxiliar em pasta de roteamento",
+ "Convert Clip Gain to Volume Automation" => "Converter ganho do clipe em automação de volume",
+ "Convert Volume Automation to Clip Gain" => "Converter automação de volume em ganho do clipe",
+ "Copy" => "Copiar",
+ "Copy Selection to..." => "Copiar seleção para...",
+ "Copy Special" => "Copiar especial",
+ "Copy to Send..." => "Copiar para envio...",
+ "Copy/Move Indicators" => "Indicadores de cópia/movimentação",
+ "Counters" => "Contadores",
+ "Create Click Track" => "Criar faixa de metrônomo",
+ "Create..." => "Criar...",
+ "Current Feet+Frames Position..." => "Posição atual em pés e quadros...",
+ "Current Time" => "Tempo atual",
+ "Current Timecode Position..." => "Posição atual do timecode...",
+ "Cut" => "Recortar",
+ "Cut Special" => "Recortar especial",
+ "Cut Time..." => "Recortar tempo...",
+ "D-Verb" => "D-Verb",
+ "DC Offset Removal" => "Remoção de deslocamento DC",
+ "Dashboard..." => "Painel...",
+ "Default" => "Padrão",
+ "Delay" => "Atraso",
+ "Delay Compensation" => "Compensação de atraso",
+ "Designate as Target Playlist" => "Definir como playlist de destino",
+ "Destructive Record" => "Gravação destrutiva",
+ "DestructivePunch" => "Punch destrutivo",
+ "Disk Allocation..." => "Alocação de disco...",
+ "Disk Usage" => "Uso do disco",
+ "Display on All Channels" => "Exibir em todos os canais",
+ "Double Edit" => "Edição dupla",
+ "Dropped Video Frame Indicator" => "Indicador de quadros de vídeo perdidos",
+ "Duplicate" => "Duplicar",
+ "Duplicate Dolby Atmos Plugin Automation to Pan Automation" => "Duplicar automação do plugin Dolby Atmos para automação de panorama",
+ "Duplicate Pan Automation to Dolby Atmos Plugin Automation" => "Duplicar automação de panorama para automação do plugin Dolby Atmos",
+ "Duplicate and Extend Edit" => "Duplicar e estender edição",
+ "Duplicate of Main Playlist" => "Duplicata da playlist principal",
+ "Dyn3 Compressor/Limiter" => "Dyn3 Compressor/Limiter",
+ "Dyn3 De-Esser" => "Dyn3 De-Esser",
+ "Dyn3 Expander/Gate" => "Dyn3 Expander/Gate",
+ "Dynamic Transport" => "Transporte dinâmico",
+ "Dynamics" => "Dinâmica",
+ "EQ" => "Equalização",
+ "EQ Curve" => "Curva de equalização",
+ "EQ3 1-Band" => "EQ3 de 1 banda",
+ "EQ3 7-Band" => "EQ3 de 7 bandas",
+ "Edit" => "Edição",
+ "Edit Lock/Unlock" => "Bloquear/desbloquear edição",
+ "Edit Window Scrolling" => "Rolagem da janela de edição",
+ "Edit Window Views" => "Visualizações da janela de edição",
+ "Edit/Tool Mode Keyboard Lock" => "Bloqueio do teclado no modo edição/ferramenta",
+ "Elastic Properties" => "Propriedades elásticas",
+ "Eleven Lite" => "Eleven Lite",
+ "End to Fill Selection" => "Do fim até preencher a seleção",
+ "End to Insertion" => "Do fim até o ponto de inserção",
+ "Event" => "Evento",
+ "Expanded" => "Expandido",
+ "Expanded Sends" => "Envios expandidos",
+ "Export" => "Exportar",
+ "Extend Edit Down" => "Estender edição para baixo",
+ "Extend Edit Down to Members" => "Estender edição para baixo até os membros",
+ "Extend Edit Selection To Marker Lane Above" => "Estender seleção de edição até a faixa de marcadores acima",
+ "Extend Edit Selection To Marker Lane Below" => "Estender seleção de edição até a faixa de marcadores abaixo",
+ "Extend Edit Up" => "Estender edição para cima",
+ "Extend Edit Up to Members" => "Estender edição para cima até os membros",
+ "External Timecode Offset..." => "Deslocamento externo de timecode...",
+ "Extract Chords from Selection" => "Extrair acordes da seleção",
+ "Extract MIDI to New Track" => "Extrair MIDI para uma nova faixa",
+ "Fade to End" => "Fade até o fim",
+ "Fade to Start" => "Fade até o início",
+ "Fades" => "Fades",
+ "Feet+Frames" => "Pés e quadros",
+ "Find Talent" => "Localizar talento",
+ "Flatten Performance..." => "Consolidar execução...",
+ "Folder Lines" => "Linhas das pastas",
+ "Freeze" => "Congelar",
+ "Gain" => "Ganho",
+ "Get Info..." => "Obter informações...",
+ "Glide Pan Only" => "Deslizar apenas o panorama",
+ "Glide to All Enabled" => "Deslizar para todos os habilitados",
+ "Glide to Current" => "Deslizar para o atual",
+ "Group" => "Grupo",
+ "Group..." => "Agrupar...",
+ "HEAT" => "HEAT",
+ "Halve Edit" => "Reduzir edição pela metade",
+ "Hardware..." => "Hardware...",
+ "Harmonic" => "Harmônico",
+ "Heal Separation" => "Reparar separação",
+ "Hide All Floating Windows" => "Ocultar todas as janelas flutuantes",
+ "I/O" => "E/S",
+ "I/O..." => "E/S...",
+ "Identify Beat..." => "Identificar batida...",
+ "Identify Sync Point" => "Identificar ponto de sincronização",
+ "Import" => "Importar",
+ "Input Quantize..." => "Quantização de entrada...",
+ "Insert Silence" => "Inserir silêncio",
+ "Insert Time..." => "Inserir tempo...",
+ "Insertion Follows Playback" => "Ponto de inserção acompanha a reprodução",
+ "Inserts A-E" => "Inserts A-E",
+ "Inserts F-J" => "Inserts F-J",
+ "Instruments" => "Instrumentos",
+ "Invert" => "Inverter",
+ "Key Signature" => "Armadura de clave",
+ "Key Signature Staff" => "Pauta da armadura de clave",
+ "Keyboard Shortcuts..." => "Atalhos de teclado...",
+ "LCR" => "LCR",
+ "LCRS" => "LCRS",
+ "Latch" => "Latch",
+ "Layered Editing" => "Edição em camadas",
+ "Learn" => "Aprender",
+ "Linear..." => "Linear...",
+ "Link Timeline and Edit Selection" => "Vincular linha do tempo e seleção de edição",
+ "Link Track and Edit Selection" => "Vincular faixa e seleção de edição",
+ "Lo-Fi" => "Lo-Fi",
+ "Loop Playback" => "Reprodução em loop",
+ "Loop Record" => "Gravação em loop",
+ "Loop..." => "Loop...",
+ "Low Latency Monitoring" => "Monitoramento de baixa latência",
+ "Lower Dock" => "Painel inferior",
+ "MIDI" => "MIDI",
+ "Audio" => "Áudio",
+ "SoundCraft Session" => "Sessão do SoundCraft",
+ "Loading SoundCraft…" => "Carregando o SoundCraft…",
+ "SoundCraft failed to start: {}" => "Falha ao iniciar o SoundCraft: {}",
+ "A browser with WebGPU or WebGL2 is required." => "É necessário um navegador com WebGPU ou WebGL2.",
+ "Download failed: {}" => "Falha no download: {}",
+ "MIDI Beat Clock..." => "Relógio de batida MIDI...",
+ "MIDI Controls" => "Controles MIDI",
+ "MIDI Editor" => "Editor MIDI",
+ "MIDI Editors" => "Editores MIDI",
+ "MIDI Event List" => "Lista de eventos MIDI",
+ "MIDI Input Devices..." => "Dispositivos de entrada MIDI...",
+ "MIDI Input Display" => "Exibição da entrada MIDI",
+ "MIDI Input Filter..." => "Filtro de entrada MIDI...",
+ "MIDI Keyboard" => "Teclado MIDI",
+ "MIDI Live Mode" => "Modo MIDI ao vivo",
+ "MIDI Operations Window" => "Janela de operações MIDI",
+ "MIDI Studio..." => "Estúdio MIDI...",
+ "MIDI Thru" => "MIDI Thru",
+ "MIDI Track Offsets" => "Deslocamentos de faixa MIDI",
+ "MIDI..." => "MIDI...",
+ "Machine Track Arming" => "Armar faixa da máquina",
+ "Machine Track Arming Profiles..." => "Perfis de armação de faixa da máquina...",
+ "Main Counter" => "Contador principal",
+ "Make Inactive" => "Desativar",
+ "Marker Controls" => "Controles de marcadores",
+ "Marker Displays" => "Exibições de marcadores",
+ "Marker Target Follows First Selected Track" => "Alvo do marcador acompanha a primeira faixa selecionada",
+ "Markers" => "Marcadores",
+ "Markers 2" => "Marcadores 2",
+ "Markers 3" => "Marcadores 3",
+ "Markers 4" => "Marcadores 4",
+ "Markers 5" => "Marcadores 5",
+ "Markers Follow Edit" => "Marcadores acompanham a edição",
+ "Maxim" => "Maxim",
+ "Melodyne" => "Melodyne",
+ "Memory Locations" => "Localizações de memória",
+ "Merge MIDI" => "Mesclar MIDI",
+ "Merge Markers" => "Mesclar marcadores",
+ "Messages" => "Mensagens",
+ "Metadata Inspector" => "Inspetor de metadados",
+ "Meters and Faders" => "Medidores e faders",
+ "Mic Preamps" => "Pré-amplificadores de microfone",
+ "Min:Secs" => "Minutos:segundos",
+ "Mirrored MIDI Editing" => "Edição MIDI espelhada",
+ "Mix" => "Mixagem",
+ "Mix Window Views" => "Visualizações da janela de mixagem",
+ "Mod Delay III" => "Mod Delay III",
+ "Modulation" => "Modulação",
+ "Momentary" => "Momentâneo",
+ "Mono" => "Mono",
+ "Move Edit Left" => "Mover edição para a esquerda",
+ "Move Edit Right" => "Mover edição para a direita",
+ "Move Edit Selection To Marker Lane Above" => "Mover seleção de edição para a faixa de marcadores acima",
+ "Move Edit Selection To Marker Lane Below" => "Mover seleção de edição para a faixa de marcadores abaixo",
+ "Move Selection to..." => "Mover seleção para...",
+ "Move Song Start..." => "Mover início da música...",
+ "Move to New Folder..." => "Mover para uma nova pasta...",
+ "Mute Sends" => "Silenciar envios",
+ "Narrow Mix" => "Mixagem compacta",
+ "New Configuration..." => "Nova configuração...",
+ "New Playlist" => "Nova playlist",
+ "New Workspace" => "Nova área de trabalho",
+ "Next" => "Próximo",
+ "No Scrolling" => "Sem rolagem",
+ "No Time" => "Sem tempo",
+ "None" => "Nenhum",
+ "Normalize" => "Normalizar",
+ "Object" => "Objeto",
+ "On Grid" => "Na grade",
+ "Open" => "Abrir",
+ "Options" => "Opções",
+ "Other" => "Outro",
+ "Other Displays" => "Outras exibições",
+ "Outlines" => "Contornos",
+ "Output Meters" => "Medidores de saída",
+ "Overlap Shadows" => "Sombras de sobreposição",
+ "Overlapped Crossfades" => "Fades cruzados sobrepostos",
+ "Overwrite Indicator" => "Indicador de sobrescrita",
+ "PFL (Pre Fader Listen)" => "PFL (escuta pré-fader)",
+ "Page" => "Página",
+ "Pan Automation" => "Automação de panorama",
+ "Parabolic..." => "Parabólico...",
+ "Paste Special" => "Colar especial",
+ "Peak" => "Pico",
+ "Peripherals..." => "Periféricos...",
+ "Pinned Tracks" => "Faixas fixadas",
+ "Pitch II" => "Pitch II",
+ "Pitch Shift" => "Alteração de tom",
+ "Pitch Shift Legacy" => "Alteração de tom (legado)",
+ "Play Edit" => "Reproduzir edição",
+ "Play Timeline" => "Reproduzir linha do tempo",
+ "Playback Engine..." => "Mecanismo de reprodução...",
+ "Plugin Automation" => "Automação de plugin",
+ "Power" => "Energia",
+ "Pre-Fader Metering" => "Medição pré-fader",
+ "Pre/Post-Roll" => "Pré-roll/pós-roll",
+ "Preferences..." => "Preferências...",
+ "Prepare DPE Tracks" => "Preparar faixas DPE",
+ "Previous" => "Anterior",
+ "Print Score..." => "Imprimir partitura...",
+ "Pro Tools Projects" => "Projetos Pro Tools",
+ "Pro Tools Search" => "Busca do Pro Tools",
+ "Processing State" => "Estado do processamento",
+ "Project..." => "Projeto...",
+ "Quad" => "Quad",
+ "Quantize to Grid" => "Quantizar para a grade",
+ "Quantize..." => "Quantizar...",
+ "QuickPunch" => "QuickPunch",
+ "Rating" => "Classificação",
+ "Real-Time Properties" => "Propriedades em tempo real",
+ "Recti-Fi" => "Recti-Fi",
+ "Rectified" => "Retificado",
+ "Regroup" => "Reagrupar",
+ "Remove Duplicate Notes" => "Remover notas duplicadas",
+ "Remove Edit from Bottom" => "Remover edição da parte inferior",
+ "Remove Edit from Top" => "Remover edição da parte superior",
+ "Remove Pitch Shift" => "Remover alteração de tom",
+ "Remove Warp" => "Remover deformação",
+ "Renumber Bars..." => "Renumerar compassos...",
+ "Repeat to Fill Selection" => "Repetir até preencher a seleção",
+ "Repeat..." => "Repetir...",
+ "Restore Last Selection" => "Restaurar última seleção",
+ "Restore Performance..." => "Restaurar execução...",
+ "Retrospective Record" => "Gravação retrospectiva",
+ "Reverb" => "Reverberação",
+ "Reverse" => "Inverter",
+ "Revert Session to Saved..." => "Reverter sessão para a versão salva...",
+ "Ruler Lane Color" => "Cor da faixa de régua",
+ "Ruler Lines" => "Linhas da régua",
+ "Rulers" => "Réguas",
+ "S-Curve..." => "Curva em S...",
+ "SIP (Solo In Place)" => "SIP (solo no local)",
+ "Samples" => "Amostras",
+ "SansAmp PSA-1" => "SansAmp PSA-1",
+ "Save As Template..." => "Salvar como modelo...",
+ "Save Session" => "Salvar sessão",
+ "Save Session As..." => "Salvar sessão como...",
+ "Save Session Copy In..." => "Salvar cópia da sessão em...",
+ "Save Track Preset..." => "Salvar predefinição de faixa...",
+ "Scale..." => "Escala...",
+ "Scene And Take" => "Cena e tomada",
+ "Sci-Fi" => "Sci-Fi",
+ "Score Setup..." => "Configuração da partitura...",
+ "Scroll to Track..." => "Rolar até a faixa...",
+ "Select All" => "Selecionar tudo",
+ "Select/Split Notes..." => "Selecionar/dividir notas...",
+ "Selected Tracks as New AAF/OMF..." => "Faixas selecionadas como novo AAF/OMF...",
+ "Selected Tracks as New Media Composer Compatible Session..." => "Faixas selecionadas como nova sessão compatível com Media Composer...",
+ "Selected Tracks as New Session..." => "Faixas selecionadas como nova sessão...",
+ "Selection" => "Seleção",
+ "Send A" => "Envio A",
+ "Send B" => "Envio B",
+ "Send C" => "Envio C",
+ "Send D" => "Envio D",
+ "Send E" => "Envio E",
+ "Send F" => "Envio F",
+ "Send G" => "Envio G",
+ "Send H" => "Envio H",
+ "Send I" => "Envio I",
+ "Send J" => "Envio J",
+ "Send To..." => "Enviar para...",
+ "Send to Back" => "Enviar para trás",
+ "Sends A-E" => "Envios A-E",
+ "Sends F-J" => "Envios F-J",
+ "Session" => "Sessão",
+ "Session Data..." => "Dados da sessão...",
+ "Session Info as Text..." => "Informações da sessão como texto...",
+ "Session..." => "Sessão...",
+ "Set Record Tracks to Input Only" => "Definir faixas de gravação apenas para entrada",
+ "Setup" => "Configuração",
+ "Shift..." => "Deslocar...",
+ "Show / Hide..." => "Mostrar/ocultar...",
+ "Show Target Playlist" => "Mostrar playlist de destino",
+ "Sibelius" => "Sibelius",
+ "Sibelius..." => "Sibelius...",
+ "Sign In" => "Entrar",
+ "Signal Generator" => "Gerador de sinal",
+ "Sketch to Front" => "Trazer Sketch para frente",
+ "Sketch..." => "Sketch...",
+ "Snap to" => "Ajustar a",
+ "Solo Mode" => "Modo solo",
+ "SoundFlow" => "SoundFlow",
+ "Soundbase" => "Soundbase",
+ "Space Clips…" => "Espaçar clipes…",
+ "Splice" => "Emenda",
+ "Split into Mono" => "Dividir em mono",
+ "Start Collaboration..." => "Iniciar colaboração...",
+ "Start to Fill Selection" => "Do início até preencher a seleção",
+ "Start to Insertion" => "Do início até o ponto de inserção",
+ "Step Input..." => "Entrada passo a passo...",
+ "Stretch..." => "Alongar...",
+ "Strip Silence" => "Remover silêncio",
+ "Sync Point" => "Ponto de sincronização",
+ "Synchronization" => "Sincronização",
+ "System Usage" => "Uso do sistema",
+ "TCE Edit to Timeline Selection" => "Edição TCE para seleção da linha do tempo",
+ "Tab to Transient" => "Tabulação até o transiente",
+ "Target Playlist" => "Playlist de destino",
+ "Task Manager" => "Gerenciador de tarefas",
+ "Tempo Editor" => "Editor de andamento",
+ "Tempo Operations Window" => "Janela de operações de andamento",
+ "Thin" => "Compactar",
+ "Tile" => "Organizar em mosaico",
+ "Tile Horizontal" => "Mosaico horizontal",
+ "Tile Vertical" => "Mosaico vertical",
+ "Time Compression Expansion" => "Compressão e expansão de tempo",
+ "Time Lock/Unlock" => "Bloquear/desbloquear tempo",
+ "Time Operations Window" => "Janela de operações de tempo",
+ "Time Shift" => "Deslocamento de tempo",
+ "Timecode" => "Timecode",
+ "Timecode 2" => "Timecode 2",
+ "To Current Automation Type" => "Para o tipo de automação atual",
+ "To File Boundaries" => "Até os limites do arquivo",
+ "To File End" => "Até o fim do arquivo",
+ "To File Start" => "Até o início do arquivo",
+ "To Fill Selection" => "Até preencher a seleção",
+ "To Selection" => "Até a seleção",
+ "Toggle Recent Playlist" => "Alternar playlist recente",
+ "Track" => "Faixa",
+ "Track Lane" => "Faixa de trilhas",
+ "Track Lane Color" => "Cor da faixa de trilhas",
+ "Track List" => "Lista de faixas",
+ "Track Number" => "Número da faixa",
+ "Track Presets" => "Predefinições de faixa",
+ "Track Transcription Lane" => "Faixa de transcrição",
+ "TrackPunch" => "TrackPunch",
+ "Transcript" => "Transcrição",
+ "Transcription Settings..." => "Configurações de transcrição...",
+ "Transparency" => "Transparência",
+ "Transport Online" => "Transporte conectado",
+ "Transpose..." => "Transpor...",
+ "Trim" => "Ajustar",
+ "Trim Playlist" => "Ajustar playlist",
+ "Trim and Downmix" => "Ajustar e reduzir canais",
+ "Trim to All Enabled" => "Ajustar a todos os habilitados",
+ "Trim to Current" => "Ajustar ao atual",
+ "UI Customization" => "Personalização da interface",
+ "Undo History" => "Histórico de desfazer",
+ "Ungroup" => "Desagrupar",
+ "Ungroup All" => "Desagrupar tudo",
+ "Universe" => "Visão geral",
+ "Unloop..." => "Desativar loop...",
+ "Update Active Configuration" => "Atualizar configuração ativa",
+ "User Time Stamp" => "Registro de data e hora do usuário",
+ "VENUE Channel Names as Track Names" => "Usar nomes de canais VENUE como nomes de faixas",
+ "Vari-Fi" => "Vari-Fi",
+ "Video Sync Offset..." => "Deslocamento de sincronização de vídeo...",
+ "Video Track Online" => "Faixa de vídeo conectada",
+ "Video..." => "Vídeo...",
+ "View" => "Visualizar",
+ "Waveforms" => "Formas de onda",
+ "Window" => "Janela",
+ "Window Configuration List" => "Lista de configurações de janela",
+ "Workspaces" => "Áreas de trabalho",
+ "Write MIDI Real-Time Properties" => "Gravar propriedades MIDI em tempo real",
+ "Write to All Enabled" => "Gravar em todos os habilitados",
+ "X-OR (Cancels Previous Solo)" => "X-OR (cancela o solo anterior)",
+ "About" => "Sobre",
+ "Contributors" => "Colaboradores",
+ "Models" => "Modelos",
+ "Join us on Discord" => "Participe no Discord",
+ "C major" => "Dó maior",
+ "Channel format" => "Formato de canal",
+ "Create up to 128 tracks at a time." => "Crie até 128 faixas por vez.",
+ "Input trim (dB)" => "Trim de entrada (dB)",
+ "Score composer" => "Compositor da partitura",
+ "Score title" => "Título da partitura",
+ "Send level" => "Nível do envio",
+ "Surround pan: drag the puck · double-click: front centre · Alt-drag: divergence" => {
+ "Panorama surround: arraste o controle · clique duplo: centro frontal · Alt+arraste: divergência"
+ }
+ "Tempo (BPM)" => "Andamento (BPM)",
+ "Ticks" => "Ticks",
+ "Timebase" => "Base de tempo",
+ "Track kind" => "Tipo de faixa",
+ "Views" => "Visualizações",
+ "Automation mode for {}" => "Modo de automação da faixa {}",
+ "Track view for {}" => "Visualização da faixa {}",
+ "BYPASSED" => "IGNORADO",
+ "OBJECT" => "OBJETO",
+ "Disable" => "Desativar",
+ "Enable" => "Ativar",
+ "Name (A–Z)" => "Nome (A–Z)",
+ "Merged PRs" => "PRs mesclados",
+ "Lines added" => "Linhas adicionadas",
+ "Lines deleted" => "Linhas removidas",
+ "Line delta" => "Variação de linhas",
+ "Binary assets added" => "Recursos binários adicionados",
+ "Binary assets removed" => "Recursos binários removidos",
+ "First commit" => "Primeiro commit",
+ "Last commit" => "Último commit",
+ "PRs" => "PRs",
+ "+LOC" => "+LOC",
+ "−LOC" => "−LOC",
+ "ΔLOC" => "ΔLOC",
+ "+Bin" => "+Bin",
+ "−Bin" => "−Bin",
+ "Username" => "Nome de usuário",
+ "Display name" => "Nome de exibição",
+ "Real name" => "Nome real",
+ "no input" => "sem entrada",
+ "no output" => "sem saída",
+ "Out 1-2" => "Saída 1-2",
+ "Bus" => "Bus",
+ "Search buses…" => "Pesquisar buses…",
+ "In {}" => "Entrada {}",
+ "Read" => "Leitura",
+ "Write" => "Gravação",
+ "Touch" => "Toque",
+ "Touch/Latch" => "Toque/Retenção",
+ "Off" => "Desativado",
+ "read" => "leitura",
+ "write" => "gravação",
+ "touch" => "toque",
+ "latch" => "retenção",
+ "touch/latch" => "toque/retenção",
+ "off" => "desativado",
+ "trim" => "trim",
+ "Stereo" => "Estéreo",
+ "Aux Input" => "Entrada auxiliar",
+ "Master Fader" => "Fader master",
+ "MIDI Track" => "Faixa MIDI",
+ "Instrument Track" => "Faixa de instrumento",
+ "VCA Master" => "Master VCA",
+ "Routing Folder Track" => "Faixa de pasta de roteamento",
+ "Video Track" => "Faixa de vídeo",
+ "Zoomer" => "Zoom",
+ "Selector" => "Seletor",
+ "Grabber" => "Capturador",
+ "Scrubber" => "Varredura",
+ "Pencil" => "Lápis",
+ "micro" => "micro",
+ "mini" => "mini",
+ "small" => "pequena",
+ "medium" => "média",
+ "large" => "grande",
+ "jumbo" => "extra grande",
+ "extreme" => "máxima",
+ "fit to window" => "ajustar à janela",
+ "custom" => "personalizada",
+ "Voice for {}" => "Voz da faixa {}",
+ "Input for {}" => "Entrada da faixa {}",
+ "Output for {}" => "Saída da faixa {}",
+ "Record enable" => "Habilitação de gravação",
+ "Input monitoring" => "Monitoramento de entrada",
+ "Solo" => "Solo",
+ "Mute" => "Silenciar",
+ "Record enable for {}" => "Habilitação de gravação para {}",
+ "Input monitoring for {}" => "Monitoramento de entrada para {}",
+ "Solo for {}" => "Solo para {}",
+ "Mute for {}" => "Silenciar {}",
+ "auto {}" => "Automação: {}",
+ "constant" => "constante",
+ "linear" => "linear",
+ "parabolic" => "parabólico",
+ "s-curve" => "curva em S",
+ "scale" => "escala",
+ "stretch" => "alongamento",
+ "insert" => "inserir",
+ "cut" => "recortar",
+ "change meter" => "alterar compasso",
+ "move song start" => "mover início da música",
+ "quantize" => "quantizar",
+ "transpose" => "transpor",
+ "change velocity" => "alterar velocidade",
+ "flatten performance" => "consolidar execução",
+ "restore performance" => "restaurar execução",
+ "start bpm " => "andamento inicial ",
+ "end bpm " => "andamento final ",
+ "Identify beat bars" => "Compassos para identificar a batida",
+ "Start tempo (BPM)" => "Andamento inicial (BPM)",
+ "End tempo (BPM)" => "Andamento final (BPM)",
+ "Meter numerator" => "Numerador do compasso",
+ "Meter denominator" => "Denominador do compasso",
+ "Time (seconds)" => "Tempo (segundos)",
+ "no device (silent clock)" => "sem dispositivo (relógio silencioso)",
+ "opened on first record or monitor" => "aberto na primeira gravação ou monitoração",
+ " (resampled to the device rate)" => " (reamostrado para a taxa do dispositivo)",
+ "No sample" => "Nenhuma amostra",
+ "{}: missing" => "{}: ausente",
+ "none" => "nenhum",
+ // Formatted messages. Placeholders mirror the English source so the same arguments fill
+ // them; `localized_format!` selects the template at run time.
+ "Active audio ends at {seconds:.2} seconds" => "O áudio ativo termina em {seconds:.2} segundos",
+ "Active plugin instances: {plugins}" => "Instâncias de plugins ativas: {plugins}",
+ "Audio: {}" => "Áudio: {}",
+ "AudioSuite · {title}" => "AudioSuite · {title}",
+ "Bouncing {name}" => "Renderizando {name}",
+ "Bouncing {} ({:.0}%)" => "Renderizando {} ({:.0}%)",
+ "Configuration {n}" => "Configuração {n}",
+ "Default ({default})" => "Padrão ({default})",
+ "Device default" => "Padrão do dispositivo",
+ "Importing {name}{more}" => "Importando {name}{more}",
+ "Main output: {}" => "Saída principal: {}",
+ "Recording at 24-bit uses {per_min:.1} MB per mono track-minute" => "A gravação em 24 bits usa {per_min:.1} MB por minuto de faixa mono",
+ "Revert “{name}” to its last saved version?" => "Reverter “{name}” para a última versão salva?",
+ "Close “{name}” without saving?" => "Fechar “{name}” sem salvar?",
+ "Save changes to “{name}” before closing?" => "Salvar as alterações em “{name}” antes de fechar?",
+ "Session file: {p}" => "Arquivo da sessão: {p}",
+ "Session media: {} files, {:.1} MB in memory (32-bit float)" => {
+ "Mídia da sessão: {} arquivos, {:.1} MB na memória (ponto flutuante de 32 bits)"
+ }
+ "Tracks: {}" => "Faixas: {}",
+ "UI frame time: {:.1} ms" => "Tempo do quadro da interface: {:.1} ms",
+ "Undo steps: {}" => "Etapas para desfazer: {}",
+ "Value in {suffix}" => "Valor em {suffix}",
+ "Version {}" => "Versão {}",
+ "{bars} bars" => "{bars} compassos",
+ "{} contributors · {} commits" => "{} colaboradores · {} commits",
+ "@{}: {} PRs, {} commits, +{} / −{} lines (Δ {}), +{} / −{} binary assets, {} – {}" => {
+ "@{}: {} PRs, {} commits, +{} / −{} linhas (Δ {}), +{} / −{} recursos binários, {} – {}"
+ }
+ "Instrument for {}" => "Instrumento de {}",
+ "Insert {} for {}" => "Insert {} para {}",
+ "Group for {}" => "Grupo da faixa {}",
+ "In 1-{}" => "Entradas 1-{}",
+ "Send {} for {}" => "Envio {} de {}",
+ "Send {} · {}" => "Envio {} · {}",
+ "Send {which} level for {track}" => "Nível do envio {which} da faixa {track}",
+ "(redo) {r}" => "(refazer) {r}",
+ "{} / {} / {}{}" => "Faixa: {} / Playlist: {} / Clipe: {}{}",
+ "{} (missing)" => "{} (ausente)",
+ "{} for {}" => "{} para {}",
+ "{} @ {} Hz" => "{} a {} Hz",
+ "{} samples" => "{} amostras",
+ "{} · {} Hz · {} ch · {}" => "{} · {} Hz · {} canais · {}",
+ "{} · {} Hz · {} ch" => "{} · {} Hz · {} canais",
+ "{} audio clips checked · {} issues" => "{} clipes de áudio verificados · {} problemas",
+ "{} ch" => "{} canais",
+ "{} object track(s)" => "{} faixa(s) de objeto",
+ "{} — {} from channel {}" => "{} — {} do canal {}",
+ "“{}” already exists. Do you want to replace it?" => "“{}” já existe. Deseja substituí-lo?",
+ "“{name}” has {what} from an earlier run, autosaved {age}." => {
+ "“{name}” tem {what} de uma execução anterior, salvo automaticamente {age}."
+ }
+ "{question} Your changes will be lost." => "{question} Suas alterações serão perdidas.",
+ "{path}\nnot found" => "{path}\nnão encontrado",
+ "media offline: {why}" => "mídia indisponível: {why}",
+ "media offline: {e}" => "mídia indisponível: {e}",
+ "Window configuration could not be restored: {error}" => "Não foi possível restaurar a configuração da janela: {error}",
+ "unsaved changes and an unfinished recording" => "alterações não salvas e uma gravação inacabada",
+ "unsaved changes" => "alterações não salvas",
+ "recently" => "recentemente",
+ "less than a minute ago" => "há menos de um minuto",
+ "minute" => "minuto",
+ "hour" => "hora",
+ "day" => "dia",
+ "{n} {unit} ago" => "há {n} {unit}",
+ "{n} {unit}s ago" => "há {n} {unit}s",
+ // Command, menu and dialog labels. The menus, the command palette and the Keyboard
+ // Shortcuts window all read these, so one entry serves every surface.
+ "Add Automation Breakpoint" => "Adicionar ponto de automação",
+ "Add MIDI Note" => "Adicionar nota MIDI",
+ "Add Note" => "Adicionar nota",
+ "Arrange Panel" => "Organizar painel",
+ "Assign Send" => "Atribuir envio",
+ "Assign to VCA" => "Atribuir ao VCA",
+ "Audio Device" => "Dispositivo de áudio",
+ "AudioSuite Process" => "Processar no AudioSuite",
+ "Auto Rename..." => "Renomear automaticamente...",
+ "Automation Mode" => "Modo de automação",
+ "Bounce Mix" => "Renderizar mixagem",
+ "Bounce Mix…" => "Renderizar mixagem…",
+ "Bounce Stems..." => "Renderizar stems...",
+ "Bypass Insert" => "Desativar insert",
+ "Cancel Zoom Toggle" => "Cancelar alternância de zoom",
+ "Clear All Mutes" => "Limpar todos os mutes",
+ "Clear All Solos" => "Limpar todos os solos",
+ "Clear Automation" => "Limpar automação",
+ "Clear Clips" => "Limpar clipes",
+ "Clear Sampler Sample" => "Limpar amostra do sampler",
+ "Clip Color" => "Cor do clipe",
+ "Clip Looping" => "Loop de clipe",
+ "Create Group" => "Criar grupo",
+ "Decrease Track Height" => "Diminuir altura da faixa",
+ "Delete Memory Location" => "Excluir localização de memória",
+ "Delete Notes" => "Excluir notas",
+ "Delete Unused Playlists" => "Excluir playlists não usadas",
+ "Deselect All" => "Desmarcar tudo",
+ "Duplicate Playlist" => "Duplicar playlist",
+ "Edit Memory Location" => "Editar localização de memória",
+ "Edit Mode" => "Modo de edição",
+ "Edit Note" => "Editar nota",
+ "Edit Tool" => "Ferramenta de edição",
+ "Export Clip Groups..." => "Exportar grupos de clipes...",
+ "Export Clips as Files..." => "Exportar clipes como arquivos...",
+ "Fast Forward" => "Avançar rapidamente",
+ "Fill Window With Session" => "Preencher janela com a sessão",
+ "Format Time" => "Formatar tempo",
+ "Go to End" => "Ir para o fim",
+ "Go to Next Marker" => "Ir para o próximo marcador",
+ "Go to Previous Marker" => "Ir para o marcador anterior",
+ "Grid Value" => "Valor da grade",
+ "Half-Speed Playback" => "Reprodução em meia velocidade",
+ "Hide Track" => "Ocultar faixa",
+ "I/O Setup" => "Configuração de E/S",
+ "Increase Track Height" => "Aumentar altura da faixa",
+ "Input Monitoring" => "Monitoração de entrada",
+ "Input Trim" => "Ajuste de entrada",
+ "Insert Plugin" => "Inserir plugin",
+ "Inspect Clip" => "Inspecionar clipe",
+ "Inspect Session" => "Inspecionar sessão",
+ "Inspect Track" => "Inspecionar faixa",
+ "Keyboard Focus" => "Foco do teclado",
+ "Keyboard Shortcuts" => "Atalhos de teclado",
+ "List CLAP Plugins" => "Listar plugins CLAP",
+ "List Commands" => "Listar comandos",
+ "List MIDI Notes" => "Listar notas MIDI",
+ "List Plugins" => "Listar plugins",
+ "List VST3 Plugins" => "Listar plugins VST3",
+ "Load Sampler Sample" => "Carregar amostra do sampler",
+ "Load Track Preset" => "Carregar predefinição de faixa",
+ "Locate" => "Localizar",
+ "MIDI Editors to Back" => "Editores MIDI para trás",
+ "MIDI Editors to Front" => "Editores MIDI para frente",
+ "Main Output Format" => "Formato da saída principal",
+ "Mix Window View" => "Visualização da janela de mixagem",
+ "Modify Group" => "Modificar grupo",
+ "Move Clips" => "Mover clipes",
+ "Move Insert" => "Mover insert",
+ "Move Notes" => "Mover notas",
+ "Move Track" => "Mover faixa",
+ "Movies" => "Filmes",
+ "New Configuration" => "Nova configuração",
+ "New MIDI Clip" => "Novo clipe MIDI",
+ "New Memory Location" => "Nova localização de memória",
+ "New Session" => "Nova sessão",
+ "New Tracks" => "Novas faixas",
+ "New Tracks…" => "Novas faixas…",
+ "Nudge Clip Gain Down" => "Reduzir ganho do clipe por deslocamento",
+ "Nudge Clip Gain Up" => "Aumentar ganho do clipe por deslocamento",
+ "Nudge Value" => "Valor do deslocamento",
+ "Object / Bed" => "Objeto / leito",
+ "Open Session..." => "Abrir sessão...",
+ "Open/Close Folder" => "Abrir/fechar pasta",
+ "Parity Report" => "Relatório de paridade",
+ "Paste Clip Effects" => "Colar efeitos do clipe",
+ "Paste Clip Gain" => "Colar ganho do clipe",
+ "Pause" => "Pausar",
+ "Phase Invert" => "Inverter fase",
+ "Pin Track" => "Fixar faixa",
+ "Place Audio File" => "Posicionar arquivo de áudio",
+ "Play" => "Reproduzir",
+ "Play/Stop" => "Reproduzir/parar",
+ "Playback Engine" => "Mecanismo de reprodução",
+ "Post-Roll Amount" => "Duração do pós-roll",
+ "Pre-Roll Amount" => "Duração do pré-roll",
+ "Promote to Main Playlist" => "Promover à playlist principal",
+ "Recall Memory Location" => "Reativar localização de memória",
+ "Record" => "Gravar",
+ "Record Enable" => "Ativar gravação",
+ "Redo" => "Refazer",
+ "Remove Insert" => "Remover insert",
+ "Remove Send" => "Remover envio",
+ "Remove Sync Point" => "Remover ponto de sincronia",
+ "Remove Tempo Change" => "Remover mudança de andamento",
+ "Rename Clip" => "Renomear clipe",
+ "Rename Marker" => "Renomear marcador",
+ "Rename Selected Clips" => "Renomear clipes selecionados",
+ "Rename Track" => "Renomear faixa",
+ "Reset Edit Settings" => "Redefinir configurações de edição",
+ "Reset Panel Layout" => "Redefinir layout dos painéis",
+ "Return to Zero" => "Voltar ao zero",
+ "Revert to Saved" => "Reverter para salvo",
+ "Rewind" => "Retroceder",
+ "Score Setup" => "Configuração da partitura",
+ "Scroll Timeline" => "Rolar linha do tempo",
+ "Select Playlist" => "Selecionar playlist",
+ "Send Level" => "Nível do envio",
+ "Session Setup" => "Configuração da sessão",
+ "Set Clip Effects" => "Definir efeitos do clipe",
+ "Set Edit Selection" => "Definir seleção de edição",
+ "Set Instrument" => "Definir instrumento",
+ "Set Instrument Parameter" => "Definir parâmetro do instrumento",
+ "Set Pan" => "Definir panorama",
+ "Set Plugin Parameter" => "Definir parâmetro do plugin",
+ "Set Plugin Parameters" => "Definir parâmetros do plugin",
+ "Set Send Surround Pan" => "Definir panorama surround do envio",
+ "Set Surround Pan" => "Definir panorama surround",
+ "Set UI State" => "Definir estado da interface",
+ "Set Video Start" => "Definir início do vídeo",
+ "Set Volume" => "Definir volume",
+ "Set Zoom" => "Definir zoom",
+ "Show Grid Lines" => "Mostrar linhas da grade",
+ "Shuffle Lock" => "Bloquear modo Shuffle",
+ "Snap to Grid" => "Ajustar à grade",
+ "Solo Safe" => "Solo seguro",
+ "Spot" => "Posicionar",
+ "Stop" => "Parar",
+ "Strip Silence Rectangles" => "Retângulos de remoção de silêncio",
+ "Sub Counter" => "Subcontador",
+ "Tab" => "Tab",
+ "Tempo Change" => "Mudança de andamento",
+ "Tempo Change (BPM)" => "Mudança de andamento (BPM)",
+ "Toggle Group Active" => "Alternar grupo ativo",
+ "Toggle Mix/Edit" => "Alternar mixagem/edição",
+ "Track Comments" => "Comentários da faixa",
+ "Track Input" => "Entrada da faixa",
+ "Track Output" => "Saída da faixa",
+ "Track Timebase" => "Base de tempo da faixa",
+ "Track View" => "Visualização da faixa",
+ "Transport Status" => "Status do transporte",
+ "Trim Clip" => "Aparar clipe",
+ "Undo" => "Desfazer",
+ "Unsaved Changes" => "Alterações não salvas",
+ "View Flags" => "Indicadores de visualização",
+ "Waveform Zoom" => "Zoom da forma de onda",
+ "Workspaces to Front" => "Áreas de trabalho para frente",
+ "Write Automation" => "Gravar automação",
+ "Write Trim Automation" => "Gravar automação de ajuste",
+ "Zoom By" => "Zoom em",
+ "Zoom In" => "Aumentar zoom",
+ "Zoom Out" => "Diminuir zoom",
+ "Zoom Preset" => "Predefinição de zoom",
+ "Zoom Toggle" => "Alternar zoom",
+ "Zoom to Selection" => "Zoom na seleção",
+ "Close folder" => "Fechar pasta",
+ "Divergence (0 = point source)" => "Divergência (0 = fonte pontual)",
+ "Elevation (height speakers)" => "Elevação (alto-falantes de altura)",
+ "Follow Main Time Scale" => "Acompanhar escala de tempo principal",
+ "Hide automation" => "Ocultar automação",
+ "Open folder" => "Abrir pasta",
+ "Send {which}" => "Envio {which}",
+ "Send {which} · Choose destination" => "Envio {which} · Escolher destino",
+ "Show volume automation" => "Mostrar automação de volume",
+ "Unfreeze" => "Descongelar",
+ "Unknown vendor" => "Fabricante desconhecido",
+ "samples" => "amostras",
+ "{v} {unit}" => "{v} {unit}",
+ "Loop Rec" => "Gravação em loop",
+ "MIDI Merge" => "Mesclagem MIDI",
+ "Pre/Post" => "Pré/Pós",
+ "0.5 seconds" => "0,5 segundos",
+ "Path" => "Caminho",
+ "1 bar" => "1 compasso",
+ "1 foot" => "1 pé",
+ "1 frame" => "1 frame",
+ "1 ms" => "1 ms",
+ "1 sample" => "1 amostra",
+ "1 second" => "1 segundo",
+ "1 subframe" => "1 subframe",
+ "1/16 note" => "1/16 nota",
+ "1/2 frame" => "1/2 frame",
+ "1/2 note" => "1/2 nota",
+ "1/32 note" => "1/32 nota",
+ "1/4 frame" => "1/4 frame",
+ "1/4 note" => "1/4 nota",
+ "1/64 note" => "1/64 nota",
+ "1/8 note" => "1/8 nota",
+ "10 ms" => "10 ms",
+ "10 samples" => "10 amostras",
+ "100 ms" => "100 ms",
+ "100 samples" => "100 amostras",
+ "1000 samples" => "1000 amostras",
+ "10000 samples" => "10000 amostras",
+ "2 samples" => "2 amostras",
+ "29.97 Drop" => "29,97 Drop",
+ "5 frames" => "5 frames",
+ "59.94 Drop" => "59,94 Drop",
+ "A bounce is already running" => "Já há um bounce em execução",
+ "Audio files" => "Arquivos de áudio",
+ "Audio input: {what} {then}" => "Entrada de áudio: {what} {then}",
+ "Audio output: {cause} {then}" => "Saída de áudio: {cause} {then}",
+ "Automation mode" => "Modo de automação",
+ "Bit depth" => "Profundidade de bits",
+ "Bounce cancelled" => "Bounce cancelado",
+ "CLIPS" => "CLIPES",
+ "COMMENTS" => "COMENTÁRIOS",
+ "Change" => "Alterar",
+ "Check the audio device, then use Reconnect audio device in Setup › Playback Engine." => {
+ "Verifique o dispositivo de áudio e use Reconectar dispositivo de áudio em Configurar › Mecanismo de reprodução."
+ }
+ "Check the disk, then record again." => "Verifique o disco e grave novamente.",
+ "Chords" => "Acordes",
+ "Clips" => "Clipes",
+ "Clips/Markers" => "Clipes/marcadores",
+ "Could not save the preset" => "Não foi possível salvar o preset",
+ "Delete marker" => "Excluir marcador",
+ "Delete note" => "Excluir nota",
+ "Dotted" => "Pontilhado",
+ "Extend" => "Estender",
+ "Fills the selection on the selected tracks with a new clip." => "Preenche a seleção nas faixas selecionadas com um novo clipe.",
+ "Finish or cancel the bounce first" => "Termine ou cancele o bounce primeiro",
+ "First" => "Primeiro",
+ "First clip: {}" => "Primeiro clipe: {}",
+ "Fit To" => "Ajustar para",
+ "G major" => "Sol maior",
+ "GRID" => "GRADE",
+ "GROUPS" => "GRUPOS",
+ "Hide" => "Ocultar",
+ "INSERTS A-E" => "INSERÇÕES A-E",
+ "INSERTS F-J" => "INSERÇÕES F-J",
+ "INSTRUMENT" => "INSTRUMENTO",
+ "Last" => "Último",
+ "Length" => "Duração",
+ "Location" => "Localização",
+ "Mute send" => "Silenciar envio",
+ "No Audio Units found" => "Nenhum plugin Audio Units encontrado",
+ "No CLAP plugins found" => "Nenhum plugin CLAP encontrado",
+ "No VST3 plugins found" => "Nenhum plugin VST3 encontrado",
+ "No audio input: {e}" => "Sem entrada de áudio: {e}",
+ "No matches" => "Nenhuma correspondência",
+ "No track is record-enabled: click the R button on the track to record." => {
+ "Nenhuma faixa ativada para gravação: clique no botão R da faixa."
+ }
+ "Note" => "Nota",
+ "Note velocity" => "Velocidade da nota",
+ "Nothing to record on yet: add a track with Track › New…, then click its R button." => {
+ "Nada para gravar ainda: crie uma faixa em Faixa › Novo… e clique no botão R."
+ }
+ "Number" => "Número",
+ "Number of Places" => "Número de casas",
+ "On" => "Ativado",
+ "PREAMP" => "PRÉ-AMP",
+ "Playback stopped: {cause} {then}" => "Reprodução interrompida: {cause} {then}",
+ "Preset name" => "Nome do preset",
+ "Processes the selected clips and replaces them with rendered audio." => {
+ "Processa os clipes selecionados e os substitui por áudio renderizado."
+ }
+ "REL GRID" => "REL GRADE",
+ "Reconnect it, then use Reconnect audio device in Setup › Playback Engine." => {
+ "Reconecte-o e use Reconectar dispositivo de áudio em Configurar › Mecanismo de reprodução."
+ }
+ "Recording stopped: {cause} The take is kept up to there. {then}" => "Gravação interrompida: {cause} A gravação foi mantida até aqui. {then}",
+ "Recording stopped: {what} The take is kept up to there. {then}" => "Gravação interrompida: {what} A gravação foi mantida até aqui. {then}",
+ "Remove configuration" => "Remover configuração",
+ "Render Clip Gain" => "Renderizar ganho do clipe",
+ "SENDS A-E" => "ENVIOS A-E",
+ "SENDS F-J" => "ENVIOS F-J",
+ "Search instruments…" => "Buscar instrumentos…",
+ "Search plugins…" => "Buscar plugins…",
+ "Send level fader" => "Fader de nível do envio",
+ "Slow Down" => "Diminuir velocidade",
+ "Speed Up" => "Aumentar velocidade",
+ "Start (ticks)" => "Início (ticks)",
+ "Starting Number" => "Número inicial",
+ "Stop recording before recovering other work." => "Pare a gravação antes de recuperar outro trabalho.",
+ "TRACKS" => "FAIXAS",
+ "The disk is too slow: this take has lost {lost} ms of input so far." => {
+ "O disco está muito lento: esta gravação perdeu {lost} ms de entrada."
+ }
+ "Timebase: samples" => "Base de tempo: amostras",
+ "Timebase: ticks" => "Base de tempo: ticks",
+ "Timecode rate" => "Taxa de timecode",
+ "Triplet" => "Tercina",
+ "Type" => "Tipo",
+ "Use Reconnect audio device in Setup › Playback Engine, or restart SoundCraft." => {
+ "Use Reconectar dispositivo de áudio em Configurar › Mecanismo de reprodução, ou reinicie o SoundCraft."
+ }
+ "Use Reconnect audio device in Setup › Playback Engine." => "Use Reconectar dispositivo de áudio em Configurar › Mecanismo de reprodução.",
+ "Whole note" => "Nota inteira",
+ "Window Configurations" => "Configurações de janela",
+ "Without a name, the clips keep their names." => "Sem nome, os clipes mantêm seus nomes.",
+ "audio on" => "áudio ativado",
+ "is unavailable" => "está indisponível",
+ "marker" => "marcador",
+ "modified" => "modificado",
+ "movie offline" => "filme indisponível",
+ "no audio engine" => "sem mecanismo de áudio",
+ "no audio input device" => "sem dispositivo de entrada de áudio",
+ "no audio track is record-enabled" => "nenhuma faixa de áudio ativada para gravação",
+ "saved" => "salvo",
+ "selection" => "seleção",
+ "send level" => "Nível do envio",
+ "send mute" => "Mute do envio",
+ "send pan" => "Panorama do envio",
+ "silent clock" => "relógio silencioso",
+ "stop recording before changing the audio device" => "pare a gravação antes de alterar o dispositivo de áudio",
+ "stopped asking for audio" => "parou de solicitar áudio",
+ "the audio engine hit an internal error (see the log)" => "o mecanismo de áudio encontrou um erro interno (veja o registro)",
+ "Equal Power" => "Potência igual",
+ "Exponential" => "Exponencial",
+ "Linear" => "Linear",
+ "Logarithmic" => "Logarítmica",
+ "S-Curve" => "Curva S",
+ "Smart Tool" => "Ferramenta inteligente",
+ "blocks" => "Blocos",
+ "clip_gain" => "Ganho do clipe",
+ "notes" => "Notas",
+ "regions" => "Regiões",
+ "waveform" => "Forma de onda",
+ "mute" => "Mute",
+ "pan" => "Panorama",
+ "volume" => "Volume",
+ "Amp Attack" => "Ataque do amplificador",
+ "Amp Decay" => "Decaimento do amplificador",
+ "Amp Release" => "Liberação do amplificador",
+ "Amp Sustain" => "Sustentação do amplificador",
+ "Asymmetry" => "Assimetria",
+ "Attack" => "Ataque",
+ "Auto Pan" => "Pan automático",
+ "Ceiling" => "Teto",
+ "Center" => "Centro",
+ "Chorus" => "Chorus",
+ "Closed Hat Decay" => "Decaimento do chimbal fechado",
+ "Comp" => "Comp",
+ "Comp Attack" => "Ataque do comp",
+ "Comp Makeup" => "Ganho do comp",
+ "Comp Ratio" => "Razão do comp",
+ "Comp Release" => "Liberação do comp",
+ "Comp Thresh" => "Limiar do comp",
+ "Compressor/Limiter" => "Compressor/Limitador",
+ "Cutoff" => "Frequência de corte",
+ "Cymbal Decay" => "Decaimento do prato",
+ "DC Rmv" => "Rem. CC",
+ "De-Esser" => "De-Esser",
+ "DeEss" => "DeEss",
+ "Decay" => "Decaimento",
+ "Depth" => "Profundidade",
+ "Diffusion" => "Difusão",
+ "Direct Gain" => "Ganho direto",
+ "Direct Solo" => "Solo direto",
+ "Dither" => "Dither",
+ "Drive" => "Drive",
+ "Drum Synth" => "Sintetizador de bateria",
+ "Drums" => "Bateria",
+ "EQ 1-Band" => "EQ de 1 banda",
+ "EQ 7-Band" => "EQ de 7 bandas",
+ "EQ1" => "EQ1",
+ "EQ7" => "EQ7",
+ "Expander/Gate" => "Expansor/Gate",
+ "Feedback" => "Realimentação",
+ "Filter Attack" => "Ataque do filtro",
+ "Filter Decay" => "Decaimento do filtro",
+ "Filter Env" => "Envelope do filtro",
+ "Filter Release" => "Liberação do filtro",
+ "Filter Sustain" => "Sustentação do filtro",
+ "Fine" => "Fino",
+ "Fine Tune" => "Afinação fina",
+ "Flanger" => "Flanger",
+ "Freq" => "Freq",
+ "Frequency" => "Frequência",
+ "Gate" => "Gate",
+ "Gate Range" => "Alcance do gate",
+ "Gate Release" => "Liberação do gate",
+ "Gate Thresh" => "Limiar do gate",
+ "Glide" => "Portamento",
+ "HF Damping" => "Amortecimento de agudos",
+ "HF Freq" => "Freq agudos",
+ "HF Gain" => "Ganho agudos",
+ "HF Q" => "Q agudos",
+ "HMF Freq" => "Freq médio-agudos",
+ "HMF Gain" => "Ganho médio-agudos",
+ "HMF Q" => "Q médio-agudos",
+ "HP Freq" => "Freq HP",
+ "HP Q" => "Q HP",
+ "HPF" => "HPF",
+ "HPF Freq" => "Freq HPF",
+ "High Freq" => "Freq agudos",
+ "High Gain" => "Ganho agudos",
+ "Highest Key" => "Tecla mais aguda",
+ "Highest Velocity" => "Velocidade mais alta",
+ "Hold" => "Sustentação",
+ "Key Tracking" => "Seguimento de tecla",
+ "Kick Decay" => "Decaimento do bumbo",
+ "Kick Tune" => "Ajuste do bumbo",
+ "Knee" => "Joelho",
+ "LF Freq" => "Freq graves",
+ "LF Gain" => "Ganho graves",
+ "LF Q" => "Q graves",
+ "LMF Freq" => "Freq médio-graves",
+ "LMF Gain" => "Ganho médio-graves",
+ "LMF Q" => "Q médio-graves",
+ "LP Freq" => "Freq LP",
+ "LP Q" => "Q LP",
+ "LPF" => "LPF",
+ "LPF Freq" => "Freq LPF",
+ "Limit" => "Limite",
+ "Link to Tempo" => "Sincronizar com o andamento",
+ "Listen" => "Escuta",
+ "LoFi" => "LoFi",
+ "Lookahead" => "Antecipação",
+ "Loop End" => "Fim do loop",
+ "Loop Start" => "Início do loop",
+ "Low Cut" => "Corte grave",
+ "Low Freq" => "Freq grave",
+ "Low Gain" => "Ganho grave",
+ "Lower Gain" => "Ganho inferior",
+ "Lower Solo" => "Solo inferior",
+ "Lowest Key" => "Tecla mais grave",
+ "Lowest Velocity" => "Velocidade mais baixa",
+ "MF Freq" => "Freq médios",
+ "MF Gain" => "Ganho médios",
+ "MF Q" => "Q médios",
+ "Makeup" => "Ganho de compensação",
+ "Manual" => "Manual",
+ "Manual Trigger" => "Acionador manual",
+ "Max" => "Máx.",
+ "Maximizer" => "Maximizador",
+ "Mid Freq" => "Freq médios",
+ "Mid Gain" => "Ganho médios",
+ "Mid Q" => "Q médios",
+ "Mod Delay" => "Atraso modulado",
+ "Mod Depth" => "Profundidade da modulação",
+ "Mod Rate" => "Taxa da modulação",
+ "ModDly" => "ModDly",
+ "Noise" => "Ruído",
+ "Noise Shaping" => "Modelagem do ruído",
+ "Open Hat Decay" => "Decaimento do chimbal aberto",
+ "Osc 2 Detune" => "Desafinação do osc 2",
+ "Osc 2 Pitch" => "Altura do osc 2",
+ "Osc Mix" => "Mix do osc",
+ "Phaser" => "Phaser",
+ "Pitch" => "Tom",
+ "Pitch Shifter" => "Deslocador de tom",
+ "Plate" => "Placa",
+ "Plate Reverb" => "Reverb de placas",
+ "Pre-Delay" => "Pré-atraso",
+ "Q" => "Q",
+ "Range" => "Alcance",
+ "Rate" => "Taxa",
+ "Rate (BPM)" => "Taxa (BPM)",
+ "Ratio" => "Razão",
+ "Rectifier" => "Retificador",
+ "Rectify" => "Retificar",
+ "Release" => "Liberação",
+ "Resonance" => "Ressonância",
+ "Ring Modulator" => "Modulador em anel",
+ "RingMod" => "RingMod",
+ "Room" => "Sala",
+ "Room Reverb" => "Reverb de sala",
+ "Root Note" => "Nota fundamental",
+ "SC HPF" => "HPF SC",
+ "SC HPF Freq" => "Freq HPF SC",
+ "Sample Start" => "Início da amostra",
+ "Sampler" => "Sampler",
+ "Satur" => "Satur",
+ "Saturator" => "Saturador",
+ "SigGen" => "Ger. sin.",
+ "Size" => "Tamanho",
+ "Snare Decay" => "Decaimento da caixa",
+ "Snare Snappy" => "Estalo da caixa",
+ "Snare Tune" => "Ajuste da caixa",
+ "Spread" => "Espalhamento",
+ "Strip" => "Canal",
+ "SubHarm" => "SubHarm",
+ "SubSynth" => "SubSynth",
+ "Subharmonic" => "Subharmônico",
+ "Subtractive Synth" => "Sintetizador subtrativo",
+ "Sustain" => "Sustentação",
+ "TShift" => "TShift",
+ "Threshold" => "Limiar",
+ "Time" => "Tempo",
+ "Tom Decay" => "Decaimento do tom",
+ "Tom Tune" => "Ajuste do tom",
+ "Tone" => "Tom",
+ "Upper Gain" => "Ganho superior",
+ "Upper Solo" => "Solo superior",
+ "Velocity Sens" => "Sensibilidade à velocidade",
+ "Wet Solo" => "Solo wet",
+ "Width" => "Largura",
+ "invert" => "Inverter",
+ "{sr} Hz{note}" => "{sr} Hz{note}",
+ "Autosave failed: {e}" => "Falha ao salvar automaticamente: {e}",
+ "Bounced {} (peak {:.1} dBFS, {:.1} LUFS)" => "Bounce concluído: {} (pico {:.1} dBFS, {:.1} LUFS)",
+ "Cannot record: {err}" => "Não foi possível gravar: {err}",
+ "Click to add a MIDI clip to {name} at the insertion point." => "Clique para adicionar um clipe MIDI a {name} no ponto de inserção.",
+ "Could not open {path}: {e}" => "Não foi possível abrir {path}: {e}",
+ "Couldn't recover “{name}”: {e}" => "Não foi possível recuperar “{name}”: {e}",
+ "Exported {} clip(s) to {}" => "Exportados {} clipe(s) para {}",
+ "Imported {name}" => "Importado: {name}",
+ "Opened {name}" => "Aberto: {name}",
+ "Opened {name} ({missing} missing media)" => "Aberto: {name} ({missing} mídias ausentes)",
+ "Redo {l}" => "Refazer: {l}",
+ "Saved preset {clean}" => "Preset salvo: {clean}",
+ "Undo {l}" => "Desfazer: {l}",
+ "automation filesystem access is not granted: read authority is absent: {shown_path}" => {
+ "acesso ao sistema de arquivos de automação não concedido: autoridade de leitura ausente: {shown_path}"
+ }
+ "automation filesystem access is not granted: write authority is absent: {shown_path}" => {
+ "acesso ao sistema de arquivos de automação não concedido: autoridade de escrita ausente: {shown_path}"
+ }
+ "automation path rejected: a link that leads nowhere: {}" => "caminho de automação rejeitado: link que não leva a lugar algum: {}",
+ "automation path rejected: cannot resolve {}: {e}" => "caminho de automação rejeitado: não foi possível resolver {}: {e}",
+ "automation path rejected: outside the read root {root}: {shown_path}" => {
+ "caminho de automação rejeitado: fora do diretório de leitura {root}: {shown_path}"
+ }
+ "automation path rejected: outside the read roots {}: {shown_path}" => {
+ "caminho de automação rejeitado: fora dos diretórios de leitura {}: {shown_path}"
+ }
+ "automation path rejected: outside the write root {root}: {shown_path}" => {
+ "caminho de automação rejeitado: fora do diretório de escrita {root}: {shown_path}"
+ }
+ "automation path rejected: outside the write roots {}: {shown_path}" => {
+ "caminho de automação rejeitado: fora dos diretórios de escrita {}: {shown_path}"
+ }
+ "automation path rejected: parent traversal below a folder that doesn't exist: {}" => {
+ "caminho de automação rejeitado: travessia acima de uma pasta que não existe: {}"
+ }
+ "automation path rejected: path is empty" => "caminho de automação rejeitado: o caminho está vazio",
+ "automation path rejected: reserved device names are not allowed: {}" => {
+ "caminho de automação rejeitado: nomes de dispositivo reservados não são permitidos: {}"
+ }
+ "internal error (see the log)" => "erro interno (consulte o registro)",
+ "make an edit selection first" => "faça uma seleção de edição primeiro",
+ "no automation has been copied" => "nenhuma automação foi copiada",
+ "no clip effects have been copied" => "nenhum efeito de clipe foi copiado",
+ "no clip gain has been copied" => "nenhum ganho de clipe foi copiado",
+ "no markers on the clipboard" => "não há marcadores na área de transferência",
+ "no previous selection to restore" => "nenhuma seleção anterior para restaurar",
+ "no selected clip has a sync point" => "nenhum clipe selecionado tem um ponto de sincronia",
+ "not opened: the path is not valid" => "não aberto: o caminho não é válido",
+ "nothing is selected" => "nada está selecionado",
+ "nothing to redo" => "nada para refazer",
+ "nothing to undo" => "nada para desfazer",
+ "score too large: over {} bytes" => "partitura muito grande: excedendo {} bytes",
+ "select a clip in the Clip List" => "selecione um clipe na Lista de clipes",
+ "select clips or files in the Clip List" => "selecione clipes ou arquivos na Lista de clipes",
+ "the clipboard is empty" => "a área de transferência está vazia",
+ "the session has no tracks" => "a sessão não tem faixas",
+ "the session has not been saved" => "a sessão não foi salva",
+ "Loop-recorded {} take(s)" => "Gravadas em loop: {} tomada(s)",
+ "Recorded {} clip(s)" => "{} clipe(s) gravado(s)",
+ "Recovered “{name}”. Save it to keep the changes." => "Recuperada “{name}”. Salve para manter as alterações.",
+ "Recovered “{name}”, but {n} audio file(s) are missing. Save it to keep the changes." => {
+ "Recuperada “{name}”, mas {n} arquivo(s) de áudio estão ausentes. Salve para manter as alterações."
+ }
+ "SoundCraft hit an internal error (see the log). Your changes were autosaved: save them, then restart SoundCraft." => {
+ "O SoundCraft encontrou um erro interno (consulte o registro). Suas alterações foram salvas automaticamente: salve-as e reinicie o SoundCraft."
+ }
+ "SoundCraft hit an internal error (see the log). Restart SoundCraft to be safe." => {
+ "O SoundCraft encontrou um erro interno (consulte o registro). Reinicie o SoundCraft para garantir."
+ }
+ "Panel layout could not be restored: {error}" => "Não foi possível restaurar o layout dos painéis: {error}",
+ "Panel move was not applied: {error}" => "Não foi possível aplicar a movimentação do painel: {error}",
+ "Panel windows could not be arranged: {error}" => "Não foi possível organizar as janelas de painéis: {error}",
+ "{name} on {track} put out invalid audio, so it is bypassed until playback stops or starts again." => {
+ "{name} em {track} produziu áudio inválido, então foi desativado até a reprodução parar ou começar novamente."
+ }
+ "{} pan {}" => "{} pan {}",
+ "Comments for {}" => "Comentários de {}",
+ "{} volume" => "Volume de {}",
+ "{name} · Send {letter}" => "{name} · Envio {letter}",
+ "{name} send level" => "Nível de envio de {name}",
+ "Type to search preferences" => "Digite para pesquisar as preferências",
+ "{name} loaded into the sampler" => "{name} carregado no sampler",
+ "SoundCraft Preferences" => "Preferências do SoundCraft",
+ "This preference is not available yet." => "Esta preferência ainda não está disponível.",
+ "Additional Empty Bars in the Score Editor" => "Compassos vazios adicionais no editor de partitura",
+ "Add New Playlists" => "Adicionar novas playlists",
+ "Adjusting Pinned Area Resizes Tracks" => "Ajustar a área fixada redimensiona as pistas",
+ "Advanced Meter Type Settings" => "Configurações avançadas do tipo de medidor",
+ "Advanced Video Logging" => "Registro avançado de vídeo",
+ "After Every Pass" => "Após cada passagem",
+ "After Write Pass, Switch To" => "Após a passagem de gravação, mudar para",
+ "All Files" => "Todos os arquivos",
+ "Allow External Track-Arm Commands in Local Mode" => "Permitir comandos externos de armar pista no modo local",
+ "Allow External Transport Commands in Local Mode" => "Permitir comandos externos de transporte no modo local",
+ "Allow Latch Prime in Stop" => "Permitir preparar o Latch com a reprodução parada",
+ "Allow Sends to Persist During Low-Latency Monitoring" => "Manter os envios durante o monitoramento de baixa latência",
+ "All — Summed" => "Todos — somados",
+ "Always Fill Channel Strips when Banking" => "Sempre preencher os canais ao trocar de banco",
+ "Always On" => "Sempre ativado",
+ "Always Show Assignable Knob Highlight" => "Sempre mostrar o destaque do botão atribuível",
+ "Always Use 32-bit" => "Sempre usar 32 bits",
+ "Anonymous Usage Data" => "Dados de uso anônimos",
+ "ARA" => "ARA",
+ "At Bottom" => "Na parte inferior",
+ "At Insertion or Selection" => "Na inserção ou seleção",
+ "At Timecode Lock" => "Ao travar no timecode",
+ "Audio During Fast Forward and Rewind" => "Áudio durante avanço e retrocesso rápidos",
+ "Audio Engine Errors Stop All Linked Systems" => "Erros do motor de áudio param todos os sistemas vinculados",
+ "Audio Track Record Lock" => "Bloqueio de gravação das pistas de áudio",
+ "Auto Accept Adjust Bounds" => "Aceitar automaticamente o ajuste de limites",
+ "Auto-Adjust Pinned Area for Tracks" => "Ajustar automaticamente a área fixada das pistas",
+ "Auto Backup" => "Backup automático",
+ "Auto Insert Default Plugins from Control Surfaces" => "Inserir automaticamente plugins padrão a partir de superfícies de controle",
+ "Automatically Copy Files on Import" => "Copiar arquivos automaticamente ao importar",
+ "Automatically Create Click Track in New Sessions" => "Criar automaticamente a pista de clique em novas sessões",
+ "Automatically Create Fades" => "Criar fades automaticamente",
+ "Automatically Download New Shared Tracks" => "Baixar automaticamente novas pistas compartilhadas",
+ "Automatic Analysis on Tick-Based Tracks" => "Análise automática em pistas baseadas em ticks",
+ "Automation Glide Time" => "Tempo de deslizamento da automação",
+ "Automation Match Time" => "Tempo de igualação da automação",
+ "Auto-Name Memory Locations when Playing" => "Nomear locais de memória automaticamente durante a reprodução",
+ "Auto-Name Separated Clips" => "Nomear automaticamente os clipes separados",
+ "Auto-Switch Input Language" => "Alternar automaticamente o idioma de entrada",
+ "Back/Forward Amount" => "Quantidade de voltar/avançar",
+ "Back/Forward Time Scale" => "Escala de tempo de voltar/avançar",
+ "Backup Every" => "Fazer backup a cada",
+ "Basics" => "Básico",
+ "C3" => "C3",
+ "C4" => "C4",
+ "Calibration Reference Level" => "Nível de referência de calibração",
+ "Category & Manufacturer" => "Categoria e fabricante",
+ "Change Documentation and Settings Location" => "Alterar o local da documentação e das configurações",
+ "Change Project Media Cache Location" => "Alterar o local do cache de mídia do projeto",
+ "Change Sound Libraries Location" => "Alterar o local das bibliotecas de sons",
+ "Classic" => "Clássico",
+ "Clip Auto Fade In/Out Length" => "Duração do fade automático de entrada/saída do clipe",
+ "Clip Gain Nudge Value" => "Valor de ajuste fino do ganho do clipe",
+ "Clip Indication" => "Indicação de clipe",
+ "Clip List Selection Follows Edit Selection" => "A seleção da lista de clipes acompanha a seleção de edição",
+ "Cloud Storage Services" => "Serviços de armazenamento em nuvem",
+ "Coalesce when Removing Members from a VCA Group" => "Mesclar ao remover membros de um grupo VCA",
+ "Color Break High" => "Quebra de cor alta",
+ "Color Break Low" => "Quebra de cor baixa",
+ "Commit" => "Confirmar",
+ "Compensate Hardware Inputs" => "Compensar entradas de hardware",
+ "Compensate Side Chains" => "Compensar side chains",
+ "Compressor/Limiter Only" => "Somente compressor/limitador",
+ "Console-Style Input Monitoring Indicators" => "Indicadores de monitoramento de entrada no estilo console",
+ "Controlled Device Type" => "Tipo de dispositivo controlado",
+ "Controllers" => "Controladores",
+ "Convert Copied Files to Session Format" => "Converter arquivos copiados para o formato da sessão",
+ "Convert Imported WAV Files to Broadcast Wave" => "Converter arquivos WAV importados para Broadcast Wave",
+ "Create New Playlists when Loop Recording" => "Criar novas playlists na gravação em loop",
+ "Current Session 5.x to 7.x/9.x" => "Sessão atual 5.x para 7.x/9.x",
+ "Current Session 7.x/9.x to 5.x" => "Sessão atual 7.x/9.x para 5.x",
+ "Current Session Fold Down" => "Downmix da sessão atual",
+ "Current Session Includes LFE in Fold Down" => "A sessão atual inclui o LFE no downmix",
+ "Current Session Surround to Stereo" => "Surround para estéreo da sessão atual",
+ "Custom Fast Forward/Rewind Speed" => "Velocidade personalizada de avanço/retrocesso rápido",
+ "Custom Shuttle Lock Speed" => "Velocidade personalizada de travamento do shuttle",
+ "Data Collection and Personalization" => "Coleta de dados e personalização",
+ "Default Automatic Naming to English" => "Nomeação automática padrão em inglês",
+ "Default Clip Color Coding" => "Codificação de cores padrão dos clipes",
+ "Default Crossfade" => "Crossfade padrão",
+ "Default Dynamics" => "Dinâmica padrão",
+ "Default Dynamics Insert Slot" => "Slot de inserção da dinâmica padrão",
+ "Default EQ" => "EQ padrão",
+ "Default EQ Insert Slot" => "Slot de inserção do EQ padrão",
+ "Default Fade In" => "Fade de entrada padrão",
+ "Default Fade Out" => "Fade de saída padrão",
+ "Default Handle Length" => "Duração padrão da margem",
+ "Default Input Gain" => "Ganho de entrada padrão",
+ "Default Plugin" => "Plugin padrão",
+ "Default Settings" => "Configurações padrão",
+ "Default Sliced-Loop Fade" => "Fade padrão de loop fatiado",
+ "Default Track Color Coding" => "Codificação de cores padrão das pistas",
+ "Degree of Thinning" => "Grau de simplificação",
+ "Delay after Play Command" => "Atraso após o comando de reprodução",
+ "Delay before Locking to Longitudinal Timecode" => "Atraso antes de travar no timecode longitudinal",
+ "Delay before Locking to Serial Timecode" => "Atraso antes de travar no timecode serial",
+ "Delay Compensation for External Devices" => "Compensação de atraso para dispositivos externos",
+ "Desktop Drag-and-Drop Conforms to Session Tempo" => "Arrastar e soltar da área de trabalho ajusta ao andamento da sessão",
+ "Destructive Punch File Length" => "Duração do arquivo de punch destrutivo",
+ "Detailed Tool Tips" => "Dicas de ferramenta detalhadas",
+ "Digital VU" => "VU digital",
+ "Direct to Rear Surrounds" => "Direto para os surrounds traseiros",
+ "Disable DSP Mode when Disabling Record and Input" => "Desativar o modo DSP ao desativar gravação e entrada",
+ "Disabled While Looping" => "Desativado durante o loop",
+ "Disable Input Monitoring when Disarming a Stopped Track" => "Desativar o monitoramento de entrada ao desarmar uma pista parada",
+ "Display" => "Exibição",
+ "Display Events as Modified by Real-Time Properties" => "Exibir eventos conforme modificados pelas propriedades em tempo real",
+ "Display Waveforms in Low Resolution While Loading" => "Exibir formas de onda em baixa resolução durante o carregamento",
+ "Docked MIDI Editor" => "Editor MIDI acoplado",
+ "Do Not Convert Sample Rate on Import" => "Não converter a taxa de amostragem ao importar",
+ "Double-Clicking a MIDI Clip Opens" => "Clicar duas vezes em um clipe MIDI abre",
+ "Double-Clicking an Audio Clip Opens" => "Clicar duas vezes em um clipe de áudio abre",
+ "Double-Click Selects Automation Breakpoints" => "Clique duplo seleciona pontos de automação",
+ "Downmix to Surrounds" => "Downmix para os surrounds",
+ "DSP Management" => "Gerenciamento de DSP",
+ "Dynamic Transport Follows Selection During Playback" => "O transporte dinâmico acompanha a seleção durante a reprodução",
+ "Editing" => "Edição",
+ "Edit Insertion Follows Scrub and Shuttle" => "A inserção de edição acompanha scrub e shuttle",
+ "Edit Selection Follows Clip List Selection" => "A seleção de edição acompanha a seleção da lista de clipes",
+ "Edit Window Default Length" => "Duração padrão da janela de edição",
+ "Edit Window Follows Banking" => "A janela de edição acompanha a troca de banco",
+ "Edit Window Follows Selection" => "A janela de edição acompanha a seleção",
+ "Enable Analog Console Processing in New Sessions" => "Ativar o processamento de console analógico em novas sessões",
+ "Enable Automation in Record" => "Ativar a automação na gravação",
+ "Enable DSP Mode for Record-Armed or Input-Monitored Tracks" => "Ativar o modo DSP para pistas armadas ou com entrada monitorada",
+ "Enable Elastic Audio on New Tracks" => "Ativar o Elastic Audio em novas pistas",
+ "Enable GPU Processing" => "Ativar o processamento por GPU",
+ "Enable Session File Auto Backup" => "Ativar o backup automático do arquivo da sessão",
+ "Enable Track Notes Dialog" => "Ativar o diálogo de notas da pista",
+ "English" => "Inglês",
+ "Portuguese (Brazil)" => "Português (Brasil)",
+ "key:Space" => "Espaço",
+ "key:Up" => "Cima",
+ "key:Down" => "Baixo",
+ "key:Left" => "Esquerda",
+ "key:Right" => "Direita",
+ "SHUFFLE" => "EMBARALHAR",
+ "SLIP" => "DESLIZAR",
+ "SPOT" => "POSICIONAR",
+ "Shuffle is locked ({cmd}-click to unlock)" => "Embaralhar está bloqueado (clique com {cmd} para desbloquear)",
+ "Shuffle mode ({fkey}); {cmd}-click locks it out" => "Modo Embaralhar ({fkey}); clique com {cmd} para bloquear",
+ "Grid mode ({fkey}; again for Relative); Shift-click: Snap to Grid in the other modes" => {
+ "Modo Grade ({fkey}; novamente para Relativo); Shift+clique: Alinhar à grade nos outros modos"
+ }
+ "Slip mode ({fkey}); Shift-click adds Snap to Grid" => "Modo Deslizar ({fkey}); Shift+clique adiciona Alinhar à grade",
+ "Spot mode ({fkey}); Shift-click adds Snap to Grid" => "Modo Posicionar ({fkey}); Shift+clique adiciona Alinhar à grade",
+ "New Tracks… ({})" => "Novas pistas… ({})",
+ "EQ and Dynamics Cycling Starts at Insert" => "A alternância de EQ e dinâmica começa na inserção",
+ "Expander/Gate Only" => "Somente expansor/gate",
+ "Factory Default" => "Padrão de fábrica",
+ "Fades Dialog Preview Post-Roll" => "Post-roll da prévia do diálogo de fades",
+ "Fades Dialog Preview Pre-Roll" => "Pre-roll da prévia do diálogo de fades",
+ "First Invite Shares All Tracks" => "O primeiro convite compartilha todas as pistas",
+ "Fit to Window" => "Ajustar à janela",
+ "Follow Session Settings" => "Seguir as configurações da sessão",
+ "Function Tool Tips" => "Dicas de função das ferramentas",
+ "Gain Reduction Meter Type" => "Tipo de medidor de redução de ganho",
+ "General Color" => "Cor geral",
+ "Global MIDI Playback Offset" => "Deslocamento global da reprodução MIDI",
+ "Handle Length" => "Duração da margem",
+ "High" => "Alta",
+ "Highest" => "Mais alta",
+ "Horizontal Zoom" => "Zoom horizontal",
+ "Ignore Track Arming" => "Ignorar o armamento de pista",
+ "Import Sliced Loops as Clip Groups" => "Importar loops fatiados como grupos de clipes",
+ "Include Control Changes in Undo Queue" => "Incluir mudanças de controle na fila de desfazer",
+ "Include Sends in Trim Mode" => "Incluir envios no modo Trim",
+ "Infinite" => "Infinito",
+ "Integration Time" => "Tempo de integração",
+ "Joining a Project Downloads All Shared Tracks" => "Entrar em um projeto baixa todas as pistas compartilhadas",
+ "K-12" => "K-12",
+ "K-14" => "K-14",
+ "K-20" => "K-20",
+ "Keep Most Recent Session Backups" => "Manter os backups de sessão mais recentes",
+ "Keep Unused Folders on Session Close" => "Manter pastas não usadas ao fechar a sessão",
+ "Latch Audio Tracks" => "Latch nas pistas de áudio",
+ "Latch Fast Forward and Rewind" => "Latch no avanço e retrocesso rápidos",
+ "Latch Switch Controls in Touch Mode" => "Latch nos controles de chave no modo Touch",
+ "Latch Until Next Event" => "Latch até o próximo evento",
+ "Levels of Undo" => "Níveis de desfazer",
+ "Linear Extended" => "Linear estendido",
+ "Linked Systems" => "Sistemas vinculados",
+ "Link Object and Audio Recording" => "Vincular objeto e gravação de áudio",
+ "Link Record and Play Faders" => "Vincular faders de gravação e reprodução",
+ "Live Peak" => "Pico ao vivo",
+ "Live RMS" => "RMS ao vivo",
+ "Local Waveform Cache Versions" => "Versões do cache local de formas de onda",
+ "Lock File Extension" => "Extensão do arquivo de bloqueio",
+ "Logging" => "Registro",
+ "Machine Chases Memory Location" => "A máquina persegue o local de memória",
+ "Machine Control" => "Controle de máquina",
+ "Machine Cues Intelligently" => "A máquina posiciona de forma inteligente",
+ "Machine Follows Edit Insertion and Scrub" => "A máquina acompanha a inserção de edição e o scrub",
+ "Manually" => "Manualmente",
+ "Marker Colors" => "Cores dos marcadores",
+ "Master Meters" => "Medidores master",
+ "Metering" => "Medição",
+ "Meter Type" => "Tipo de medidor",
+ "Middle C" => "Dó central",
+ "MIDI Beat Clock" => "Clock de batida MIDI",
+ "MIDI Input Monitoring Follows Selected Track" => "O monitoramento de entrada MIDI acompanha a pista selecionada",
+ "MIDI Merge Release Mode" => "Modo de liberação da mesclagem MIDI",
+ "MIDI Note 60" => "Nota MIDI 60",
+ "MIDI Note Color Shows Velocity" => "A cor das notas MIDI mostra a velocity",
+ "MIDI Notes and Controllers" => "Notas e controladores MIDI",
+ "MIDI / Score Editor Display" => "Exibição do editor MIDI / partitura",
+ "MIDI Timecode" => "Timecode MIDI",
+ "Minimum Sync Delay" => "Atraso mínimo de sincronização",
+ "Miscellaneous" => "Diversos",
+ "Mixing" => "Mixagem",
+ "Mix Window Follows Banking" => "A janela de mixagem acompanha a troca de banco",
+ "Mix Window Follows Selection" => "A janela de mixagem acompanha a seleção",
+ "Modern" => "Moderno",
+ "Mouse Wheel Scrolling Snaps to Track" => "A rolagem da roda do mouse se ajusta à pista",
+ "Mute Record-Armed Tracks While Stopped" => "Silenciar pistas armadas para gravação enquanto parado",
+ "Name Dialog" => "Diálogo de nome",
+ "New Session 5.x to 7.x/9.x" => "Nova sessão 5.x para 7.x/9.x",
+ "New Session 7.x/9.x to 5.x" => "Nova sessão 7.x/9.x para 5.x",
+ "New Session Fold Down" => "Downmix da nova sessão",
+ "New Session Includes LFE in Fold Down" => "A nova sessão inclui o LFE no downmix",
+ "New Session Surround to Stereo" => "Surround para estéreo da nova sessão",
+ "New Tracks Are Shared" => "Novas pistas são compartilhadas",
+ "New Tracks Default to Tick Timebase" => "Novas pistas usam base de tempo em ticks por padrão",
+ "No Change" => "Sem alteração",
+ "No Files" => "Nenhum arquivo",
+ "Noise Burst Peak Protection" => "Proteção de pico contra rajadas de ruído",
+ "Non-Linear Device" => "Dispositivo não linear",
+ "Non-Linear Transport Error Suppression" => "Supressão de erros de transporte não linear",
+ "Note Display" => "Exibição de notas",
+ "Number Keys 1–5 Control" => "Controle das teclas numéricas 1–5",
+ "Numeric Keypad" => "Teclado numérico",
+ "Offline Processing" => "Processamento offline",
+ "On Exiting Trim Mode" => "Ao sair do modo Trim",
+ "Online Recording Starts" => "A gravação online começa",
+ "Open Unresourced DSP Plugins as Native" => "Abrir plugins DSP sem recursos como nativos",
+ "Organize Plugin Menus By" => "Organizar os menus de plugins por",
+ "Organize Track I/O Menus By" => "Organizar os menus de E/S de pista por",
+ "Original Track Height While Pinned" => "Altura original da pista quando fixada",
+ "Parallel Task Optimization" => "Otimização de tarefas paralelas",
+ "Peak / Clip" => "Pico / clipe",
+ "Peak Hold" => "Retenção de pico",
+ "Pencil Resolution for Controller Data" => "Resolução do lápis para dados de controlador",
+ "Personalize the Experience" => "Personalizar a experiência",
+ "Play Start Follows Timeline Selection" => "O início da reprodução acompanha a seleção da linha do tempo",
+ "Play Start Latency" => "Latência de início da reprodução",
+ "Plugin Controls Default to Auto-Enabled" => "Controles de plugin ativados automaticamente por padrão",
+ "Polyphonic" => "Polifônico",
+ "PPM BBC" => "PPM BBC",
+ "PPM Digital" => "PPM digital",
+ "PPM DIN" => "PPM DIN",
+ "PPM EBU" => "PPM EBU",
+ "PPM Nordic" => "PPM nórdico",
+ "Preserve Fades when Editing" => "Preservar fades ao editar",
+ "Prevent Others from Overwriting an Open Session" => "Impedir que outros sobrescrevam uma sessão aberta",
+ "Prevent Tearing" => "Evitar rasgos de imagem",
+ "Priority Compressor/Limiter" => "Prioridade ao compressor/limitador",
+ "Priority Expander/Gate" => "Prioridade ao expansor/gate",
+ "Processing" => "Processamento",
+ "Processor" => "Processador",
+ "Punch In Frame Offset" => "Deslocamento de quadros do punch in",
+ "Punch Out Frame Offset" => "Deslocamento de quadros do punch out",
+ "Punch Recording Crossfade Length" => "Duração do crossfade da gravação punch",
+ "Randomize Marker Color Upon Creation" => "Sortear a cor do marcador ao criá-lo",
+ "Recall Memory Location at Original Track" => "Recuperar o local de memória na pista original",
+ "Receive Play Selections" => "Receber seleções de reprodução",
+ "Receive Solos" => "Receber solos",
+ "Record Enable Buttons" => "Botões de armar gravação",
+ "Reduce Visual Effects" => "Reduzir efeitos visuais",
+ "Remote Mode" => "Modo remoto",
+ "Remove Range Selection after Opening a MIDI or Score Editor" => "Remover a seleção de intervalo após abrir um editor MIDI ou de partitura",
+ "Remove Range Selection after Zooming In" => "Remover a seleção de intervalo após aumentar o zoom",
+ "Rendered File Bit Depth" => "Profundidade de bits do arquivo renderizado",
+ "Reserve Voices for Preview in Context" => "Reservar vozes para a prévia em contexto",
+ "Reset Advanced Meter Settings" => "Redefinir as configurações avançadas de medidores",
+ "Reset “Don’t Show This Again” Settings" => "Redefinir as configurações de “Não mostrar novamente”",
+ "Reset Logging" => "Redefinir o registro",
+ "RMS" => "RMS",
+ "Routing Coefficients" => "Coeficientes de roteamento",
+ "Sample Peak" => "Pico de amostra",
+ "Sample Rate Conversion Quality" => "Qualidade da conversão de taxa de amostragem",
+ "Save Logs" => "Salvar registros",
+ "Scroll to Track Banks Controllers" => "Rolar até o banco de pistas dos controladores",
+ "Send Fully Overlapped Clips to a Playlist While Editing" => "Enviar clipes totalmente sobrepostos para uma playlist ao editar",
+ "Send Fully Overlapped Clips to a Playlist While Recording" => "Enviar clipes totalmente sobrepostos para uma playlist ao gravar",
+ "Send Pans Default to Follow Main Pan" => "Pan dos envios segue o pan principal por padrão",
+ "Sends Default to" => "Envios padrão para",
+ "Separate Clip Operates on All Related Takes" => "Separar clipe atua em todos os takes relacionados",
+ "Separate Grid Settings when Zoomed In" => "Configurações de grade separadas com zoom aproximado",
+ "Set Servo Lock at Play" => "Definir o servo lock ao reproduzir",
+ "Show Dashboard After Closing a Session" => "Mostrar o painel inicial após fechar uma sessão",
+ "Show Dashboard Window at Startup" => "Mostrar a janela do painel inicial ao iniciar",
+ "Show Insert Assignment Gain Reduction Meter" => "Mostrar o medidor de redução de ganho na atribuição de inserts",
+ "Show Marker Lane Colors in Timeline Rulers" => "Mostrar as cores das faixas de marcadores nas réguas da linha do tempo",
+ "Show Marker Lane Colors in Tracks" => "Mostrar as cores das faixas de marcadores nas pistas",
+ "Show Send Assignment Level Meter" => "Mostrar o medidor de nível na atribuição de envios",
+ "Show Sound Libraries in Workspace Locations" => "Mostrar bibliotecas de sons nos locais do espaço de trabalho",
+ "Show Target Playlists after Sending a Clip Selection" => "Mostrar playlists de destino após enviar uma seleção de clipes",
+ "Show Track Gain Reduction Meter" => "Mostrar o medidor de redução de ganho da pista",
+ "Shuttle" => "Shuttle",
+ "Slewing" => "Slewing",
+ "Small" => "Pequena",
+ "Smart Tool Fade Adjustment" => "Ajuste de fade da ferramenta inteligente",
+ "Smooth and Thin Data after Pass" => "Suavizar e simplificar dados após a passagem",
+ "Solo Independent of Linked State" => "Solo independente do estado vinculado",
+ "Some" => "Alguns",
+ "Standard VCA Logic for Group Attributes" => "Lógica VCA padrão para atributos de grupo",
+ "Steep Breakpoint Smoothing Time" => "Tempo de suavização de pontos íngremes",
+ "Stop at Shuttle Speed Zero" => "Parar na velocidade zero do shuttle",
+ "Suppress Automation Write-To Warnings" => "Suprimir avisos de gravação de automação",
+ "Suppress Name Dialog when Creating New Playlists" => "Suprimir o diálogo de nome ao criar novas playlists",
+ "Tab Respects Breakpoints in Automation Lanes" => "Tab respeita os pontos nas faixas de automação",
+ "Tagged Loop Files Only" => "Somente arquivos de loop com marcação",
+ "Time Compression / Expansion" => "Compressão / expansão de tempo",
+ "Timeline Insertion and Play Start Follow Playback" => "A inserção na linha do tempo e o início da reprodução acompanham a reprodução",
+ "Time Mode" => "Modo de tempo",
+ "Time Stretch" => "Time stretch",
+ "Touch Timeout" => "Tempo limite do Touch",
+ "Track and Master Meter Types" => "Tipos de medidor de pista e master",
+ "Track and Master Meter Types Linked" => "Tipos de medidor de pista e master vinculados",
+ "Track Collaboration" => "Colaboração de pistas",
+ "Track Meters" => "Medidores de pista",
+ "Track Position Numbers Stay with Hidden Tracks" => "Os números de posição das pistas permanecem com as pistas ocultas",
+ "Track Type" => "Tipo de pista",
+ "Transmit Play Selections" => "Transmitir seleções de reprodução",
+ "Transmit Solos" => "Transmitir solos",
+ "Transport Record Lock" => "Bloqueio de gravação do transporte",
+ "UI Theme" => "Tema da interface",
+ "Use Absolute Pan Linking" => "Usar vinculação de pan absoluta",
+ "Use F11 for Wait for Note" => "Usar F11 para Aguardar nota",
+ "Use MIDI to Tap Tempo" => "Usar MIDI para marcar o andamento",
+ "User Media and Settings Location" => "Local da mídia e das configurações do usuário",
+ "Use Separate Play and Stop Keys" => "Usar teclas separadas de reproduzir e parar",
+ "Vertical MIDI Zoom" => "Zoom vertical MIDI",
+ "VU" => "VU",
+ "Warnings & Dialogs" => "Avisos e diálogos",
+ "Whole File" => "Arquivo inteiro",
+ "Zoom Presets" => "Predefinições de zoom",
+ "Zoom Toggle Follows Edit Selection" => "A alternância de zoom acompanha a seleção de edição",
+ "System" => "Sistema",
+ "Light" => "Claro",
+ "Dark" => "Escuro",
+ "Tracks and Groups" => "Pistas e grupos",
+ "MEMORY LOCATIONS" => "LOCAIS DE MEMÓRIA",
+ "UNDO HISTORY" => "HISTÓRICO DE DESFAZER",
+ "Import Audio" => "Importar áudio",
+ "Import MIDI" => "Importar MIDI",
+ "Open Session" => "Abrir sessão",
+ "Save Session As" => "Salvar sessão como",
+ "Repeat" => "Repetir",
+ "Quantize strength" => "Intensidade da quantização",
+ "Bounce" => "Bounce",
+ "Remove" => "Remover",
+ "Zeros" => "Zeros",
+ "Key" => "Tonalidade",
+ "Speed Ramp" => "Rampa de velocidade",
+ "times" => "vezes",
+ "Hz" => "Hz",
+ "Untitled" => "Sem título",
+ "Readout" => "Leitura",
+ "5 minutes" => "5 minutos",
+ "25 minutes" => "25 minutos",
+ "2.00 seconds" => "2,00 segundos",
+ "3 Seconds" => "3 segundos",
+ "1 — Shortest" => "1 — Mais curto",
+ "0 frames" => "0 quadros",
+ "30 frames" => "30 quadros",
+ "0 samples" => "0 amostras",
+ "100 dB in 1.00 s" => "100 dB em 1,00 s",
+ "Effect" => "Efeito",
+ "Mode" => "Modo",
+ "Mod Source" => "Fonte de modulação",
+ "HPF Slope" => "Inclinação do HPF",
+ "LPF Slope" => "Inclinação do LPF",
+ "Punch Recording" => "Gravação punch",
+ "Shift (seconds)" => "Deslocamento (segundos)",
+ "Store Plugin State" => "Armazenar estado do plugin",
+ "Tempo Sync" => "Sincronia de andamento",
+ "Waveform" => "Forma de onda",
+ "MusicXML" => "MusicXML",
+ "MusicXML..." => "MusicXML...",
+ "Export — MIDI" => "Exportar — MIDI",
+ "Export — MusicXML" => "Exportar — MusicXML",
+ "Export — Selected Tracks as New Session" => "Exportar — Pistas selecionadas como nova sessão",
+ "File — Print Score" => "Arquivo — Imprimir partitura",
+ "File — Save As Template" => "Arquivo — Salvar como modelo",
+ "Import — Clip Groups" => "Importar — Grupos de clipes",
+ "Import — Session Data" => "Importar — Dados de sessão",
+ "Import — Video" => "Importar — Vídeo",
+ "Track — Save Track Preset" => "Pista — Salvar predefinição de pista",
+ "Fill window with session (Alt+A)" => "Preencher a janela com a sessão (Alt+A)",
+ "Go to End (End)" => "Ir para o fim (End)",
+ "Loop Playback (Cmd+Shift+L)" => "Reproduzir em loop (Cmd+Shift+L)",
+ "Return to Zero (Home)" => "Voltar ao zero (Home)",
+ "Waveform zoom in (Cmd+Alt+])" => "Aumentar zoom da forma de onda (Cmd+Alt+])",
+ "Zoom in (Cmd+])" => "Aumentar zoom (Cmd+])",
+ "Zoom out (Cmd+[)" => "Diminuir zoom (Cmd+[)",
+ "Zoom Toggle (E)" => "Alternar zoom (E)",
+ "no group" => "sem grupo",
+ "nogrp" => "sgrp",
+ "aux" => "aux",
+ "master" => "master",
+ "audio" => "áudio",
+ "midi" => "midi",
+ "inst" => "inst",
+ "vca" => "vca",
+ "folder" => "pasta",
+ "video" => "vídeo",
+ "Select a MIDI clip (or a MIDI track) to edit its notes." => "Selecione um clipe MIDI (ou uma pista MIDI) para editar suas notas.",
+ "{} · {} Hz · {} · {} · {}" => "{} · {} Hz · {} · {} · {}",
+ "1 track" => "1 faixa",
+ "{n} tracks" => "{n} faixas",
+ "{undo} {ms:.1} ms/frame" => "{undo} {ms:.1} ms/quadro",
+ "{seconds:.2} s" => "{seconds:.2} s",
+ "♩ = {bpm:.2} {n}/{d}" => "♩ = {bpm:.2} {n}/{d}",
+ "{n} ch" => "{n} canais",
+ "{b}-bit" => "{b} bits",
+ "Send {which} to {name}: {db} dB\nClick for the send fader · drag vertically to adjust · Shift-drag for fine control · Alt-click for 0 dB · right-click for options" => {
+ "Envio {which} para {name}: {db} dB\nClique para abrir o fader do envio · arraste na vertical para ajustar · Shift-arraste para controle fino · Alt-clique para 0 dB · clique com o botão direito para opções"
+ }
+ "1 {what}" => "1 {what}",
+ "{n} {what}s" => "{n} {what}s",
+ "the clip \"{name}\"" => "o clipe \"{name}\"",
+ "the file \"{name}\"" => "o arquivo \"{name}\"",
+ "{clips} and {files}" => "{clips} e {files}",
+ "Remove {what} from the session?" => "Remover {what} da sessão?",
+ "a clip on the timeline, which is removed too." => "um clipe na linha do tempo, que também será removido.",
+ "{n} clips on the timeline, which are removed too." => "{n} clipes na linha do tempo, que também serão removidos.",
+ " It is used by {users}" => " Ele é usado por {users}",
+ " They are used by {users}" => " Eles são usados por {users}",
+ " \"{name}\" is used by {users}" => " \"{name}\" é usado por {users}",
+ " {n} of the files are used by {users}" => " {n} dos arquivos são usados por {users}",
+ " The file stays on disk." => " O arquivo permanece no disco.",
+ " The files stay on disk." => " Os arquivos permanecem no disco.",
+ _ => return error_translation(source),
+ })
+}
+
+macro_rules! error_templates {
+ ($($source:literal => $translation:literal,)*) => {
+ fn error_translation(source: &str) -> Option<&'static str> {
+ match source {
+ $($source => Some($translation),)*
+ _ => None,
+ }
+ }
+
+ /// Engine error messages with `{name}` placeholders standing for the values they embed. The
+ /// UI matches a message against these templates and fills the translation with the values.
+ pub(super) const ERROR_TEMPLATES: &[(&str, &str)] = &[$(($source, $translation)),*];
+ };
+}
+
+error_templates! {
+ "{path} is not valid Unicode" => "{path} não é Unicode válido",
+ "unknown command `{c}`" => "comando desconhecido `{c}`",
+ "`{c}` is not available: {why}" => "`{c}` não está disponível: {why}",
+ "bad parameters for `{c}`: {why}" => "parâmetros inválidos para `{c}`: {why}",
+ "unsupported: {why}" => "não suportado: {why}",
+ "internal error in `{c}`: {why}" => "erro interno em `{c}`: {why}",
+ "stop recording first" => "pare a gravação primeiro",
+ "journal entry cap" => "limite de entradas do diário atingido",
+ "MIDI file: more than {n} meter changes" => "arquivo MIDI: mais de {n} mudanças de compasso",
+ "MIDI file: more than {n} tempo changes" => "arquivo MIDI: mais de {n} mudanças de andamento",
+ "MIDI file: more than {n} tracks" => "arquivo MIDI: mais de {n} pistas",
+ "MIDI track {n}: longer than 24 hours" => "pista MIDI {n}: mais longa que 24 horas",
+ "none of the requested tracks hold MIDI" => "nenhuma das pistas pedidas contém MIDI",
+ "Clips/Markers is available only for Grid" => "Clipes/Marcadores só está disponível para Grade",
+ "Grid mode always snaps" => "o modo Grade sempre alinha",
+ "Shuffle is locked" => "o Shuffle está bloqueado",
+ "leave Shuffle mode before locking it" => "saia do modo Shuffle antes de bloqueá-lo",
+ "`at` required" => "`at` é obrigatório",
+ "`bars`/`beats` must describe a positive length" => "`bars`/`beats` devem descrever um comprimento positivo",
+ "`buffer_size` must be a number in 16..=8192 or null" => "`buffer_size` deve ser um número entre 16 e 8192 ou nulo",
+ "`bus` required" => "`bus` é obrigatório",
+ "`by` is required" => "`by` é obrigatório",
+ "`clip` id required" => "o id de `clip` é obrigatório",
+ "`clip` required" => "`clip` é obrigatório",
+ "`clips` must be an array of ids" => "`clips` deve ser uma lista de ids",
+ "`color` components must be integers 0..=255" => "os componentes de `color` devem ser inteiros de 0 a 255",
+ "`color` must be [r,g,b] or a palette index" => "`color` deve ser [r,g,b] ou um índice da paleta",
+ "`color` must be [r,g,b] or null" => "`color` deve ser [r,g,b] ou nulo",
+ "`db` (number) required" => "`db` (número) é obrigatório",
+ "`db` or `delta_db` required" => "`db` ou `delta_db` é obrigatório",
+ "`db` required" => "`db` é obrigatório",
+ "`device` must be a string or null" => "`device` deve ser texto ou nulo",
+ "`dir` required" => "`dir` é obrigatório",
+ "`end_bpm` required" => "`end_bpm` é obrigatório",
+ "`feet_frames` required (F+FF)" => "`feet_frames` é obrigatório (F+FF)",
+ "`folder` is not a folder track" => "`folder` não é uma pista de pasta",
+ "`folder` required" => "`folder` é obrigatório",
+ "`format` required" => "`format` é obrigatório",
+ "`from` slot" => "slot `from`",
+ "`to` slot" => "slot `to`",
+ "`index` required" => "`index` é obrigatório",
+ "`name` and `suffix` together must be at most {n} characters" => "`name` e `suffix` juntos devem ter no máximo {n} caracteres",
+ "`name` must not be empty" => "`name` não pode ficar vazio",
+ "`name` required" => "`name` é obrigatório",
+ "`new_name` required" => "`new_name` é obrigatório",
+ "`new_tracks: false` needs `track` or a selected audio track" => "`new_tracks: false` precisa de `track` ou de uma pista de áudio selecionada",
+ "`number`, `zeros` and `suffix` need a `name`" => "`number`, `zeros` e `suffix` precisam de um `name`",
+ "`pan` (number) required" => "`pan` (número) é obrigatório",
+ "`param` required" => "`param` é obrigatório",
+ "`params` must be an object" => "`params` deve ser um objeto",
+ "`params` must be an object of numbers" => "`params` deve ser um objeto de números",
+ "`path` or `paths` required" => "`path` ou `paths` é obrigatório",
+ "`path` required" => "`path` é obrigatório",
+ "`playlist` index required" => "o índice de `playlist` é obrigatório",
+ "`plugin` required" => "`plugin` é obrigatório",
+ "`process` required" => "`process` é obrigatório",
+ "`rows` must be an array" => "`rows` deve ser uma lista",
+ "`rows` must contain 1–128 rows" => "`rows` deve conter de 1 a 128 linhas",
+ "`slot` must be 0..{n} or a..j" => "`slot` deve ser de 0 a {n} ou de a a j",
+ "`slot` must be 0..{n} or a..{m}" => "`slot` deve ser de 0 a {n} ou de a a {m}",
+ "`slot` must be a number or a letter" => "`slot` deve ser um número ou uma letra",
+ "`slot` required" => "`slot` é obrigatório",
+ "`source` id required" => "o id de `source` é obrigatório",
+ "`state` is not valid base64 (or is too large)" => "`state` não é base64 válido (ou é grande demais)",
+ "`state` must be a base64 string or null" => "`state` deve ser texto base64 ou nulo",
+ "`timecode` required (HH:MM:SS:FF)" => "`timecode` é obrigatório (HH:MM:SS:FF)",
+ "`to` required" => "`to` é obrigatório",
+ "`track` is not a MIDI or instrument track" => "`track` não é uma pista MIDI ou de instrumento",
+ "`track` required" => "`track` é obrigatório",
+ "`tracks` must be an array of track ids or names" => "`tracks` deve ser uma lista de ids ou nomes de pistas",
+ "`value` must be a number" => "`value` deve ser um número",
+ "`value` required" => "`value` é obrigatório",
+ "`vca` must be a VCA Master track" => "`vca` deve ser uma pista VCA Master",
+ "`view` required" => "`view` é obrigatório",
+ "`{k}` must be an array of ids" => "`{k}` deve ser uma lista de ids",
+ "`{k}` required" => "`{k}` é obrigatório",
+ "`{k}` must be a number" => "`{k}` deve ser um número",
+ "`{k}` must be a whole number from 0 to {max}" => "`{k}` deve ser um número inteiro de 0 a {max}",
+ "`{k}` must be text" => "`{k}` deve ser texto",
+ "`{name}` is a hosted plugin; AudioSuite runs built-in plugins only (engine.plugins)" => "`{name}` é um plugin hospedado; o AudioSuite só executa plugins internos (engine.plugins)",
+ "`{path}` has no track named `{n}`" => "`{path}` não tem uma pista chamada `{n}`",
+ "`{plugin}` has no parameter `{k}`" => "`{plugin}` não tem o parâmetro `{k}`",
+ "`{plugin}` is not an instrument" => "`{plugin}` não é um instrumento",
+ "`{name}` has more than a day of clips to scan" => "`{name}` tem mais de um dia de clipes para analisar",
+ "`{name}` has no parameter `{param}`" => "`{name}` não tem o parâmetro `{param}`",
+ "`{name}` has no parameter(s): {list}" => "`{name}` não tem o(s) parâmetro(s): {list}",
+ "`{name}` is not a Video track" => "`{name}` não é uma pista de vídeo",
+ "`{name}` is not a built-in instrument" => "`{name}` não é um instrumento interno",
+ "`{name}` is used by {n} clip{plural} on the timeline; pass `with_clips: true` to remove them too" => "`{name}` é usado por {n} clipe{plural} na linha do tempo; passe `with_clips: true` para removê-los também",
+ "a bus named `{name}` exists" => "já existe um bus chamado `{name}`",
+ "a group named `{name}` already exists" => "já existe um grupo chamado `{name}`",
+ "a group needs at least one track" => "um grupo precisa de pelo menos uma pista",
+ "a single creation is limited to 128 tracks" => "uma única criação é limitada a 128 pistas",
+ "a track named `{name}` already exists" => "já existe uma pista chamada `{name}`",
+ "all insert slots are in use" => "todos os slots de inserção estão em uso",
+ "all send slots are in use" => "todos os slots de envio estão em uso",
+ "an output named `{name}` exists" => "já existe uma saída chamada `{name}`",
+ "analyse at most 20 minutes at a time" => "analise no máximo 20 minutos por vez",
+ "audio files go on audio tracks" => "arquivos de áudio vão em pistas de áudio",
+ "audio has no channels for clip `{name}`" => "o áudio não tem canais para o clipe `{name}`",
+ "audio unavailable for clip `{name}`" => "áudio indisponível para o clipe `{name}`",
+ "audio path escapes the group folder: {path}" => "o caminho do áudio sai da pasta do grupo: {path}",
+ "automation filesystem access is not granted: read authority is absent: {path}" => "o acesso do sistema de arquivos à automação não foi concedido: falta autorização de leitura: {path}",
+ "automation filesystem access is not granted: write authority is absent: {path}" => "o acesso do sistema de arquivos à automação não foi concedido: falta autorização de escrita: {path}",
+ "automation path rejected: a link that leads nowhere: {path}" => "caminho de automação rejeitado: um link que não leva a lugar nenhum: {path}",
+ "automation path rejected: cannot resolve {path}: {why}" => "caminho de automação rejeitado: não foi possível resolver {path}: {why}",
+ "automation path rejected: outside the read root {root}: {path}" => "caminho de automação rejeitado: fora da raiz de leitura {root}: {path}",
+ "automation path rejected: outside the read roots {root}: {path}" => "caminho de automação rejeitado: fora das raízes de leitura {root}: {path}",
+ "automation path rejected: outside the write root {root}: {path}" => "caminho de automação rejeitado: fora da raiz de escrita {root}: {path}",
+ "automation path rejected: outside the write roots {root}: {path}" => "caminho de automação rejeitado: fora das raízes de escrita {root}: {path}",
+ "automation path rejected: parent traversal below a folder that doesn't exist: {path}" => "caminho de automação rejeitado: navegação para o diretório pai abaixo de uma pasta que não existe: {path}",
+ "automation path rejected: reserved device names are not allowed: {path}" => "caminho de automação rejeitado: nomes de dispositivo reservados não são permitidos: {path}",
+ "bad feet" => "pés inválidos",
+ "bad frames" => "quadros inválidos",
+ "bit_depth must be 16, 24 or 32f" => "bit_depth deve ser 16, 24 ou 32f",
+ "bundle: {why}" => "pacote: {why}",
+ "cannot create `{id}`" => "não foi possível criar `{id}`",
+ "cannot write `{name}` files (supported: {list})" => "não é possível gravar arquivos `{name}` (suportados: {list})",
+ "clip fades cannot also specify tracks or an edit range" => "os fades de clipe não podem especificar também pistas ou um intervalo de edição",
+ "clip group file has too many clips" => "o arquivo de grupo de clipes tem clipes demais",
+ "clip has no length" => "o clipe não tem comprimento",
+ "clip must be an id" => "clip deve ser um id",
+ "clip not found" => "clipe não encontrado",
+ "curvature must be a finite number from -1 to 1" => "a curvatura deve ser um número finito de -1 a 1",
+ "curvature requires a clip and side" => "a curvatura exige um clipe e um lado",
+ "designate a target playlist first (Track › Designate as Target Playlist)" => "designe primeiro uma playlist de destino (Pista › Designar como playlist de destino)",
+ "each note needs `start` or `start_ticks`" => "cada nota precisa de `start` ou `start_ticks`",
+ "each row must be an object without nested rows" => "cada linha deve ser um objeto sem linhas aninhadas",
+ "empty send slot" => "slot de envio vazio",
+ "empty slot" => "slot vazio",
+ "factor must be a positive number" => "o fator deve ser um número positivo",
+ "feet must be 0.. and frames 0..15" => "os pés devem ser 0 ou mais e os quadros de 0 a 15",
+ "give `factor` (0.05..20) or a new `length`" => "informe `factor` (0,05 a 20) ou um novo `length`",
+ "give `start` and `end`" => "informe `start` e `end`",
+ "give `start` and `length` or `end`" => "informe `start` e `length` ou `end`",
+ "index out of range" => "índice fora do intervalo",
+ "length must be a positive sample count" => "o comprimento deve ser uma quantidade positiva de amostras",
+ "make a timeline selection first" => "faça primeiro uma seleção na linha do tempo",
+ "missing media: {list}" => "mídia ausente: {list}",
+ "mode must be shuffle|slip|spot|grid|relative_grid" => "o modo deve ser shuffle|slip|spot|grid|relative_grid",
+ "mode must be strip, extract or separate" => "o modo deve ser strip, extract ou separate",
+ "no MIDI or instrument tracks to notate" => "não há pistas MIDI ou de instrumento para notar",
+ "no audio file with id {id}" => "nenhum arquivo de áudio com o id {id}",
+ "no bus `{name}`" => "nenhum bus `{name}`",
+ "no bus named \"{name}\"" => "nenhum bus chamado \"{name}\"",
+ "no clip with id {id}" => "nenhum clipe com o id {id}",
+ "no clips" => "nenhum clipe",
+ "no clips selected" => "nenhum clipe selecionado",
+ "no clips to export" => "não há clipes para exportar",
+ "no markers on the clipboard (copy a range that contains markers)" => "não há marcadores na área de transferência (copie um intervalo que contenha marcadores)",
+ "no output `{name}`" => "nenhuma saída `{name}`",
+ "no path yet: pass `path` (Save As)" => "ainda não há caminho: informe `path` (Salvar como)",
+ "no such audio file" => "arquivo de áudio inexistente",
+ "no such clip" => "clipe inexistente",
+ "no such clip, or it is edit-locked" => "clipe inexistente ou bloqueado para edição",
+ "no such playlist" => "playlist inexistente",
+ "no such track" => "pista inexistente",
+ "no track" => "nenhuma pista",
+ "not a MIDI clip" => "não é um clipe MIDI",
+ "not a MIDI or instrument track" => "não é uma pista MIDI ou de instrumento",
+ "not a SoundCraft clip group file" => "não é um arquivo de grupo de clipes do SoundCraft",
+ "not a clip group file: {why}" => "não é um arquivo de grupo de clipes: {why}",
+ "not a regular file" => "não é um arquivo comum",
+ "not a take SoundCraft recorded" => "não é uma tomada gravada pelo SoundCraft",
+ "not in a folder SoundCraft records into" => "não está em uma pasta em que o SoundCraft grava",
+ "nothing to clear: pass `clips` or `sources`, or select them in the Clip List" => "nada para limpar: informe `clips` ou `sources`, ou selecione-os na Lista de clipes",
+ "nothing to import" => "nada para importar",
+ "nothing to move into that folder" => "nada para mover para essa pasta",
+ "only instrument tracks have a sampler" => "apenas pistas de instrumento têm sampler",
+ "only instrument tracks have an instrument" => "apenas pistas de instrumento têm instrumento",
+ "parameter(s) need a numeric value: {list}" => "o(s) parâmetro(s) precisam de um valor numérico: {list}",
+ "pass `start` and/or `end`" => "informe `start` e/ou `end`",
+ "read {a}; write {b}" => "leitura {a}; escrita {b}",
+ "record-enable (or pass) the audio tracks to prepare" => "habilite a gravação (ou informe) as pistas de áudio a preparar",
+ "score too large: over {n} bytes" => "partitura grande demais: mais de {n} bytes",
+ "select MIDI clips" => "selecione clipes MIDI",
+ "select a MIDI or instrument track" => "selecione uma pista MIDI ou de instrumento",
+ "select a VCA master" => "selecione um VCA master",
+ "select a clip" => "selecione um clipe",
+ "select a clip in the Clip List, or pass `clips`" => "selecione um clipe na Lista de clipes ou informe `clips`",
+ "select a range on the timeline" => "selecione um intervalo na linha do tempo",
+ "select a range to analyse" => "selecione um intervalo para analisar",
+ "select an audio clip" => "selecione um clipe de áudio",
+ "select an audio track to generate on" => "selecione uma pista de áudio para gerar",
+ "select audio clips first" => "selecione clipes de áudio primeiro",
+ "select audio on an audio track" => "selecione áudio em uma pista de áudio",
+ "select one or more aux input tracks" => "selecione uma ou mais pistas de entrada auxiliar",
+ "select some audio first" => "selecione algum áudio primeiro",
+ "select two or more clips" => "selecione dois ou mais clipes",
+ "selection is empty" => "a seleção está vazia",
+ "shape must be linear|equal power|s-curve|exponential|logarithmic" => "a forma deve ser linear|equal power|s-curve|exponential|logarithmic",
+ "side must be in or out" => "o lado deve ser in ou out",
+ "slot out of range" => "slot fora do intervalo",
+ "source channel unavailable" => "canal de origem indisponível",
+ "source_bpm must be 5..1000" => "source_bpm deve estar entre 5 e 1000",
+ "split would copy too much audio" => "a divisão copiaria áudio demais",
+ "stretch ratio {ratio} is outside 0.1..10" => "a razão de esticamento {ratio} está fora de 0,1 a 10",
+ "that playlist is already active" => "essa playlist já está ativa",
+ "the Video track has no clips" => "a pista de vídeo não tem clipes",
+ "the clip has no clip effects" => "o clipe não tem efeitos de clipe",
+ "the clip is locked" => "o clipe está bloqueado",
+ "the clip is too long to stretch: one render holds at most {secs} s of {channels}-channel audio" => "o clipe é longo demais para esticar: uma renderização comporta no máximo {secs} s de áudio de {channels} canais",
+ "the clip's audio is not loaded" => "o áudio do clipe não está carregado",
+ "the clips can't land there: past the last track, or on a track that can't hold them" => "os clipes não podem ficar ali: além da última pista ou em uma pista que não os comporta",
+ "the range contains more than 10,000 grid boundaries" => "o intervalo contém mais de 10.000 limites de grade",
+ "the sampler has no parameter `{k}`" => "o sampler não tem o parâmetro `{k}`",
+ "the sampler is not available" => "o sampler não está disponível",
+ "the scan was stopped" => "a análise foi interrompida",
+ "the selection is empty" => "a seleção está vazia",
+ "the selection is not a looped clip" => "a seleção não é um clipe em loop",
+ "the selection is too short" => "a seleção é curta demais",
+ "the selection must cover a clip start, end or the boundary between two clips" => "a seleção deve cobrir o início ou o fim de um clipe, ou o limite entre dois clipes",
+ "the session has no Video track" => "a sessão não tem pista de vídeo",
+ "the target length must be between 1 sample and {secs} s" => "o comprimento de destino deve ficar entre 1 amostra e {secs} s",
+ "the target playlist is the main playlist" => "a playlist de destino é a playlist principal",
+ "the track has no instrument" => "a pista não tem instrumento",
+ "the track has no playlist" => "a pista não tem playlist",
+ "the track's instrument is not the sampler" => "o instrumento da pista não é o sampler",
+ "there is no audio to prepare" => "não há áudio a preparar",
+ "too many tempo events: use a coarser resolution" => "eventos de andamento demais: use uma resolução mais grossa",
+ "too much audio to generate in one command" => "áudio demais para gerar em um único comando",
+ "unknown `group`" => "`group` desconhecido",
+ "unknown action `{name}`" => "ação desconhecida `{name}`",
+ "unknown automation param `{name}`" => "parâmetro de automação desconhecido `{name}`",
+ "unknown bus `{name}`" => "bus desconhecido `{name}`",
+ "unknown field `{k}`: an instrument's parameters go in `params` ({{id: value}}), or one at a time in mix.instrument_param" => "campo desconhecido `{k}`: os parâmetros de um instrumento vão em `params` ({{id: valor}}), ou um de cada vez em mix.instrument_param",
+ "unknown focus `{name}`" => "foco desconhecido `{name}`",
+ "unknown fold_down `{name}` (use \"stereo\")" => "fold_down desconhecido `{name}` (use \"stereo\")",
+ "unknown format" => "formato desconhecido",
+ "unknown format `{name}`" => "formato desconhecido `{name}`",
+ "unknown grid value or format" => "valor ou formato de grade desconhecido",
+ "unknown height" => "altura desconhecida",
+ "unknown kind `{name}`" => "tipo desconhecido `{name}`",
+ "unknown memory location (give `number`, `id` or `name`)" => "local de memória desconhecido (informe `number`, `id` ou `name`)",
+ "unknown mode" => "modo desconhecido",
+ "unknown mode `{name}`" => "modo desconhecido `{name}`",
+ "unknown nudge value or format" => "valor ou formato de nudge desconhecido",
+ "unknown plugin" => "plugin desconhecido",
+ "unknown plugin `{name}`" => "plugin desconhecido `{name}`",
+ "unknown process `{name}`" => "processo desconhecido `{name}`",
+ "unknown ruler" => "régua desconhecida",
+ "unknown tool" => "ferramenta desconhecida",
+ "unknown track" => "pista desconhecida",
+ "unknown view `{name}`" => "visualização desconhecida `{name}`",
+ "use F+FF, e.g. 12+08" => "use F+FF, por exemplo 12+08",
+ "{name}: file is too large to import" => "{name}: o arquivo é grande demais para importar",
+ "{name}: no audio" => "{name}: sem áudio",
+ "{name}: too long for a sample (ten minutes of 192 kHz stereo at most)" => "{name}: longo demais para um sample (no máximo dez minutos de estéreo a 192 kHz)",
+ "{path}: not a SoundCraft track preset" => "{path}: não é um preset de pista do SoundCraft",
+ "{path}: not a regular file" => "{path}: não é um arquivo comum",
+ "{path}: too large to import" => "{path}: grande demais para importar",
+ "{name} (video): {why}" => "{name} (vídeo): {why}",
+ "{path} already exists: pass `replace: true` to replace it" => "{path} já existe: passe `replace: true` para substituí-lo",
+ "“{name}” would need {reps} loops to fill that; a clip loops at most {max} times" => "“{name}” precisaria de {reps} repetições para preencher isso; um clipe repete no máximo {max} vezes",
+}
diff --git a/crates/ui-egui/src/app.rs b/crates/ui-egui/src/app.rs
index 282689066..295b5d5d7 100644
--- a/crates/ui-egui/src/app.rs
+++ b/crates/ui-egui/src/app.rs
@@ -139,6 +139,7 @@ impl SoundApp {
/// Each host iteration starts with `raw_input_hook`; its editor-poll admission prevents an
/// empty queue on a discarded pass from ending a still-active plugin gesture.
pub fn logic(&mut self, ctx: &egui::Context) {
+ let _language = crate::localization::enter(self.ui.language);
self.ui.undo_levels = self.ui.undo_levels.clamp(1, 64);
self.engine.set_history_limit(self.ui.undo_levels);
// Fonts set now take effect next frame, so draw only from the frame after.
@@ -244,6 +245,7 @@ impl SoundApp {
/// Lay out the whole window.
pub fn ui(&mut self, ui: &mut egui::Ui) {
+ let _language = crate::localization::enter(self.ui.language);
let ctx = ui.ctx().clone();
// egui just processed the scripted key events. A scripted release while the host still
// physically holds the key would report it up; put the host-only state back before any
diff --git a/crates/ui-egui/src/app/audio.rs b/crates/ui-egui/src/app/audio.rs
index 3ec928491..75ef5012d 100644
--- a/crates/ui-egui/src/app/audio.rs
+++ b/crates/ui-egui/src/app/audio.rs
@@ -13,7 +13,7 @@ impl SoundApp {
/// then stays the configuration of the open device.
pub fn apply_audio_config(&mut self, cfg: soundcraft_playback::AudioConfig) -> Result<(), String> {
if self.engine.transport.recording {
- return Err("stop recording before changing the audio device".into());
+ return Err(crate::localization::text("stop recording before changing the audio device").into());
}
self.ui.audio = cfg;
let at = self.position();
@@ -46,7 +46,7 @@ impl SoundApp {
}
Err(e) => {
self.recorder_failed = true;
- self.ui.status = format!("No audio input: {e}");
+ self.ui.status = crate::localized_format!("No audio input: {e}", e = e);
}
}
}
@@ -58,24 +58,28 @@ impl SoundApp {
let name = p.device_name.clone();
let (cause, then) = match trouble {
OutputTrouble::Bug => (
- "the audio engine hit an internal error (see the log)".to_string(),
- "Use Reconnect audio device in Setup › Playback Engine, or restart SoundCraft.",
+ crate::localization::text("the audio engine hit an internal error (see the log)").to_string(),
+ crate::localization::text("Use Reconnect audio device in Setup › Playback Engine, or restart SoundCraft."),
+ ),
+ OutputTrouble::Gone => (
+ format!("“{}” {}", name, crate::localization::text("is unavailable")),
+ crate::localization::text("Check the audio device, then use Reconnect audio device in Setup › Playback Engine."),
+ ),
+ OutputTrouble::Stalled => (
+ format!("“{}” {}", name, crate::localization::text("stopped asking for audio")),
+ crate::localization::text("Use Reconnect audio device in Setup › Playback Engine."),
),
- OutputTrouble::Gone => {
- (format!("“{name}” is unavailable"), "Check the audio device, then use Reconnect audio device in Setup › Playback Engine.")
- }
- OutputTrouble::Stalled => (format!("“{name}” stopped asking for audio"), "Use Reconnect audio device in Setup › Playback Engine."),
};
let (recording, playing) = (self.engine.transport.recording, self.engine.transport.playing);
if recording || playing {
self.stop_play();
}
self.ui.status = if recording {
- format!("Recording stopped: {cause}. The take is kept up to there. {then}")
+ crate::localized_format!("Recording stopped: {cause} The take is kept up to there. {then}", cause = cause, then = then)
} else if playing {
- format!("Playback stopped: {cause}. {then}")
+ crate::localized_format!("Playback stopped: {cause} {then}", cause = cause, then = then)
} else {
- format!("Audio output: {cause}. {then}")
+ crate::localized_format!("Audio output: {cause} {then}", cause = cause, then = then)
};
}
@@ -88,7 +92,7 @@ impl SoundApp {
let lost = r.lost_ms();
if recording && lost > self.lost_shown {
self.lost_shown = lost;
- self.ui.status = format!("The disk is too slow: this take has lost {lost} ms of input so far.");
+ self.ui.status = crate::localized_format!("The disk is too slow: this take has lost {lost} ms of input so far.", lost = lost);
}
return;
};
@@ -99,14 +103,14 @@ impl SoundApp {
Trouble::Device(what) => {
self.recorder = None;
self.recorder_failed = true;
- (what, "Reconnect it, then use Reconnect audio device in Setup › Playback Engine.")
+ (what, crate::localization::text("Reconnect it, then use Reconnect audio device in Setup › Playback Engine."))
}
- Trouble::Disk(what) => (what, "Check the disk, then record again."),
+ Trouble::Disk(what) => (what, crate::localization::text("Check the disk, then record again.")),
};
self.ui.status = if recording {
- format!("Recording stopped: {what}. The take is kept up to there. {then}")
+ crate::localized_format!("Recording stopped: {what} The take is kept up to there. {then}", what = what, then = then)
} else {
- format!("Audio input: {what}. {then}")
+ crate::localized_format!("Audio input: {what} {then}", what = what, then = then)
};
}
diff --git a/crates/ui-egui/src/app/commands.rs b/crates/ui-egui/src/app/commands.rs
index 42a74ce8d..8442457c1 100644
--- a/crates/ui-egui/src/app/commands.rs
+++ b/crates/ui-egui/src/app/commands.rs
@@ -3,6 +3,7 @@ use super::{SoundApp, Value, bounce, menus};
impl SoundApp {
/// Run a command; errors go to the status line. Returns the result.
pub fn run(&mut self, id: &str, params: Value) -> Result {
+ let _language = crate::localization::enter(self.ui.language);
if matches!(id, "session.new" | "session.open" | "session.close" | "session.revert") && bounce::refuses_session_switch(self) {
return Err(self.ui.status.clone());
}
@@ -39,7 +40,7 @@ impl SoundApp {
Ok(v)
}
Err(e) => {
- self.ui.status = e.to_string();
+ self.ui.status = crate::localization::error_text(&e.to_string());
log::warn!("{id}: {e}");
Err(e.to_string())
}
diff --git a/crates/ui-egui/src/app/files.rs b/crates/ui-egui/src/app/files.rs
index 6b230d349..92ded255c 100644
--- a/crates/ui-egui/src/app/files.rs
+++ b/crates/ui-egui/src/app/files.rs
@@ -34,7 +34,7 @@ impl SoundApp {
/// plugins' own state reaches the session every two minutes (`autosave`).
pub(super) fn autosave_changes(&mut self) {
if let Some(e) = self.autosaver.as_ref().and_then(soundcraft_engine::autosave::Autosaver::failure) {
- self.ui.status = format!("Autosave failed: {e}");
+ self.ui.status = crate::localized_format!("Autosave failed: {e}", e = e);
}
if self.autosave_dir.is_none() || self.engine.revision == self.autosaved_rev {
return;
@@ -60,7 +60,7 @@ impl SoundApp {
let Some(w) = &self.autosaver else { return false };
let written = w.flush();
if let Err(e) = &written {
- self.ui.status = format!("Autosave failed: {e}");
+ self.ui.status = crate::localized_format!("Autosave failed: {e}", e = e);
}
written.is_ok()
}
@@ -105,16 +105,19 @@ impl SoundApp {
self.panic_rev = self.engine.revision;
let saved = self.engine.is_dirty() && self.write_autosave();
self.ui.status = if saved {
- "SoundCraft hit an internal error (see the log). Your changes were autosaved: save them, then restart SoundCraft.".into()
+ crate::localization::text(
+ "SoundCraft hit an internal error (see the log). Your changes were autosaved: save them, then restart SoundCraft.",
+ )
+ .into()
} else {
- "SoundCraft hit an internal error (see the log). Restart SoundCraft to be safe.".into()
+ crate::localization::text("SoundCraft hit an internal error (see the log). Restart SoundCraft to be safe.").into()
};
}
/// Replace the open session with unsaved work an earlier run left behind.
pub fn recover(&mut self, left: &soundcraft_engine::autosave::Leftover) {
if self.engine.transport.recording {
- self.ui.status = "Stop recording before recovering other work.".into();
+ self.ui.status = crate::localization::text("Stop recording before recovering other work.").into();
return;
}
self.close_autosave();
@@ -125,11 +128,15 @@ impl SoundApp {
soundcraft_engine::autosave::discard(left);
}
self.ui.status = match missing.len() {
- 0 => format!("Recovered “{}”. Save it to keep the changes.", left.name),
- n => format!("Recovered “{}”, but {n} audio file(s) are missing. Save it to keep the changes.", left.name),
+ 0 => crate::localized_format!("Recovered “{name}”. Save it to keep the changes.", name = left.name),
+ n => crate::localized_format!(
+ "Recovered “{name}”, but {n} audio file(s) are missing. Save it to keep the changes.",
+ name = left.name,
+ n = n
+ ),
};
}
- Err(e) => self.ui.status = format!("Couldn't recover “{}”: {e}", left.name),
+ Err(e) => self.ui.status = crate::localized_format!("Couldn't recover “{name}”: {e}", name = left.name, e = e),
}
}
diff --git a/crates/ui-egui/src/app/input.rs b/crates/ui-egui/src/app/input.rs
index c6167d5aa..2827aad33 100644
--- a/crates/ui-egui/src/app/input.rs
+++ b/crates/ui-egui/src/app/input.rs
@@ -153,7 +153,7 @@ impl SoundApp {
let r = self.run("mix.sampler_load", json!({"track": track.0, "path": path}));
self.sample_loaded(track, path, r);
}
- Err(e) => self.ui.status = e.to_string(),
+ Err(e) => self.ui.status = crate::localization::error_text(&e.to_string()),
}
} else {
self.sample_reads.push(sampler_window::SampleRead { track, file });
diff --git a/crates/ui-egui/src/app/playback.rs b/crates/ui-egui/src/app/playback.rs
index 645a0d5f4..35d79630d 100644
--- a/crates/ui-egui/src/app/playback.rs
+++ b/crates/ui-egui/src/app/playback.rs
@@ -92,9 +92,9 @@ impl SoundApp {
let armed = self.engine.session().tracks.iter().any(|t| t.mixer.record_arm);
if !armed {
let why = if self.engine.session().tracks.is_empty() {
- "Nothing to record on yet: add a track with Track › New…, then click its R button."
+ crate::localization::text("Nothing to record on yet: add a track with Track › New…, then click its R button.")
} else {
- "No track is record-enabled: click the R button on the track to record."
+ crate::localization::text("No track is record-enabled: click the R button on the track to record.")
};
self.ui.status = why.into();
self.record_hint = Some((self.last_frame.unwrap_or_default(), why));
@@ -104,7 +104,7 @@ impl SoundApp {
let takes = match self.arm_recorder() {
Ok(takes) => takes,
Err(err) => {
- self.ui.status = format!("Cannot record: {err}");
+ self.ui.status = crate::localized_format!("Cannot record: {err}", err = err);
return;
}
};
@@ -163,10 +163,10 @@ impl SoundApp {
None if self.engine.path.is_some() => std::path::PathBuf::new(),
None => self.fallback_take_dir()?,
};
- let Some(r) = &mut self.recorder else { return Err("no audio input device".into()) };
+ let Some(r) = &mut self.recorder else { return Err(crate::localization::text("no audio input device").into()) };
let plan = soundcraft_engine::io::plan_takes(&self.engine, &unsaved_dir, r.channels);
if plan.is_empty() {
- return Err("no audio track is record-enabled".into());
+ return Err(crate::localization::text("no audio track is record-enabled").into());
}
// The takes are unsaved work: on Unix the folder they go into is owner-only, like the
// autosaves, before the recorder makes anything in it (other systems get the folder's
@@ -216,8 +216,11 @@ impl SoundApp {
self.punch = None;
self.autosaved_rev = 0;
let ids = soundcraft_engine::io::place_recording(&mut self.engine, &plan, takes);
- self.ui.status =
- if plan.pass.is_some() { format!("Loop-recorded {} take(s)", ids.len() / tracks) } else { format!("Recorded {} clip(s)", ids.len()) };
+ self.ui.status = if plan.pass.is_some() {
+ crate::localized_format!("Loop-recorded {} take(s)", ids.len() / tracks)
+ } else {
+ crate::localized_format!("Recorded {} clip(s)", ids.len())
+ };
if let Some(p) = problem {
log::warn!("recording: {p}");
self.ui.status = format!("{} ({p})", self.ui.status);
diff --git a/crates/ui-egui/src/app/plugins.rs b/crates/ui-egui/src/app/plugins.rs
index 19feaee72..d7f8ac176 100644
--- a/crates/ui-egui/src/app/plugins.rs
+++ b/crates/ui-egui/src/app/plugins.rs
@@ -75,7 +75,11 @@ impl SoundApp {
{
match p.open_editor(track, slot) {
Ok(()) => return,
- Err(e) => self.ui.status = format!("{}: {e}", mix_window::plugin_info(&plugin).map_or(plugin.as_str(), |i| i.name)),
+ Err(e) => {
+ let name = mix_window::plugin_info(&plugin).map_or(plugin.as_str(), |i| i.name);
+ let reason = crate::localization::error_text(&e.to_string());
+ self.ui.status = format!("{name}: {reason}");
+ }
}
}
if !self.ui.plugin_windows.contains(&(track, slot)) {
@@ -130,5 +134,9 @@ pub(crate) fn failed_plugin_status(s: &soundcraft_model::Session, track: TrackId
let t = s.track(track)?;
let ins = if slot == soundcraft_mix::INSTRUMENT_SLOT { t.instrument.as_ref() } else { t.mixer.inserts.get(slot)?.as_ref() }?;
let name = crate::mix_window::plugin_info(&ins.plugin).map_or(ins.plugin.as_str(), |p| p.name);
- Some(format!("{name} on {} put out invalid audio, so it is bypassed until playback stops or starts again.", t.name))
+ Some(crate::localized_format!(
+ "{name} on {track} put out invalid audio, so it is bypassed until playback stops or starts again.",
+ name = name,
+ track = t.name
+ ))
}
diff --git a/crates/ui-egui/src/bounce.rs b/crates/ui-egui/src/bounce.rs
index 480c2a02e..04e75ecf5 100644
--- a/crates/ui-egui/src/bounce.rs
+++ b/crates/ui-egui/src/bounce.rs
@@ -8,14 +8,14 @@ use serde_json::Value;
/// Starts the bounce `file.bounce_mix` runs for `params`; [`step`] renders it.
pub fn start(app: &mut SoundApp, params: &Value) {
if app.bounce.is_some() {
- app.ui.status = "A bounce is already running".into();
+ app.ui.status = crate::localization::text("A bounce is already running").into();
return;
}
// Third-party plugins keep state the session can't see: store it first.
app.capture_plugin_states();
match soundcraft_engine::cmd::bounce_job(&app.engine, params) {
Ok(job) => app.bounce = Some(job),
- Err(e) => app.ui.status = e.to_string(),
+ Err(e) => app.ui.status = crate::localization::error_text(&e.to_string()),
}
}
@@ -29,9 +29,14 @@ pub fn step(app: &mut SoundApp, ctx: &egui::Context) {
return;
}
Ok(Some(done)) => {
- format!("Bounced {} (peak {:.1} dBFS, {:.1} LUFS)", job.path().file_name().unwrap_or_default().to_string_lossy(), done.peak_db, done.lufs)
+ crate::localized_format!(
+ "Bounced {} (peak {:.1} dBFS, {:.1} LUFS)",
+ job.path().file_name().unwrap_or_default().to_string_lossy(),
+ done.peak_db,
+ done.lufs
+ )
}
- Err(e) => e.to_string(),
+ Err(e) => crate::localization::error_text(&e.to_string()),
};
app.bounce = None;
}
@@ -40,7 +45,7 @@ pub fn step(app: &mut SoundApp, ctx: &egui::Context) {
/// out of memory. True when refused; the status line says why.
pub fn refuses_session_switch(app: &mut SoundApp) -> bool {
if app.bounce.is_some() {
- app.ui.status = "Finish or cancel the bounce first".into();
+ app.ui.status = crate::localization::text("Finish or cancel the bounce first").into();
}
app.bounce.is_some()
}
@@ -70,15 +75,15 @@ pub fn show(app: &mut SoundApp, ctx: &egui::Context) {
ui.spacing_mut().item_spacing = egui::vec2(8.0, 8.0);
ui.set_width(320.0);
let name = job.path().file_name().unwrap_or_default().to_string_lossy();
- ui.label(egui::RichText::new(format!("Bouncing {name}")).font(bold(13.0)));
+ ui.label(egui::RichText::new(crate::localized_format!("Bouncing {name}", name = name)).font(bold(13.0)));
ui.add(egui::ProgressBar::new(job.progress()));
ui.horizontal(|ui| {
- cancel |= ui.button("Cancel").clicked();
+ cancel |= ui.button(crate::localization::text("Cancel")).clicked();
ui.label(egui::RichText::new(format!("{:.0}%", job.progress() * 100.0)).color(Tokens::current().text_dim));
});
});
if cancel {
app.bounce = None;
- app.ui.status = "Bounce cancelled".into();
+ app.ui.status = crate::localization::text("Bounce cancelled").into();
}
}
diff --git a/crates/ui-egui/src/credits.rs b/crates/ui-egui/src/credits.rs
index f8d9a507a..9feb73a37 100644
--- a/crates/ui-egui/src/credits.rs
+++ b/crates/ui-egui/src/credits.rs
@@ -123,7 +123,7 @@ impl Contributor {
/// One line with everything we know, for tooltips.
pub fn summary(&self) -> String {
- format!(
+ crate::localized_format!(
"@{}: {} PRs, {} commits, +{} / −{} lines (Δ {}), +{} / −{} binary assets, {} – {}",
self.login,
self.prs,
@@ -213,31 +213,31 @@ impl Default for View {
/// Controls for name style, sort key and sort direction above the contributor table.
fn contributors_toolbar(ui: &mut egui::Ui, v: &mut View) {
ui.horizontal_wrapped(|ui| {
- ui.label("Show");
+ ui.label(crate::localization::text("Show"));
for m in NameMode::ALL {
- if ui.selectable_label(v.names == m, m.label()).clicked() {
+ if ui.selectable_label(v.names == m, crate::localization::text(m.label())).clicked() {
v.names = m;
}
}
ui.separator();
- let sort = ui.label("Sort");
- let combo = craft_ui::ComboBox::from_id_salt("credits_sort").selected_text(v.key.label().0).show_ui(ui, |ui| {
+ let sort = ui.label(crate::localization::text("Sort"));
+ let combo = craft_ui::ComboBox::from_id_salt("credits_sort").selected_text(crate::localization::text(v.key.label().0)).show_ui(ui, |ui| {
for k in SortKey::ALL {
- if ui.selectable_label(v.key == k, k.label().0).clicked() {
+ if ui.selectable_label(v.key == k, crate::localization::text(k.label().0)).clicked() {
v.key = k;
v.ascending = k.default_ascending();
}
}
});
combo.response.labelled_by(sort.id);
- if ui.button(if v.ascending { "⏶" } else { "⏷" }).on_hover_text("Reverse the order").clicked() {
+ if ui.button(if v.ascending { "⏶" } else { "⏷" }).on_hover_text(crate::localization::text("Reverse the order")).clicked() {
v.ascending = !v.ascending;
}
ui.separator();
- if ui.selectable_label(!v.table, "Grab bag").clicked() {
+ if ui.selectable_label(!v.table, crate::localization::text("Grab bag")).clicked() {
v.table = false;
}
- if ui.selectable_label(v.table, "Table").clicked() {
+ if ui.selectable_label(v.table, crate::localization::text("Table")).clicked() {
v.table = true;
}
});
@@ -247,7 +247,7 @@ fn contributors_grab_bag(ui: &mut egui::Ui, list: &[&Contributor], names: NameMo
ui.horizontal_wrapped(|ui| {
for (i, c) in list.iter().enumerate() {
if i > 0 {
- ui.label(RichText::new("·").weak());
+ ui.label(RichText::new(crate::localization::text("·")).weak());
}
ui.hyperlink_to(c.name(names), format!("https://github.com/{}", c.login)).on_hover_text(c.summary());
}
@@ -260,10 +260,10 @@ pub fn contributors_ui(ui: &mut egui::Ui) {
let mut v = ui.data_mut(|d| d.get_temp::(id)).unwrap_or_default();
contributors_toolbar(ui, &mut v);
let list = sorted(CONTRIBUTORS, v.names, v.key, v.ascending);
- ui.label(RichText::new(format!("{} contributors · {} commits", list.len(), group(TOTAL_COMMITS))).small().weak());
+ ui.label(RichText::new(crate::localized_format!("{} contributors · {} commits", list.len(), group(TOTAL_COMMITS))).small().weak());
ui.separator();
if list.is_empty() {
- ui.label("No contributor data was built into this copy.");
+ ui.label(crate::localization::text("No contributor data was built into this copy."));
} else if v.table {
// The table scrolls vertically itself, under a fixed header; it only scrolls sideways
// once its columns are dragged wider than the dialog.
@@ -372,7 +372,7 @@ fn cells(c: &Contributor) -> [String; 9] {
/// A contributor-table header. The sorted column is highlighted; its direction shows on the
/// toolbar's sort-order button, so no arrow widens the column.
fn header_text(k: SortKey) -> RichText {
- RichText::new(k.label().1).strong()
+ RichText::new(crate::localization::text(k.label().1)).strong()
}
fn table(ui: &mut egui::Ui, list: &[&Contributor], v: &mut View) {
@@ -390,7 +390,8 @@ fn table(ui: &mut egui::Ui, list: &[&Contributor], v: &mut View) {
.header(h + 4.0, |mut header| {
for k in SortKey::ALL {
header.col(|ui| {
- let r = aligned(ui, k != SortKey::Name, |ui| ui.selectable_label(v.key == k, header_text(k))).on_hover_text(k.label().0);
+ let r = aligned(ui, k != SortKey::Name, |ui| ui.selectable_label(v.key == k, header_text(k)))
+ .on_hover_text(crate::localization::text(k.label().0));
if r.clicked() {
if v.key == k {
@@ -423,7 +424,7 @@ fn table(ui: &mut egui::Ui, list: &[&Contributor], v: &mut View) {
/// About ▸ Models: AI models credited in Co-Authored-By trailers.
pub fn models_ui(ui: &mut egui::Ui) {
if MODELS.is_empty() {
- ui.label("No model credits were built into this copy.");
+ ui.label(crate::localization::text("No model credits were built into this copy."));
return;
}
let assisted: u64 = MODELS.iter().map(|m| m.commits).max().unwrap_or(0).max(1);
@@ -447,14 +448,14 @@ pub fn models_ui(ui: &mut egui::Ui) {
let widths: Vec = titles
.iter()
.enumerate()
- .map(|(i, title)| natural(ui, RichText::new(*title).strong(), rows.iter().filter_map(|r| r.get(i).cloned())))
+ .map(|(i, title)| natural(ui, RichText::new(crate::localization::text(title)).strong(), rows.iter().filter_map(|r| r.get(i).cloned())))
.collect();
egui::ScrollArea::horizontal().id_salt("credits_models").auto_shrink([false, false]).show(ui, |ui| {
fitted_table(ui, "credits_models", &widths, &MODEL_GROW)
.header(h + 4.0, |mut header| {
for (title, r) in titles.into_iter().zip(right) {
header.col(|ui| {
- aligned(ui, r, |ui| ui.label(RichText::new(title).strong()));
+ aligned(ui, r, |ui| ui.label(RichText::new(crate::localization::text(title)).strong()));
});
}
})
diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs
index 360bb0abb..832e5b51e 100644
--- a/crates/ui-egui/src/dialogs.rs
+++ b/crates/ui-egui/src/dialogs.rs
@@ -268,33 +268,43 @@ fn clear_message(s: &Session, clips: &[ClipId], sources: &[SourceId]) -> Option<
let listed: std::collections::BTreeSet = clips.iter().copied().collect();
let names: Vec<&str> = s.tracks.iter().flat_map(|t| t.clips()).filter(|c| listed.contains(&c.id)).map(|c| c.name.as_str()).collect();
let files: Vec<_> = sources.iter().filter_map(|id| s.source(*id)).collect();
- let count = |n: usize, what: &str| if n == 1 { format!("1 {what}") } else { format!("{n} {what}s") };
+ let count = |n: usize, what: &str| {
+ if n == 1 { crate::localized_format!("1 {what}", what = what) } else { crate::localized_format!("{n} {what}s", n = n, what = what) }
+ };
let what = match (names.as_slice(), files.as_slice()) {
([], []) => return None,
- ([name], []) => format!("the clip \"{name}\""),
- ([], [f]) => format!("the file \"{}\"", f.name),
- (c, []) => count(c.len(), "clip"),
- ([], f) => count(f.len(), "file"),
- (c, f) => format!("{} and {}", count(c.len(), "clip"), count(f.len(), "file")),
+ ([name], []) => crate::localized_format!("the clip \"{name}\"", name = name),
+ ([], [f]) => crate::localized_format!("the file \"{name}\"", name = f.name),
+ (c, []) => count(c.len(), crate::localization::text("clip")),
+ ([], f) => count(f.len(), crate::localization::text("file")),
+ (c, f) => crate::localized_format!(
+ "{clips} and {files}",
+ clips = count(c.len(), crate::localization::text("clip")),
+ files = count(f.len(), crate::localization::text("file"))
+ ),
};
- let mut text = format!("Remove {what} from the session?");
+ let mut text = crate::localized_format!("Remove {what} from the session?", what = what);
let used: Vec<(&str, usize)> =
files.iter().map(|f| (f.name.as_str(), s.clips_using(f.id).filter(|c| !listed.contains(&c.id)).count())).filter(|(_, n)| *n > 0).collect();
let n: usize = used.iter().map(|u| u.1).sum();
let users = if n == 1 {
- "a clip on the timeline, which is removed too.".to_string()
+ crate::localization::text("a clip on the timeline, which is removed too.").to_owned()
} else {
- format!("{n} clips on the timeline, which are removed too.")
+ crate::localized_format!("{n} clips on the timeline, which are removed too.", n = n)
};
match used.as_slice() {
[] => {}
- [_] if files.len() == 1 => text += &format!(" It is used by {users}"),
- u if u.len() == files.len() => text += &format!(" They are used by {users}"),
- [(name, _)] => text += &format!(" \"{name}\" is used by {users}"),
- many => text += &format!(" {} of the files are used by {users}", many.len()),
+ [_] if files.len() == 1 => text += &crate::localized_format!(" It is used by {users}", users = users),
+ u if u.len() == files.len() => text += &crate::localized_format!(" They are used by {users}", users = users),
+ [(name, _)] => text += &crate::localized_format!(" \"{name}\" is used by {users}", name = name, users = users),
+ many => text += &crate::localized_format!(" {n} of the files are used by {users}", n = many.len(), users = users),
}
if !files.is_empty() && files.iter().all(|f| !f.unsaved) {
- text += if files.len() == 1 { " The file stays on disk." } else { " The files stay on disk." };
+ text += if files.len() == 1 {
+ crate::localization::text(" The file stays on disk.")
+ } else {
+ crate::localization::text(" The files stay on disk.")
+ };
}
Some(text)
}
@@ -311,10 +321,10 @@ pub fn bounce_path(path: &str, format: EncodeFormat) -> std::path::PathBuf {
/// The Bounce form's file row: a path field and a Browse button that also picks the format.
fn bounce_file_row(app: &mut SoundApp, ui: &mut egui::Ui, path: &mut String, format: &mut EncodeFormat) {
ui.horizontal(|ui| {
- ui.label("File");
- crate::widgets::named_text_field(ui.add(egui::TextEdit::singleline(path).desired_width(420.0)), "File");
+ ui.label(crate::localization::text("File"));
+ crate::widgets::named_text_field(ui.add(egui::TextEdit::singleline(path).desired_width(420.0)), crate::localization::text("File"));
if let Some(pick) = &app.services.pick_save
- && ui.button("Browse…").clicked()
+ && ui.button(crate::localization::text("Browse…")).clicked()
&& let Some(p) = pick("file.bounce_mix", std::path::Path::new(path.as_str()))
{
match unicode(&p) {
@@ -324,7 +334,7 @@ fn bounce_file_row(app: &mut SoundApp, ui: &mut egui::Ui, path: &mut String, for
*format = picked;
}
}
- Err(e) => app.ui.status = e.to_string(),
+ Err(e) => app.ui.status = crate::localization::error_text(&e.to_string()),
}
}
});
@@ -332,20 +342,20 @@ fn bounce_file_row(app: &mut SoundApp, ui: &mut egui::Ui, path: &mut String, for
/// The path prompt's form; the command to run once it is confirmed.
fn path_prompt_form(app: &mut SoundApp, ui: &mut egui::Ui, cmd: &str, path: &mut String, key: &str, enter: bool) -> Option<(String, Value)> {
- crate::widgets::named_text_field(ui.add(egui::TextEdit::singleline(path).desired_width(420.0)), "Path");
+ crate::widgets::named_text_field(ui.add(egui::TextEdit::singleline(path).desired_width(420.0)), crate::localization::text("Path"));
let mut picked = None;
// Import Audio picks several files at once; every other open dialog takes one.
let multi = cmd == "file.import_audio" && app.services.pick_open_many.is_some();
if multi
&& let Some(pick) = &app.services.pick_open_many
- && ui.button("Browse…").clicked()
+ && ui.button(crate::localization::text("Browse…")).clicked()
{
let mut files = pick(cmd);
if files.len() > 1 {
let texts: Result, _> = files.iter().map(|f| unicode(f)).collect();
match texts {
Ok(texts) => return Some((cmd.to_string(), json!({"paths": texts}))),
- Err(e) => app.ui.status = e.to_string(),
+ Err(e) => app.ui.status = crate::localization::error_text(&e.to_string()),
}
} else {
picked = files.pop();
@@ -356,36 +366,36 @@ fn path_prompt_form(app: &mut SoundApp, ui: &mut egui::Ui, cmd: &str, path: &mut
&& cmd != "session.save_as"
&& cmd != "session.save_copy"
&& key != "dir"
- && ui.button("Browse…").clicked()
+ && ui.button(crate::localization::text("Browse…")).clicked()
&& let Some(p) = pick(cmd, &[])
{
picked = Some(p);
}
if let Some(pick) = &app.services.pick_folder
&& key == "dir"
- && ui.button("Browse…").clicked()
+ && ui.button(crate::localization::text("Browse…")).clicked()
&& let Some(p) = pick(std::path::Path::new(path.as_str()))
{
picked = Some(p);
}
if let Some(pick) = &app.services.pick_save
&& (cmd == "session.save_as" || cmd == "session.save_copy")
- && ui.button("Browse…").clicked()
+ && ui.button(crate::localization::text("Browse…")).clicked()
&& let Some(p) = pick(cmd, std::path::Path::new(path.as_str()))
{
picked = Some(p);
}
match picked.as_deref().map(unicode) {
Some(Ok(text)) => *path = text.to_owned(),
- Some(Err(e)) => app.ui.status = e.to_string(),
+ Some(Err(e)) => app.ui.status = crate::localization::error_text(&e.to_string()),
None => {}
}
let file = soundcraft_engine::io::session_file(path);
let replaces = soundcraft_engine::io::replaces(&app.engine, cmd, &file);
if replaces {
- ui.label(format!("“{}” already exists. Do you want to replace it?", file.file_name().unwrap_or_default().to_string_lossy()));
+ ui.label(crate::localized_format!("“{}” already exists. Do you want to replace it?", file.file_name().unwrap_or_default().to_string_lossy()));
}
- if buttons(ui, if replaces { "Replace" } else { "OK" }, enter && !replaces) {
+ if buttons(ui, crate::localization::text(if replaces { "Replace" } else { "OK" }), enter && !replaces) {
let mut v = json!({});
v[key] = json!(path);
if replaces {
@@ -407,10 +417,10 @@ fn strip_silence_form(
let mut rename_from = None;
let [threshold, min_ms, pre_ms, post_ms] = values;
let before = [*threshold, *min_ms, *pre_ms, *post_ms];
- crate::widgets::fine_slider(ui, threshold, -96.0..=0.0, "Threshold dB");
- crate::widgets::fine_slider(ui, min_ms, 0.0..=4000.0, "Min strip duration ms");
- crate::widgets::fine_slider(ui, pre_ms, 0.0..=500.0, "Clip start pad ms");
- crate::widgets::fine_slider(ui, post_ms, 0.0..=2000.0, "Clip end pad ms");
+ crate::widgets::fine_slider(ui, threshold, -96.0..=0.0, crate::localization::text("Threshold dB"));
+ crate::widgets::fine_slider(ui, min_ms, 0.0..=4000.0, crate::localization::text("Min strip duration ms"));
+ crate::widgets::fine_slider(ui, pre_ms, 0.0..=500.0, crate::localization::text("Clip start pad ms"));
+ crate::widgets::fine_slider(ui, post_ms, 0.0..=2000.0, crate::localization::text("Clip end pad ms"));
let values = [*threshold, *min_ms, *pre_ms, *post_ms];
// The Edit window is drawn before this window, so it draws the rectangles for new values in the next frame.
if values != before {
@@ -424,13 +434,13 @@ fn strip_silence_form(
ui.horizontal(|ui| {
let mut mode = None;
let mut rename = false;
- if ui.button("Extract").clicked() {
+ if ui.button(crate::localization::text("Extract")).clicked() {
mode = Some("extract");
}
- if ui.button("Rename…").clicked() {
+ if ui.button(crate::localization::text("Rename…")).clicked() {
rename = true;
}
- if ui.button("Separate").clicked() {
+ if ui.button(crate::localization::text("Separate")).clicked() {
mode = Some("separate");
}
// Enter on a focused Extract or Separate clicks that button, so Enter presses Strip only when neither was clicked.
@@ -504,7 +514,8 @@ pub fn show(app: &mut SoundApp, ctx: &egui::Context) {
|i: &egui::InputState| i.events.iter().any(|e| matches!(e, egui::Event::Key { key: egui::Key::Enter, pressed: true, repeat: false, .. }));
let enter = !first_frame && ctx.input(fresh_enter) && (ctx.memory(|m| m.focused().is_none()) || ctx.text_edit_focused());
let esc = ctx.input(|i| i.key_pressed(egui::Key::Escape));
- egui::Window::new(egui::RichText::new(&title).font(bold(13.0)))
+ egui::Window::new(egui::RichText::new(crate::localization::text(&title)).font(bold(13.0)))
+ .id(egui::Id::unique(&title))
.collapsible(false)
.resizable(false)
.anchor(Align2::CENTER_CENTER, vec2(0.0, -80.0))
@@ -522,15 +533,15 @@ pub fn show(app: &mut SoundApp, ctx: &egui::Context) {
}
Dialog::NewSession { name, sample_rate, demo } => {
ui.horizontal(|ui| {
- ui.label("Name");
- crate::widgets::named_text_field(ui.text_edit_singleline(name), "Name");
+ ui.label(crate::localization::text("Name"));
+ crate::widgets::named_text_field(ui.text_edit_singleline(name), crate::localization::text("Name"));
});
- craft_ui::ComboBox::from_label("Sample Rate").selected_text(format!("{sample_rate} Hz")).show_ui(ui, |ui| {
+ craft_ui::ComboBox::from_label(crate::localization::text("Sample Rate")).selected_text(format!("{sample_rate} Hz")).show_ui(ui, |ui| {
for r in soundcraft_time::SampleRate::COMMON {
ui.selectable_value(sample_rate, r, format!("{r} Hz"));
}
});
- crate::widgets::checkbox(ui, demo, "Start from the demo session");
+ crate::widgets::checkbox(ui, demo, crate::localization::text("Start from the demo session"));
if buttons(ui, "Create", enter) {
action = Some((
"session.new".into(),
@@ -541,25 +552,25 @@ pub fn show(app: &mut SoundApp, ctx: &egui::Context) {
Dialog::Bounce { path, format, bit_depth, normalize, dither } => {
bounce_file_row(app, ui, path, format);
ui.horizontal(|ui| {
- craft_ui::ComboBox::from_label("Format").selected_text(format.container().name()).show_ui(ui, |ui| {
+ craft_ui::ComboBox::from_label(crate::localization::text("Format")).selected_text(format.container().name()).show_ui(ui, |ui| {
for &f in EncodeFormat::ALL {
ui.selectable_value(format, f, f.container().name());
}
});
- craft_ui::ComboBox::from_label("Bit Depth").selected_text(format!("{bit_depth}-bit")).show_ui(ui, |ui| {
+ craft_ui::ComboBox::from_label(crate::localization::text("Bit Depth")).selected_text(format!("{bit_depth}-bit")).show_ui(ui, |ui| {
for b in ["16", "24", "32f"] {
- ui.selectable_value(bit_depth, b.to_string(), format!("{b}-bit"));
+ ui.selectable_value(bit_depth, b.to_string(), crate::localized_format!("{b}-bit", b = b));
}
});
});
- crate::widgets::checkbox(ui, normalize, "Normalize to -0.1 dBFS");
+ crate::widgets::checkbox(ui, normalize, crate::localization::text("Normalize to -0.1 dBFS"));
// 32-bit float keeps every sample as it is: there is nothing to dither.
ui.add_enabled_ui(bit_depth.as_str() != "32f", |ui| {
- crate::widgets::checkbox(ui, dither, "Dither (TPDF)")
- .on_hover_text("Adds ±1 LSB triangular dither when writing 16- or 24-bit files. Leave it off when the master chain already dithers.");
+ crate::widgets::checkbox(ui, dither, crate::localization::text("Dither (TPDF)"))
+ .on_hover_text(crate::localization::text("Adds ±1 LSB triangular dither when writing 16- or 24-bit files. Leave it off when the master chain already dithers."));
});
ui.label(
- egui::RichText::new("Bounces the edit selection, or the whole session when nothing is selected.")
+ egui::RichText::new(crate::localization::text("Bounces the edit selection, or the whole session when nothing is selected."))
.small()
.color(Tokens::current().text_dim),
);
@@ -602,7 +613,7 @@ pub fn show(app: &mut SoundApp, ctx: &egui::Context) {
}
Dialog::Number { cmd, key, value, suffix, .. } => {
ui.horizontal(|ui| {
- ui.add(egui::DragValue::new(value).speed(0.1)).accessible_name(format!("Value in {suffix}"));
+ ui.add(egui::DragValue::new(value).speed(0.1)).accessible_name(crate::localized_format!("Value in {suffix}", suffix = suffix));
ui.label(suffix.as_str());
});
if buttons(ui, "OK", enter) {
@@ -613,8 +624,8 @@ pub fn show(app: &mut SoundApp, ctx: &egui::Context) {
Dialog::TempoChange { at, bpm } => {
ui.horizontal(|ui| {
// Same limits the engine enforces (time crate `valid_bpm`).
- ui.add(egui::DragValue::new(bpm).speed(0.1).range(5.0..=1000.0)).accessible_name("Tempo (BPM)");
- ui.label("bpm");
+ ui.add(egui::DragValue::new(bpm).speed(0.1).range(5.0..=1000.0)).accessible_name(crate::localization::text("Tempo (BPM)"));
+ ui.label(crate::localization::text("bpm"));
});
if buttons(ui, "OK", enter) {
action = Some(tempo_change_action(*at, *bpm));
@@ -629,7 +640,7 @@ pub fn show(app: &mut SoundApp, ctx: &egui::Context) {
}
Dialog::Fades { shape } => {
for s in soundcraft_model::FadeShape::ALL {
- ui.radio_value(shape, s.label().to_lowercase(), s.label());
+ ui.radio_value(shape, s.label().to_lowercase(), crate::localization::text(s.label()));
}
if buttons(ui, "OK", enter) {
action = Some(("edit.fades_create".into(), json!({"shape": shape})));
@@ -644,7 +655,7 @@ pub fn show(app: &mut SoundApp, ctx: &egui::Context) {
}
Dialog::StripSilenceRename { names, .. } => {
strip_name_fields(ui, names, STRIP_NAME_LABELS);
- let cleared = ui.button("Clear").clicked();
+ let cleared = ui.button(crate::localization::text("Clear")).clicked();
if cleared {
*names = StripNames::default();
}
@@ -654,7 +665,7 @@ pub fn show(app: &mut SoundApp, ctx: &egui::Context) {
}
}
Dialog::AutoRename { clips, names } => {
- ui.label("Text for naming the clips that editing makes from the selected clips:");
+ ui.label(crate::localization::text("Text for naming the clips that editing makes from the selected clips:"));
strip_name_fields(ui, names, AUTO_NAME_LABELS);
if buttons(ui, "OK", enter) {
action = Some(auto_rename_action(clips, names));
@@ -662,14 +673,14 @@ pub fn show(app: &mut SoundApp, ctx: &egui::Context) {
}
Dialog::Group { id, name, edit, mix, members } => {
ui.horizontal(|ui| {
- ui.label("Name");
- crate::widgets::named_text_field(ui.text_edit_singleline(name), "Name");
+ ui.label(crate::localization::text("Name"));
+ crate::widgets::named_text_field(ui.text_edit_singleline(name), crate::localization::text("Name"));
});
ui.horizontal(|ui| {
- crate::widgets::checkbox(ui, edit, "Edit group");
- crate::widgets::checkbox(ui, mix, "Mix group");
+ crate::widgets::checkbox(ui, edit, crate::localization::text("Edit group"));
+ crate::widgets::checkbox(ui, mix, crate::localization::text("Mix group"));
});
- ui.label("Tracks");
+ ui.label(crate::localization::text("Tracks"));
egui::ScrollArea::vertical().max_height(180.0).show(ui, |ui| {
for (_, n, on) in members.iter_mut() {
crate::widgets::checkbox(ui, on, n.as_str());
@@ -690,14 +701,14 @@ pub fn show(app: &mut SoundApp, ctx: &egui::Context) {
}
}
Dialog::Session { frame_rate, bit_depth } => {
- craft_ui::ComboBox::from_label("Timecode Rate").selected_text(frame_rate.as_str()).show_ui(ui, |ui| {
+ craft_ui::ComboBox::from_label(crate::localization::text("Timecode Rate")).selected_text(crate::localization::text(frame_rate.as_str())).show_ui(ui, |ui| {
for r in soundcraft_time::FrameRate::ALL {
- ui.selectable_value(frame_rate, r.label().to_string(), r.label());
+ ui.selectable_value(frame_rate, r.label().to_string(), crate::localization::text(r.label()));
}
});
- craft_ui::ComboBox::from_label("Bit Depth").selected_text(bit_depth.as_str()).show_ui(ui, |ui| {
+ craft_ui::ComboBox::from_label(crate::localization::text("Bit Depth")).selected_text(crate::localization::text(bit_depth.as_str())).show_ui(ui, |ui| {
for b in ["16", "24", "32f"] {
- ui.selectable_value(bit_depth, b.to_string(), b);
+ ui.selectable_value(bit_depth, b.to_string(), crate::localization::text(b));
}
});
if buttons(ui, "OK", enter) {
@@ -707,15 +718,15 @@ pub fn show(app: &mut SoundApp, ctx: &egui::Context) {
Dialog::Loop { by, count, length, format, start, filled } => {
let s = app.engine.session();
ui.horizontal(|ui| {
- let count_label = ui.radio_value(by, LoopBy::Count, "Number of Loops");
+ let count_label = ui.radio_value(by, LoopBy::Count, crate::localization::text("Number of Loops"));
ui.add_enabled(*by == LoopBy::Count, egui::DragValue::new(count).range(1..=512)).labelled_by(count_label.id);
});
ui.horizontal(|ui| {
- let length_label = ui.radio_value(by, LoopBy::Length, "Loop Length");
+ let length_label = ui.radio_value(by, LoopBy::Length, crate::localization::text("Loop Length"));
ui.add_enabled(*by == LoopBy::Length, egui::TextEdit::singleline(length).desired_width(140.0)).labelled_by(length_label.id);
- ui.label(format.label());
+ ui.label(crate::localization::text(format.label()));
});
- ui.radio_value(by, LoopBy::Fill, "Loop Until End of Session or Next Clip");
+ ui.radio_value(by, LoopBy::Fill, crate::localization::text("Loop Until End of Session or Next Clip"));
let params = loop_params(s, *by, *count, length, *format, *start, filled);
if buttons_enabled(ui, "OK", enter, params.is_some()) {
action = params.map(|p| ("clip.loop".into(), p));
@@ -723,18 +734,18 @@ pub fn show(app: &mut SoundApp, ctx: &egui::Context) {
}
Dialog::ScoreSetup { title, composer, bars_per_system, show_track_names } => {
egui::Grid::new("score_setup").num_columns(2).spacing(vec2(10.0, 8.0)).show(ui, |ui| {
- ui.label("Title");
+ ui.label(crate::localization::text("Title"));
// The painted label is not an accesskit name; name the field itself.
- crate::widgets::named_text_field(ui.text_edit_singleline(title), "Score title");
+ crate::widgets::named_text_field(ui.text_edit_singleline(title), crate::localization::text("Score title"));
ui.end_row();
- ui.label("Composer");
- crate::widgets::named_text_field(ui.text_edit_singleline(composer), "Score composer");
+ ui.label(crate::localization::text("Composer"));
+ crate::widgets::named_text_field(ui.text_edit_singleline(composer), crate::localization::text("Score composer"));
ui.end_row();
- ui.label("Bars per system");
- ui.add(egui::DragValue::new(bars_per_system).range(1..=16)).accessible_name("Bars per system");
+ ui.label(crate::localization::text("Bars per system"));
+ ui.add(egui::DragValue::new(bars_per_system).range(1..=16)).accessible_name(crate::localization::text("Bars per system"));
ui.end_row();
});
- crate::widgets::checkbox(ui, show_track_names, "Show track names");
+ crate::widgets::checkbox(ui, show_track_names, crate::localization::text("Show track names"));
if buttons(ui, "OK", enter) {
action = Some((
"file.score_setup".into(),
@@ -747,19 +758,19 @@ pub fn show(app: &mut SoundApp, ctx: &egui::Context) {
let revert = then.0 == "session.revert";
if revert || cfg!(target_arch = "wasm32") {
let (question, ok) = if revert {
- (format!("Revert “{name}” to its last saved version?"), "Revert")
+ (crate::localized_format!("Revert “{name}” to its last saved version?", name = name), "Revert")
} else {
- (format!("Close “{name}” without saving?"), "Don't Save")
+ (crate::localized_format!("Close “{name}” without saving?", name = name), "Don't Save")
};
- ui.label(format!("{question} Your changes will be lost."));
+ ui.label(crate::localized_format!("{question} Your changes will be lost.", question = question));
if buttons(ui, ok, false) {
action = Some(then.clone());
}
} else {
- ui.label(format!("Save changes to “{name}” before closing?"));
+ ui.label(crate::localized_format!("Save changes to “{name}” before closing?", name = name));
ui.separator();
ui.horizontal(|ui| {
- if ui.button("Don't Save").clicked() {
+ if ui.button(crate::localization::text("Don't Save")).clicked() {
action = Some(then.clone());
}
if buttons(ui, "Save", enter) {
@@ -834,7 +845,7 @@ pub fn show(app: &mut SoundApp, ctx: &egui::Context) {
} else {
match run_then(app, &cmd, params) {
Ok(v) if cmd == "file.export_clips" => {
- app.ui.status = format!("Exported {} clip(s) to {}", v["written"], v["dir"].as_str().unwrap_or_default());
+ app.ui.status = crate::localized_format!("Exported {} clip(s) to {}", v["written"], v["dir"].as_str().unwrap_or_default());
}
Ok(_) => {}
Err(e) => app.ui.status = e,
@@ -873,11 +884,11 @@ pub(crate) fn buttons_enabled(ui: &mut egui::Ui, ok: &str, enter: bool, ready: b
let mut canceled = false;
ui.separator();
ui.horizontal(|ui| {
- if ui.button("Cancel").clicked() {
+ if ui.button(crate::localization::text("Cancel")).clicked() {
canceled = true;
ui.ctx().memory_mut(|m| m.data.insert_temp(egui::Id::unique("dlg_cancel"), true));
}
- let b = egui::Button::new(egui::RichText::new(ok).strong()).fill(Tokens::current().accent);
+ let b = egui::Button::new(egui::RichText::new(crate::localization::text(ok)).strong()).fill(Tokens::current().accent);
if ui.add_enabled(ready, b).clicked() {
pressed = true;
}
@@ -888,7 +899,7 @@ pub(crate) fn buttons_enabled(ui: &mut egui::Ui, ok: &str, enter: bool, ready: b
/// A name field that takes the focus with its text selected, so typing replaces the old name.
fn name_field(ui: &mut egui::Ui, name: &mut String) {
let mut out = egui::TextEdit::singleline(name).show(ui);
- let _ = crate::widgets::named_text_field(out.response.response.clone(), "Name");
+ let _ = crate::widgets::named_text_field(out.response.response.clone(), crate::localization::text("Name"));
if !out.response.has_focus() {
out.response.request_focus();
let all = egui::text::CCursorRange::two(egui::text::CCursor::new(0), egui::text::CCursor::new(name.chars().count()));
@@ -1305,6 +1316,28 @@ mod tests {
assert_eq!(named[..2], ["SFX023.Reel1", "SFX024.Reel1"]);
}
+ #[test]
+ fn clear_question_is_assembled_in_portuguese() {
+ let _scope = crate::localization::enter(crate::localization::Language::PortugueseBrazil);
+ let mut e = soundcraft_engine::demo::demo_engine();
+ let kick = e.session().sources.iter().find(|f| f.name == "Kick").map(|f| f.id).unwrap();
+ let kick_clips: Vec = e.session().clips_using(kick).map(|c| c.id).collect();
+ let message = |d: &Dialogs| match &d.open {
+ Some(Dialog::ClearClips { message, .. }) => message.clone(),
+ other => panic!("{other:?}"),
+ };
+ let mut d = Dialogs::default();
+ assert!(d.open_clear(&e, kick_clips, vec![kick]));
+ let combined = message(&d);
+ assert_eq!(combined, "Remover 3 clipes e 1 arquivo da sessão?");
+ e.session_mut().sources.iter_mut().for_each(|f| f.unsaved = false);
+ assert!(d.open_clear(&e, vec![], vec![kick]));
+ assert_eq!(
+ message(&d),
+ "Remover o arquivo \"Kick\" da sessão? Ele é usado por 3 clipes na linha do tempo, que também serão removidos. O arquivo permanece no disco."
+ );
+ }
+
#[test]
fn clear_always_asks_and_names_the_timeline_clips_that_go_too() {
let mut e = soundcraft_engine::demo::demo_engine();
diff --git a/crates/ui-egui/src/dialogs/audiosuite.rs b/crates/ui-egui/src/dialogs/audiosuite.rs
index eeba0a092..1771b3de7 100644
--- a/crates/ui-egui/src/dialogs/audiosuite.rs
+++ b/crates/ui-egui/src/dialogs/audiosuite.rs
@@ -20,7 +20,7 @@ pub(super) fn audiosuite_window(app: &mut SoundApp, ctx: &egui::Context) {
let v = params.entry(p.id.to_string()).or_insert(p.default);
let mut wide = f64::from(*v);
crate::widgets::FineSlider::new(&mut wide, f64::from(p.min)..=f64::from(p.max))
- .text(p.name)
+ .text(crate::localization::text(p.name))
.default_value(f64::from(p.default))
.show(ui);
*v = wide as f32;
@@ -30,45 +30,48 @@ pub(super) fn audiosuite_window(app: &mut SoundApp, ctx: &egui::Context) {
"normalize" => {
let v = params.entry("target_db".into()).or_insert(-0.1);
let mut wide = f64::from(*v);
- crate::widgets::FineSlider::new(&mut wide, -24.0..=0.0).text("Peak dB").default_value(-0.1).show(ui);
+ crate::widgets::FineSlider::new(&mut wide, -24.0..=0.0).text(crate::localization::text("Peak dB")).default_value(-0.1).show(ui);
*v = wide as f32;
}
"time_stretch" => {
let v = params.entry("ratio".into()).or_insert(1.0);
let mut wide = f64::from(*v);
- crate::widgets::FineSlider::new(&mut wide, 0.25..=4.0).text("Length ratio").default_value(1.0).show(ui);
+ crate::widgets::FineSlider::new(&mut wide, 0.25..=4.0)
+ .text(crate::localization::text("Length ratio"))
+ .default_value(1.0)
+ .show(ui);
*v = wide as f32;
}
"pitch_shift" => {
let v = params.entry("semitones".into()).or_insert(0.0);
let mut wide = f64::from(*v);
- crate::widgets::FineSlider::new(&mut wide, -24.0..=24.0).text("Semitones").default_value(0.0).show(ui);
+ crate::widgets::FineSlider::new(&mut wide, -24.0..=24.0).text(crate::localization::text("Semitones")).default_value(0.0).show(ui);
*v = wide as f32;
}
"speed_ramp" => {
for (id, label, default, choices) in SPEED_RAMP_CHOICES {
let v = params.entry(id.to_string()).or_insert(default);
ui.horizontal(|ui| {
- ui.label(label);
+ ui.label(crate::localization::text(label));
for &(value, name) in choices {
- ui.radio_value(v, value, name);
+ ui.radio_value(v, value, crate::localization::text(name));
}
});
}
}
_ => {
- ui.label("No parameters.");
+ ui.label(crate::localization::text("No parameters."));
}
}
}
ui.ctx().memory_mut(|m| m.data.insert_temp(key, params.clone()));
let hint = if soundcraft_dsp::is_generator(&process) {
- "Fills the selection on the selected tracks with a new clip."
+ crate::localization::text("Fills the selection on the selected tracks with a new clip.")
} else {
- "Processes the selected clips and replaces them with rendered audio."
+ crate::localization::text("Processes the selected clips and replaces them with rendered audio.")
};
ui.label(egui::RichText::new(hint).small());
- if ui.button(egui::RichText::new("Render").strong()).clicked() {
+ if ui.button(egui::RichText::new(crate::localization::text("Render")).strong()).clicked() {
let p: serde_json::Map = params.iter().map(|(k, v)| (k.clone(), json!(v))).collect();
let _ = app.run("audiosuite.process", json!({"process": process, "params": p}));
}
diff --git a/crates/ui-egui/src/dialogs/files.rs b/crates/ui-egui/src/dialogs/files.rs
index a6c107c45..c029f3300 100644
--- a/crates/ui-egui/src/dialogs/files.rs
+++ b/crates/ui-egui/src/dialogs/files.rs
@@ -52,7 +52,7 @@ pub fn open_path(app: &mut SoundApp, path: &std::path::Path) {
Ok(p) => p,
Err(e) => {
log::warn!("{e}");
- app.ui.status = e.to_string();
+ app.ui.status = crate::localization::error_text(&e.to_string());
return;
}
};
@@ -98,9 +98,13 @@ pub(super) fn open_pending_session(app: &mut SoundApp) {
Ok(missing) => {
// This path replaces the document without going through `SoundApp::run`.
app.document_replaced();
- if missing.is_empty() { format!("Opened {name}") } else { format!("Opened {name} ({} missing media)", missing.len()) }
+ if missing.is_empty() {
+ crate::localized_format!("Opened {name}", name = name)
+ } else {
+ crate::localized_format!("Opened {name} ({missing} missing media)", name = name, missing = missing.len())
+ }
}
- Err(e) => e.to_string(),
+ Err(e) => crate::localization::error_text(&e.to_string()),
};
}
diff --git a/crates/ui-egui/src/dialogs/new_tracks.rs b/crates/ui-egui/src/dialogs/new_tracks.rs
index f7fc75e15..80865a7b1 100644
--- a/crates/ui-egui/src/dialogs/new_tracks.rs
+++ b/crates/ui-egui/src/dialogs/new_tracks.rs
@@ -162,7 +162,7 @@ impl NewTracks {
let id = egui::Id::unique(("new_tracks_row", row.key));
let rect = egui::Rect::from_min_size(ui.available_rect_before_wrap().min, vec2(ui.available_width(), ui.spacing().interact_size.y));
ui.scope_builder(egui::UiBuilder::new().scope_id(id).max_rect(rect).layout(egui::Layout::left_to_right(egui::Align::Center)), |ui| {
- let label = ui.label("Create");
+ let label = ui.label(crate::localization::text("Create"));
let counter = ui
.scope_builder(egui::UiBuilder::new().scope_id(id.with("count")), |ui| {
ui.spacing_mut().interact_size.x = widths.count;
@@ -180,19 +180,19 @@ impl NewTracks {
if counter.gained_focus() {
counter.scroll_to_me(Some(egui::Align::Center));
}
- ui.label("new");
+ ui.label(crate::localization::text("new"));
let format = if has_format(&row.kind) {
Some(
craft_ui::ComboBox::from_id_salt("nt_fmt")
.width(widths.format)
- .selected_text(&row.format)
+ .selected_text(crate::localization::text(&row.format))
.show_ui(ui, |ui| {
for f in ChannelFormat::ALL {
- ui.selectable_value(&mut row.format, f.label().to_string(), f.label());
+ ui.selectable_value(&mut row.format, f.label().to_string(), crate::localization::text(f.label()));
}
})
.response
- .accessible_name("Channel format"),
+ .accessible_name(crate::localization::text("Channel format")),
)
} else {
ui.allocate_space(vec2(widths.format, ui.spacing().interact_size.y));
@@ -200,47 +200,55 @@ impl NewTracks {
};
let kind = craft_ui::ComboBox::from_id_salt("nt_kind")
.width(widths.kind)
- .selected_text(TrackKind::from_id(&row.kind).map_or("Audio Track", |k| k.label()))
+ .selected_text(crate::localization::text(TrackKind::from_id(&row.kind).map_or("Audio Track", |k| k.label())))
.show_ui(ui, |ui| {
for k in TrackKind::ALL {
- if ui.selectable_label(row.kind == k.id(), k.label()).clicked() {
+ if ui.selectable_label(row.kind == k.id(), crate::localization::text(k.label())).clicked() {
set_new_track_kind(&mut row.kind, &mut row.name, k);
}
}
})
.response
- .accessible_name("Track kind");
+ .accessible_name(crate::localization::text("Track kind"));
let timebase = if has_timebase(&row.kind) {
- ui.label("in");
+ ui.label(crate::localization::text("in"));
Some(
craft_ui::ComboBox::from_id_salt("nt_tb")
.width(widths.timebase)
- .selected_text(if row.timebase == "ticks" { "Ticks" } else { "Samples" })
+ .selected_text(crate::localization::text(if row.timebase == "ticks" { "Ticks" } else { "Samples" }))
.show_ui(ui, |ui| {
- ui.selectable_value(&mut row.timebase, "samples".to_string(), "Samples");
- ui.selectable_value(&mut row.timebase, "ticks".to_string(), "Ticks");
+ ui.selectable_value(&mut row.timebase, "samples".to_string(), crate::localization::text("Samples"));
+ ui.selectable_value(&mut row.timebase, "ticks".to_string(), crate::localization::text("Ticks"));
})
.response
- .accessible_name("Timebase"),
+ .accessible_name(crate::localization::text("Timebase")),
)
} else {
- ui.allocate_space(vec2(text_width(ui, "in"), ui.spacing().interact_size.y));
+ ui.allocate_space(vec2(text_width(ui, crate::localization::text("in")), ui.spacing().interact_size.y));
ui.allocate_space(vec2(widths.timebase, ui.spacing().interact_size.y));
None
};
- let label = ui.label("Name:");
+ let label = ui.label(crate::localization::text("Name:"));
let name = crate::widgets::named_text_field(
ui.add(egui::TextEdit::singleline(&mut row.name).id(id.with("name")).desired_width(NAME_WIDTH)).labelled_by(label.id),
- "Name:",
+ crate::localization::text("Name:"),
);
if format.iter().chain(timebase.iter()).chain([&kind, &name]).any(|r| r.clicked() || r.has_focus()) {
self.active = index;
}
let size = vec2(ROW_BUTTON_WIDTH, ui.spacing().interact_size.y);
- if ui.add_enabled(len > 1, egui::Button::new("−").min_size(size)).on_hover_text("Remove this row").clicked() {
+ if ui
+ .add_enabled(len > 1, egui::Button::new(crate::localization::text("−")).min_size(size))
+ .on_hover_text(crate::localization::text("Remove this row"))
+ .clicked()
+ {
remove = Some(index);
}
- if ui.add_enabled(len < MAX_TRACKS, egui::Button::new("+").min_size(size)).on_hover_text("Add a row below").clicked() {
+ if ui
+ .add_enabled(len < MAX_TRACKS, egui::Button::new(crate::localization::text("+")).min_size(size))
+ .on_hover_text(crate::localization::text("Add a row below"))
+ .clicked()
+ {
insert = Some(index);
}
});
@@ -258,7 +266,7 @@ impl NewTracks {
let total = self.rows.iter().fold(0_u32, |total, row| total.saturating_add(row.count));
let can_create = !self.rows.is_empty() && total <= MAX_TRACKS as u32;
if !can_create {
- ui.colored_label(ui.visuals().error_fg_color, "Create up to 128 tracks at a time.");
+ ui.colored_label(ui.visuals().error_fg_color, crate::localization::text("Create up to 128 tracks at a time."));
}
// Enter on a focused row button changes that row only; it must not also submit the dialog.
if crate::dialogs::buttons_enabled(ui, "Create", enter && !row_action, can_create) && !row_action {
diff --git a/crates/ui-egui/src/dialogs/ops_windows.rs b/crates/ui-egui/src/dialogs/ops_windows.rs
index 6b41a4f07..430eac2e4 100644
--- a/crates/ui-egui/src/dialogs/ops_windows.rs
+++ b/crates/ui-egui/src/dialogs/ops_windows.rs
@@ -94,39 +94,44 @@ fn beat_detective(app: &mut SoundApp, ctx: &egui::Context) {
if !open {
return;
}
- egui::Window::new("Beat Analysis").open(&mut open).default_size(vec2(360.0, 220.0)).show(ctx, |ui| {
- ui.label("Analyses the edit selection on the selected tracks.");
- ui.add(egui::Slider::new(&mut app.ops.beat_sensitivity, 0.0..=1.0).text("Sensitivity"));
- crate::widgets::checkbox(ui, &mut app.ops.beat_separate, "Separate clips at detected beats");
- crate::widgets::checkbox(ui, &mut app.ops.beat_set_tempo, "Set the session tempo from the beats");
- ui.horizontal(|ui| {
- if ui.button("Analyze").clicked() {
- let r = app.run("event.beat_detective", json!({"sensitivity": app.ops.beat_sensitivity, "separate": false, "set_tempo": false}));
- app.ops.beat_result = r.map_or_else(|e| e, |v| v.to_string());
- }
- if ui.button(egui::RichText::new("Apply").strong()).clicked() {
- let r = app.run(
- "event.beat_detective",
- json!({"sensitivity": app.ops.beat_sensitivity, "separate": app.ops.beat_separate, "set_tempo": app.ops.beat_set_tempo}),
- );
- app.ops.beat_result = r.map_or_else(|e| e, |v| v.to_string());
+ egui::Window::new(crate::localization::text("Beat Analysis"))
+ .id(egui::Id::unique("Beat Analysis"))
+ .open(&mut open)
+ .default_size(vec2(360.0, 220.0))
+ .show(ctx, |ui| {
+ ui.label(crate::localization::text("Analyses the edit selection on the selected tracks."));
+ ui.add(egui::Slider::new(&mut app.ops.beat_sensitivity, 0.0..=1.0).text(crate::localization::text("Sensitivity")));
+ crate::widgets::checkbox(ui, &mut app.ops.beat_separate, crate::localization::text("Separate clips at detected beats"));
+ crate::widgets::checkbox(ui, &mut app.ops.beat_set_tempo, crate::localization::text("Set the session tempo from the beats"));
+ ui.horizontal(|ui| {
+ if ui.button(crate::localization::text("Analyze")).clicked() {
+ let r = app.run("event.beat_detective", json!({"sensitivity": app.ops.beat_sensitivity, "separate": false, "set_tempo": false}));
+ app.ops.beat_result = r.map_or_else(|e| e, |v| v.to_string());
+ }
+ if ui.button(egui::RichText::new(crate::localization::text("Apply")).strong()).clicked() {
+ let r = app.run(
+ "event.beat_detective",
+ json!({"sensitivity": app.ops.beat_sensitivity, "separate": app.ops.beat_separate, "set_tempo": app.ops.beat_set_tempo}),
+ );
+ app.ops.beat_result = r.map_or_else(|e| e, |v| v.to_string());
+ }
+ });
+ ui.separator();
+ ui.horizontal(|ui| {
+ ui.label(crate::localization::text("Identify Beat: selection is"));
+ ui.add(egui::DragValue::new(&mut app.ops.identify_bars).range(1..=64))
+ .accessible_name(crate::localization::text("Identify beat bars"));
+ ui.label(crate::localization::text("bar(s)"));
+ if ui.button(crate::localization::text("Set Tempo")).clicked() {
+ let r = app.run("event.identify_beat", json!({"bars": app.ops.identify_bars}));
+ app.ops.beat_result = r.map_or_else(|e| e, |v| v.to_string());
+ }
+ });
+ if !app.ops.beat_result.is_empty() {
+ let s = app.ops.beat_result.clone();
+ ui.label(egui::RichText::new(if s.len() > 300 { format!("{}…", &s[..300]) } else { s }).small());
}
});
- ui.separator();
- ui.horizontal(|ui| {
- ui.label("Identify Beat: selection is");
- ui.add(egui::DragValue::new(&mut app.ops.identify_bars).range(1..=64)).accessible_name("Identify beat bars");
- ui.label("bar(s)");
- if ui.button("Set Tempo").clicked() {
- let r = app.run("event.identify_beat", json!({"bars": app.ops.identify_bars}));
- app.ops.beat_result = r.map_or_else(|e| e, |v| v.to_string());
- }
- });
- if !app.ops.beat_result.is_empty() {
- let s = app.ops.beat_result.clone();
- ui.label(egui::RichText::new(if s.len() > 300 { format!("{}…", &s[..300]) } else { s }).small());
- }
- });
app.ui.show_beat_detective = open;
}
@@ -152,26 +157,34 @@ fn tempo_ops(app: &mut SoundApp, ctx: &egui::Context) {
if !open {
return;
}
- egui::Window::new("Tempo Operations").open(&mut open).default_size(vec2(360.0, 200.0)).show(ctx, |ui| {
- craft_ui::ComboBox::from_label("Curve").selected_text(app.ops.tempo_curve.clone()).show_ui(ui, |ui| {
- for c in ["constant", "linear", "parabolic", "s-curve", "scale", "stretch"] {
- ui.selectable_value(&mut app.ops.tempo_curve, c.to_string(), c);
- }
- });
- ui.add(egui::DragValue::new(&mut app.ops.tempo_start).range(5.0..=999.0).prefix("start bpm ")).accessible_name("Start tempo (BPM)");
- ui.add(egui::DragValue::new(&mut app.ops.tempo_end).range(5.0..=999.0).prefix("end bpm ")).accessible_name("End tempo (BPM)");
- ui.label(
- egui::RichText::new(
+ egui::Window::new(crate::localization::text("Tempo Operations"))
+ .id(egui::Id::unique("Tempo Operations"))
+ .open(&mut open)
+ .default_size(vec2(360.0, 200.0))
+ .show(ctx, |ui| {
+ craft_ui::ComboBox::from_label(crate::localization::text("Curve"))
+ .selected_text(crate::localization::text(&app.ops.tempo_curve))
+ .show_ui(ui, |ui| {
+ for c in ["constant", "linear", "parabolic", "s-curve", "scale", "stretch"] {
+ ui.selectable_value(&mut app.ops.tempo_curve, c.to_string(), crate::localization::text(c));
+ }
+ });
+ ui.add(egui::DragValue::new(&mut app.ops.tempo_start).range(5.0..=999.0).prefix(crate::localization::text("start bpm ")))
+ .accessible_name(crate::localization::text("Start tempo (BPM)"));
+ ui.add(egui::DragValue::new(&mut app.ops.tempo_end).range(5.0..=999.0).prefix(crate::localization::text("end bpm ")))
+ .accessible_name(crate::localization::text("End tempo (BPM)"));
+ ui.label(
+ egui::RichText::new(crate::localization::text(
"Applies across the edit selection (constant: at the insertion point; scale: factor = end / start; stretch: factor = start / end).",
- )
+ ))
.small(),
);
- if ui.button(egui::RichText::new("Apply").strong()).clicked() {
- let (id, p) = tempo_ops_apply(&app.ops.tempo_curve, app.ops.tempo_start, app.ops.tempo_end);
- let r = app.run(id, p);
- result_line(ui, &r);
- }
- });
+ if ui.button(egui::RichText::new(crate::localization::text("Apply")).strong()).clicked() {
+ let (id, p) = tempo_ops_apply(&app.ops.tempo_curve, app.ops.tempo_start, app.ops.tempo_end);
+ let r = app.run(id, p);
+ result_line(ui, &r);
+ }
+ });
app.ui.show_tempo_ops = open;
}
@@ -182,43 +195,51 @@ fn time_ops(app: &mut SoundApp, ctx: &egui::Context) {
if !open {
return;
}
- egui::Window::new("Time Operations").open(&mut open).default_size(vec2(360.0, 200.0)).show(ctx, |ui| {
- craft_ui::ComboBox::from_label("Operation").selected_text(app.ops.time_op.clone()).show_ui(ui, |ui| {
- for c in ["insert", "cut", "change meter", "move song start"] {
- ui.selectable_value(&mut app.ops.time_op, c.to_string(), c);
+ egui::Window::new(crate::localization::text("Time Operations"))
+ .id(egui::Id::unique("Time Operations"))
+ .open(&mut open)
+ .default_size(vec2(360.0, 200.0))
+ .show(ctx, |ui| {
+ craft_ui::ComboBox::from_label(crate::localization::text("Operation"))
+ .selected_text(crate::localization::text(&app.ops.time_op))
+ .show_ui(ui, |ui| {
+ for c in ["insert", "cut", "change meter", "move song start"] {
+ ui.selectable_value(&mut app.ops.time_op, c.to_string(), crate::localization::text(c));
+ }
+ });
+ match app.ops.time_op.as_str() {
+ "change meter" => {
+ ui.horizontal(|ui| {
+ ui.add(egui::DragValue::new(&mut app.ops.meter_num).range(1..=64))
+ .accessible_name(crate::localization::text("Meter numerator"));
+ ui.label(crate::localization::text("/"));
+ let den = craft_ui::ComboBox::from_id_salt("den").selected_text(app.ops.meter_den.to_string()).show_ui(ui, |ui| {
+ for d in [2u32, 4, 8, 16] {
+ ui.selectable_value(&mut app.ops.meter_den, d, d.to_string());
+ }
+ });
+ den.response.accessible_name(crate::localization::text("Meter denominator"));
+ });
+ }
+ "insert" => {
+ ui.add(egui::DragValue::new(&mut app.ops.time_seconds).range(0.0..=3600.0).suffix(" s"))
+ .accessible_name(crate::localization::text("Time (seconds)"));
+ }
+ _ => {
+ ui.label(egui::RichText::new(crate::localization::text("Uses the edit selection.")).small());
+ }
+ }
+ if ui.button(egui::RichText::new(crate::localization::text("Apply")).strong()).clicked() {
+ let at = app.engine.session().edit.selection.start;
+ let r = match app.ops.time_op.as_str() {
+ "insert" => app.run("event.insert_time", json!({"start": at, "length": {"seconds": app.ops.time_seconds}})),
+ "cut" => app.run("event.cut_time", json!({})),
+ "change meter" => app.run("event.meter", json!({"numerator": app.ops.meter_num, "denominator": app.ops.meter_den, "at": at})),
+ _ => app.run("event.move_song_start", json!({"to": at})),
+ };
+ result_line(ui, &r);
}
});
- match app.ops.time_op.as_str() {
- "change meter" => {
- ui.horizontal(|ui| {
- ui.add(egui::DragValue::new(&mut app.ops.meter_num).range(1..=64)).accessible_name("Meter numerator");
- ui.label("/");
- let den = craft_ui::ComboBox::from_id_salt("den").selected_text(app.ops.meter_den.to_string()).show_ui(ui, |ui| {
- for d in [2u32, 4, 8, 16] {
- ui.selectable_value(&mut app.ops.meter_den, d, d.to_string());
- }
- });
- den.response.accessible_name("Meter denominator");
- });
- }
- "insert" => {
- ui.add(egui::DragValue::new(&mut app.ops.time_seconds).range(0.0..=3600.0).suffix(" s")).accessible_name("Time (seconds)");
- }
- _ => {
- ui.label(egui::RichText::new("Uses the edit selection.").small());
- }
- }
- if ui.button(egui::RichText::new("Apply").strong()).clicked() {
- let at = app.engine.session().edit.selection.start;
- let r = match app.ops.time_op.as_str() {
- "insert" => app.run("event.insert_time", json!({"start": at, "length": {"seconds": app.ops.time_seconds}})),
- "cut" => app.run("event.cut_time", json!({})),
- "change meter" => app.run("event.meter", json!({"numerator": app.ops.meter_num, "denominator": app.ops.meter_den, "at": at})),
- _ => app.run("event.move_song_start", json!({"to": at})),
- };
- result_line(ui, &r);
- }
- });
app.ui.show_time_ops = open;
}
@@ -227,44 +248,49 @@ fn midi_ops(app: &mut SoundApp, ctx: &egui::Context) {
if !open {
return;
}
- egui::Window::new("MIDI Operations").open(&mut open).default_size(vec2(360.0, 220.0)).show(ctx, |ui| {
- craft_ui::ComboBox::from_label("Operation").selected_text(app.ops.midi_op.clone()).show_ui(ui, |ui| {
- for c in ["quantize", "transpose", "change velocity", "flatten performance", "restore performance"] {
- ui.selectable_value(&mut app.ops.midi_op, c.to_string(), c);
- }
- });
- match app.ops.midi_op.as_str() {
- "quantize" => {
- craft_ui::ComboBox::from_label("Grid").selected_text(app.ops.quant_grid.clone()).show_ui(ui, |ui| {
- for g in ["1/4", "1/8", "1/8t", "1/16", "1/16t", "1/32"] {
- ui.selectable_value(&mut app.ops.quant_grid, g.to_string(), g);
+ egui::Window::new(crate::localization::text("MIDI Operations"))
+ .id(egui::Id::unique("MIDI Operations"))
+ .open(&mut open)
+ .default_size(vec2(360.0, 220.0))
+ .show(ctx, |ui| {
+ craft_ui::ComboBox::from_label(crate::localization::text("Operation"))
+ .selected_text(crate::localization::text(&app.ops.midi_op))
+ .show_ui(ui, |ui| {
+ for c in ["quantize", "transpose", "change velocity", "flatten performance", "restore performance"] {
+ ui.selectable_value(&mut app.ops.midi_op, c.to_string(), crate::localization::text(c));
}
});
- ui.add(egui::Slider::new(&mut app.ops.quant_strength, 0.0..=100.0).text("Strength %"));
- ui.add(egui::Slider::new(&mut app.ops.quant_swing, 0.0..=100.0).text("Swing %"));
- }
- "transpose" => {
- ui.add(egui::Slider::new(&mut app.ops.transpose, -48..=48).text("Semitones"));
- }
- "change velocity" => {
- ui.add(egui::Slider::new(&mut app.ops.velocity_add, -127..=127).text("Add"));
- }
- _ => {}
- }
- ui.label(egui::RichText::new("Applies to the selected MIDI clips (or those under the selection).").small());
- if ui.button(egui::RichText::new("Apply").strong()).clicked() {
- let r = match app.ops.midi_op.as_str() {
+ match app.ops.midi_op.as_str() {
"quantize" => {
- app.run("event.quantize", json!({"grid": app.ops.quant_grid, "strength": app.ops.quant_strength, "swing": app.ops.quant_swing}))
+ craft_ui::ComboBox::from_label(crate::localization::text("Grid")).selected_text(app.ops.quant_grid.clone()).show_ui(ui, |ui| {
+ for g in ["1/4", "1/8", "1/8t", "1/16", "1/16t", "1/32"] {
+ ui.selectable_value(&mut app.ops.quant_grid, g.to_string(), g);
+ }
+ });
+ ui.add(egui::Slider::new(&mut app.ops.quant_strength, 0.0..=100.0).text(crate::localization::text("Strength %")));
+ ui.add(egui::Slider::new(&mut app.ops.quant_swing, 0.0..=100.0).text(crate::localization::text("Swing %")));
}
- "transpose" => app.run("event.transpose", json!({"semitones": app.ops.transpose})),
- "change velocity" => app.run("event.change_velocity", json!({"add": app.ops.velocity_add})),
- "flatten performance" => app.run("event.flatten_performance", json!({})),
- _ => app.run("event.restore_performance", json!({})),
- };
- result_line(ui, &r);
- }
- });
+ "transpose" => {
+ ui.add(egui::Slider::new(&mut app.ops.transpose, -48..=48).text(crate::localization::text("Semitones")));
+ }
+ "change velocity" => {
+ ui.add(egui::Slider::new(&mut app.ops.velocity_add, -127..=127).text(crate::localization::text("Add")));
+ }
+ _ => {}
+ }
+ ui.label(egui::RichText::new(crate::localization::text("Applies to the selected MIDI clips (or those under the selection).")).small());
+ if ui.button(egui::RichText::new(crate::localization::text("Apply")).strong()).clicked() {
+ let r = match app.ops.midi_op.as_str() {
+ "quantize" => app
+ .run("event.quantize", json!({"grid": app.ops.quant_grid, "strength": app.ops.quant_strength, "swing": app.ops.quant_swing})),
+ "transpose" => app.run("event.transpose", json!({"semitones": app.ops.transpose})),
+ "change velocity" => app.run("event.change_velocity", json!({"add": app.ops.velocity_add})),
+ "flatten performance" => app.run("event.flatten_performance", json!({})),
+ _ => app.run("event.restore_performance", json!({})),
+ };
+ result_line(ui, &r);
+ }
+ });
app.ui.show_midi_ops = open;
}
@@ -275,29 +301,36 @@ fn rtp(app: &mut SoundApp, ctx: &egui::Context) {
}
let targets = app.engine.target_tracks();
sync_rtp_form(&mut app.ops, app.engine.session(), targets, ctx.dragged_id().is_some());
- egui::Window::new("MIDI Real-Time Properties").open(&mut open).default_size(vec2(340.0, 200.0)).show(ctx, |ui| {
- ui.label("Non-destructive, applied at playback to the selected MIDI tracks.");
- let mut changed = RtpChanged::default();
- changed.velocity = ui.add(egui::Slider::new(&mut app.ops.rtp_velocity, -127..=127).text("Velocity +")).changed();
- changed.transpose = ui.add(egui::Slider::new(&mut app.ops.rtp_transpose, -48..=48).text("Transpose")).changed();
- changed.duration = ui.add(egui::Slider::new(&mut app.ops.rtp_duration, 1.0..=400.0).text("Duration %")).changed();
- changed.delay = ui.add(egui::Slider::new(&mut app.ops.rtp_delay, -960..=960).text("Delay (ticks)")).changed();
- if let Some(p) = rtp_params(changed, &app.ops) {
- let _ = app.engine.execute_merged("event.midi_rtp", &p, "rtp");
- }
- ui.horizontal(|ui| {
- if ui.button("Write to Notes").clicked() {
- let _ = app.run("track.write_midi_rtp", json!({}));
- }
- if ui.button("Clear").clicked() {
- let _ = app.run("event.midi_rtp", json!({"clear": true}));
- app.ops.rtp_velocity = 0;
- app.ops.rtp_transpose = 0;
- app.ops.rtp_duration = 100.0;
- app.ops.rtp_delay = 0;
+ egui::Window::new(crate::localization::text("MIDI Real-Time Properties"))
+ .id(egui::Id::unique("MIDI Real-Time Properties"))
+ .open(&mut open)
+ .default_size(vec2(340.0, 200.0))
+ .show(ctx, |ui| {
+ ui.label(crate::localization::text("Non-destructive, applied at playback to the selected MIDI tracks."));
+ let mut changed = RtpChanged::default();
+ changed.velocity =
+ ui.add(egui::Slider::new(&mut app.ops.rtp_velocity, -127..=127).text(crate::localization::text("Velocity +"))).changed();
+ changed.transpose =
+ ui.add(egui::Slider::new(&mut app.ops.rtp_transpose, -48..=48).text(crate::localization::text("Transpose"))).changed();
+ changed.duration =
+ ui.add(egui::Slider::new(&mut app.ops.rtp_duration, 1.0..=400.0).text(crate::localization::text("Duration %"))).changed();
+ changed.delay = ui.add(egui::Slider::new(&mut app.ops.rtp_delay, -960..=960).text(crate::localization::text("Delay (ticks)"))).changed();
+ if let Some(p) = rtp_params(changed, &app.ops) {
+ let _ = app.engine.execute_merged("event.midi_rtp", &p, "rtp");
}
+ ui.horizontal(|ui| {
+ if ui.button(crate::localization::text("Write to Notes")).clicked() {
+ let _ = app.run("track.write_midi_rtp", json!({}));
+ }
+ if ui.button(crate::localization::text("Clear")).clicked() {
+ let _ = app.run("event.midi_rtp", json!({"clear": true}));
+ app.ops.rtp_velocity = 0;
+ app.ops.rtp_transpose = 0;
+ app.ops.rtp_duration = 100.0;
+ app.ops.rtp_delay = 0;
+ }
+ });
});
- });
app.ui.show_rtp = open;
}
diff --git a/crates/ui-egui/src/dialogs/recent.rs b/crates/ui-egui/src/dialogs/recent.rs
index 597cc99c9..221880f7d 100644
--- a/crates/ui-egui/src/dialogs/recent.rs
+++ b/crates/ui-egui/src/dialogs/recent.rs
@@ -85,9 +85,9 @@ impl SoundApp {
/// The File › Open Recent submenu.
pub fn menu(app: &mut SoundApp, ui: &mut egui::Ui) {
- ui.menu_button("Open Recent", |ui| {
+ ui.menu_button(crate::localization::text("Open Recent"), |ui| {
if app.ui.recent_sessions.is_empty() {
- ui.add_enabled(false, egui::Button::new("No Recent Sessions"));
+ ui.add_enabled(false, egui::Button::new(crate::localization::text("No Recent Sessions")));
return;
}
let now = ui.ctx().input(|i| i.time);
@@ -95,14 +95,17 @@ pub fn menu(app: &mut SoundApp, ui: &mut egui::Ui) {
let mut open = None;
for (i, path) in app.ui.recent_sessions.iter().enumerate() {
let here = exists.get(i).copied().unwrap_or(true);
- let text = if here { label(path) } else { format!("{} (missing)", label(path)) };
- let r = ui.add_enabled(here, egui::Button::new(text)).on_hover_text(path.as_str()).on_disabled_hover_text(format!("{path}\nnot found"));
+ let text = if here { label(path) } else { crate::localized_format!("{} (missing)", label(path)) };
+ let r = ui
+ .add_enabled(here, egui::Button::new(text))
+ .on_hover_text(path.as_str())
+ .on_disabled_hover_text(crate::localized_format!("{path}\nnot found", path = path));
if r.clicked() {
open = Some(path.clone());
}
}
ui.separator();
- if ui.button("Clear Recent").clicked() {
+ if ui.button(crate::localization::text("Clear Recent")).clicked() {
app.ui.recent_sessions.clear();
app.recent_changed = true;
ui.close();
@@ -112,7 +115,7 @@ pub fn menu(app: &mut SoundApp, ui: &mut egui::Ui) {
// Through the dialog layer, so unsaved changes are asked about first.
if let Err(e) = crate::dialogs::run_or_ask(app, "session.open", json!({"path": path})) {
log::warn!("{path}: {e}");
- app.ui.status = format!("Could not open {path}: {e}");
+ app.ui.status = crate::localized_format!("Could not open {path}: {e}", path = path, e = e);
}
}
});
diff --git a/crates/ui-egui/src/dialogs/recovery.rs b/crates/ui-egui/src/dialogs/recovery.rs
index bd66e297f..6b8782a25 100644
--- a/crates/ui-egui/src/dialogs/recovery.rs
+++ b/crates/ui-egui/src/dialogs/recovery.rs
@@ -9,22 +9,28 @@ pub fn show(app: &mut SoundApp, ctx: &egui::Context) {
let Some(left) = app.leftovers.first().cloned() else { return };
let mut open = true;
let mut recover = None;
- egui::Window::new(egui::RichText::new("Recover Unsaved Work").font(bold(13.0)))
+ egui::Window::new(egui::RichText::new(crate::localization::text("Recover Unsaved Work")).font(bold(13.0)))
+ .id(egui::Id::unique("Recover Unsaved Work"))
.open(&mut open)
.collapsible(false)
.resizable(false)
.anchor(Align2::CENTER_CENTER, vec2(0.0, -80.0))
.show(ctx, |ui| {
- let age = left.saved.elapsed().map_or_else(|_| "recently".into(), |d| ago(d.as_secs()));
- let what = if left.recording { "unsaved changes and an unfinished recording" } else { "unsaved changes" };
- ui.label(format!("“{}” has {what} from an earlier run, autosaved {age}.", left.name));
+ let age = left.saved.elapsed().map_or_else(|_| crate::localization::text("recently").to_owned(), |d| ago(d.as_secs()));
+ let what = crate::localization::text(if left.recording { "unsaved changes and an unfinished recording" } else { "unsaved changes" });
+ ui.label(crate::localized_format!("“{name}” has {what} from an earlier run, autosaved {age}.", name = left.name, what = what, age = age));
ui.separator();
ui.horizontal(|ui| {
- if ui.button("Discard").clicked() {
+ if ui.button(crate::localization::text("Discard")).clicked() {
recover = Some(false);
}
- let recover_button = egui::Button::new(egui::RichText::new("Recover").strong()).fill(Tokens::current().accent);
- if ui.add_enabled(!app.engine.transport.recording, recover_button).on_disabled_hover_text("Stop recording first").clicked() {
+ let recover_button =
+ egui::Button::new(egui::RichText::new(crate::localization::text("Recover")).strong()).fill(Tokens::current().accent);
+ if ui
+ .add_enabled(!app.engine.transport.recording, recover_button)
+ .on_disabled_hover_text(crate::localization::text("Stop recording first"))
+ .clicked()
+ {
recover = Some(true);
}
});
@@ -41,10 +47,15 @@ pub fn show(app: &mut SoundApp, ctx: &egui::Context) {
fn ago(secs: u64) -> String {
let (n, unit) = match secs {
- 0..60 => return "less than a minute ago".into(),
+ 0..60 => return crate::localization::text("less than a minute ago").to_owned(),
60..3_600 => (secs / 60, "minute"),
3_600..86_400 => (secs / 3_600, "hour"),
_ => (secs / 86_400, "day"),
};
- format!("{n} {unit}{} ago", if n == 1 { "" } else { "s" })
+ let unit = crate::localization::text(unit);
+ if n == 1 {
+ crate::localized_format!("{n} {unit} ago", n = n, unit = unit)
+ } else {
+ crate::localized_format!("{n} {unit}s ago", n = n, unit = unit)
+ }
}
diff --git a/crates/ui-egui/src/dialogs/spot.rs b/crates/ui-egui/src/dialogs/spot.rs
index 88f361c24..b28f29957 100644
--- a/crates/ui-egui/src/dialogs/spot.rs
+++ b/crates/ui-egui/src/dialogs/spot.rs
@@ -141,10 +141,10 @@ fn spot_field_row(ui: &mut Ui, s: &Session, d: &mut Spot, i: usize, label: &str)
}
fn original_time_stamp_row(ui: &mut Ui, s: &Session, d: &mut Spot, at: Samples) {
- ui.label("Original Time Stamp");
+ ui.label(crate::localization::text("Original Time Stamp"));
ui.horizontal(|ui| {
ui.label(RichText::new(s.format_position(at, TimeFormat::Timecode)).font(mono(13.0)));
- if ui.button("Use").on_hover_text("Spot to where it was recorded").clicked() {
+ if ui.button(crate::localization::text("Use")).on_hover_text(crate::localization::text("Spot to where it was recorded")).clicked() {
d.start = at;
}
});
@@ -154,12 +154,13 @@ fn original_time_stamp_row(ui: &mut Ui, s: &Session, d: &mut Spot, at: Samples)
/// The dialog's fields; the caller adds OK and Cancel.
pub fn fields(ui: &mut Ui, s: &Session, d: &mut Spot) {
egui::Grid::new("spot").num_columns(2).spacing(vec2(10.0, 6.0)).show(ui, |ui| {
- let scale = ui.label("Time Scale");
- let time_scale = craft_ui::ComboBox::from_id_salt("spot_scale").selected_text(d.format.label()).show_ui(ui, |ui| {
- for f in TimeFormat::ALL {
- ui.selectable_value(&mut d.format, f, f.label());
- }
- });
+ let scale = ui.label(crate::localization::text("Time Scale"));
+ let time_scale =
+ craft_ui::ComboBox::from_id_salt("spot_scale").selected_text(crate::localization::text(d.format.label())).show_ui(ui, |ui| {
+ for f in TimeFormat::ALL {
+ ui.selectable_value(&mut d.format, f, crate::localization::text(f.label()));
+ }
+ });
time_scale.response.labelled_by(scale.id);
ui.end_row();
for (i, label) in FIELDS.into_iter().enumerate() {
@@ -168,7 +169,7 @@ pub fn fields(ui: &mut Ui, s: &Session, d: &mut Spot) {
}
spot_field_row(ui, s, d, i, label);
}
- ui.label("Duration");
+ ui.label(crate::localization::text("Duration"));
ui.label(RichText::new(format_length(d.start, d.len, d.format, s.sample_rate, &s.tempo, s.frame_rate)).font(mono(13.0)));
ui.end_row();
if let Some(at) = d.stamp {
diff --git a/crates/ui-egui/src/dialogs/strip_silence.rs b/crates/ui-egui/src/dialogs/strip_silence.rs
index ae50a5720..2b78bfa6b 100644
--- a/crates/ui-egui/src/dialogs/strip_silence.rs
+++ b/crates/ui-egui/src/dialogs/strip_silence.rs
@@ -150,23 +150,23 @@ pub(super) const AUTO_NAME_LABELS: [&str; 2] = ["Starting Number", "Number of Pl
pub(super) fn strip_name_fields(ui: &mut egui::Ui, names: &mut StripNames, labels: [&str; 2]) {
let [number, zeros] = labels;
egui::Grid::new("strip_names").num_columns(2).spacing(vec2(10.0, 8.0)).show(ui, |ui| {
- let name = ui.label("Name");
+ let name = ui.label(crate::localization::text("Name"));
ui.text_edit_singleline(&mut names.name).labelled_by(name.id);
ui.end_row();
- let number = ui.label(number);
+ let number = ui.label(crate::localization::text(number));
ui.add(egui::DragValue::new(&mut names.number).range(0..=StripNames::MAX_NUMBER)).labelled_by(number.id);
ui.end_row();
- let zeros = ui.label(zeros);
+ let zeros = ui.label(crate::localization::text(zeros));
ui.add(egui::DragValue::new(&mut names.zeros).range(0..=StripNames::MAX_ZEROS)).labelled_by(zeros.id);
ui.end_row();
- let suffix = ui.label("Suffix");
+ let suffix = ui.label(crate::localization::text("Suffix"));
ui.text_edit_singleline(&mut names.suffix).labelled_by(suffix.id);
ui.end_row();
});
let example = if names.name.trim().is_empty() {
- "Without a name, the clips keep their names.".to_string()
+ crate::localization::text("Without a name, the clips keep their names.").to_string()
} else {
- format!("First clip: {}", names.clip_name(0))
+ crate::localized_format!("First clip: {}", names.clip_name(0))
};
ui.label(egui::RichText::new(example).small().color(Tokens::current().text_dim));
}
diff --git a/crates/ui-egui/src/docking.rs b/crates/ui-egui/src/docking.rs
index 912761569..705d61a1b 100644
--- a/crates/ui-egui/src/docking.rs
+++ b/crates/ui-egui/src/docking.rs
@@ -452,7 +452,7 @@ pub fn show(app: &mut crate::SoundApp, ui: &mut egui::Ui, window: crate::MainWin
if edit { std::mem::replace(&mut app.ui.docking, edit_default()) } else { std::mem::replace(&mut app.ui.mix_docking, mix_default()) };
let before_sync = workspace.clone();
if let Err(error) = (if edit { validate(&workspace) } else { validate_mix(&workspace) }).and_then(|()| sync(&mut workspace, app, edit)) {
- app.ui.status = format!("Panel layout could not be restored: {error}");
+ app.ui.status = crate::localized_format!("Panel layout could not be restored: {error}", error = error);
workspace = if edit { edit_default() } else { mix_default() };
let _ = sync(&mut workspace, app, edit);
}
@@ -481,7 +481,7 @@ pub fn show(app: &mut crate::SoundApp, ui: &mut egui::Ui, window: crate::MainWin
ui,
&workspace.layout,
&style,
- |panel| panel.label().into(),
+ |panel| crate::localization::text(panel.label()).into(),
permissions,
panel_limits,
|ui, panel| match panel {
@@ -508,7 +508,7 @@ pub fn show(app: &mut crate::SoundApp, ui: &mut egui::Ui, window: crate::MainWin
store(app, workspace, edit);
for action in output.actions {
if let Err(error) = command_for(app, &DockCommand::Layout { action }, edit) {
- app.ui.status = format!("Panel move was not applied: {error}");
+ app.ui.status = crate::localized_format!("Panel move was not applied: {error}", error = error);
}
}
}
diff --git a/crates/ui-egui/src/edit_window.rs b/crates/ui-egui/src/edit_window.rs
index 6bcbfd42e..7db88e689 100644
--- a/crates/ui-egui/src/edit_window.rs
+++ b/crates/ui-egui/src/edit_window.rs
@@ -81,7 +81,7 @@ fn dock_tabs(app: &mut SoundApp, ui: &mut Ui) {
("MEMORY LOCATIONS", app.ui.show_memory_locations, "window.memory_locations"),
("UNDO HISTORY", app.ui.show_undo_history, "window.undo_history"),
] {
- let g = ui.painter().layout_no_wrap(label.to_string(), bold(10.5), if on { Color32::WHITE } else { t.text_dim });
+ let g = ui.painter().layout_no_wrap(crate::localization::text(label).to_string(), bold(10.5), if on { Color32::WHITE } else { t.text_dim });
let tr = Rect::from_min_size(pos2(x, r.min.y + 2.0), vec2(g.size().x + 16.0, r.height() - 4.0));
if on {
ui.painter().rect_filled(tr, 3.0, t.accent_dark);
@@ -98,25 +98,20 @@ fn status_bar(app: &mut SoundApp, ui: &mut Ui) {
let t = Tokens::current();
let r = ui.max_rect();
let s = app.engine.session();
- let mut left = format!(
- "{} · {} Hz · {} · {} tracks · {}",
- s.name,
- s.sample_rate.hz(),
- match s.bit_depth {
- soundcraft_model::BitDepthSetting::Int16 => "16-bit",
- soundcraft_model::BitDepthSetting::Int24 => "24-bit",
- soundcraft_model::BitDepthSetting::Float32 => "32-bit float",
- },
- s.tracks.len(),
- app.ui.status
- );
+ let depth = match s.bit_depth {
+ soundcraft_model::BitDepthSetting::Int16 => crate::localization::text("16-bit"),
+ soundcraft_model::BitDepthSetting::Int24 => crate::localization::text("24-bit"),
+ soundcraft_model::BitDepthSetting::Float32 => crate::localization::text("32-bit float"),
+ };
+ let tracks = if s.tracks.len() == 1 { crate::localized_format!("1 track") } else { crate::localized_format!("{n} tracks", n = s.tracks.len()) };
+ let mut left = crate::localized_format!("{} · {} Hz · {} · {} · {}", s.name, s.sample_rate.hz(), depth, tracks, app.ui.status);
soundcraft_model::truncate_chars(&mut left, 4 * soundcraft_model::MAX_NAME_CHARS);
ui.painter().text(pos2(r.min.x + 10.0, r.center().y), Align2::LEFT_CENTER, left, regular(11.0), t.text_dim);
- let undo = app.engine.undo_label().map_or(String::new(), |l| format!("Undo {l}"));
+ let undo = app.engine.undo_label().map_or(String::new(), |l| crate::localized_format!("Undo {l}", l = crate::localization::text(l)));
ui.painter().text(
pos2(r.max.x - 10.0, r.center().y),
Align2::RIGHT_CENTER,
- if app.frame_ms < 50.0 { format!("{undo} {:.1} ms/frame", app.frame_ms) } else { undo },
+ if app.frame_ms < 50.0 { crate::localized_format!("{undo} {ms:.1} ms/frame", undo = undo, ms = app.frame_ms) } else { undo },
regular(11.0),
t.text_dim,
);
diff --git a/crates/ui-egui/src/edit_window/clips.rs b/crates/ui-egui/src/edit_window/clips.rs
index de4f1ee32..6fe384a04 100644
--- a/crates/ui-egui/src/edit_window/clips.rs
+++ b/crates/ui-egui/src/edit_window/clips.rs
@@ -263,7 +263,13 @@ fn draw_clip_content(cl: &ClipLane<'_>, clip: &Clip, g: &ClipGeom<'_>) {
}
}
} else {
- painter.text(body_r.center(), Align2::CENTER_CENTER, "media offline", regular(10.0), Color32::from_rgb(220, 120, 120));
+ painter.text(
+ body_r.center(),
+ Align2::CENTER_CENTER,
+ crate::localization::text("media offline"),
+ regular(10.0),
+ Color32::from_rgb(220, 120, 120),
+ );
}
}
ClipContent::Video { .. } => {} // thumbnails: video_track::draw_lane
diff --git a/crates/ui-egui/src/edit_window/header.rs b/crates/ui-egui/src/edit_window/header.rs
index 2467165ad..95caeb998 100644
--- a/crates/ui-egui/src/edit_window/header.rs
+++ b/crates/ui-egui/src/edit_window/header.rs
@@ -94,11 +94,11 @@ fn strip_buttons(app: &mut SoundApp, ui: &mut Ui, track: &Track, head: Rect) {
ui.painter().circle_filled(round.center(), 5.0, shade(strip, if rresp.hovered() { 0.6 } else { 0.45 }));
arrow(ui.painter(), round.center(), !track.is_folder() || track.folder_open, ink);
if track.is_folder() {
- if rresp.on_hover_text(if track.folder_open { "Close folder" } else { "Open folder" }).clicked() {
+ if rresp.on_hover_text(crate::localization::text(if track.folder_open { "Close folder" } else { "Open folder" })).clicked() {
let _ = app.run("track.folder_toggle", json!({"track": id.0}));
}
} else {
- egui::Popup::menu(&rresp.on_hover_text("Track options")).show(|ui| track_context_menu(app, ui, id));
+ egui::Popup::menu(&rresp.on_hover_text(crate::localization::text("Track options"))).show(|ui| track_context_menu(app, ui, id));
}
if h >= 40.0 && track.kind.has_playlist() {
let ar = at(3.0, h - 12.0, 9.0, 9.0);
@@ -109,7 +109,7 @@ fn strip_buttons(app: &mut SoundApp, ui: &mut Ui, track: &Track, head: Rect) {
ui.painter().line_segment([a, b], Stroke::new(1.0, ink));
ui.painter().circle_filled(a, 1.3, ink);
ui.painter().circle_filled(b, 1.3, ink);
- if aresp.on_hover_text(if showing { "Hide automation" } else { "Show volume automation" }).clicked() {
+ if aresp.on_hover_text(crate::localization::text(if showing { "Hide automation" } else { "Show volume automation" })).clicked() {
let view = if !showing {
"volume"
} else if track.kind.is_midi() {
@@ -199,14 +199,14 @@ fn playlist_menu(app: &mut SoundApp, ui: &mut Ui, track: &Track, head: Rect, hea
let presp = ui.interact(pl_r, ui.scope_id().with(("pl", id.0)), Sense::click());
ui.painter().rect_filled(pl_r, 1.5, shade(head_bg, if presp.hovered() { -0.2 } else { -0.35 }));
arrow(ui.painter(), pos2(pl_r.center().x, pl_r.min.y + 5.75), true, t.text);
- egui::Popup::menu(&presp.on_hover_text("Playlists")).show(|ui| {
- if ui.button("New...").clicked() {
+ egui::Popup::menu(&presp.on_hover_text(crate::localization::text("Playlists"))).show(|ui| {
+ if ui.button(crate::localization::text("New...")).clicked() {
let _ = app.run("track.playlist_new", json!({"track": id.0}));
}
- if ui.button("Duplicate...").clicked() {
+ if ui.button(crate::localization::text("Duplicate...")).clicked() {
let _ = app.run("track.playlist_duplicate", json!({"track": id.0}));
}
- if ui.button("Delete Unused...").clicked() {
+ if ui.button(crate::localization::text("Delete Unused...")).clicked() {
let _ = app.run("track.playlist_delete_unused", json!({"track": id.0}));
}
ui.separator();
@@ -256,10 +256,10 @@ fn view_selector(app: &mut SoundApp, ui: &mut Ui, track: &Track, head: Rect) {
ui,
at(17.0, view_y, 105.0, 17.0),
ui.scope_id().with(("view", id.0)),
- &view_label(&track.view),
+ crate::localization::text(&view_label(&track.view)),
t.text,
true,
- &format!("Track view for {}", track.name),
+ &crate::localized_format!("Track view for {}", track.name),
);
egui::Popup::menu(&vresp).show(|ui| view_menu(app, ui, track));
}
@@ -272,11 +272,19 @@ fn view_selector(app: &mut SoundApp, ui: &mut Ui, track: &Track, head: Rect) {
soundcraft_model::AutomationMode::Latch => t.auto_latch,
_ => t.text_dim,
};
- let mode_name = format!("Automation mode for {}", track.name);
- let aresp = header_selector(ui, at(17.0, 39.0, 105.0, 17.0), ui.scope_id().with(("auto_mode", id.0)), mode.label(), col, true, &mode_name);
+ let mode_name = crate::localized_format!("Automation mode for {}", track.name);
+ let aresp = header_selector(
+ ui,
+ at(17.0, 39.0, 105.0, 17.0),
+ ui.scope_id().with(("auto_mode", id.0)),
+ crate::localization::text(mode.label()),
+ col,
+ true,
+ &mode_name,
+ );
egui::Popup::menu(&aresp).show(|ui| {
for m in soundcraft_model::AutomationMode::ALL {
- if ui.selectable_label(m == mode, m.label()).clicked() {
+ if ui.selectable_label(m == mode, crate::localization::text(m.label())).clicked() {
let _ = app.run("mix.automation_mode", json!({"track": id.0, "mode": m.label()}));
}
}
@@ -303,17 +311,25 @@ fn voice_row(app: &mut SoundApp, ui: &mut Ui, track: &Track, head: Rect) {
let d = vec2(a.to_radians().sin(), a.to_radians().cos()) * 3.5;
ui.painter().line_segment([r.center() - d, r.center() + d], Stroke::new(1.5, t.text));
}
- if resp.on_hover_text(if track.frozen { "Unfreeze" } else { "Freeze" }).clicked() {
+ if resp.on_hover_text(crate::localization::text(if track.frozen { "Unfreeze" } else { "Freeze" })).clicked() {
let _ = app.run("track.freeze", json!({"tracks": [id.0]}));
}
}
if !matches!(track.kind, TrackKind::Master | TrackKind::Vca | TrackKind::Folder) {
let (voice, color) = if track.inactive { ("off", t.text_dim) } else { ("dyn", t.text) };
- let voice_name = format!("Voice for {}", track.name);
- let resp = header_selector(ui, at(31.0, 57.0, 31.0, 17.0), ui.scope_id().with(("voice", id.0)), voice, color, false, &voice_name);
- egui::Popup::menu(&resp.on_hover_text("Voice: dyn plays the track, off makes it inactive")).show(|ui| {
+ let voice_name = crate::localized_format!("Voice for {}", track.name);
+ let resp = header_selector(
+ ui,
+ at(31.0, 57.0, 31.0, 17.0),
+ ui.scope_id().with(("voice", id.0)),
+ crate::localization::text(voice),
+ color,
+ false,
+ &voice_name,
+ );
+ egui::Popup::menu(&resp.on_hover_text(crate::localization::text("Voice: dyn plays the track, off makes it inactive"))).show(|ui| {
for (label, inactive) in [("dyn", false), ("off", true)] {
- if ui.selectable_label(track.inactive == inactive, label).clicked() {
+ if ui.selectable_label(track.inactive == inactive, crate::localization::text(label)).clicked() {
let _ = app.run("track.make_inactive", json!({"tracks": [id.0], "inactive": inactive}));
}
}
@@ -327,11 +343,19 @@ fn voice_row(app: &mut SoundApp, ui: &mut Ui, track: &Track, head: Rect) {
soundcraft_model::AutomationMode::Latch => t.auto_latch,
_ => t.text_dim,
};
- let mode_name = format!("Automation mode for {}", track.name);
- let aresp = header_selector(ui, at(63.0, 57.0, 59.0, 17.0), ui.scope_id().with(("auto_mode", id.0)), mode.label(), col, true, &mode_name);
+ let mode_name = crate::localized_format!("Automation mode for {}", track.name);
+ let aresp = header_selector(
+ ui,
+ at(63.0, 57.0, 59.0, 17.0),
+ ui.scope_id().with(("auto_mode", id.0)),
+ crate::localization::text(mode.label()),
+ col,
+ true,
+ &mode_name,
+ );
egui::Popup::menu(&aresp).show(|ui| {
for m in soundcraft_model::AutomationMode::ALL {
- if ui.selectable_label(m == mode, m.label()).clicked() {
+ if ui.selectable_label(m == mode, crate::localization::text(m.label())).clicked() {
let _ = app.run("mix.automation_mode", json!({"track": id.0, "mode": m.label()}));
}
}
@@ -378,10 +402,13 @@ fn field_row(app: &mut SoundApp, ui: &mut Ui, track: &Track, head: Rect, head_bg
let resp = ui.interact(field, ui.scope_id().with(("field", id.0)), Sense::click());
ui.painter().rect_filled(field, 2.0, shade(head_bg, if resp.hovered() { -0.02 } else { -0.1 }));
if track.kind == TrackKind::Instrument {
- let name =
- track.instrument.as_ref().and_then(|i| crate::mix_window::plugin_info(&i.plugin)).map_or("no instrument", |p| p.short_name);
+ let name = track
+ .instrument
+ .as_ref()
+ .and_then(|i| crate::mix_window::plugin_info(&i.plugin))
+ .map_or_else(|| crate::localization::text("no instrument"), |p| p.short_name);
ui.painter().with_clip_rect(field).text(pos2(field.min.x + 5.0, field.center().y), Align2::LEFT_CENTER, name, bold(10.0), t.text);
- egui::Popup::menu(&resp.on_hover_text("Instrument"))
+ egui::Popup::menu(&resp.on_hover_text(crate::localization::text("Instrument")))
.close_behavior(egui::PopupCloseBehavior::CloseOnClickOutside)
.show(|ui| crate::mix_window::instrument_menu(app, ui, id));
} else {
@@ -397,7 +424,7 @@ fn field_row(app: &mut SoundApp, ui: &mut Ui, track: &Track, head: Rect, head_bg
t.text,
);
}
- egui::Popup::menu(&resp.on_hover_text("Elastic Audio")).show(|ui| {
+ egui::Popup::menu(&resp.on_hover_text(crate::localization::text("Elastic Audio"))).show(|ui| {
for alg in ["none", "polyphonic", "rhythmic", "monophonic", "varispeed", "x-form"] {
let current = track.elastic.as_deref().unwrap_or("none") == alg;
if ui.selectable_label(current, soundcraft_engine::feature_names::display_label(alg)).clicked() {
@@ -427,6 +454,7 @@ pub(super) fn header_selector(ui: &Ui, r: Rect, id: egui::Id, text: &str, color:
let resp = ui.interact(r, id, Sense::click());
resp.widget_info(|| {
let mut info = egui::WidgetInfo::labeled(egui::accesskit::Role::ComboBox, ui.is_enabled(), name);
+ // `text` can be a user-defined route name (a bus called "File"), so show it unchanged.
info.current_text_value = Some(text.to_string());
info
});
@@ -451,14 +479,23 @@ enum HeaderKey {
/// mute that another track's solo implies). Record keys stay dark red when off, as in Pro Tools.
fn header_toggle(ui: &Ui, r: Rect, track: TrackId, track_name: &str, key: HeaderKey, lit: bool, implied: bool) -> egui::Response {
let t = Tokens::current();
- let (label, color) = match key {
+ let (source_label, color) = match key {
HeaderKey::Rec => ("Record enable", t.rec),
HeaderKey::Input => ("Input monitoring", t.input),
HeaderKey::Solo => ("Solo", t.solo),
HeaderKey::Mute => ("Mute", t.mute),
};
- let name = format!("{label} for {track_name}");
- let resp = ui.interact(r, ui.scope_id().with((label, track.0)), Sense::click());
+ let label = crate::localization::text(source_label);
+ // Fixed badges, independent of the translated label: in some languages the translated
+ // labels for two different buttons would otherwise start with the same letter.
+ let badge = match key {
+ HeaderKey::Rec => "",
+ HeaderKey::Input => "I",
+ HeaderKey::Solo => "S",
+ HeaderKey::Mute => "M",
+ };
+ let name = crate::localized_format!("{} for {}", label, track_name);
+ let resp = ui.interact(r, ui.scope_id().with((source_label, track.0)), Sense::click());
resp.widget_info(|| egui::WidgetInfo::selected(egui::Role::Button, ui.is_enabled(), lit, &name));
let rec = key == HeaderKey::Rec;
let (tint, k) = if lit {
@@ -482,7 +519,7 @@ fn header_toggle(ui: &Ui, r: Rect, track: TrackId, track_name: &str, key: Header
if rec {
ui.painter().circle_filled(r.center(), 4.0, if lit { Color32::WHITE } else { t.text.lerp_to_gamma(color, 0.3) });
} else {
- ui.painter().text(r.center(), Align2::CENTER_CENTER, label.get(..1).unwrap_or_default(), bold(11.0), ink);
+ ui.painter().text(r.center(), Align2::CENTER_CENTER, badge, bold(11.0), ink);
}
resp.on_hover_text(label)
}
@@ -532,7 +569,7 @@ pub(super) fn header_column(app: &mut SoundApp, ui: &mut Ui, track: &Track, col:
let mut child = ui.new_child(egui::UiBuilder::new().max_rect(r.shrink(3.0)));
let field = crate::widgets::named_text_field(
child.add(egui::TextEdit::multiline(&mut c).desired_width(r.width() - 6.0).font(regular(10.0))),
- &format!("Comments for {}", track.name),
+ &crate::localized_format!("Comments for {}", track.name),
);
if field.changed() {
let _ =
@@ -552,8 +589,9 @@ fn io_column(app: &mut SoundApp, ui: &mut Ui, track: &Track, r: Rect) {
let row = |y: f32, h: f32| (r.height() >= y + h + 1.0).then_some(Rect::from_min_size(r.min + vec2(7.0, y), vec2(r.width() - 14.0, h)));
if let Some(input) = row(4.0, 15.0).filter(|_| crate::mix_window::has_input_selector(track.kind)) {
let input_name = crate::mix_window::input_name(app, track);
- let resp = header_selector(&ui, input, ui.scope_id().with(("in", id.0)), &input_name, t.text, true, &format!("Input for {}", track.name));
- crate::mix_window::route_popup(app, &resp.on_hover_text("Input"), id, true);
+ let name = crate::localized_format!("Input for {}", track.name);
+ let resp = header_selector(&ui, input, ui.scope_id().with(("in", id.0)), &input_name, t.text, true, &name);
+ crate::mix_window::route_popup(app, &resp.on_hover_text(crate::localization::text("Input")), id, true);
}
if let Some(out) = row(21.0, 17.0) {
let (sel, fader) = (out.with_max_x(out.max.x - 11.0), out.with_min_x(out.max.x - 11.0));
@@ -571,8 +609,8 @@ fn io_column(app: &mut SoundApp, ui: &mut Ui, track: &Track, r: Rect) {
let c = fader.center() + vec2(0.5, 0.0);
ui.painter().vline(c.x, c.y - 5.0..=c.y + 5.0, Stroke::new(1.0, t.text));
ui.painter().rect_filled(Rect::from_center_size(c + vec2(0.0, -1.5), vec2(5.0, 2.5)), 0.5, t.text);
- crate::mix_window::route_popup(app, &resp.on_hover_text("Output"), id, false);
- if fresp.on_hover_text("Show in the Mix window").clicked() {
+ crate::mix_window::route_popup(app, &resp.on_hover_text(crate::localization::text("Output")), id, false);
+ if fresp.on_hover_text(crate::localization::text("Show in the Mix window")).clicked() {
let _ = app.run("edit.select", json!({"tracks": [id.0]}));
let _ = app.run("window.mix", json!({}));
}
diff --git a/crates/ui-egui/src/edit_window/input.rs b/crates/ui-egui/src/edit_window/input.rs
index 15bf71a37..54d16b703 100644
--- a/crates/ui-egui/src/edit_window/input.rs
+++ b/crates/ui-egui/src/edit_window/input.rs
@@ -513,7 +513,7 @@ pub(super) fn new_midi_clip(app: &mut SoundApp, s: &Session, track: TrackId, fro
fn clip_context_menu(app: &mut SoundApp, ui: &mut Ui, clip: Option) {
let Some(c) = clip else {
- if ui.button("Paste").clicked() {
+ if ui.button(crate::localization::text("Paste")).clicked() {
let _ = app.run("edit.paste", json!({}));
}
return;
@@ -535,11 +535,11 @@ fn clip_context_menu(app: &mut SoundApp, ui: &mut Ui, clip: Option) {
}
}
ui.separator();
- if ui.button("Rename...").clicked() {
+ if ui.button(crate::localization::text("Rename...")).clicked() {
let name = app.engine.session().find_clip(c).map(|(_, x)| x.name.clone()).unwrap_or_default();
app.dialogs.open_rename_clip(c, &name);
}
- if ui.button("Delete").clicked() {
+ if ui.button(crate::localization::text("Delete")).clicked() {
let s = app.engine.session();
let selected: Vec = s.edit.selected_clips.iter().map(|id| id.0).collect();
let track: Vec = s.find_clip(c).map(|(t, _)| t.0).into_iter().collect();
diff --git a/crates/ui-egui/src/edit_window/rulers.rs b/crates/ui-egui/src/edit_window/rulers.rs
index a9b7a647a..7ea3b566e 100644
--- a/crates/ui-egui/src/edit_window/rulers.rs
+++ b/crates/ui-egui/src/edit_window/rulers.rs
@@ -99,7 +99,13 @@ pub(super) fn draw_rulers(app: &mut SoundApp, ui: &mut Ui, area: Rect, tl: Rect,
let lab = Rect::from_min_max(pos2(area.min.x, y0), pos2(area.min.x + HEADER_W, y0 + h));
y0 += h;
let painter = ui.painter().with_clip_rect(row);
- ui.painter().text(pos2(lab.max.x - 12.0, lab.center().y), Align2::RIGHT_CENTER, ruler_label(id), bold(11.0), t.ruler_text);
+ ui.painter().text(
+ pos2(lab.max.x - 12.0, lab.center().y),
+ Align2::RIGHT_CENTER,
+ crate::localization::text(ruler_label(id)),
+ bold(11.0),
+ t.ruler_text,
+ );
let fmt = TimeFormat::from_id(id);
match id.as_str() {
"tempo" => {
@@ -151,7 +157,13 @@ pub(super) fn draw_rulers(app: &mut SoundApp, ui: &mut Ui, area: Rect, tl: Rect,
"key" => {
painter.rect_filled(row, 0.0, Color32::from_rgb(64, 52, 88));
if s.key_signatures.is_empty() {
- painter.text(pos2(tl.min.x + 6.0, row.center().y), Align2::LEFT_CENTER, "C major", bold(11.0), Color32::from_rgb(220, 214, 236));
+ painter.text(
+ pos2(tl.min.x + 6.0, row.center().y),
+ Align2::LEFT_CENTER,
+ crate::localization::text("C major"),
+ bold(11.0),
+ Color32::from_rgb(220, 214, 236),
+ );
}
for (at, k) in &s.key_signatures {
let x = x_of(&s, tl, *at);
@@ -374,7 +386,7 @@ pub(super) fn column_titles(ui: &Ui, rulers: Rect, cols: &[Column]) {
ui.painter().vline(end - 0.5, row.y_range(), line);
for &(_, _, title, w) in cols {
ui.painter().vline(x + 0.5, row.y_range(), line);
- ui.painter().text(pos2(x + w / 2.0, row.center().y), Align2::CENTER_CENTER, title, bold(10.0), t.section_label);
+ ui.painter().text(pos2(x + w / 2.0, row.center().y), Align2::CENTER_CENTER, crate::localization::text(title), bold(10.0), t.section_label);
x += w;
}
}
@@ -383,9 +395,9 @@ pub(super) fn column_titles(ui: &Ui, rulers: Rect, cols: &[Column]) {
pub(super) fn views_button(app: &mut SoundApp, ui: &mut Ui, rulers: Rect) {
let r = Rect::from_min_size(rulers.min + vec2(6.0, 5.0), vec2(50.0, 18.0));
let mut child = ui.new_child(egui::UiBuilder::new().max_rect(r));
- let resp = crate::widgets::selector_box(&mut child, r.width(), r.height(), "Views", Tokens::current().text);
- resp.widget_info(|| egui::WidgetInfo::labeled(egui::Role::ComboBox, child.is_enabled(), "Views"));
- let resp = resp.on_hover_text("Columns beside the track headers: inserts, sends, I/O…");
+ let resp = crate::widgets::selector_box(&mut child, r.width(), r.height(), crate::localization::text("Views"), Tokens::current().text);
+ resp.widget_info(|| egui::WidgetInfo::labeled(egui::Role::ComboBox, child.is_enabled(), crate::localization::text("Views")));
+ let resp = resp.on_hover_text(crate::localization::text("Columns beside the track headers: inserts, sends, I/O…"));
egui::Popup::menu(&resp).close_behavior(egui::PopupCloseBehavior::CloseOnClickOutside).show(|ui| {
let shown = edit_columns(app.engine.session());
for (id, label, _, _) in COLUMNS {
@@ -394,10 +406,10 @@ pub(super) fn views_button(app: &mut SoundApp, ui: &mut Ui, rulers: Rect) {
}
}
ui.separator();
- if ui.button("All").clicked() {
+ if ui.button(crate::localization::text("All")).clicked() {
let _ = app.run("view.edit_all", json!({}));
}
- if ui.button("Minimal").clicked() {
+ if ui.button(crate::localization::text("Minimal")).clicked() {
let _ = app.run("view.edit_minimal", json!({}));
}
});
diff --git a/crates/ui-egui/src/edit_window/tracks.rs b/crates/ui-egui/src/edit_window/tracks.rs
index b495da28f..1f9813fd1 100644
--- a/crates/ui-egui/src/edit_window/tracks.rs
+++ b/crates/ui-egui/src/edit_window/tracks.rs
@@ -163,7 +163,7 @@ fn playlist_lanes(app: &mut SoundApp, ui: &mut Ui, track: &Track, row: Rect, mai
let _ = app.run("track.playlist_promote", json!({"track": track.id.0, "playlist": i, "start": a, "end": b}));
}
}
- resp.on_hover_text("Click a take (or the selection) to promote it to the main playlist");
+ resp.on_hover_text(crate::localization::text("Click a take (or the selection) to promote it to the main playlist"));
y += LANE_H;
}
}
@@ -185,7 +185,7 @@ pub(super) fn view_menu(app: &mut SoundApp, ui: &mut Ui, track: &Track) {
}
opts.extend(["volume", "pan", "mute"]);
for o in opts {
- if ui.selectable_label(track.view == o, view_label(o)).clicked() {
+ if ui.selectable_label(track.view == o, crate::localization::text(&view_label(o))).clicked() {
let _ = app.run("track.view", json!({"track": id, "view": o}));
}
}
@@ -240,7 +240,7 @@ pub(crate) fn track_context_menu(app: &mut SoundApp, ui: &mut Ui, id: TrackId) {
.map(|track| (track.id.0, track.name.clone()))
.collect();
if !folders.is_empty() {
- ui.menu_button("Move to Folder", |ui| {
+ ui.menu_button(crate::localization::text("Move to Folder"), |ui| {
for (folder, name) in &folders {
if ui.button(name).clicked() {
let _ = app.run("track.move_to_folder", json!({"tracks": selection, "folder": folder}));
@@ -248,24 +248,26 @@ pub(crate) fn track_context_menu(app: &mut SoundApp, ui: &mut Ui, id: TrackId) {
}
});
}
- if app.engine.session().track(id).is_some_and(|track| track.folder.is_some()) && ui.button("Remove from Folder").clicked() {
+ if app.engine.session().track(id).is_some_and(|track| track.folder.is_some())
+ && ui.button(crate::localization::text("Remove from Folder")).clicked()
+ {
let _ = app.run("track.remove_from_folder", json!({"tracks": selection}));
}
// Only the track clicked: the command has one target, and the selection stays as it is.
- if ui.button("Scroll Into View").clicked() {
+ if ui.button(crate::localization::text("Scroll Into View")).clicked() {
let _ = app.run("view.scroll_into_view", json!({"track": id.0}));
}
ui.separator();
- ui.menu_button("Track Height", |ui| {
+ ui.menu_button(crate::localization::text("Track Height"), |ui| {
for h in TrackHeight::ALL {
- if ui.button(h.label()).clicked() {
+ if ui.button(crate::localization::text(h.label())).clicked() {
let own: Vec = selection.iter().map(|&t| TrackId(t)).collect();
let tracks = height_targets(app.engine.session(), ui.input(|i| i.modifiers), &own);
let _ = app.run("track.height", json!({"tracks": tracks, "height": h.label()}));
}
}
});
- ui.menu_button("Track Color", |ui| {
+ ui.menu_button(crate::localization::text("Track Color"), |ui| {
for (i, c) in soundcraft_model::TRACK_COLORS.iter().enumerate() {
let (r, resp) = ui.allocate_exact_size(vec2(120.0, 14.0), Sense::click());
ui.painter().rect_filled(r, 2.0, rgb(*c));
diff --git a/crates/ui-egui/src/import.rs b/crates/ui-egui/src/import.rs
index f17a041bb..ef2426820 100644
--- a/crates/ui-egui/src/import.rs
+++ b/crates/ui-egui/src/import.rs
@@ -137,7 +137,7 @@ fn finish(app: &mut SoundApp) {
Ok(decoded) => {
app.engine.offer_import(decoded);
if run_now(app, params) {
- app.ui.status = format!("Imported {name}");
+ app.ui.status = crate::localized_format!("Imported {name}", name = name);
}
app.engine.drop_offered_imports();
}
@@ -166,7 +166,7 @@ pub fn show(app: &SoundApp, ctx: &egui::Context) {
ui.horizontal(|ui| {
ui.add(egui::Spinner::new());
let more = if waiting > 0 { format!(" ({waiting} more)") } else { String::new() };
- ui.label(format!("Importing {name}{more}"));
+ ui.label(crate::localized_format!("Importing {name}{more}", name = name, more = more));
});
});
},
diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs
index 7d685d1a4..5f80e62cb 100644
--- a/crates/ui-egui/src/lib.rs
+++ b/crates/ui-egui/src/lib.rs
@@ -23,6 +23,7 @@ pub mod edit_window;
pub mod fonts;
pub mod icons;
pub mod import;
+pub mod localization;
pub mod menus;
pub mod mix_window;
pub mod palette;
@@ -143,6 +144,8 @@ pub struct UiState {
pub video_burn_in: bool,
pub workspace_dir: String,
pub configurations: Vec<(String, Value)>,
+ /// Interface language (`ui.language`).
+ pub language: localization::Language,
/// Appearance (`ui.theme`): dark by default, light or follow the system on request.
pub theme: theme::ThemeMode,
/// The main window's size (logical points) and maximized state, and the interface scale, as
@@ -212,6 +215,7 @@ impl Default for UiState {
video_burn_in: false,
workspace_dir: String::new(),
configurations: Vec::new(),
+ language: localization::Language::default(),
theme: theme::ThemeMode::Dark,
window_size: [1600.0, 1000.0],
window_maximized: false,
diff --git a/crates/ui-egui/src/localization.rs b/crates/ui-egui/src/localization.rs
new file mode 100644
index 000000000..fabbf9243
--- /dev/null
+++ b/crates/ui-egui/src/localization.rs
@@ -0,0 +1,542 @@
+//! Language selection and source-language fallback for UI strings.
+
+#[path = "../locales/pt-BR/mod.rs"]
+mod pt_br;
+
+use std::cell::Cell;
+
+thread_local! {
+ static CURRENT_LANGUAGE: Cell = const { Cell::new(Language::English) };
+}
+
+/// A language supported by the UI.
+#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
+pub enum Language {
+ #[default]
+ #[serde(rename = "en")]
+ English,
+ #[serde(rename = "pt-BR")]
+ PortugueseBrazil,
+}
+
+impl Language {
+ /// All supported languages, in the order they are shown in the language menu.
+ pub const ALL: [Self; 2] = [Self::English, Self::PortugueseBrazil];
+
+ /// Stable language tag used in preferences and control commands.
+ pub const fn id(self) -> &'static str {
+ match self {
+ Self::English => "en",
+ Self::PortugueseBrazil => "pt-BR",
+ }
+ }
+
+ /// English source name of the language; translate it with `text` for display.
+ pub const fn native_name(self) -> &'static str {
+ match self {
+ Self::English => "English",
+ Self::PortugueseBrazil => "Portuguese (Brazil)",
+ }
+ }
+
+ pub fn parse(tag: &str) -> Option {
+ Self::ALL.into_iter().find(|language| language.id().eq_ignore_ascii_case(tag.trim()))
+ }
+
+ /// Rewrites the decimal point of a rendered number for this language.
+ pub fn localize_decimal(self, number: &str) -> String {
+ match self {
+ Self::English => number.to_owned(),
+ Self::PortugueseBrazil => number.replace('.', ","),
+ }
+ }
+
+ /// Translates a UI string, falling back to its English source when no translation exists.
+ pub fn text(self, source: &str) -> &str {
+ match self {
+ Self::English => source,
+ Self::PortugueseBrazil => pt_br::translate(source).unwrap_or(source),
+ }
+ }
+}
+
+/// Sets the language used by text widgets on this thread for the duration of a UI frame.
+pub fn enter(language: Language) -> LanguageScope {
+ let previous = CURRENT_LANGUAGE.with(|current| current.replace(language));
+ LanguageScope(previous)
+}
+
+/// The language selected for the current UI frame.
+pub fn current_language() -> Language {
+ CURRENT_LANGUAGE.with(Cell::get)
+}
+
+/// Translates a source string using the language selected for the current UI frame.
+pub fn text(source: &str) -> &str {
+ current_language().text(source)
+}
+
+/// Translates an engine error message for display. Messages are matched against the catalog's
+/// error templates and their embedded values are carried over; text that matches no template is
+/// returned unchanged, so low-level library errors stay in English.
+pub fn error_text(message: &str) -> String {
+ error_text_in(current_language(), message, 0)
+}
+
+const MAX_ERROR_DEPTH: usize = 4;
+
+fn error_text_in(language: Language, message: &str, depth: usize) -> String {
+ let templates: &[(&str, &str)] = match language {
+ Language::English => &[],
+ Language::PortugueseBrazil => pt_br::ERROR_TEMPLATES,
+ };
+ let mut best: Option<(usize, &str, Vec<(String, String)>)> = None;
+ for (template, translation) in templates {
+ if let Some((weight, captures)) = match_template(template, message)
+ && best.as_ref().is_none_or(|(w, ..)| weight > *w)
+ {
+ best = Some((weight, translation, captures));
+ }
+ }
+ let Some((_, translation, captures)) = best else { return message.to_owned() };
+ let captures: Vec<(String, String)> = captures
+ .into_iter()
+ .map(|(name, value)| {
+ let value = if depth < MAX_ERROR_DEPTH { error_text_in(language, &value, depth + 1) } else { value };
+ (name, value)
+ })
+ .collect();
+ fill_captures(language, translation, &captures)
+}
+
+enum Piece<'a> {
+ Literal(String),
+ Field(&'a str),
+}
+
+fn split_template(template: &str) -> Vec> {
+ let mut pieces = Vec::new();
+ let mut literal = String::new();
+ let mut rest = template;
+ while let Some(ch) = rest.chars().next() {
+ if let Some(after) = rest.strip_prefix("{{") {
+ literal.push('{');
+ rest = after;
+ } else if let Some(after) = rest.strip_prefix("}}") {
+ literal.push('}');
+ rest = after;
+ } else if ch == '{'
+ && let Some(end) = rest.find('}')
+ {
+ if !literal.is_empty() {
+ pieces.push(Piece::Literal(std::mem::take(&mut literal)));
+ }
+ pieces.push(Piece::Field(rest.get(1..end).unwrap_or_default()));
+ rest = rest.get(end + 1..).unwrap_or_default();
+ } else {
+ literal.push(ch);
+ rest = rest.get(ch.len_utf8()..).unwrap_or_default();
+ }
+ }
+ if !literal.is_empty() {
+ pieces.push(Piece::Literal(literal));
+ }
+ pieces
+}
+
+/// Matches `message` against `template`. Returns the template's literal length, used to prefer
+/// the most specific template, and the captured values by placeholder name.
+fn match_template(template: &str, message: &str) -> Option<(usize, Vec<(String, String)>)> {
+ let pieces = split_template(template);
+ let mut captures = Vec::new();
+ let mut pos = 0usize;
+ let mut weight = 0usize;
+ let mut index = 0usize;
+ while let Some(piece) = pieces.get(index) {
+ match piece {
+ Piece::Literal(text) => {
+ if !message.get(pos..)?.starts_with(text.as_str()) {
+ return None;
+ }
+ pos += text.len();
+ weight += text.len();
+ }
+ Piece::Field(name) => {
+ let rest = message.get(pos..)?;
+ let end = match pieces.get(index + 1) {
+ None => rest.len(),
+ Some(Piece::Literal(next)) if pieces.len() == index + 2 => {
+ if rest.len() < next.len() || !rest.ends_with(next.as_str()) {
+ return None;
+ }
+ rest.len() - next.len()
+ }
+ Some(Piece::Literal(next)) => rest.find(next.as_str())?,
+ Some(Piece::Field(_)) => return None,
+ };
+ if end == 0 {
+ return None;
+ }
+ let name = name.split(':').next().unwrap_or_default();
+ captures.push((name.to_owned(), rest.get(..end)?.to_owned()));
+ pos += end;
+ }
+ }
+ index += 1;
+ }
+ (pos == message.len() && weight > 0).then_some((weight, captures))
+}
+
+fn fill_captures(language: Language, translation: &str, captures: &[(String, String)]) -> String {
+ let mut out = String::with_capacity(translation.len());
+ for piece in split_template(translation) {
+ match piece {
+ Piece::Literal(text) => out.push_str(&text),
+ Piece::Field(field) => {
+ let name = field.split(':').next().unwrap_or_default();
+ match captures.iter().find(|(captured, _)| captured == name) {
+ Some((_, value)) if value.parse::().is_ok() => out.push_str(&language.localize_decimal(value)),
+ Some((_, value)) => out.push_str(value),
+ None => {
+ out.push('{');
+ out.push_str(field);
+ out.push('}');
+ }
+ }
+ }
+ }
+ }
+ out
+}
+
+/// Whether the Brazilian Portuguese catalog has an entry for `source`, even an identical one.
+#[cfg(test)]
+pub(crate) fn has_pt_br_entry(source: &str) -> bool {
+ pt_br::translate(source).is_some()
+}
+
+/// Guard that restores the previously active language when dropped.
+pub struct LanguageScope(Language);
+
+impl Drop for LanguageScope {
+ /// Restores the language that was active when the scope was created.
+ fn drop(&mut self) {
+ CURRENT_LANGUAGE.with(|language| language.set(self.0));
+ }
+}
+
+/// One formatting argument, kept as a reference and rendered only when the template asks for it.
+///
+/// The template is only known at run time, so the format specifier is too: the formatter reads a
+/// `:.N` precision from it and renders the value with that precision.
+pub struct Arg<'a> {
+ value: &'a dyn std::fmt::Display,
+}
+
+impl<'a> Arg<'a> {
+ /// Wraps the argument without rendering it.
+ pub fn new(value: &'a T) -> Self {
+ Self { value }
+ }
+
+ /// Renders the argument for the given precision specifier (`.0` to `.3`), if any. A number
+ /// given a precision uses the active language's decimal separator.
+ fn render(&self, spec: Option<&str>) -> String {
+ let precision = spec.and_then(|spec| spec.strip_prefix('.')).and_then(|digits| digits.parse::().ok()).filter(|n| *n <= 3);
+ match precision {
+ Some(n) => {
+ let text = format!("{:.*}", n, self.value);
+ if text.parse::().is_ok() { current_language().localize_decimal(&text) } else { text }
+ }
+ None => self.value.to_string(),
+ }
+ }
+}
+
+/// Formats the translated `source` with positional arguments. Placeholders may carry a `:.N`
+/// precision, as in `format!`; other specifiers are ignored.
+pub fn format_positional(source: &str, args: &[Arg<'_>]) -> String {
+ format_template(source, args, &[], true)
+}
+
+/// Formats the translated `source` with named arguments (`name = value`).
+pub fn format_named(source: &str, args: &[(&str, Arg<'_>)]) -> String {
+ format_template(source, &[], args, false)
+}
+
+/// Shared implementation behind `format_positional` and `format_named`.
+fn format_template(source: &str, positional: &[Arg<'_>], named: &[(&str, Arg<'_>)], positional_mode: bool) -> String {
+ let template = text(source);
+ let mut out = String::with_capacity(template.len());
+ let mut next = 0usize;
+ let mut chars = template.chars().peekable();
+ while let Some(ch) = chars.next() {
+ match ch {
+ '{' if chars.peek() == Some(&'{') => {
+ chars.next();
+ out.push('{');
+ }
+ '}' if chars.peek() == Some(&'}') => {
+ chars.next();
+ out.push('}');
+ }
+ '{' => {
+ let mut field = String::new();
+ let mut closed = false;
+ for ch in chars.by_ref() {
+ if ch == '}' {
+ closed = true;
+ break;
+ }
+ field.push(ch);
+ }
+ if !closed {
+ out.push('{');
+ out.push_str(&field);
+ break;
+ }
+ let (key, spec) = match field.split_once(':') {
+ Some((key, spec)) => (key, Some(spec)),
+ None => (field.as_str(), None),
+ };
+ let value = if positional_mode {
+ let value = positional.get(next);
+ next += 1;
+ value
+ } else {
+ named.iter().find(|(name, _)| *name == key).map(|(_, value)| value)
+ };
+ match value {
+ Some(value) => out.push_str(&value.render(spec)),
+ None => {
+ out.push('{');
+ out.push_str(&field);
+ out.push('}');
+ }
+ }
+ }
+ '}' => out.push('}'),
+ ch => out.push(ch),
+ }
+ }
+ out
+}
+
+#[macro_export]
+macro_rules! localized_format {
+ ($source:literal) => {
+ $crate::localization::text($source).to_owned()
+ };
+ ($source:literal, $($name:ident = $value:expr),+ $(,)?) => {{
+ $crate::localization::format_named(
+ $source,
+ &[$( (stringify!($name), $crate::localization::Arg::new(&$value)) ),+],
+ )
+ }};
+ ($source:literal, $($value:expr),+ $(,)?) => {{
+ $crate::localization::format_positional(
+ $source,
+ &[$($crate::localization::Arg::new(&$value)),+],
+ )
+ }};
+}
+
+#[cfg(test)]
+mod tests {
+ use super::{Arg, Language, enter, error_text, format_named, format_positional, text};
+
+ #[test]
+ fn language_tags_are_stable_and_round_trip() {
+ for language in Language::ALL {
+ assert_eq!(Language::parse(language.id()), Some(language));
+ let encoded = serde_json::to_value(language).unwrap_or_default();
+ let decoded: Language = serde_json::from_value(encoded).unwrap_or_default();
+ assert_eq!(decoded, language);
+ }
+ assert_eq!(Language::parse(" PT-br "), Some(Language::PortugueseBrazil));
+ assert_eq!(Language::parse("fr"), None);
+ }
+
+ #[test]
+ fn language_translations_fall_back_to_the_english_source() {
+ assert_ne!(Language::PortugueseBrazil.text("Appearance"), "Appearance");
+ assert_eq!(Language::PortugueseBrazil.text("A source string with no catalog entry"), "A source string with no catalog entry");
+ assert_eq!(Language::English.text("Appearance"), "Appearance");
+ }
+
+ #[test]
+ fn language_scope_restores_the_previous_language() {
+ assert_eq!(text("Appearance"), "Appearance");
+ {
+ let _scope = enter(Language::PortugueseBrazil);
+ assert_ne!(text("Appearance"), "Appearance");
+ {
+ let _inner = enter(Language::English);
+ assert_eq!(text("Appearance"), "Appearance");
+ }
+ assert_ne!(text("Appearance"), "Appearance");
+ }
+ assert_eq!(text("Appearance"), "Appearance");
+ }
+
+ #[test]
+ fn portuguese_catalog_covers_every_menu_label() {
+ for path in include_str!("../../engine/catalog/menus.txt").lines() {
+ for label in path.split(" > ").map(str::trim).filter(|label| !label.is_empty()) {
+ assert!(super::pt_br::translate(label).is_some(), "missing pt-BR menu label: {label}");
+ }
+ }
+ }
+
+ #[test]
+ fn engine_errors_are_translated_with_their_values() {
+ assert_eq!(error_text("select a clip"), "select a clip");
+ let _scope = enter(Language::PortugueseBrazil);
+ assert_ne!(error_text("select a clip"), "select a clip");
+ assert_ne!(error_text("no track"), "no track");
+ let wrapped = error_text("bad parameters for `track.new`: `name` required");
+ assert!(wrapped.contains("`track.new`") && wrapped.contains("`name`"), "{wrapped}");
+ assert!(!wrapped.contains("bad parameters") && !wrapped.contains("required"), "{wrapped}");
+ let ratio = error_text("stretch ratio 12.500 is outside 0.1..10");
+ assert!(ratio.contains("12,500"), "{ratio}");
+ assert_eq!(error_text("some unknown library failure"), "some unknown library failure");
+ }
+
+ #[test]
+ fn positional_templates_fill_in_order() {
+ assert_eq!(format_positional("{} of {}", &[Arg::new(&1), Arg::new(&"two")]), "1 of two");
+ assert_eq!(format_positional("no fields", &[Arg::new(&1)]), "no fields");
+ }
+
+ #[test]
+ fn named_templates_fill_by_name_in_any_order() {
+ assert_eq!(format_named("{b}-{a}-{b}", &[("a", Arg::new(&1)), ("b", Arg::new(&2))]), "2-1-2");
+ }
+
+ #[test]
+ fn precision_specifiers_are_honoured() {
+ let value = 3.14259_f64;
+ for (template, expected) in [("{:.0}", "3"), ("{:.1}", "3.1"), ("{:.2}", "3.14"), ("{:.3}", "3.143"), ("{}", "3.14259")] {
+ assert_eq!(format_positional(template, &[Arg::new(&value)]), expected, "{template}");
+ }
+ }
+
+ #[test]
+ fn braces_can_be_escaped() {
+ assert_eq!(format_positional("{{{}}}", &[Arg::new(&5)]), "{5}");
+ }
+
+ #[test]
+ fn missing_unknown_and_unclosed_fields_are_kept_verbatim() {
+ assert_eq!(format_positional("{} {}", &[Arg::new(&1)]), "1 {}");
+ assert_eq!(format_named("{nope}", &[("a", Arg::new(&1))]), "{nope}");
+ assert_eq!(format_positional("open {", &[]), "open {");
+ assert_eq!(format_positional("tail {abc", &[]), "tail {abc");
+ }
+
+ #[test]
+ fn portuguese_numbers_use_a_decimal_comma_only_with_a_precision() {
+ let _scope = enter(Language::PortugueseBrazil);
+ assert_eq!(format_positional("{:.1} dB", &[Arg::new(&-6.04_f64)]), "-6,0 dB");
+ assert_eq!(format_positional("{}", &[Arg::new(&"v1.2")]), "v1.2");
+ let _english = enter(Language::English);
+ assert_eq!(format_positional("{:.1}", &[Arg::new(&2.5_f64)]), "2.5");
+ }
+
+ /// Parses a Rust string literal at the start of `s`; returns its value and the rest.
+ fn literal(s: &str) -> Option<(String, &str)> {
+ let mut chars = s.strip_prefix('"')?.char_indices();
+ let mut out = String::new();
+ while let Some((i, c)) = chars.next() {
+ match c {
+ '"' => return Some((out, &s[i + 2..])),
+ '\\' => match chars.next()?.1 {
+ 'n' => out.push('\n'),
+ other => out.push(other),
+ },
+ c => out.push(c),
+ }
+ }
+ None
+ }
+
+ /// Every `"source" => "translation"` pair of the catalog, read from its source file.
+ fn catalog_entries() -> Vec<(String, String)> {
+ let text = include_str!("../locales/pt-BR/mod.rs");
+ let mut lines = text.lines().map(str::trim);
+ let mut entries = Vec::new();
+ while let Some(line) = lines.next() {
+ let Some((key, rest)) = literal(line) else { continue };
+ let Some(rest) = rest.trim_start().strip_prefix("=>") else { continue };
+ let rest = rest.trim();
+ let value =
+ if rest.starts_with('{') { lines.next().and_then(|next| literal(next).map(|(v, _)| v)) } else { literal(rest).map(|(v, _)| v) };
+ if let Some(value) = value {
+ entries.push((key, value));
+ }
+ }
+ entries
+ }
+
+ fn placeholders(template: &str) -> Vec {
+ let mut found = Vec::new();
+ let mut chars = template.chars().peekable();
+ while let Some(c) = chars.next() {
+ if c == '{' && chars.peek() == Some(&'{') {
+ chars.next();
+ } else if c == '{' {
+ let field: String = chars.by_ref().take_while(|c| *c != '}').collect();
+ found.push(field);
+ }
+ }
+ found.sort();
+ found
+ }
+
+ #[test]
+ fn catalog_entries_are_parsed_and_unique() {
+ let entries = catalog_entries();
+ assert!(entries.len() > 1000, "parsed only {} catalog entries", entries.len());
+ let mut keys: Vec<&str> = entries.iter().map(|(key, _)| key.as_str()).collect();
+ keys.sort_unstable();
+ let before = keys.len();
+ keys.dedup();
+ assert_eq!(before, keys.len(), "duplicate catalog keys");
+ }
+
+ #[test]
+ fn catalog_translations_keep_the_english_placeholders() {
+ for (source, translation) in catalog_entries() {
+ assert_eq!(placeholders(&source), placeholders(&translation), "placeholders differ for {source:?}");
+ assert_eq!(super::pt_br::translate(&source), Some(translation.as_str()), "lookup differs for {source:?}");
+ }
+ }
+
+ #[test]
+ fn every_localized_source_string_has_a_catalog_entry() {
+ fn visit(dir: &std::path::Path, missing: &mut Vec) {
+ let Ok(read) = std::fs::read_dir(dir) else { return };
+ for entry in read.flatten() {
+ let path = entry.path();
+ if path.is_dir() {
+ visit(&path, missing);
+ } else if path.extension().is_some_and(|e| e == "rs") && !path.ends_with("localization.rs") {
+ let Ok(text) = std::fs::read_to_string(&path) else { continue };
+ for marker in ["localization::text(\"", "localized_format!(\""] {
+ for (at, _) in text.match_indices(marker) {
+ let start = at + marker.len() - 1;
+ if let Some((source, _)) = literal(&text[start..])
+ && super::pt_br::translate(&source).is_none()
+ {
+ missing.push(format!("{}: {source:?}", path.display()));
+ }
+ }
+ }
+ }
+ }
+ }
+ let mut missing = Vec::new();
+ visit(&std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("src"), &mut missing);
+ assert!(missing.is_empty(), "strings without a pt-BR entry:\n{}", missing.join("\n"));
+ }
+}
diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs
index ac0d62c4c..c61c0e874 100644
--- a/crates/ui-egui/src/menus.rs
+++ b/crates/ui-egui/src/menus.rs
@@ -77,6 +77,7 @@ pub const UI_COMMANDS: &[(&str, &str, &str, Option<&str>)] = &[
("ui.new_tracks_dialog", "New Tracks…", "", None),
("ui.bounce_dialog", "Bounce Mix…", "", None),
("ui.set", "Set UI State", "", None),
+ ("ui.language", "Language", "", None),
("ui.theme", "Appearance", "", None),
("ui.reduce_visual_effects", "Reduce Visual Effects", "", None),
("ui.undo_levels", "Levels of Undo", "", None),
@@ -272,32 +273,32 @@ pub fn menu_bar(app: &mut SoundApp, ui: &mut egui::Ui) {
ui,
|ui| {
egui::MenuBar::new().ui(ui, |ui| {
- ui.menu_button("SoundCraft", |ui| {
+ ui.menu_button(crate::localization::text("SoundCraft"), |ui| {
ui.add_enabled_ui(menu_entries_enabled, |ui| {
- if ui.button("About SoundCraft").clicked() {
+ if ui.button(crate::localization::text("About SoundCraft")).clicked() {
app.ui.show_about = true;
}
- if ui.add_enabled(preferences_enabled, egui::Button::new("Preferences...")).clicked() {
+ if ui.add_enabled(preferences_enabled, egui::Button::new(crate::localization::text("Preferences..."))).clicked() {
let _ = app.run("setup.preferences", json!({"value": true}));
}
- if ui.button("Check for Updates…").clicked() {
+ if ui.button(crate::localization::text("Check for Updates…")).clicked() {
let _ = app.run("app.checkForUpdates", json!({}));
}
- if ui.button("Session Info").clicked() {
+ if ui.button(crate::localization::text("Session Info")).clicked() {
app.ui.show_session_info = true;
}
- if ui.button("Session Audio Health").clicked() {
+ if ui.button(crate::localization::text("Session Audio Health")).clicked() {
let _ = app.run("window.audio_health", json!({"value": true}));
}
ui.separator();
- if ui.button("Quit").clicked() {
+ if ui.button(crate::localization::text("Quit")).clicked() {
let _ = crate::dialogs::run_or_ask(app, "app.quit", json!({}));
}
});
});
let extra = ui_aliases();
for root in tree() {
- ui.menu_button(&root.label, |ui| {
+ ui.menu_button(crate::localization::text(&root.label), |ui| {
scrolling(ui, |ui| {
ui.add_enabled_ui(menu_entries_enabled, |ui| {
for c in &root.children {
@@ -311,14 +312,16 @@ pub fn menu_bar(app: &mut SoundApp, ui: &mut egui::Ui) {
}
if root.path == "AudioSuite" {
ui.separator();
- ui.label(egui::RichText::new("Processes selected clips offline").small().color(t.text_dim));
+ ui.label(
+ egui::RichText::new(crate::localization::text("Processes selected clips offline")).small().color(t.text_dim),
+ );
}
if root.path == "Window" {
ui.separator();
let mut separate = app.ui.mix_separate;
if ui
- .checkbox(&mut separate, "Mix in Separate Window")
- .on_hover_text("Show Edit and Mix at once, e.g. one per monitor")
+ .checkbox(&mut separate, crate::localization::text("Mix in Separate Window"))
+ .on_hover_text(crate::localization::text("Show Edit and Mix at once, e.g. one per monitor"))
.changed()
{
let _ = run_ui_command(app, "window.mix_separate", &json!({"value": separate}));
@@ -333,7 +336,11 @@ pub fn menu_bar(app: &mut SoundApp, ui: &mut egui::Ui) {
"{}{} — {}",
app.engine.session().name,
if app.engine.is_dirty() { " *" } else { "" },
- if app.ui.window == MainWindow::Edit || app.ui.mix_separate { "Edit" } else { "Mix" }
+ if app.ui.window == MainWindow::Edit || app.ui.mix_separate {
+ crate::localization::text("Edit")
+ } else {
+ crate::localization::text("Mix")
+ }
);
ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
ui.label(egui::RichText::new(title).color(t.text_dim));
@@ -353,10 +360,11 @@ fn scrolling(ui: &mut egui::Ui, add: impl FnOnce(&mut egui::Ui) -> R) -> R {
fn instrument_menu(app: &mut SoundApp, ui: &mut egui::Ui) {
match instrument_track(app.engine.session()) {
Some(id) => {
- ui.menu_button("Instrument", |ui| crate::mix_window::instrument_menu(app, ui, id));
+ ui.menu_button(crate::localization::text("Instrument"), |ui| crate::mix_window::instrument_menu(app, ui, id));
}
None => {
- ui.add_enabled(false, egui::Button::new("Instrument")).on_disabled_hover_text("Select an instrument track");
+ ui.add_enabled(false, egui::Button::new(crate::localization::text("Instrument")))
+ .on_disabled_hover_text(crate::localization::text("Select an instrument track"));
}
}
}
@@ -368,7 +376,7 @@ fn instrument_track(s: &soundcraft_model::Session) -> Option Option<&'static str> {
pub fn live_label(app: &SoundApp, id: Option<&str>) -> Option {
let e = &app.engine;
match id? {
- "edit.undo" => Some(e.undo_label().map_or_else(|| "Can't Undo".into(), |l| format!("Undo {l}"))),
- "edit.redo" => Some(e.redo_label().map_or_else(|| "Can't Redo".into(), |l| format!("Redo {l}"))),
+ "edit.undo" => Some(e.undo_label().map_or_else(
+ || crate::localization::text("Can't Undo").into(),
+ |l| crate::localized_format!("Undo {l}", l = crate::localization::text(l)),
+ )),
+ "edit.redo" => Some(e.redo_label().map_or_else(
+ || crate::localization::text("Can't Redo").into(),
+ |l| crate::localized_format!("Redo {l}", l = crate::localization::text(l)),
+ )),
_ => None,
}
}
@@ -607,6 +622,16 @@ pub fn run_ui_command(app: &mut SoundApp, id: &str, p: &Value) -> Option {
+ let Some(tag) = p.get("language").and_then(Value::as_str) else {
+ return Some(Ok(json!({"language": app.ui.language.id()})));
+ };
+ let Some(language) = crate::localization::Language::parse(tag) else {
+ return Some(Err(format!("unknown language `{tag}` (en or pt-BR)")));
+ };
+ app.ui.language = language;
+ json!({"language": language.id()})
+ }
"app.checkForUpdates" | "help.checkForUpdates" => {
crate::updates_ui::check(app);
json!({})
@@ -713,7 +738,7 @@ pub fn run_ui_command(app: &mut SoundApp, id: &str, p: &Value) -> Option {
if let Err(error) = crate::docking::arrange(app) {
- app.ui.status = format!("Panel windows could not be arranged: {error}");
+ app.ui.status = crate::localized_format!("Panel windows could not be arranged: {error}", error = error);
}
app.arrange_request = true;
json!({})
diff --git a/crates/ui-egui/src/mix_window.rs b/crates/ui-egui/src/mix_window.rs
index bc05ef1db..113a5ff47 100644
--- a/crates/ui-egui/src/mix_window.rs
+++ b/crates/ui-egui/src/mix_window.rs
@@ -36,7 +36,7 @@ pub fn show(app: &mut SoundApp, ui: &mut Ui) {
/// be seen at once, e.g. one per monitor. Closing that window brings Mix back into the main one.
/// Backends without multiple windows show it as a floating egui window instead.
pub fn show_separate(app: &mut SoundApp, ctx: &egui::Context) {
- let title = format!("{} — Mix", app.engine.session().name);
+ let title = format!("{} — {}", app.engine.session().name, crate::localization::text("Mix"));
let builder = egui::ViewportBuilder::default().with_title(title).with_inner_size([1100.0, 720.0]).with_min_inner_size([480.0, 320.0]);
ctx.show_viewport_immediate(egui::ViewportId::from_hash_of("soundcraft.mix"), builder, |ui, _class| {
ui.set_style(ui.ctx().global_style());
@@ -147,10 +147,13 @@ fn short_label(text: &str) -> &str {
fn section_label(ui: &Ui, r: Rect, text: &str, narrow: bool) {
let p = ui.painter();
let color = Tokens::current().section_label;
- let text = if narrow { short_label(text) } else { text };
- let mut galley = p.layout_no_wrap(text.to_owned(), bold(10.0), color);
+ let source = text;
+ let short = crate::localization::text(short_label(source));
+ let text = crate::localization::text(source);
+ let label = if narrow { short } else { text };
+ let mut galley = p.layout_no_wrap(label.to_owned(), bold(10.0), color);
if galley.size().x > r.width() - 8.0 {
- galley = p.layout_no_wrap(short_label(text).to_owned(), bold(10.0), color);
+ galley = p.layout_no_wrap(short.to_owned(), bold(10.0), color);
}
p.galley(Align2::CENTER_CENTER.anchor_size(pos2(r.center().x, r.min.y + 7.0), galley.size()).min, galley, color);
}
@@ -237,7 +240,7 @@ fn preamp_section(app: &mut SoundApp, ui: &mut Ui, cx: &StripCtx<'_>, mut y: f32
let mut c = ui.new_child(egui::UiBuilder::new().max_rect(kr));
let resp = c
.add_sized(kr.size(), egui::DragValue::new(&mut db).range(-24.0..=24.0).speed(0.1).suffix(" dB").max_decimals(1))
- .accessible_name("Input trim (dB)");
+ .accessible_name(crate::localization::text("Input trim (dB)"));
if resp.changed() {
let _ = app.engine.execute_merged("mix.trim", &json!({"tracks": [id.0], "db": db}), &format!("trim:{}", id.0));
}
@@ -264,7 +267,7 @@ fn instrument_section(app: &mut SoundApp, ui: &mut Ui, cx: &StripCtx<'_>, mut y:
_ if track.kind == TrackKind::Instrument => instrument_slot(app, ui, track, sr),
Some(k) => insert_slot(app, ui, track, k, sr),
None if track.kind == TrackKind::Midi => {
- ui.painter().text(sr.center(), Align2::CENTER_CENTER, "MIDI in: all", regular(9.0), t.text_dim);
+ ui.painter().text(sr.center(), Align2::CENTER_CENTER, crate::localization::text("MIDI in: all"), regular(9.0), t.text_dim);
}
None => {}
}
@@ -282,8 +285,11 @@ fn object_section(app: &mut SoundApp, ui: &mut Ui, cx: &StripCtx<'_>, mut y: f32
if has_input {
let on = app.engine.session().edit.flag(&format!("object.{}", id.0));
let mut c = ui.new_child(egui::UiBuilder::new().max_rect(sec));
- let label = egui::RichText::new(if on { "OBJECT" } else { "BED" }).font(bold(9.0));
- if c.add_sized(sec.size(), egui::Button::new(label).selected(on)).on_hover_text("Route as an immersive object or to the bed").clicked() {
+ let label = egui::RichText::new(crate::localization::text(if on { "OBJECT" } else { "BED" })).font(bold(9.0));
+ if c.add_sized(sec.size(), egui::Button::new(label).selected(on))
+ .on_hover_text(crate::localization::text("Route as an immersive object or to the bed"))
+ .clicked()
+ {
let _ = app.run("track.object", json!({"tracks": [id.0], "object": !on}));
}
}
@@ -364,10 +370,10 @@ fn comments_section(app: &mut SoundApp, ui: &mut Ui, cx: &StripCtx<'_>, mut y: f
let sec = Rect::from_min_size(pos2(x0, y), vec2(inner_w, 44.0));
let mut c = track.comments.clone();
let mut child = ui.new_child(egui::UiBuilder::new().max_rect(sec));
- let hint = if narrow { "" } else { "comments" };
+ let hint = if narrow { "" } else { crate::localization::text("comments") };
let field = crate::widgets::named_text_field(
child.add(egui::TextEdit::multiline(&mut c).desired_width(inner_w).desired_rows(2).hint_text(hint).font(regular(10.0))),
- &format!("Comments for {}", track.name),
+ &crate::localized_format!("Comments for {}", track.name),
);
if field.changed() {
let _ = app.engine.execute_merged("track.comments", &json!({"track": id.0, "comments": c}), &format!("comments:{}", id.0));
@@ -403,7 +409,11 @@ fn io_section(app: &mut SoundApp, ui: &mut Ui, cx: &StripCtx<'_>, mut y: f32) ->
in_r.height(),
&input,
t.text,
- SelectorLabels { name: &format!("Input for {}", track.name), value: &input, tooltip: "Input" },
+ SelectorLabels {
+ name: &crate::localized_format!("Input for {}", track.name),
+ value: &input,
+ tooltip: crate::localization::text("Input"),
+ },
);
route_popup(app, &resp, id, true);
}
@@ -415,7 +425,11 @@ fn io_section(app: &mut SoundApp, ui: &mut Ui, cx: &StripCtx<'_>, mut y: f32) ->
out_r.height(),
&output,
t.text,
- SelectorLabels { name: &format!("Output for {}", track.name), value: &output, tooltip: "Output" },
+ SelectorLabels {
+ name: &crate::localized_format!("Output for {}", track.name),
+ value: &output,
+ tooltip: crate::localization::text("Output"),
+ },
);
route_popup(app, &resp, id, false);
// Automation mode.
@@ -430,11 +444,11 @@ fn io_section(app: &mut SoundApp, ui: &mut Ui, cx: &StripCtx<'_>, mut y: f32) ->
} else {
t.auto_write
};
- let full_label = format!("auto {}", mode.label());
+ let full_label = crate::localized_format!("auto {}", crate::localization::text(mode.label()));
let label = if mode == soundcraft_model::AutomationMode::TouchLatch {
- if narrow { "t/l" } else { mode.label() }
+ if narrow { "t/l" } else { crate::localization::text(mode.label()) }
} else if narrow {
- mode.label()
+ crate::localization::text(mode.label())
} else {
&full_label
};
@@ -444,11 +458,11 @@ fn io_section(app: &mut SoundApp, ui: &mut Ui, cx: &StripCtx<'_>, mut y: f32) ->
am_r.height(),
label,
col,
- SelectorLabels { name: &format!("Automation mode for {}", track.name), value: &full_label, tooltip: &full_label },
+ SelectorLabels { name: &crate::localized_format!("Automation mode for {}", track.name), value: &full_label, tooltip: &full_label },
);
egui::Popup::menu(&resp).show(|ui| {
for m in soundcraft_model::AutomationMode::ALL {
- if ui.selectable_label(m == mode, m.label()).clicked() {
+ if ui.selectable_label(m == mode, crate::localization::text(m.label())).clicked() {
let _ = app.run("mix.automation_mode", json!({"track": id.0, "mode": m.label()}));
}
}
@@ -464,7 +478,13 @@ fn group_selector(app: &mut SoundApp, ui: &mut Ui, cx: &StripCtx<'_>, mut y: f32
let t = Tokens::current();
// Group selector.
let no_group = if narrow { "nogrp" } else { "no group" };
- let gname = app.engine.session().groups.iter().find(|g| g.members.contains(&id)).map_or(no_group.to_string(), |g| g.name.clone());
+ let gname = app
+ .engine
+ .session()
+ .groups
+ .iter()
+ .find(|g| g.members.contains(&id))
+ .map_or(crate::localization::text(no_group).to_string(), |g| g.name.clone());
let gr = Rect::from_min_size(pos2(x0 + 2.0, y), vec2(inner_w - 4.0, 16.0));
let mut c = ui.new_child(egui::UiBuilder::new().max_rect(gr));
let _ = selector_box_named(
@@ -473,7 +493,7 @@ fn group_selector(app: &mut SoundApp, ui: &mut Ui, cx: &StripCtx<'_>, mut y: f32
gr.height(),
&gname,
t.text_dim,
- SelectorLabels { name: &format!("Group for {}", track.name), value: &gname, tooltip: "Group" },
+ SelectorLabels { name: &crate::localized_format!("Group for {}", track.name), value: &gname, tooltip: crate::localization::text("Group") },
);
y += 22.0;
y
@@ -526,7 +546,7 @@ fn pan_section(app: &mut SoundApp, ui: &mut Ui, cx: &StripCtx<'_>, mut y: f32) -
pr,
ui.scope_id().with(("pan-value", id.0, i)),
Readout {
- name: &format!("{} pan {}", track.name, i + 1),
+ name: &crate::localized_format!("{} pan {}", track.name, i + 1),
display: &pan_text(v),
edit_initial: &format!("{:.0}", v * 100.0),
parse: parse_pan,
@@ -553,11 +573,11 @@ fn toggle_rows(app: &mut SoundApp, ui: &mut Ui, cx: &StripCtx<'_>, mut y: f32) -
);
row.spacing_mut().item_spacing.x = 6.0;
if track.kind.has_playlist() {
- let input_label = format!("Input monitoring for {}", track.name);
+ let input_label = crate::localized_format!("Input monitoring for {}", track.name);
if text_toggle(&mut row, vec2(bw, 18.0), "I", track.mixer.input_monitor, t.input, &input_label).clicked() {
let _ = app.run("mix.input_monitor", json!({"track": id.0}));
}
- let record_label = format!("Record enable for {}", track.name);
+ let record_label = crate::localized_format!("Record enable for {}", track.name);
if rec_toggle(&mut row, vec2(bw, 18.0), track.mixer.record_arm, &record_label).clicked() {
let _ = app.run("mix.record_arm", json!({"track": id.0}));
}
@@ -568,11 +588,11 @@ fn toggle_rows(app: &mut SoundApp, ui: &mut Ui, cx: &StripCtx<'_>, mut y: f32) -
);
row.spacing_mut().item_spacing.x = 6.0;
if track.kind != TrackKind::Master {
- let solo_label = format!("Solo for {}", track.name);
+ let solo_label = crate::localized_format!("Solo for {}", track.name);
if text_toggle(&mut row, vec2(bw, 18.0), "S", track.mixer.solo, t.solo, &solo_label).clicked() {
let _ = app.run("mix.solo", json!({"track": id.0}));
}
- let mute_label = format!("Mute for {}", track.name);
+ let mute_label = crate::localized_format!("Mute for {}", track.name);
if text_toggle(&mut row, vec2(bw, 18.0), "M", track.mixer.mute, t.mute, &mute_label).clicked() {
let _ = app.run("mix.mute", json!({"track": id.0}));
}
@@ -632,7 +652,7 @@ fn name_and_readout(app: &mut SoundApp, ui: &mut Ui, cx: &StripCtx<'_>) {
vr,
ui.scope_id().with(("volume-value", id.0)),
Readout {
- name: &format!("{} volume", track.name),
+ name: &crate::localized_format!("{} volume", track.name),
display: &db_text(track.mixer.volume_db),
edit_initial: &format!("{:.1}", track.mixer.volume_db),
parse: parse_db,
@@ -652,7 +672,7 @@ fn name_and_readout(app: &mut SoundApp, ui: &mut Ui, cx: &StripCtx<'_>) {
TrackKind::Folder => "folder",
TrackKind::Video => "video",
};
- ui.painter().text(pos2(vr.center().x, vr.max.y + 9.0), Align2::CENTER_CENTER, kind, regular(9.5), t.text_dim);
+ ui.painter().text(pos2(vr.center().x, vr.max.y + 9.0), Align2::CENTER_CENTER, crate::localization::text(kind), regular(9.5), t.text_dim);
let nr = Rect::from_min_size(pos2(x0, r.max.y - 26.0), vec2(inner_w, 18.0));
ui.painter().rect(
nr,
diff --git a/crates/ui-egui/src/mix_window/plugin_menu.rs b/crates/ui-egui/src/mix_window/plugin_menu.rs
index ea077887c..a37d9f4c0 100644
--- a/crates/ui-egui/src/mix_window/plugin_menu.rs
+++ b/crates/ui-egui/src/mix_window/plugin_menu.rs
@@ -3,7 +3,7 @@ use super::{Color32, Rect, SoundApp, TrackId, Ui, json, pos2, vec2};
/// An insert's menu: a search field that takes typing at once, then (until something is typed)
/// Bypass and removal and the plugins by category and format.
pub fn plugin_menu(app: &mut SoundApp, ui: &mut Ui, id: TrackId, slot: usize, occupied: bool) {
- let search = MenuSearch::show(ui, egui::Id::unique(("plugin-search", id.0, slot)), "Search plugins…");
+ let search = MenuSearch::show(ui, egui::Id::unique(("plugin-search", id.0, slot)), crate::localization::text("Search plugins…"));
if search.typing() {
if let Some(plugin) = plugin_search(ui, &search, false) {
pick_insert(app, ui, id, slot, &plugin);
@@ -11,10 +11,10 @@ pub fn plugin_menu(app: &mut SoundApp, ui: &mut Ui, id: TrackId, slot: usize, oc
return;
}
if occupied {
- if ui.button("Bypass").clicked() {
+ if ui.button(crate::localization::text("Bypass")).clicked() {
run_pick(app, ui, "mix.insert_bypass", json!({"track": id.0, "slot": slot}));
}
- if ui.button("no insert").clicked() {
+ if ui.button(crate::localization::text("no insert")).clicked() {
run_pick(app, ui, "mix.insert_remove", json!({"track": id.0, "slot": slot}));
}
ui.separator();
@@ -44,7 +44,7 @@ pub fn plugin_menu(app: &mut SoundApp, ui: &mut Ui, id: TrackId, slot: usize, oc
/// instruments.
pub fn instrument_menu(app: &mut SoundApp, ui: &mut Ui, id: TrackId) {
let slot = soundcraft_mix::INSTRUMENT_SLOT;
- let search = MenuSearch::show(ui, egui::Id::unique(("instrument-search", id.0)), "Search instruments…");
+ let search = MenuSearch::show(ui, egui::Id::unique(("instrument-search", id.0)), crate::localization::text("Search instruments…"));
if search.typing() {
if let Some(plugin) = plugin_search(ui, &search, true) {
run_pick(app, ui, "mix.instrument", json!({"track": id.0, "plugin": plugin}));
@@ -54,7 +54,9 @@ pub fn instrument_menu(app: &mut SoundApp, ui: &mut Ui, id: TrackId) {
let current = app.engine.session().track(id).and_then(|t| t.instrument.clone());
if let Some(info) = current.as_ref().and_then(|i| plugin_info(&i.plugin)) {
ui.label(egui::RichText::new(info.name).strong());
- if current.as_ref().is_some_and(|i| !soundcraft_mix::is_third_party(&i.plugin)) && ui.button("Edit Parameters…").clicked() {
+ if current.as_ref().is_some_and(|i| !soundcraft_mix::is_third_party(&i.plugin))
+ && ui.button(crate::localization::text("Edit Parameters…")).clicked()
+ {
if !app.ui.plugin_windows.contains(&(id, slot)) {
app.ui.plugin_windows.push((id, slot));
}
@@ -64,13 +66,13 @@ pub fn instrument_menu(app: &mut SoundApp, ui: &mut Ui, id: TrackId) {
&& p.has_editor(id, slot)
{
if p.editor_open(id, slot) {
- if ui.button("Close Plugin Editor").clicked() {
+ if ui.button(crate::localization::text("Close Plugin Editor")).clicked() {
p.close_editor(id, slot);
ui.close();
}
- } else if ui.button("Open Plugin Editor").clicked() {
+ } else if ui.button(crate::localization::text("Open Plugin Editor")).clicked() {
if let Err(e) = p.open_editor(id, slot) {
- app.ui.status = format!("{}: {e}", info.name);
+ app.ui.status = format!("{}: {}", info.name, crate::localization::error_text(&e.to_string()));
}
ui.close();
}
@@ -78,7 +80,7 @@ pub fn instrument_menu(app: &mut SoundApp, ui: &mut Ui, id: TrackId) {
ui.separator();
}
let mut picked = None;
- ui.menu_button("Built-in", |ui| {
+ ui.menu_button(crate::localization::text("Built-in"), |ui| {
for p in soundcraft_dsp::plugins().iter().filter(|p| p.is_instrument) {
if ui.button(p.name).clicked() {
picked = Some(p.id.to_string());
@@ -141,15 +143,15 @@ fn plugin_search(ui: &mut Ui, search: &MenuSearch, instruments: bool) -> Option<
}
});
if n == 0 {
- ui.weak("No matches");
+ ui.weak(crate::localization::text("No matches"));
}
if clap.is_none() || vst3.is_none() {
ui.separator();
ui.horizontal(|ui| {
- if clap.is_none() && ui.small_button("Scan CLAP").clicked() {
+ if clap.is_none() && ui.small_button(crate::localization::text("Scan CLAP")).clicked() {
soundcraft_clap_host::scan();
}
- if vst3.is_none() && ui.small_button("Scan VST3").clicked() {
+ if vst3.is_none() && ui.small_button(crate::localization::text("Scan VST3")).clicked() {
soundcraft_vst3_host::scan();
}
});
@@ -256,20 +258,20 @@ struct MenuPlugin {
/// id picked. Each format is scanned the first time its submenu opens, then cached by its host.
fn hosted_menus(ui: &mut Ui, instruments: bool) -> Option {
let mut picked = None;
- ui.menu_button("CLAP", |ui| {
+ ui.menu_button(crate::localization::text("CLAP"), |ui| {
let list = soundcraft_clap_host::scan().into_iter().filter(|d| d.is_instrument == instruments);
if let Some(p) = vendor_menus(ui, list.map(|d| MenuPlugin { id: d.id, name: d.name, vendor: d.vendor }).collect(), "No CLAP plugins found") {
picked = Some(p);
}
});
- ui.menu_button("VST3", |ui| {
+ ui.menu_button(crate::localization::text("VST3"), |ui| {
let list = soundcraft_vst3_host::scan().into_iter().filter(|d| d.is_instrument == instruments);
if let Some(p) = vendor_menus(ui, list.map(|d| MenuPlugin { id: d.id, name: d.name, vendor: d.vendor }).collect(), "No VST3 plugins found") {
picked = Some(p);
}
});
if cfg!(target_os = "macos") {
- ui.menu_button("Audio Units", |ui| {
+ ui.menu_button(crate::localization::text("Audio Units"), |ui| {
let list = soundcraft_au_host::scan().into_iter().filter(|d| d.is_instrument == instruments);
if let Some(p) = vendor_menus(ui, list.map(|d| MenuPlugin { id: d.id, name: d.name, vendor: d.vendor }).collect(), "No Audio Units found")
{
@@ -284,7 +286,7 @@ fn hosted_menus(ui: &mut Ui, instruments: bool) -> Option {
/// within the screen so that every plugin stays reachable however many are installed.
fn vendor_menus(ui: &mut Ui, mut list: Vec, none: &str) -> Option {
if list.is_empty() {
- ui.label(none);
+ ui.label(crate::localization::text(none));
return None;
}
list.sort_by_cached_key(|p| (p.vendor.to_lowercase(), p.name.to_lowercase()));
@@ -294,7 +296,7 @@ fn vendor_menus(ui: &mut Ui, mut list: Vec, none: &str) -> Option String {
match r {
- Route::None => "no output".into(),
- Route::Main => app.engine.session().outputs.first().map_or_else(|| "Out 1-2".into(), |o| o.name.clone()),
+ Route::None => crate::localization::text("no output").to_string(),
+ Route::Main => app.engine.session().outputs.first().map_or_else(|| crate::localization::text("Out 1-2").to_string(), |o| o.name.clone()),
Route::Bus(b) => app.engine.session().bus(*b).map_or_else(|| "bus?".into(), |b| b.name.clone()),
Route::Hardware(h) => h.clone(),
}
@@ -13,7 +13,7 @@ pub(crate) fn route_name(app: &SoundApp, r: &Route) -> String {
pub(crate) fn input_name(app: &SoundApp, track: &Track) -> String {
if track.kind.has_playlist() && track.mixer.input == Route::None {
let channels = track.format.channels();
- if channels == 1 { "In 1".to_string() } else { format!("In 1-{channels}") }
+ if channels == 1 { crate::localized_format!("In {}", 1) } else { crate::localized_format!("In 1-{}", channels) }
} else {
route_name(app, &track.mixer.input)
}
@@ -30,14 +30,14 @@ pub(crate) fn route_popup(app: &mut SoundApp, resp: &egui::Response, id: TrackId
fn route_menu(app: &mut SoundApp, ui: &mut Ui, id: TrackId, input: bool) {
let key = if input { "input" } else { "output" };
let cmd = if input { "track.input" } else { "track.output" };
- let hint = if input { "Search inputs…" } else { "Search outputs…" };
+ let hint = crate::localization::text(if input { "Search inputs…" } else { "Search outputs…" });
let search = MenuSearch::show(ui, egui::Id::unique(("route-search", id.0, input)), hint);
let busses: Vec = app.engine.session().busses.iter().map(|b| b.name.clone()).collect();
let main_name = app.engine.session().outputs.first().map_or_else(|| "Out 1-2".to_string(), |o| o.name.clone());
// (label, the route the command is given)
- let mut fixed = vec![(if input { "no input" } else { "no output" }.to_string(), "none".to_string())];
+ let mut fixed = vec![(crate::localization::text(if input { "no input" } else { "no output" }).to_string(), "none".to_string())];
if input {
- fixed.extend((1..=8).map(|i| (format!("In {i}"), format!("In {i}"))));
+ fixed.extend((1..=8).map(|i| (crate::localized_format!("In {}", i), format!("In {i}"))));
} else {
fixed.push((main_name, "main".to_string()));
}
@@ -58,7 +58,7 @@ fn route_menu(app: &mut SoundApp, ui: &mut Ui, id: TrackId, input: bool) {
}
}
ui.separator();
- ui.strong("Bus");
+ ui.strong(crate::localization::text("Bus"));
if let Some(bus) = search
.rows(ui, busses.len(), 420.0, |ui, i, highlighted| busses.get(i).is_some_and(|b| menu_row(ui, highlighted, b)))
.and_then(|i| busses.get(i))
@@ -66,7 +66,7 @@ fn route_menu(app: &mut SoundApp, ui: &mut Ui, id: TrackId, input: bool) {
let _ = app.run(cmd, json!({"track": id.0, key: bus}));
ui.close();
}
- if ui.button("new bus...").clicked() {
+ if ui.button(crate::localization::text("new bus...")).clicked() {
let mut n = busses.len() + 1;
while busses.contains(&format!("Bus {n}")) || app.engine.session().track_by_name(&format!("Bus {n}")).is_some() {
n += 1;
diff --git a/crates/ui-egui/src/mix_window/sends.rs b/crates/ui-egui/src/mix_window/sends.rs
index f235a6ada..8383b4ab4 100644
--- a/crates/ui-egui/src/mix_window/sends.rs
+++ b/crates/ui-egui/src/mix_window/sends.rs
@@ -18,8 +18,9 @@ pub(crate) fn send_slot(app: &mut SoundApp, ui: &mut Ui, track: &Track, slot: us
let level_r = if compact { r } else { level_icon(r).expand2(vec2(3.0, 0.0)).with_min_y(r.min.y).with_max_y(r.max.y) };
let route_r = Rect::from_min_max(r.min, pos2((level_r.min.x - 1.0).max(r.min.x), r.max.y));
let route_resp = ui.interact(if snd.is_some() { route_r } else { r }, ui.scope_id().with(("snd-route", id.0, slot)), Sense::click());
- route_resp
- .widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, true, format!("Send {} for {}", (b'A' + slot as u8) as char, track.name)));
+ route_resp.widget_info(|| {
+ egui::WidgetInfo::labeled(egui::Role::Button, true, crate::localized_format!("Send {} for {}", (b'A' + slot as u8) as char, track.name))
+ });
let mark = if compact { Mark::Arrow } else { Mark::Letter((b'a' + slot as u8) as char) };
match &snd {
Some(s) => {
@@ -30,7 +31,13 @@ pub(crate) fn send_slot(app: &mut SoundApp, ui: &mut Ui, track: &Track, slot: us
let which = (b'A' + slot as u8) as char;
let shown = app.ui.send_window == Some((id, slot));
let level_resp = ui.interact(level_r, ui.scope_id().with(("send-value", id.0, slot)), Sense::click_and_drag());
- level_resp.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, true, format!("Send {which} level for {}", track.name)));
+ level_resp.widget_info(|| {
+ egui::WidgetInfo::labeled(
+ egui::Role::Button,
+ true,
+ crate::localized_format!("Send {which} level for {track}", which = which, track = track.name),
+ )
+ });
if shown {
ui.painter().rect_stroke(level_r.shrink(0.5), 1.0, Stroke::new(1.5, t.accent), StrokeKind::Inside);
}
@@ -50,9 +57,11 @@ pub(crate) fn send_slot(app: &mut SoundApp, ui: &mut Ui, track: &Track, slot: us
let _ =
app.engine.execute_merged("mix.send_level", &json!({"track": id.0, "slot": slot, "db": db}), &format!("send:{}:{slot}", id.0));
}
- let _ = level_resp.clone().on_hover_text(format!(
- "Send {which} to {name}: {} dB\nClick for the send fader · drag vertically to adjust · Shift-drag for fine control · Alt-click for 0 dB · right-click for options",
- db_text(s.level_db)
+ let _ = level_resp.clone().on_hover_text(crate::localized_format!(
+ "Send {which} to {name}: {db} dB\nClick for the send fader · drag vertically to adjust · Shift-drag for fine control · Alt-click for 0 dB · right-click for options",
+ which = which,
+ name = name,
+ db = db_text(s.level_db)
));
level_resp.context_menu(|ui| send_options_menu(app, ui, id, slot, s));
}
@@ -86,7 +95,7 @@ fn send_window_contents(app: &mut SoundApp, ctx: &egui::Context) {
};
let t = Tokens::current();
let mut open = true;
- egui::Window::new(format!("{name} · Send {}", (b'A' + slot as u8) as char))
+ egui::Window::new(crate::localized_format!("{name} · Send {letter}", name = name, letter = (b'A' + slot as u8) as char))
.id(egui::Id::unique("send_window"))
.open(&mut open)
.auto_sized()
@@ -117,7 +126,7 @@ fn send_window_contents(app: &mut SoundApp, ctx: &egui::Context) {
}
ui.label(egui::RichText::new(pan_text(send.pan)).color(t.counter_text).small());
let (fr, fresp) = ui.allocate_exact_size(vec2(56.0, 220.0), Sense::hover());
- fresp.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Slider, true, "Send level"));
+ fresp.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Slider, true, crate::localization::text("Send level")));
// Distinct from the strip's "Send A level for