Skip to content
Merged
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
28 changes: 14 additions & 14 deletions src/renderer/src/components/DeviceControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ export const DeviceControls: React.FC<DeviceControlsProps> = ({
{isRemoteAC && (
<>
<Box sx={sliderContainerSx}>
<Typography variant="caption" color="text.secondary">Temperature (°C)</Typography>
<Typography variant="caption" color="text.secondary">{t("Temperature (°C)")}</Typography>
<Slider
size="small"
value={acTemperature}
Expand All @@ -465,39 +465,39 @@ export const DeviceControls: React.FC<DeviceControlsProps> = ({
<TextField
select
size="small"
label="Mode"
label={t("Mode")}
value={acMode}
onChange={(e) => setAcMode(e.target.value)}
fullWidth
>
<MenuItem value="1">Auto</MenuItem>
<MenuItem value="2">Cool</MenuItem>
<MenuItem value="3">Dry</MenuItem>
<MenuItem value="4">Fan</MenuItem>
<MenuItem value="5">Heat</MenuItem>
<MenuItem value="1">{t("Auto")}</MenuItem>
<MenuItem value="2">{t("Cool")}</MenuItem>
<MenuItem value="3">{t("Dry")}</MenuItem>
<MenuItem value="4">{t("Fan")}</MenuItem>
<MenuItem value="5">{t("Heat")}</MenuItem>
</TextField>
<TextField
select
size="small"
label="Fan speed"
label={t("Fan speed")}
value={acFanSpeed}
onChange={(e) => setAcFanSpeed(e.target.value)}
fullWidth
>
<MenuItem value="1">Auto</MenuItem>
<MenuItem value="2">Low</MenuItem>
<MenuItem value="3">Medium</MenuItem>
<MenuItem value="4">High</MenuItem>
<MenuItem value="1">{t("Auto")}</MenuItem>
<MenuItem value="2">{t("Low")}</MenuItem>
<MenuItem value="3">{t("Medium")}</MenuItem>
<MenuItem value="4">{t("High")}</MenuItem>
</TextField>
<TextField
select
size="small"
label="Power"
label={t("Power")}
value={acPower}
onChange={(e) => setAcPower(e.target.value as "on" | "off")}
fullWidth
>
<MenuItem value="on">On</MenuItem>
<MenuItem value="on">{t("On")}</MenuItem>
<MenuItem value="off">{t("Off")}</MenuItem>
</TextField>
</Box>
Expand Down
16 changes: 16 additions & 0 deletions src/renderer/src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,17 @@ const en: Dictionary = {
On: "On",
Off: "Off",
Auto: "Auto",
Mode: "Mode",
"Fan speed": "Fan speed",
Power: "Power",
"Temperature (°C)": "Temperature (°C)",
Low: "Low",
Medium: "Medium",
High: "High",
Cool: "Cool",
Dry: "Dry",
Fan: "Fan",
Heat: "Heat",
Comment on lines +98 to +108

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

翻訳キーの追加ありがとうございます。コードの可読性と保守性を高めるため、関連するキーをグループ化することをお勧めします。例えば、Cool, Dry, Fan, HeatHigh の後ではなく、Auto の近くに配置すると、モード関連のキーとしてまとまりが良くなります。

Suggested change
Mode: "Mode",
"Fan speed": "Fan speed",
Power: "Power",
"Temperature (°C)": "Temperature (°C)",
Low: "Low",
Medium: "Medium",
High: "High",
Cool: "Cool",
Dry: "Dry",
Fan: "Fan",
Heat: "Heat",
Auto: "Auto",
Cool: "Cool",
Dry: "Dry",
Fan: "Fan",
Heat: "Heat",
Mode: "Mode",
"Fan speed": "Fan speed",
Power: "Power",
"Temperature (°C)": "Temperature (°C)",
Low: "Low",
Medium: "Medium",
High: "High",

Apply: "Apply",
Start: "Start",
Stop: "Stop",
Expand Down Expand Up @@ -233,9 +241,17 @@ const ja: Dictionary = {
On: "オン",
Off: "オフ",
Auto: "自動",
Mode: "モード",
"Fan speed": "風量",
Power: "電源",
"Temperature (°C)": "温度 (°C)",
Low: "弱",
Medium: "中",
High: "強",
Cool: "冷房",
Dry: "除湿",
Fan: "送風",
Heat: "暖房",
Comment on lines +244 to +254

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

日本語の翻訳キー追加、ありがとうございます。英語版と同様に、関連するキーをグループ化すると、将来のメンテナンスが容易になります。Cool, Dry, Fan, HeatAuto の後に移動させることを検討してください。

Suggested change
Mode: "モード",
"Fan speed": "風量",
Power: "電源",
"Temperature (°C)": "温度 (°C)",
Low: "弱",
Medium: "中",
High: "強",
Cool: "冷房",
Dry: "除湿",
Fan: "送風",
Heat: "暖房",
Auto: "自動",
Cool: "冷房",
Dry: "除湿",
Fan: "送風",
Heat: "暖房",
Mode: "モード",
"Fan speed": "風量",
Power: "電源",
"Temperature (°C)": "温度 (°C)",
Low: "弱",
Medium: "中",
High: "強",

Apply: "適用",
Start: "開始",
Stop: "停止",
Expand Down