Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Change "Ok" to "OK" in UI (#58744)

Albert Bogusz1d1a4bee3402
diff --git a/crates/auto_update/src/auto_update.rs b/crates/auto_update/src/auto_update.rs
index ca853be5f14..9786aa84d16 100644
--- a/crates/auto_update/src/auto_update.rs
+++ b/crates/auto_update/src/auto_update.rs
@@ -281,7 +281,7 @@ pub fn check(_: &Check, window: &mut Window, cx: &mut App) {
gpui::PromptLevel::Info,
"Zed was installed via a package manager.",
Some(&message),
- &["Ok"],
+ &["OK"],
cx,
));
return;
@@ -301,7 +301,7 @@ pub fn check(_: &Check, window: &mut Window, cx: &mut App) {
gpui::PromptLevel::Info,
"Could not check for updates",
Some("Auto-updates disabled for non-bundled app."),
- &["Ok"],
+ &["OK"],
cx,
));
}
diff --git a/crates/git_ui/src/git_panel.rs b/crates/git_ui/src/git_panel.rs
index d3d75147caa..160c3698dde 100644
--- a/crates/git_ui/src/git_panel.rs
+++ b/crates/git_ui/src/git_panel.rs
@@ -2275,7 +2275,7 @@ impl GitPanel {
return;
};
let error_spawn = |message, window: &mut Window, cx: &mut App| {
- let prompt = window.prompt(PromptLevel::Warning, message, None, &["Ok"], cx);
+ let prompt = window.prompt(PromptLevel::Warning, message, None, &["OK"], cx);
cx.spawn(async move |_| {
prompt.await.ok();
})
@@ -2952,7 +2952,7 @@ impl GitPanel {
PromptLevel::Warning,
"Unable to initialize a git repository",
Some("Open a directory first"),
- &["Ok"],
+ &["OK"],
cx,
);
cx.background_executor()
diff --git a/crates/gpui/examples/window.rs b/crates/gpui/examples/window.rs
index c51f43fe66d..959ea4981c4 100644
--- a/crates/gpui/examples/window.rs
+++ b/crates/gpui/examples/window.rs
@@ -272,7 +272,7 @@ impl Render for WindowDemo {
PromptLevel::Info,
"Are you sure?",
None,
- &["Ok", "Cancel"],
+ &["OK", "Cancel"],
cx,
);
diff --git a/crates/gpui/src/platform.rs b/crates/gpui/src/platform.rs
index fad863d9ff3..06072b0d5e6 100644
--- a/crates/gpui/src/platform.rs
+++ b/crates/gpui/src/platform.rs
@@ -1796,7 +1796,7 @@ impl PromptButton {
impl From<&str> for PromptButton {
fn from(value: &str) -> Self {
match value.to_lowercase().as_str() {
- "ok" => PromptButton::Ok("Ok".into()),
+ "ok" => PromptButton::Ok("OK".into()),
"cancel" => PromptButton::Cancel("Cancel".into()),
_ => PromptButton::Other(SharedString::from(value.to_owned())),
}
diff --git a/crates/install_cli/src/install_cli_binary.rs b/crates/install_cli/src/install_cli_binary.rs
index 4c6d8cde40c..ee8b8b2b669 100644
--- a/crates/install_cli/src/install_cli_binary.rs
+++ b/crates/install_cli/src/install_cli_binary.rs
@@ -70,7 +70,7 @@ pub fn install_cli_binary(window: &mut Window, cx: &mut Context<Workspace>) {
PromptLevel::Warning,
"CLI should already be installed",
Some(LINUX_PROMPT_DETAIL),
- &["Ok"],
+ &["OK"],
);
cx.background_spawn(prompt).detach();
return Ok(());
diff --git a/crates/onboarding/src/onboarding.rs b/crates/onboarding/src/onboarding.rs
index 3f1509b922e..a0aa0b9811f 100644
--- a/crates/onboarding/src/onboarding.rs
+++ b/crates/onboarding/src/onboarding.rs
@@ -485,7 +485,7 @@ pub async fn handle_import_vscode_settings(
gpui::PromptLevel::Info,
&format!("Could not find or load a {source} settings file"),
None,
- &["Ok"],
+ &["OK"],
);
return;
}
@@ -501,7 +501,7 @@ pub async fn handle_import_vscode_settings(
truncate_and_remove_front(&vscode_settings.path.to_string_lossy(), 128),
),
None,
- &["Ok", "Cancel"],
+ &["Import", "Cancel"],
);
let result = cx.spawn(async move |_| prompt.await.ok()).await;
if result != Some(0) {
diff --git a/crates/recent_projects/src/recent_projects.rs b/crates/recent_projects/src/recent_projects.rs
index 4abfc9ccd3a..22b07679f96 100644
--- a/crates/recent_projects/src/recent_projects.rs
+++ b/crates/recent_projects/src/recent_projects.rs
@@ -348,7 +348,7 @@ pub fn init(cx: &mut App) {
Please note that Zed currently does not support opening network share folders inside wsl.
"#};
- let _ = cx.prompt(gpui::PromptLevel::Critical, "Invalid path", Some(&message), &["Ok"]).await;
+ let _ = cx.prompt(gpui::PromptLevel::Critical, "Invalid path", Some(&message), &["OK"]).await;
return;
}
@@ -492,7 +492,7 @@ pub fn init(cx: &mut App) {
gpui::PromptLevel::Critical,
"Cannot open Dev Container from remote project",
None,
- &["Ok"],
+ &["OK"],
)
.await
.ok();
diff --git a/crates/recent_projects/src/remote_servers.rs b/crates/recent_projects/src/remote_servers.rs
index fefc8e1fad4..7dc53a55a96 100644
--- a/crates/recent_projects/src/remote_servers.rs
+++ b/crates/recent_projects/src/remote_servers.rs
@@ -1780,7 +1780,7 @@ impl RemoteServerProjects {
gpui::PromptLevel::Critical,
"Failed to connect",
Some(&e.to_string()),
- &["Ok"],
+ &["OK"],
)
.await
.ok();
@@ -2075,7 +2075,7 @@ impl RemoteServerProjects {
gpui::PromptLevel::Critical,
"Failed to start Dev Container. See logs for details",
Some(&format!("{e}")),
- &["Ok"],
+ &["OK"],
)
.await
.ok();
@@ -2130,7 +2130,7 @@ impl RemoteServerProjects {
gpui::PromptLevel::Critical,
"Failed to connect",
Some(&e.to_string()),
- &["Ok"],
+ &["OK"],
)
.await
.ok();
diff --git a/crates/ui/src/components/notification/alert_modal.rs b/crates/ui/src/components/notification/alert_modal.rs
index 5c368a9a745..0a82a309aca 100644
--- a/crates/ui/src/components/notification/alert_modal.rs
+++ b/crates/ui/src/components/notification/alert_modal.rs
@@ -141,7 +141,7 @@ impl RenderOnce for AlertModal {
if let Some(footer) = self.footer {
modal = modal.child(footer);
} else if has_default_footer {
- let primary_action = self.primary_action.unwrap_or_else(|| "Ok".into());
+ let primary_action = self.primary_action.unwrap_or_else(|| "OK".into());
let dismiss_label = self.dismiss_label.unwrap_or_else(|| "Cancel".into());
modal = modal.child(
diff --git a/crates/workspace/src/notifications.rs b/crates/workspace/src/notifications.rs
index 42e75b1c8c2..74ac4bd38f3 100644
--- a/crates/workspace/src/notifications.rs
+++ b/crates/workspace/src/notifications.rs
@@ -1665,7 +1665,7 @@ where
display.push('.');
}
let detail = f(err, window, cx).unwrap_or(display);
- window.prompt(PromptLevel::Critical, &msg, Some(&detail), &["Ok"], cx)
+ window.prompt(PromptLevel::Critical, &msg, Some(&detail), &["OK"], cx)
}) {
prompt.await.ok();
}
diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs
index be73f25e61c..248a554c187 100644
--- a/crates/workspace/src/workspace.rs
+++ b/crates/workspace/src/workspace.rs
@@ -9640,7 +9640,7 @@ pub fn join_channel(
PromptLevel::Critical,
"Failed to join channel",
Some(&detail),
- &["Ok"],
+ &["OK"],
cx,
)
})?
diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs
index d56668b4797..1b5e00c68d5 100644
--- a/crates/zed/src/zed.rs
+++ b/crates/zed/src/zed.rs
@@ -1533,7 +1533,7 @@ fn open_about_window(cx: &mut App) {
window.remove_window();
}))
.child(
- Button::new("ok", "Ok")
+ Button::new("ok", "OK")
.full_width()
.style(ButtonStyle::OutlinedGhost)
.toggle_state(ok_is_focused)
diff --git a/crates/zed/src/zed/move_to_applications.rs b/crates/zed/src/zed/move_to_applications.rs
index 10bd4b80472..329e49fb81c 100644
--- a/crates/zed/src/zed/move_to_applications.rs
+++ b/crates/zed/src/zed/move_to_applications.rs
@@ -105,7 +105,7 @@ impl MoveToApplicationsRequest {
PromptLevel::Critical,
"Failed to move Zed to Applications",
Some(&error.to_string()),
- &["Ok"],
+ &["OK"],
)
.await
.log_err();