mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 09:41:11 +00:00
dreaming: use i18n for phase labels and off state
Add dreaming.phase.{light,deep,rem,off} translation keys.
Replace hardcoded English literals in phase cards template.
This commit is contained in:
@@ -296,6 +296,12 @@ export const en: TranslationMap = {
|
||||
clearGrounded: "Clear Grounded",
|
||||
working: "Working…",
|
||||
},
|
||||
phase: {
|
||||
light: "Light",
|
||||
deep: "Deep",
|
||||
rem: "Rem",
|
||||
off: "off",
|
||||
},
|
||||
stats: {
|
||||
shortTerm: "Short-term",
|
||||
grounded: "Grounded",
|
||||
|
||||
@@ -583,12 +583,12 @@ function renderScene(props: DreamingProps, idle: boolean, dreamText: string) {
|
||||
const phase = props.phases?.[phaseId as keyof NonNullable<typeof props.phases>];
|
||||
const enabled = phase?.enabled ?? false;
|
||||
const nextRun = formatPhaseNextRun(phase?.nextRunAtMs);
|
||||
const label = phaseId.charAt(0).toUpperCase() + phaseId.slice(1);
|
||||
const label = t(`dreaming.phase.${phaseId}` as any);
|
||||
return html`
|
||||
<div class="dreams__phase ${enabled ? "" : "dreams__phase--off"}">
|
||||
<div class="dreams__phase-dot ${enabled ? "dreams__phase-dot--on" : ""}"></div>
|
||||
<span class="dreams__phase-name">${label}</span>
|
||||
<span class="dreams__phase-next">${enabled ? nextRun : "off"}</span>
|
||||
<span class="dreams__phase-next">${enabled ? nextRun : t("dreaming.phase.off")}</span>
|
||||
</div>
|
||||
`;
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user