The Strip Silence button is its own localized string (#1695)

"Strip" was one key for the Strip Silence dialog's action button and
the Channel Strip plug-in's short name, so a translation had to pick
one word for both. The button now uses the dialog's own "Strip
Silence" key (Portuguese "Remover silêncio") and the plug-in keeps
"Strip" ("Canal").

Co-authored-by: midasmatterhorn <[email protected]>
Co-authored-by: FredApps <[email protected]>
This commit is contained in:
authored and GitHub committed 2026-11-28 09:47:06 +01:00
1 parent e336e68449
commit 91123a1b77
4 files changed
+16 -4

No files matched your search

+3 -1
View File
@@ -444,7 +444,9 @@ fn strip_silence_form(
mode = Some("separate");
}
// Enter on a focused Extract or Separate clicks that button, so Enter presses Strip only when neither was clicked.
if buttons(ui, "Strip", enter) && mode.is_none() {
// The button is its own string ("Strip Silence"), not the Channel Strip plug-in's
// short name "Strip", so translations can give them different words (#1610).
if buttons(ui, "Strip Silence", enter) && mode.is_none() {
mode = Some("strip");
}
// Enter on a focused Rename… also presses Strip, so Rename… goes first.
+10
View File
@@ -512,6 +512,16 @@ mod tests {
}
}
/// The Strip Silence dialog's action button and the Channel Strip plug-in's short name are
/// different strings ("remove" vs a channel strip): the button keeps the dialog's own key,
/// so a translation gives each its word (#1610).
#[test]
fn strip_button_translates_as_its_own_key() {
let pt = Language::PortugueseBrazil;
assert_eq!(pt.text("Strip Silence"), "Remover silêncio", "the dialog's action button");
assert_eq!(pt.text("Strip"), "Canal", "the Channel Strip plug-in's short name keeps its own key");
}
#[test]
fn every_localized_source_string_has_a_catalog_entry() {
fn visit(dir: &std::path::Path, missing: &mut Vec<String>) {
@@ -123,7 +123,7 @@ fn enter_right_after_switching_between_strip_silence_and_rename_presses_the_new_
#[test]
fn strip_silence_strip_removes_the_silence() {
let (mut h, track, before) = strip_silence_dialog();
h.get_by_role_and_label(Role::Button, "Strip").click();
h.get_by_role_and_label(Role::Button, "Strip Silence").click();
h.run_steps(2);
assert_eq!(h.state().dialogs.open_name(), None);
let strip = clips(&h, track);
@@ -167,7 +167,7 @@ fn strip_silence_opens_with_the_values_escape_closed_it_with() {
fn strip_silence_opens_with_the_values_strip_used() {
let (mut h, _, _) = strip_silence_dialog();
set_values(&mut h, CHANGED);
h.get_by_role_and_label(Role::Button, "Strip").click();
h.get_by_role_and_label(Role::Button, "Strip Silence").click();
h.run_steps(2);
assert_eq!(reopen(&mut h), CHANGED);
}
@@ -54,7 +54,7 @@ fn rename_names_the_clips_strip_silence_leaves() {
click(&mut h, "OK");
assert_eq!(h.state().dialogs.open_name(), Some("strip_silence"), "OK goes back to Strip Silence");
assert_eq!(h.state().dialogs.strip_names, sfx());
click(&mut h, "Strip");
click(&mut h, "Strip Silence");
assert_eq!(h.state().dialogs.open_name(), None);
let names: Vec<String> = h.state().engine.session().track(track).unwrap().clips().iter().map(|c| c.name.clone()).collect();
assert!(names.len() > 1);