forked from 1b-agent/opencadstudio-upstream
Complete application localization across all supported languages
This commit is contained in:
1 parent
96c794c072
commit
d66e89ca19
78 files changed
+26043
-877
No files matched your search
+14
-1
@@ -21,63 +21,76 @@ use clap::Parser;
|
||||
#[command(
|
||||
name = "OpenCADStudio",
|
||||
version,
|
||||
about = "Open CAD Studio — 2D/3D CAD editor",
|
||||
about = crate::t!("Open CAD Studio — 2D/3D CAD editor").into_owned(),
|
||||
long_about = None,
|
||||
)]
|
||||
pub struct Cli {
|
||||
/// CAD files to open at startup (.dwg / .dxf). Also how the OS file
|
||||
/// association launches us when drawings are double-clicked — selecting
|
||||
/// several hands them all to one launch, so this takes a list.
|
||||
#[arg(help = crate::t!("CAD files to open at startup (.dwg / .dxf).").into_owned(), long_help = None)]
|
||||
pub files: Vec<PathBuf>,
|
||||
|
||||
/// Start with a new empty drawing, ignoring any file argument.
|
||||
#[arg(long)]
|
||||
#[arg(help = crate::t!("Start with a new empty drawing.").into_owned(), long_help = None)]
|
||||
pub new: bool,
|
||||
|
||||
/// Always start a new editor process, even when one is already running.
|
||||
/// Without this, opening a drawing hands it to the running editor as a tab.
|
||||
#[arg(long)]
|
||||
#[arg(help = crate::t!("Start a new editor process.").into_owned(), long_help = None)]
|
||||
pub new_instance: bool,
|
||||
|
||||
/// Open read-only: editing is allowed but saving is disabled.
|
||||
#[arg(long)]
|
||||
#[arg(help = crate::t!("Open read-only: saving is disabled.").into_owned(), long_help = None)]
|
||||
pub read_only: bool,
|
||||
|
||||
/// Restrict the GPU backend (e.g. dx12, vulkan, gl, metal). Sets WGPU_BACKEND.
|
||||
#[arg(long, value_name = "BACKEND")]
|
||||
#[arg(help = crate::t!("GPU backend (dx12, vulkan, gl, metal). Sets WGPU_BACKEND.").into_owned(), long_help = None)]
|
||||
pub backend: Option<String>,
|
||||
|
||||
/// Safe mode: force the GL backend, for flaky/hybrid GPU drivers.
|
||||
#[arg(long, visible_alias = "no-gpu")]
|
||||
#[arg(help = crate::t!("Safe mode: use the GL backend.").into_owned(), long_help = None)]
|
||||
pub safe_mode: bool,
|
||||
|
||||
/// Force the packed renderer path that avoids shader storage buffers.
|
||||
/// Normally selected automatically for adapters with insufficient limits.
|
||||
#[arg(long)]
|
||||
#[arg(help = crate::t!("Use the renderer for GPUs without shader storage buffers.").into_owned(), long_help = None)]
|
||||
pub compat_renderer: bool,
|
||||
|
||||
/// Run the headless JSON automation server (stdin/stdout, or --port).
|
||||
#[arg(long)]
|
||||
#[arg(help = crate::t!("Run the headless JSON automation server (stdin/stdout, or --port).").into_owned(), long_help = None)]
|
||||
pub serve: bool,
|
||||
|
||||
/// Expose the running desktop editor to AI clients over MCP stdio.
|
||||
#[arg(long)]
|
||||
#[arg(help = crate::t!("Connect AI clients to the running editor over MCP stdio.").into_owned(), long_help = None)]
|
||||
pub mcp: bool,
|
||||
|
||||
/// TCP port for --serve (defaults to stdin/stdout).
|
||||
#[arg(long, value_name = "PORT")]
|
||||
#[arg(help = crate::t!("TCP port for --serve (defaults to stdin/stdout).").into_owned(), long_help = None)]
|
||||
pub port: Option<u16>,
|
||||
|
||||
/// Headless convert: read IN, write OUT (format from OUT's extension), exit.
|
||||
#[arg(long, num_args = 2, value_names = ["IN", "OUT"])]
|
||||
#[arg(help = crate::t!("Convert IN to OUT using the output file extension, then exit.").into_owned(), long_help = None)]
|
||||
pub export: Option<Vec<PathBuf>>,
|
||||
|
||||
/// Run a command script at startup: one command line per line of FILE.
|
||||
#[arg(long, value_name = "FILE")]
|
||||
#[arg(help = crate::t!("Run a command script at startup, one command per line.").into_owned(), long_help = None)]
|
||||
pub script: Option<PathBuf>,
|
||||
|
||||
/// Log level (error|warn|info|debug|trace). Also honours RUST_LOG.
|
||||
#[arg(long, value_name = "LEVEL")]
|
||||
#[arg(help = crate::t!("Log level (error|warn|info|debug|trace). Also reads RUST_LOG.").into_owned(), long_help = None)]
|
||||
pub log: Option<String>,
|
||||
|
||||
/// Internal: run as the plugin runner child process.
|
||||
|
||||
Reference in new issue
Block a user