fix(i18n): add missing placeholder keys and wire into SettingsTab

This commit is contained in:
svemagie
2026-04-14 12:46:09 +02:00
parent 196aea2770
commit 2d67fd48ee
3 changed files with 9 additions and 3 deletions
+3 -3
View File
@@ -54,7 +54,7 @@ export class MicropubSettingsTab extends PluginSettingTab {
.setDesc(t("settingMicropubEndpointDesc")) .setDesc(t("settingMicropubEndpointDesc"))
.addText((text) => .addText((text) =>
text text
.setPlaceholder("https://example.com/micropub") .setPlaceholder(t("settingMicropubEndpointPlaceholder"))
.setValue(this.plugin.settings.micropubEndpoint) .setValue(this.plugin.settings.micropubEndpoint)
.onChange(async (value) => { .onChange(async (value) => {
this.plugin.settings.micropubEndpoint = value.trim(); this.plugin.settings.micropubEndpoint = value.trim();
@@ -67,7 +67,7 @@ export class MicropubSettingsTab extends PluginSettingTab {
.setDesc(t("settingMediaEndpointDesc")) .setDesc(t("settingMediaEndpointDesc"))
.addText((text) => .addText((text) =>
text text
.setPlaceholder("https://example.com/micropub/media") .setPlaceholder(t("settingMediaEndpointPlaceholder"))
.setValue(this.plugin.settings.mediaEndpoint) .setValue(this.plugin.settings.mediaEndpoint)
.onChange(async (value) => { .onChange(async (value) => {
this.plugin.settings.mediaEndpoint = value.trim(); this.plugin.settings.mediaEndpoint = value.trim();
@@ -258,7 +258,7 @@ export class MicropubSettingsTab extends PluginSettingTab {
.setDesc(t("settingAccessTokenDesc")) .setDesc(t("settingAccessTokenDesc"))
.addText((text) => { .addText((text) => {
text text
.setPlaceholder("your-bearer-token") .setPlaceholder(t("settingAccessTokenPlaceholder"))
.setValue(this.plugin.settings.accessToken) .setValue(this.plugin.settings.accessToken)
.onChange(async (value) => { .onChange(async (value) => {
this.plugin.settings.accessToken = value.trim(); this.plugin.settings.accessToken = value.trim();
+3
View File
@@ -25,8 +25,10 @@ export const de: Record<string, string> = {
// Settings — endpoints // Settings — endpoints
settingMicropubEndpoint: "Micropub-Endpunkt", settingMicropubEndpoint: "Micropub-Endpunkt",
settingMicropubEndpointDesc: "z. B. https://example.com/micropub", settingMicropubEndpointDesc: "z. B. https://example.com/micropub",
settingMicropubEndpointPlaceholder: "https://example.com/micropub",
settingMediaEndpoint: "Medien-Endpunkt", settingMediaEndpoint: "Medien-Endpunkt",
settingMediaEndpointDesc:"Für Bild-Uploads. Wird automatisch ermittelt, wenn leer.", settingMediaEndpointDesc:"Für Bild-Uploads. Wird automatisch ermittelt, wenn leer.",
settingMediaEndpointPlaceholder: "https://example.com/micropub/media",
// Settings — publish behaviour // Settings — publish behaviour
settingVisibility: "Standard-Sichtbarkeit", settingVisibility: "Standard-Sichtbarkeit",
@@ -67,6 +69,7 @@ export const de: Record<string, string> = {
manualTokenSummary: "Oder Token manuell einfügen", manualTokenSummary: "Oder Token manuell einfügen",
settingAccessToken: "Zugriffstoken", settingAccessToken: "Zugriffstoken",
settingAccessTokenDesc: "Bearer-Token aus deinem Indiekit-Adminbereich.", settingAccessTokenDesc: "Bearer-Token aus deinem Indiekit-Adminbereich.",
settingAccessTokenPlaceholder: "your-bearer-token",
btnVerify: "Prüfen", btnVerify: "Prüfen",
noticeSetEndpointFirst: "Bitte zuerst Micropub-Endpunkt und Token eingeben.", noticeSetEndpointFirst: "Bitte zuerst Micropub-Endpunkt und Token eingeben.",
noticeTokenValid: "✅ Token ist gültig!", noticeTokenValid: "✅ Token ist gültig!",
+3
View File
@@ -25,8 +25,10 @@ export const en: Record<string, string> = {
// Settings — endpoints // Settings — endpoints
settingMicropubEndpoint: "Micropub endpoint", settingMicropubEndpoint: "Micropub endpoint",
settingMicropubEndpointDesc: "e.g. https://example.com/micropub", // intentional: replaces personal domain in source settingMicropubEndpointDesc: "e.g. https://example.com/micropub", // intentional: replaces personal domain in source
settingMicropubEndpointPlaceholder: "https://example.com/micropub",
settingMediaEndpoint: "Media endpoint", settingMediaEndpoint: "Media endpoint",
settingMediaEndpointDesc:"For image uploads. Auto-discovered if blank.", settingMediaEndpointDesc:"For image uploads. Auto-discovered if blank.",
settingMediaEndpointPlaceholder: "https://example.com/micropub/media",
// Settings — publish behaviour // Settings — publish behaviour
settingVisibility: "Default visibility", settingVisibility: "Default visibility",
@@ -67,6 +69,7 @@ export const en: Record<string, string> = {
manualTokenSummary: "Or paste a token manually", manualTokenSummary: "Or paste a token manually",
settingAccessToken: "Access token", settingAccessToken: "Access token",
settingAccessTokenDesc: "Bearer token from your Indiekit admin panel.", settingAccessTokenDesc: "Bearer token from your Indiekit admin panel.",
settingAccessTokenPlaceholder: "your-bearer-token",
btnVerify: "Verify", btnVerify: "Verify",
noticeSetEndpointFirst: "Set the Micropub endpoint and token first.", noticeSetEndpointFirst: "Set the Micropub endpoint and token first.",
noticeTokenValid: "✅ Token is valid!", noticeTokenValid: "✅ Token is valid!",