mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-14 16:07:52 +00:00
fix(i18n): translate data-held labels and unify zh terms (#2529)
This commit is contained in:
@@ -368,7 +368,9 @@ fn check(dir: &Path) -> Result<(), String> {
|
||||
let manifest = Manifest::load(&dir)?;
|
||||
println!("{} {} — {}", preview.id, preview.version, preview.name);
|
||||
if manifest.legacy {
|
||||
println!(" note: plugin.toml uses the 0.1 format (`openidea-api`); see plugins/README.md to move to 0.2");
|
||||
println!(
|
||||
" note: plugin.toml uses the 0.1 format (`openidea-api`); its code no longer runs: rebuild it against the 1.x SDK and declare `engines.openidea` (see plugins/README.md)"
|
||||
);
|
||||
}
|
||||
if let Some(wasm) = &manifest.wasm {
|
||||
let engine = PluginEngine::new()?;
|
||||
|
||||
@@ -25,7 +25,7 @@ use tokio::io::AsyncBufReadExt;
|
||||
const UP_TIMEOUT: Duration = Duration::from_secs(30 * 60);
|
||||
const PROBE_TIMEOUT: Duration = Duration::from_secs(60);
|
||||
|
||||
/// The Dev Containers CLI: the IDE-managed copy (Settings › Tools) or one on `PATH`.
|
||||
/// The Dev Containers CLI: the IDE-managed copy (Settings › Languages & Frameworks › Language Servers) or one on `PATH`.
|
||||
fn cli(data_dir: &Path) -> IdeResult<PathBuf> {
|
||||
ide_tools::Tools::new(data_dir)
|
||||
.info("devcontainer", &[])
|
||||
@@ -34,7 +34,7 @@ fn cli(data_dir: &Path) -> IdeResult<PathBuf> {
|
||||
.map(ide_core::IpcPath::into_path_buf)
|
||||
.ok_or_else(|| {
|
||||
IdeError::unavailable(
|
||||
"The Dev Containers CLI is not installed. Install it in Settings › Tools › Dev Containers CLI.",
|
||||
"The Dev Containers CLI is not installed. Install it in Settings › Languages & Frameworks › Language Servers.",
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import { Fragment, type ReactNode } from "react";
|
||||
import { create } from "zustand";
|
||||
import { executeAction } from "@/platform/actions";
|
||||
import { tx } from "@/platform/i18n";
|
||||
import { isTauri } from "@/platform/ipc";
|
||||
import { EDIT_SCOPES_ACTION, useCustomScopeList } from "@/platform/search";
|
||||
import { Button, IconButton, Input, Select, T } from "@/ui";
|
||||
@@ -77,7 +78,7 @@ export function ScopeFields({
|
||||
onChange({ ...value, kind, custom: kind === "custom" ? (value.custom ?? scopes[0]?.name) : value.custom })
|
||||
}
|
||||
/>
|
||||
<span>{kind === "file" && file ? `File '${file.split("/").pop()}'` : SCOPE_LABELS[kind]}</span>
|
||||
<span>{kind === "file" && file ? tx`File '${file.split("/").pop()}'` : tx(SCOPE_LABELS[kind])}</span>
|
||||
</label>
|
||||
))}
|
||||
{value.kind === "directory" && (
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* sync), Run Configurations and its modules. Gradle: the root project with
|
||||
* Tasks (grouped), Run Configurations and its subprojects.
|
||||
*/
|
||||
import { tx } from "@/platform/i18n";
|
||||
import type {
|
||||
GradleModel,
|
||||
GradleProject,
|
||||
@@ -343,17 +344,17 @@ export function gradleChildren(
|
||||
export function nodeLabel(node: BuildNode): string {
|
||||
switch (node.kind) {
|
||||
case "profiles":
|
||||
return "Profiles";
|
||||
return tx("Profiles");
|
||||
case "profile":
|
||||
return node.profile.id;
|
||||
case "mavenProject":
|
||||
return node.project.displayName;
|
||||
case "lifecycle":
|
||||
return "Lifecycle";
|
||||
return tx("Lifecycle");
|
||||
case "phase":
|
||||
return node.phase;
|
||||
case "plugins":
|
||||
return "Plugins";
|
||||
return tx("Plugins");
|
||||
case "plugin":
|
||||
return pluginLabel(node.plugin);
|
||||
case "goal":
|
||||
|
||||
@@ -121,7 +121,7 @@ async function prepare(config: RunConfig): Promise<ExecutorLaunch | null> {
|
||||
|
||||
export const coverageExecutor: RunExecutorContribution = {
|
||||
id: "coverage",
|
||||
label: (name) => `Run '${name}' with Coverage`,
|
||||
label: (name) => tx`Run '${name}' with Coverage`,
|
||||
icon: "run-coverage",
|
||||
action: "run.coverage",
|
||||
order: 10,
|
||||
|
||||
@@ -188,7 +188,7 @@ export function DebugToolWindow() {
|
||||
className={clsx(styles.tab, tab === id && styles.tabActive)}
|
||||
onClick={() => setView({ session: active.startedAt, status: active.status, tab: id })}
|
||||
>
|
||||
{label}
|
||||
{tx(label)}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -168,7 +168,7 @@ function MethodList({ profile, query }: { profile: Profile; query: string }) {
|
||||
const header = (key: MethodSort, label: string) => (
|
||||
<th aria-sort={sort === key ? (key === "name" ? "ascending" : "descending") : "none"}>
|
||||
<button type="button" className={styles.headerCell} onClick={() => setSort(key)}>
|
||||
{label}
|
||||
{tx(label)}
|
||||
</button>
|
||||
</th>
|
||||
);
|
||||
|
||||
@@ -97,7 +97,7 @@ async function prepare(config: RunConfig): Promise<ExecutorLaunch | null> {
|
||||
|
||||
export const profilerExecutor: RunExecutorContribution = {
|
||||
id: "profiler",
|
||||
label: (name) => `Profile '${name}'`,
|
||||
label: (name) => tx`Profile '${name}'`,
|
||||
icon: "profile",
|
||||
action: "run.profile",
|
||||
order: 20,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/** The Services tree (Docker → Containers / Images / Volumes / Networks), built from a snapshot. */
|
||||
import { tx } from "@/platform/i18n";
|
||||
import type { DockerContainer, DockerImage, DockerNetwork, DockerSnapshot, DockerVolume } from "@/platform/ipc";
|
||||
|
||||
export type GroupKind = "devContainers" | "containers" | "images" | "networks" | "volumes";
|
||||
@@ -201,7 +202,7 @@ export function nodeLabel(n: ServiceNode): string {
|
||||
case "docker":
|
||||
return "Docker";
|
||||
case "group":
|
||||
return GROUPS.find(([g]) => g === n.group)![1];
|
||||
return tx(GROUPS.find(([g]) => g === n.group)![1]);
|
||||
case "compose":
|
||||
return `Docker-compose: ${n.project}`;
|
||||
case "container":
|
||||
|
||||
@@ -296,8 +296,8 @@
|
||||
"Copy Path From Content Root": "复制相对于内容根目录的路径",
|
||||
"Copy File Name": "复制文件名",
|
||||
"Fixup…": "修补提交…",
|
||||
"Step Over": "单步跳过",
|
||||
"Step Out": "单步跳出",
|
||||
"Step Over": "步过",
|
||||
"Step Out": "步出",
|
||||
"Hot Reload": "热重载",
|
||||
"Hot Restart": "热重启",
|
||||
"Flutter: inject the changed sources into the running app": "Flutter:将改动后的源码注入正在运行的应用",
|
||||
@@ -1269,7 +1269,7 @@
|
||||
"Interpreter:": "解释器:",
|
||||
"Introduce Constant…": "引入常量…",
|
||||
"Introduce Field…": "引入字段…",
|
||||
"Introduce Parameter…": "引入形参…",
|
||||
"Introduce Parameter…": "引入参数…",
|
||||
"Introduce Variable…": "引入变量…",
|
||||
"Invalid": "无效",
|
||||
"Invalidate Caches": "清除缓存",
|
||||
@@ -7183,5 +7183,20 @@
|
||||
"Fork Agent Task": "Fork Agent 任务",
|
||||
"Couldn't fork the task": "无法 Fork 任务",
|
||||
"Fork": "Fork",
|
||||
"Fork Conversation from Here": "从此处 Fork 对话"
|
||||
"Fork Conversation from Here": "从此处 Fork 对话",
|
||||
"Whole project": "整个项目",
|
||||
"Module or directory": "模块或目录",
|
||||
"Current file": "当前文件",
|
||||
"Uncommitted files": "未提交的文件",
|
||||
"Threads & Variables": "线程和变量",
|
||||
"Usage Limit": "用量上限",
|
||||
"Dev Containers": "开发容器",
|
||||
"Containers": "容器",
|
||||
"Images": "镜像",
|
||||
"Volumes": "卷",
|
||||
"Profiles": "配置文件",
|
||||
"Lifecycle": "生命周期",
|
||||
"Self": "自身",
|
||||
"Run '{name}' with Coverage": "使用覆盖率运行 '{name}'",
|
||||
"Profile '{name}'": "对 '{name}' 进行性能分析"
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@
|
||||
"menu.vcs.operations": "VCS 操作弹出窗口…",
|
||||
"menu.view": "视图",
|
||||
"menu.view.notifications": "通知",
|
||||
"menu.view.toggleTheme": "切换亮色/暗色主题",
|
||||
"menu.view.toggleTheme": "切换浅色/深色主题",
|
||||
"menu.welcome.recentProjects": "管理项目…",
|
||||
"menu.window": "窗口",
|
||||
"menu.tools": "工具",
|
||||
|
||||
Reference in New Issue
Block a user