From 2d67fd48eeabbe236bc5ccfdac50fa6cadadce01 Mon Sep 17 00:00:00 2001 From: svemagie <869694+svemagie@users.noreply.github.com> Date: Tue, 14 Apr 2026 12:46:09 +0200 Subject: [PATCH] fix(i18n): add missing placeholder keys and wire into SettingsTab --- src/SettingsTab.ts | 6 +++--- src/lang/de.ts | 3 +++ src/lang/en.ts | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/SettingsTab.ts b/src/SettingsTab.ts index b712840..e7975f3 100644 --- a/src/SettingsTab.ts +++ b/src/SettingsTab.ts @@ -54,7 +54,7 @@ export class MicropubSettingsTab extends PluginSettingTab { .setDesc(t("settingMicropubEndpointDesc")) .addText((text) => text - .setPlaceholder("https://example.com/micropub") + .setPlaceholder(t("settingMicropubEndpointPlaceholder")) .setValue(this.plugin.settings.micropubEndpoint) .onChange(async (value) => { this.plugin.settings.micropubEndpoint = value.trim(); @@ -67,7 +67,7 @@ export class MicropubSettingsTab extends PluginSettingTab { .setDesc(t("settingMediaEndpointDesc")) .addText((text) => text - .setPlaceholder("https://example.com/micropub/media") + .setPlaceholder(t("settingMediaEndpointPlaceholder")) .setValue(this.plugin.settings.mediaEndpoint) .onChange(async (value) => { this.plugin.settings.mediaEndpoint = value.trim(); @@ -258,7 +258,7 @@ export class MicropubSettingsTab extends PluginSettingTab { .setDesc(t("settingAccessTokenDesc")) .addText((text) => { text - .setPlaceholder("your-bearer-token") + .setPlaceholder(t("settingAccessTokenPlaceholder")) .setValue(this.plugin.settings.accessToken) .onChange(async (value) => { this.plugin.settings.accessToken = value.trim(); diff --git a/src/lang/de.ts b/src/lang/de.ts index 3b6dfb7..50c9821 100644 --- a/src/lang/de.ts +++ b/src/lang/de.ts @@ -25,8 +25,10 @@ export const de: Record = { // Settings — endpoints settingMicropubEndpoint: "Micropub-Endpunkt", settingMicropubEndpointDesc: "z. B. https://example.com/micropub", + settingMicropubEndpointPlaceholder: "https://example.com/micropub", settingMediaEndpoint: "Medien-Endpunkt", settingMediaEndpointDesc:"Für Bild-Uploads. Wird automatisch ermittelt, wenn leer.", + settingMediaEndpointPlaceholder: "https://example.com/micropub/media", // Settings — publish behaviour settingVisibility: "Standard-Sichtbarkeit", @@ -67,6 +69,7 @@ export const de: Record = { manualTokenSummary: "Oder Token manuell einfügen", settingAccessToken: "Zugriffstoken", settingAccessTokenDesc: "Bearer-Token aus deinem Indiekit-Adminbereich.", + settingAccessTokenPlaceholder: "your-bearer-token", btnVerify: "Prüfen", noticeSetEndpointFirst: "Bitte zuerst Micropub-Endpunkt und Token eingeben.", noticeTokenValid: "✅ Token ist gültig!", diff --git a/src/lang/en.ts b/src/lang/en.ts index 664f00d..4d8177a 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -25,8 +25,10 @@ export const en: Record = { // Settings — endpoints settingMicropubEndpoint: "Micropub endpoint", settingMicropubEndpointDesc: "e.g. https://example.com/micropub", // intentional: replaces personal domain in source + settingMicropubEndpointPlaceholder: "https://example.com/micropub", settingMediaEndpoint: "Media endpoint", settingMediaEndpointDesc:"For image uploads. Auto-discovered if blank.", + settingMediaEndpointPlaceholder: "https://example.com/micropub/media", // Settings — publish behaviour settingVisibility: "Default visibility", @@ -67,6 +69,7 @@ export const en: Record = { manualTokenSummary: "Or paste a token manually", settingAccessToken: "Access token", settingAccessTokenDesc: "Bearer token from your Indiekit admin panel.", + settingAccessTokenPlaceholder: "your-bearer-token", btnVerify: "Verify", noticeSetEndpointFirst: "Set the Micropub endpoint and token first.", noticeTokenValid: "✅ Token is valid!",