diff --git a/locales/ca-ES.yml b/locales/ca-ES.yml index f855f6732..091dde9d7 100644 --- a/locales/ca-ES.yml +++ b/locales/ca-ES.yml @@ -1382,7 +1382,7 @@ adminCustomCssWarn: Aquesta configuració només s'ha d'utilitzar si sabeu què showUpdates: Mostra una finestra emergent quan Calckey s'actualitzi recommendedInstances: Servidors recomanats recommendedInstancesDescription: Servidors recomanats separats per salts de línia - que apareixen a la línia de temps recomanada. NO afegiu `https://`, NOMÉS el domini. + que apareixen a la línia de temps recomanada. caption: Descripció Automàtica splash: Pantalla de Benvinguda swipeOnDesktop: Permet lliscar a l'estil del mòbil a l'escriptori diff --git a/locales/en-US.yml b/locales/en-US.yml index 415d87230..58c966cad 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1050,7 +1050,7 @@ customSplashIconsDescription: "URLs for custom splash screen icons separated by showUpdates: "Show a popup when Calckey updates" recommendedInstances: "Recommended servers" recommendedInstancesDescription: "Recommended servers separated by line breaks to - appear in the recommended timeline. Do NOT add `https://`, ONLY the domain." + appear in the recommended timeline." caption: "Auto Caption" splash: "Splash Screen" updateAvailable: "There might be an update available!" diff --git a/locales/fr-FR.yml b/locales/fr-FR.yml index 633b393ff..f81ef4520 100644 --- a/locales/fr-FR.yml +++ b/locales/fr-FR.yml @@ -1952,8 +1952,7 @@ antennaInstancesDescription: Lister un hôte d'instance par ligne userSaysSomethingReason: '{name} a dit {reason}' breakFollowConfirm: Êtes vous sur de vouloir retirer l'abonné ? recommendedInstancesDescription: Instances recommandées séparées par une nouvelle - ligne pour apparaître dans la timeline recommandée. Ne PAS ajouter `https://`, SEULEMENT - le domaine. + ligne pour apparaître dans la timeline recommandée. sendPushNotificationReadMessage: Supprimer les notifications push une fois que les notifications ou messages concernés ont été lus sendPushNotificationReadMessageCaption: Une notification contenant le texte "{emptyPushNotificationMessage}" diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index fe03d1f41..0e8fab2c0 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -946,7 +946,7 @@ customSplashIconsDescription: "ユーザがページをロード/リロードす URL。画像は静的なURLで、できればすべて192x192にリサイズしてください。" showUpdates: "Calckeyの更新時にポップアップを表示する" recommendedInstances: "おすすめサーバー" -recommendedInstancesDescription: "おすすめタイムラインに表示するサーバーを改行区切りで入力してください。`https://`は書かず、ドメインのみを入力してください。" +recommendedInstancesDescription: "おすすめタイムラインに表示するサーバーを改行区切りで入力してください。" caption: "自動キャプション" splash: "スプラッシュスクリーン" updateAvailable: "アップデートがありますよ!" diff --git a/locales/ru-RU.yml b/locales/ru-RU.yml index 8b3e05a17..bfef68d10 100644 --- a/locales/ru-RU.yml +++ b/locales/ru-RU.yml @@ -1847,7 +1847,7 @@ customMOTDDescription: Пользовательские сообщения дл разрывами строк, будут отображаться случайным образом каждый раз, когда пользователь загружает / перезагружает страницу. recommendedInstancesDescription: Рекомендуемые инстансы, разделенные разрывами строк, - должны отображаться на рекомендуемой ленте. НЕ добавляйте `https://`, ТОЛЬКО домен. + должны отображаться на рекомендуемой ленте. caption: Автоматическая подпись splash: Заставка updateAvailable: Возможно, доступно обновление! diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml index 2803d7846..d1bad4ad1 100644 --- a/locales/zh-TW.yml +++ b/locales/zh-TW.yml @@ -1839,7 +1839,7 @@ pushNotification: 推送通知 subscribePushNotification: 啟用推送通知 unsubscribePushNotification: 禁用推送通知 pushNotificationAlreadySubscribed: 推送通知已經啟用 -recommendedInstancesDescription: 以每行分隔的推薦伺服器出現在推薦的時間線中。 不要添加 `https://`,只添加域名。 +recommendedInstancesDescription: 以每行分隔的推薦伺服器出現在推薦的時間線中。 searchPlaceholder: 在聯邦網路上搜尋 cw: 內容警告 selectChannel: 選擇一個頻道 diff --git a/packages/backend/src/server/api/endpoints/admin/update-meta.ts b/packages/backend/src/server/api/endpoints/admin/update-meta.ts index 16e49a85a..ce2c5c802 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts @@ -221,6 +221,16 @@ export default define(meta, paramDef, async (ps, me) => { if (Array.isArray(ps.recommendedInstances)) { set.recommendedInstances = ps.recommendedInstances.filter(Boolean); + if (set.recommendedInstances?.length > 0) { + set.recommendedInstances.forEach((instance, index) => { + if (/^https?:\/\//i.test(instance)) { + set.recommendedInstances![index] = instance.replace( + /^https?:\/\//i, + "", + ); + } + }); + } } if (Array.isArray(ps.hiddenTags)) {