feat: localize optimizer interface

This commit is contained in:
Codex
2026-06-21 23:43:02 +08:00
parent 1298456683
commit 1596de4527
6 changed files with 72 additions and 56 deletions
+11 -11
View File
@@ -20,10 +20,10 @@ interface ArticleInputFormProps {
}
const platforms: { value: PublishPlatform; label: string }[] = [
{ value: "official_site", label: "Official site" },
{ value: "media_article", label: "Media article" },
{ value: "comparison_review", label: "Comparison review" },
{ value: "recommendation_list", label: "Recommendation list" },
{ value: "official_site", label: "官网文章" },
{ value: "media_article", label: "媒体稿" },
{ value: "comparison_review", label: "对比评测" },
{ value: "recommendation_list", label: "推荐榜单" },
];
export function ArticleInputForm({
@@ -47,13 +47,13 @@ export function ArticleInputForm({
return (
<form className="panel stack" onSubmit={handleSubmit}>
<div className="panel-heading">
<span>Article Input</span>
<span></span>
<button disabled={isSubmitting} type="submit">
{isSubmitting ? "Analyzing..." : "Analyze"}
{isSubmitting ? "分析中..." : "分析文章"}
</button>
</div>
<label>
<span>Title</span>
<span></span>
<input
required
value={value.title}
@@ -61,7 +61,7 @@ export function ArticleInputForm({
/>
</label>
<label>
<span>Body</span>
<span></span>
<textarea
required
className="body-input"
@@ -70,14 +70,14 @@ export function ArticleInputForm({
/>
</label>
<label>
<span>Images</span>
<span></span>
<textarea
value={value.image_lines}
onChange={(event) => update("image_lines", event.target.value)}
/>
</label>
<label>
<span>Target platform</span>
<span></span>
<select
value={value.platform}
onChange={(event) =>
@@ -92,7 +92,7 @@ export function ArticleInputForm({
</select>
</label>
<label>
<span>User instructions</span>
<span></span>
<textarea
value={value.user_instructions}
onChange={(event) => update("user_instructions", event.target.value)}