Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
set -euo pipefail
test -L "dist/macos/stage/Applications"
test "$(readlink "dist/macos/stage/Applications")" = "/Applications"
for app in "dist/macos/stage/Codex++.app" "dist/macos/stage/Codex++ 管理工具.app"; do
for app in "dist/macos/stage/Codex++.app" "dist/macos/stage/Codex++ Manager.app"; do
test -f "$app/Contents/Info.plist"
test -f "$app/Contents/PkgInfo"
test -x "$app/Contents/MacOS/$(/usr/libexec/PlistBuddy -c 'Print :CFBundleExecutable' "$app/Contents/Info.plist")"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
set -euo pipefail
test -L "dist/macos/stage/Applications"
test "$(readlink "dist/macos/stage/Applications")" = "/Applications"
for app in "dist/macos/stage/Codex++.app" "dist/macos/stage/Codex++ 管理工具.app"; do
for app in "dist/macos/stage/Codex++.app" "dist/macos/stage/Codex++ Manager.app"; do
test -f "$app/Contents/Info.plist"
test -f "$app/Contents/PkgInfo"
test -x "$app/Contents/MacOS/$(/usr/libexec/PlistBuddy -c 'Print :CFBundleExecutable' "$app/Contents/Info.plist")"
Expand Down
2 changes: 1 addition & 1 deletion apps/codex-plus-manager/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Codex++ 管理工具</title>
<title>Codex++ Manager</title>
</head>
<body>
<div id="app"></div>
Expand Down
2 changes: 1 addition & 1 deletion apps/codex-plus-manager/src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub fn run() {
};
let mut main_window_builder =
tauri::WebviewWindowBuilder::new(app, "main", tauri::WebviewUrl::App(url.into()))
.title("Codex++ 管理工具")
.title("Codex++ Manager")
.inner_size(1180.0, 820.0)
.min_inner_size(960.0, 720.0);
if let Some(icon) = app.default_window_icon().cloned() {
Expand Down
2 changes: 1 addition & 1 deletion apps/codex-plus-manager/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{
"create": false,
"label": "main",
"title": "Codex++ 管理工具",
"title": "Codex++ Manager",
"width": 1180,
"height": 820,
"minWidth": 960,
Expand Down
10 changes: 9 additions & 1 deletion apps/codex-plus-manager/src-tauri/tests/windows_subsystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ fn windows_binaries_request_administrator_privileges() {
assert!(windows_manifest.contains("requireAdministrator"));
assert!(windows_manifest.contains("Microsoft.Windows.Common-Controls"));
assert!(windows_installer.contains("RequestExecutionLevel admin"));
assert!(windows_installer.contains("CreateShortcut \"$DESKTOP\\Codex++ Manager.lnk\""));
assert!(windows_installer.contains("CreateShortcut \"$SMPROGRAMS\\Codex++\\Codex++ Manager.lnk\""));
assert!(windows_installer.contains("CreateShortcut \"$SMPROGRAMS\\Codex++\\Uninstall Codex++.lnk\""));
assert!(!windows_installer.contains("CreateShortcut \"$DESKTOP\\Codex++ 管理工具.lnk\""));
assert!(!windows_installer.contains("CreateShortcut \"$SMPROGRAMS\\Codex++\\卸载 Codex++.lnk\""));
}

#[test]
Expand Down Expand Up @@ -159,8 +164,11 @@ fn macos_packager_hides_silent_launcher_but_not_manager() {
"create_app \"Codex++\" \"CodexPlusPlus\" \"$BINARY_DIR/codex-plus-plus\" \"com.bigpizzav3.codexplusplus\" \"true\""
));
assert!(script.contains(
"create_app \"Codex++ 管理工具\" \"CodexPlusPlusManager\" \"$BINARY_DIR/codex-plus-plus-manager\" \"com.bigpizzav3.codexplusplus.manager\" \"false\""
"create_app \"Codex++ Manager\" \"CodexPlusPlusManager\" \"$BINARY_DIR/codex-plus-plus-manager\" \"com.bigpizzav3.codexplusplus.manager\" \"false\""
));
assert!(script.contains("sign_app \"$STAGE/Codex++ Manager.app\""));
assert!(script.contains("verify_app \"$STAGE/Codex++ Manager.app\""));
assert!(!script.contains("create_app \"Codex++ 管理工具\""));
}

#[test]
Expand Down
8 changes: 6 additions & 2 deletions apps/codex-plus-manager/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ import {
serializeModelWindowRows,
type ModelWindowRow,
} from "./model-windows";
import { getLanguage, t, tf, toggleLanguage } from "@/i18n";
import { getLanguage, languageButtonTitle, t, tf, toggleLanguage } from "@/i18n";

type Status = "ok" | "failed" | "not_implemented" | "not_checked" | string;

Expand Down Expand Up @@ -730,6 +730,10 @@ const defaultSettings: BackendSettings = {
};

export function App() {
useEffect(() => {
document.title = t("Codex++ 管理工具");
}, []);

const [theme, setTheme] = useState<Theme>(() => loadInitialTheme());
const [route, setRoute] = useState<Route>(() => loadInitialRoute());
const [notice, setNotice] = useState<{ title: string; message: string; status?: Status } | null>(null);
Expand Down Expand Up @@ -2070,7 +2074,7 @@ export function App() {
<Button
onClick={() => toggleLanguage()}
size="icon"
title={getLanguage() === "en" ? t("切换到中文") : t("切换到英文")}
title={languageButtonTitle()}
variant="outline"
>
<Languages className="h-4 w-4" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const initialFor = (name: string): string => {

export function createPresetPatch(preset: ProviderPreset): PresetPatch {
return {
name: preset.name,
name: t(preset.name),
baseUrl: preset.baseUrl,
upstreamBaseUrl: preset.baseUrl,
protocol: preset.protocol,
Expand Down Expand Up @@ -164,8 +164,8 @@ function PresetButton({
title={`${preset.websiteUrl ?? ""}\n${preset.baseUrl}`}
type="button"
>
<span className="preset-btn-icon">{initialFor(preset.name)}</span>
<span className="preset-btn-name">{preset.name}</span>
<span className="preset-btn-icon">{initialFor(t(preset.name))}</span>
<span className="preset-btn-name">{t(preset.name)}</span>
<span className="preset-btn-model">{preset.model}</span>
</button>
);
Expand Down
6 changes: 6 additions & 0 deletions apps/codex-plus-manager/src/i18n-en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

// Plain strings: t("中文") -> EN_PLAIN["中文"].
export const EN_PLAIN: Record<string, string> = {
"JOJO Code 包月": "JOJO Code Monthly",
"Codex++ 管理工具": "Codex++ Manager",
"小米 MiMo": "Xiaomi MiMo",
"百度千帆 Coding Plan": "Baidu Qianfan Coding Plan",
"火山引擎 Ark": "Volcengine Ark",
"API Key 模式下扩展插件市场请求,尽量显示完整插件列表;官方/混合模式通常不需要。":
"Expands plugin marketplace requests in API Key mode to show the full plugin list. Usually unnecessary in official/mixed mode.",
"API Key 环境变量": "API Key environment variable",
Expand Down Expand Up @@ -158,6 +163,7 @@ export const EN_PLAIN: Record<string, string> = {
"切换到此供应商时会写入 ~/.codex/auth.json": "Switching to this provider writes ~/.codex/auth.json",
"切换到此供应商时会写入的预览;上下文开关变化会立即反映": "Preview of what gets written when switching to this provider; context toggles are reflected immediately",
"切换到中文": "Switch to Chinese",
"切换到越南语": "Switch to Vietnamese",
"切换到英文": "Switch to English",
"切换到浅色": "Switch to light",
"切换到深色": "Switch to dark",
Expand Down
Loading