Skip to content

Commit 6ca0f37

Browse files
authored
Update MacroBuilder.ts
1 parent 4ede40f commit 6ca0f37

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/gui/MacroGUIs/MacroBuilder.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
import type { IConditionalCommand } from "../../types/macros/Conditional/IConditionalCommand";
1414
import { ConditionalCommandSettingsModal } from "./ConditionalCommandSettingsModal";
1515
import { ConditionalBranchEditorModal } from "./ConditionalBranchEditorModal";
16+
import { t } from "../../i18n/i18n";
1617

1718
function getChoicesAsList(nestedChoices: IChoice[]): IChoice[] {
1819
const arr: IChoice[] = [];
@@ -83,7 +84,7 @@ export class MacroBuilder extends Modal {
8384
headerEl.addEventListener("click", async () => {
8485
const newName: string = await GenericInputPrompt.Prompt(
8586
this.app,
86-
`Update name for ${this.choice.name}`,
87+
`${t("macro.renaming")} ${this.choice.name}`,
8788
this.choice.name,
8889
this.choice.name
8990
);
@@ -98,8 +99,8 @@ export class MacroBuilder extends Modal {
9899

99100
private addRunOnStartupSetting(): void {
100101
new Setting(this.contentEl)
101-
.setName("Run on startup")
102-
.setDesc("Execute this macro when Obsidian starts")
102+
.setName(t("macro.run_on_startup"))
103+
.setDesc(t("macro.run_on_startup_desc"))
103104
.addToggle(toggle => toggle
104105
.setValue(this.choice.runOnStartup)
105106
.onChange(value => {
@@ -153,12 +154,12 @@ export class MacroBuilder extends Modal {
153154
command: IConditionalCommand,
154155
branch: "then" | "else"
155156
): Promise<boolean> {
156-
const title = branch === "then" ? "Then branch" : "Else branch";
157+
const title = branch === "then" ? t("macro.branches.then") : t("macro.branches.else");
157158
const modal = new ConditionalBranchEditorModal({
158159
app: this.app,
159160
plugin: this.plugin,
160161
choices: this.choices,
161-
title: `Edit ${title} commands`,
162+
title: `${t("macro.branches.edit")} ${title}`,
162163
commands: branch === "then" ? command.thenCommands : command.elseCommands,
163164
conditionalHandlers: this.buildConditionalHandlers(),
164165
});

0 commit comments

Comments
 (0)