From a864dafeb0358ba931fca4721f510f2f54f15107 Mon Sep 17 00:00:00 2001 From: bestony Date: Thu, 16 Jul 2026 07:16:40 +0800 Subject: [PATCH] fix: render caprover deploy as code in CLI deploy description Part 2 of the Method 1 CLI help text embedded raw tags inside i18n strings. localize() returns plain text, so React escaped them and users saw literal caprover deploy instead of styled code. Use Utils.formatText with a %s placeholder and a real element, matching part 1. Update locale strings accordingly (and clean de-DE part 1 which had the same raw HTML issue). --- src/containers/apps/appDetails/deploy/Deployment.tsx | 10 +++++++--- src/locales/ar-EG.json | 2 +- src/locales/de-DE.json | 4 ++-- src/locales/en-US.json | 2 +- src/locales/es-ES.json | 2 +- src/locales/fa-IR.json | 2 +- src/locales/fr-FR.json | 2 +- src/locales/hr-HR.json | 4 ++-- src/locales/id-ID.json | 2 +- src/locales/nl-NL.json | 2 +- src/locales/pt-BR.json | 2 +- src/locales/ru-RU.json | 2 +- src/locales/sv-SE.json | 2 +- src/locales/zh-CN.json | 2 +- 14 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/containers/apps/appDetails/deploy/Deployment.tsx b/src/containers/apps/appDetails/deploy/Deployment.tsx index c7943743..a796b27b 100644 --- a/src/containers/apps/appDetails/deploy/Deployment.tsx +++ b/src/containers/apps/appDetails/deploy/Deployment.tsx @@ -144,9 +144,13 @@ export default class Deployment extends ApiComponent< {localize('apps.link_see_here', '(here)')} .{' '} - {localize( - 'apps.deploy_cli_description_part2', - "If you're using CI/CD to run caprover deploy and you do not wish to use your password, you can use app-specific tokens" + {Utils.formatText( + localize( + 'apps.deploy_cli_description_part2', + "If you're using CI/CD to run %s and you do not wish to use your password, you can use app-specific tokens" + ), + ['%s'], + [caprover deploy] )}{' '} {localize('apps.link_see_here', '(here)')} diff --git a/src/locales/ar-EG.json b/src/locales/ar-EG.json index 40eff2cc..a8563422 100644 --- a/src/locales/ar-EG.json +++ b/src/locales/ar-EG.json @@ -100,7 +100,7 @@ "apps.deploy_captain_definition_relative_path_hint": "مسار تعريف captain", "apps.deploy_captain_definition_relative_path_hint_tooltip": "قم بالتعديل فقط إذا وضعت ملف تعريف captain الخاص بك في دليل فرعي من مشروعك", "apps.deploy_cli_description_part1": "استخدم أمر التوزيع CLI. هذه هي الطريقة الأسهل لأنها تتطلب أمرًا بسيطًا مثل %s. اقرأ المزيد عن ذلك في الوثائق", - "apps.deploy_cli_description_part2": "إذا كنت تستخدم CI/CD لتشغيل caprover deploy ولا ترغب في استخدام كلمة المرور الخاصة بك، يمكنك استخدام رموز محددة للتطبيق", + "apps.deploy_cli_description_part2": "إذا كنت تستخدم CI/CD لتشغيل %s ولا ترغب في استخدام كلمة المرور الخاصة بك، يمكنك استخدام رموز محددة للتطبيق", "apps.deploy_copied_to_clipboard": "تم النسخ إلى الحافظة!", "apps.deploy_current_version_tooltip": "الإصدار الحالي", "apps.deploy_failed_deploy_tooltip": "فشل التوزيع", diff --git a/src/locales/de-DE.json b/src/locales/de-DE.json index e4a15142..4cef680a 100644 --- a/src/locales/de-DE.json +++ b/src/locales/de-DE.json @@ -99,8 +99,8 @@ "apps.deploy_captain_definition_path_hint": "Sie sollten diesen Pfad nicht ändern müssen, es sei denn, Sie haben ein Repository mit mehreren captain-definition-Dateien (Mono-Repos). Lesen Sie die Dokumentation zur captain-definition, bevor Sie den Pfad bearbeiten", "apps.deploy_captain_definition_relative_path_hint": "captain-definition-Pfad", "apps.deploy_captain_definition_relative_path_hint_tooltip": "Ändern Sie dies nur, wenn Sie Ihre captain-definition-Datei in einem Unterverzeichnis Ihres Projekts abgelegt haben", - "apps.deploy_cli_description_part1": "Verwenden Sie den Befehl caprover deploy. Dies ist die einfachste Methode, da sie nur einen einfachen Befehl wie %s erfordert. Lesen Sie mehr darüber in der Dokumentation", - "apps.deploy_cli_description_part2": "Wenn Sie CI/CD verwenden, um caprover deploy auszuführen, und Sie Ihr Passwort nicht verwenden möchten, können Sie app-spezifische Tokens verwenden", + "apps.deploy_cli_description_part1": "Verwenden Sie den CLI-Deploy-Befehl. Dies ist die einfachste Methode, da sie nur einen einfachen Befehl wie %s erfordert. Lesen Sie mehr darüber in der Dokumentation", + "apps.deploy_cli_description_part2": "Wenn Sie CI/CD verwenden, um %s auszuführen, und Sie Ihr Passwort nicht verwenden möchten, können Sie app-spezifische Tokens verwenden", "apps.deploy_copied_to_clipboard": "In die Zwischenablage kopiert!", "apps.deploy_current_version_tooltip": "Aktuelle Version", "apps.deploy_failed_deploy_tooltip": "Fehlgeschlagener Deploy", diff --git a/src/locales/en-US.json b/src/locales/en-US.json index aa902d47..e0ce4500 100644 --- a/src/locales/en-US.json +++ b/src/locales/en-US.json @@ -100,7 +100,7 @@ "apps.deploy_captain_definition_relative_path_hint": "captain-definition path", "apps.deploy_captain_definition_relative_path_hint_tooltip": "Edit only if you have placed your captain-definition file in a subdirectory of your project", "apps.deploy_cli_description_part1": "Use CLI deploy command. This is the easiest method as it only requires a simple command like %s. Read more about it in the docs", - "apps.deploy_cli_description_part2": "If you're using CI/CD to run caprover deploy and you do not wish to use your password, you can use app-specific tokens", + "apps.deploy_cli_description_part2": "If you're using CI/CD to run %s and you do not wish to use your password, you can use app-specific tokens", "apps.deploy_copied_to_clipboard": "Copied to clipboard!", "apps.deploy_current_version_tooltip": "Current Version", "apps.deploy_failed_deploy_tooltip": "Failed deploy", diff --git a/src/locales/es-ES.json b/src/locales/es-ES.json index f23bd298..71429242 100644 --- a/src/locales/es-ES.json +++ b/src/locales/es-ES.json @@ -100,7 +100,7 @@ "apps.deploy_captain_definition_relative_path_hint": "ruta de definición del capitán", "apps.deploy_captain_definition_relative_path_hint_tooltip": "Edite solo si ha colocado su archivo de definición del capitán en un subdirectorio de su proyecto", "apps.deploy_cli_description_part1": "Use el comando de despliegue CLI. Este es el método más fácil ya que solo requiere un comando simple como %s. Lea más sobre esto en los documentos", - "apps.deploy_cli_description_part2": "Si está utilizando CI/CD para ejecutar caprover deploy y no desea usar su contraseña, puede usar tokens específicos de la app", + "apps.deploy_cli_description_part2": "Si está utilizando CI/CD para ejecutar %s y no desea usar su contraseña, puede usar tokens específicos de la app", "apps.deploy_copied_to_clipboard": "¡Copiado al portapapeles!", "apps.deploy_current_version_tooltip": "Versión Actual", "apps.deploy_failed_deploy_tooltip": "Despliegue fallido", diff --git a/src/locales/fa-IR.json b/src/locales/fa-IR.json index def6be9d..a81fb253 100644 --- a/src/locales/fa-IR.json +++ b/src/locales/fa-IR.json @@ -100,7 +100,7 @@ "apps.deploy_captain_definition_relative_path_hint": "مسیر تعریف captain", "apps.deploy_captain_definition_relative_path_hint_tooltip": "تنها در صورتی ویرایش کنید که فایل تعریف captain خود را در یک زیرشاخه پروژه خود قرار داده‌اید", "apps.deploy_cli_description_part1": "از دستور استقرار CLI استفاده کنید. این ساده‌ترین روش است زیرا تنها به یک دستور ساده مانند %s نیاز دارد. برای اطلاعات بیشتر در مورد آن در اسناد مطالعه کنید", - "apps.deploy_cli_description_part2": "اگر از CI/CD برای اجرای caprover deploy استفاده می‌کنید و نمی‌خواهید از رمز عبور خود استفاده کنید، می‌توانید از توکن‌های خاص برنامه استفاده کنید", + "apps.deploy_cli_description_part2": "اگر از CI/CD برای اجرای %s استفاده می‌کنید و نمی‌خواهید از رمز عبور خود استفاده کنید، می‌توانید از توکن‌های خاص برنامه استفاده کنید", "apps.deploy_copied_to_clipboard": "در کلیپ‌برد کپی شد!", "apps.deploy_current_version_tooltip": "نسخه فعلی", "apps.deploy_failed_deploy_tooltip": "استقرار ناموفق", diff --git a/src/locales/fr-FR.json b/src/locales/fr-FR.json index 7f579a28..015046d7 100644 --- a/src/locales/fr-FR.json +++ b/src/locales/fr-FR.json @@ -100,7 +100,7 @@ "apps.deploy_captain_definition_relative_path_hint": "chemin de captain-definition", "apps.deploy_captain_definition_relative_path_hint_tooltip": "Modifiez uniquement si vous avez placé votre fichier captain-definition dans un sous-répertoire de votre projet", "apps.deploy_cli_description_part1": "Utilisez la commande de déploiement CLI. C'est la méthode la plus simple car elle ne nécessite qu'une simple commande comme %s. En savoir plus dans la documentation", - "apps.deploy_cli_description_part2": "Si vous utilisez CI/CD pour exécuter caprover deploy et que vous ne souhaitez pas utiliser votre mot de passe, vous pouvez utiliser des tokens spécifiques à l'app", + "apps.deploy_cli_description_part2": "Si vous utilisez CI/CD pour exécuter %s et que vous ne souhaitez pas utiliser votre mot de passe, vous pouvez utiliser des tokens spécifiques à l'app", "apps.deploy_copied_to_clipboard": "Copié dans le presse-papiers !", "apps.deploy_current_version_tooltip": "Version actuelle", "apps.deploy_failed_deploy_tooltip": "Déploiement échoué", diff --git a/src/locales/hr-HR.json b/src/locales/hr-HR.json index 83db2ba2..abc034b8 100644 --- a/src/locales/hr-HR.json +++ b/src/locales/hr-HR.json @@ -100,7 +100,7 @@ "apps.deploy_captain_definition_relative_path_hint": "putanja captain-definition", "apps.deploy_captain_definition_relative_path_hint_tooltip": "Uredite samo ako ste postavili svoju captain-definition datoteku u poddirektorij vašeg projekta", "apps.deploy_cli_description_part1": "Koristite naredbu za deploy putem CLI-ja. Ovo je najjednostavnija metoda jer zahtijeva samo jednostavnu naredbu poput %s. Pročitajte više o tome u dokumentaciji", - "apps.deploy_cli_description_part2": "Ako koristite CI/CD za izvođenje caprover deploy i ne želite koristiti svoju lozinku, možete koristiti specifični token aplikacije", + "apps.deploy_cli_description_part2": "Ako koristite CI/CD za izvođenje %s i ne želite koristiti svoju lozinku, možete koristiti specifični token aplikacije", "apps.deploy_copied_to_clipboard": "Kopirano u međuspremnik!", "apps.deploy_current_version_tooltip": "Trenutna verzija", "apps.deploy_failed_deploy_tooltip": "Neuspjeli deploy", @@ -465,4 +465,4 @@ "themes.head_embed": "Ugradi elemente u ", "themes.see_here": "Pogledaj ovdje za detalje.", "themes.theme_custom_help": "Možete prilagoditi CapRover temu pružanjem prilagođene teme i umetanjem elemenata (font, CSS, JS itd.) u odjeljak." -} \ No newline at end of file +} diff --git a/src/locales/id-ID.json b/src/locales/id-ID.json index ab63a7a5..30aae2ea 100644 --- a/src/locales/id-ID.json +++ b/src/locales/id-ID.json @@ -100,7 +100,7 @@ "apps.deploy_captain_definition_relative_path_hint": "jalur definisi kapten", "apps.deploy_captain_definition_relative_path_hint_tooltip": "Edit hanya jika Anda telah menempatkan file definisi kapten Anda di subdirektori proyek Anda", "apps.deploy_cli_description_part1": "Gunakan perintah penempatan CLI. Ini adalah metode termudah karena hanya memerlukan perintah sederhana seperti %s. Baca lebih lanjut tentang itu dalam dokumen", - "apps.deploy_cli_description_part2": "Jika Anda menggunakan CI/CD untuk menjalankan caprover deploy dan Anda tidak ingin menggunakan kata sandi Anda, Anda dapat menggunakan token khusus aplikasi", + "apps.deploy_cli_description_part2": "Jika Anda menggunakan CI/CD untuk menjalankan %s dan Anda tidak ingin menggunakan kata sandi Anda, Anda dapat menggunakan token khusus aplikasi", "apps.deploy_copied_to_clipboard": "Disalin ke papan klip!", "apps.deploy_current_version_tooltip": "Versi Saat Ini", "apps.deploy_failed_deploy_tooltip": "Penempatan gagal", diff --git a/src/locales/nl-NL.json b/src/locales/nl-NL.json index 8c0a2a56..cfb7ba1d 100644 --- a/src/locales/nl-NL.json +++ b/src/locales/nl-NL.json @@ -100,7 +100,7 @@ "apps.deploy_captain_definition_relative_path_hint": "captain-definition pad", "apps.deploy_captain_definition_relative_path_hint_tooltip": "Alleen bewerken als je je captain-definition bestand in een submap van je project hebt geplaatst", "apps.deploy_cli_description_part1": "Gebruik het CLI-implementatiecommando. Dit is de eenvoudigste methode omdat het slechts een eenvoudig commando vereist zoals %s. Lees meer hierover in de documentatie", - "apps.deploy_cli_description_part2": "Als je CI/CD gebruikt om caprover deploy uit te voeren en je je wachtwoord niet wilt gebruiken, kun je app-specifieke tokens gebruiken", + "apps.deploy_cli_description_part2": "Als je CI/CD gebruikt om %s uit te voeren en je je wachtwoord niet wilt gebruiken, kun je app-specifieke tokens gebruiken", "apps.deploy_copied_to_clipboard": "Gekopieerd naar klembord!", "apps.deploy_current_version_tooltip": "Huidige versie", "apps.deploy_failed_deploy_tooltip": "Mislukte implementatie", diff --git a/src/locales/pt-BR.json b/src/locales/pt-BR.json index 033df3d3..174a5353 100644 --- a/src/locales/pt-BR.json +++ b/src/locales/pt-BR.json @@ -100,7 +100,7 @@ "apps.deploy_captain_definition_relative_path_hint": "caminho captain-definition", "apps.deploy_captain_definition_relative_path_hint_tooltip": "Edite somente se você colocou seu arquivo captain-definition em um subdiretório do seu projeto", "apps.deploy_cli_description_part1": "Use o comando de deploy do CLI. Este é o método mais fácil, pois requer apenas um comando simples como %s. Leia mais sobre ele na documentação", - "apps.deploy_cli_description_part2": "Se você estiver usando CI/CD para rodar caprover deploy e não quiser usar sua senha, você pode usar tokens específicos de app", + "apps.deploy_cli_description_part2": "Se você estiver usando CI/CD para rodar %s e não quiser usar sua senha, você pode usar tokens específicos de app", "apps.deploy_copied_to_clipboard": "Copiado para a área de transferência!", "apps.deploy_current_version_tooltip": "Versão Atual", "apps.deploy_failed_deploy_tooltip": "Deploy falhou", diff --git a/src/locales/ru-RU.json b/src/locales/ru-RU.json index 67635073..a6af0b03 100644 --- a/src/locales/ru-RU.json +++ b/src/locales/ru-RU.json @@ -100,7 +100,7 @@ "apps.deploy_captain_definition_relative_path_hint": "Путь к captain-definition", "apps.deploy_captain_definition_relative_path_hint_tooltip": "Редактируйте, только если файл находится в подкаталоге", "apps.deploy_cli_description_part1": "Используйте команду CLI для развертывания. Это самый простой способ. Подробнее в документации: %s", - "apps.deploy_cli_description_part2": "Если вы используете CI/CD для запуска caprover deploy и не хотите вводить пароль, используйте токены приложений.", + "apps.deploy_cli_description_part2": "Если вы используете CI/CD для запуска %s и не хотите вводить пароль, используйте токены приложений.", "apps.deploy_copied_to_clipboard": "Скопировано в буфер!", "apps.deploy_current_version_tooltip": "Текущая версия", "apps.deploy_failed_deploy_tooltip": "Ошибка развертывания", diff --git a/src/locales/sv-SE.json b/src/locales/sv-SE.json index 01719c1c..2e4eb12e 100644 --- a/src/locales/sv-SE.json +++ b/src/locales/sv-SE.json @@ -100,7 +100,7 @@ "apps.deploy_captain_definition_relative_path_hint": "captain-definition-sökväg", "apps.deploy_captain_definition_relative_path_hint_tooltip": "Redigera endast om du har placerat din captain-definition-fil i en undermapp till ditt projekt", "apps.deploy_cli_description_part1": "Använd CLI-utplaceringskommando. Detta är den enklaste metoden eftersom den bara kräver ett enkelt kommando som %s. Läs mer om detta i dokumenten", - "apps.deploy_cli_description_part2": "Om du använder CI/CD för att köra caprover deploy och du inte vill använda ditt lösenord, kan du använda appspecifika tokens", + "apps.deploy_cli_description_part2": "Om du använder CI/CD för att köra %s och du inte vill använda ditt lösenord, kan du använda appspecifika tokens", "apps.deploy_copied_to_clipboard": "Kopierat till urklipp!", "apps.deploy_current_version_tooltip": "Nuvarande version", "apps.deploy_failed_deploy_tooltip": "Misslyckad utplacering", diff --git a/src/locales/zh-CN.json b/src/locales/zh-CN.json index 124c18db..740312bf 100644 --- a/src/locales/zh-CN.json +++ b/src/locales/zh-CN.json @@ -100,7 +100,7 @@ "apps.deploy_captain_definition_relative_path_hint": "captain-definition 路径", "apps.deploy_captain_definition_relative_path_hint_tooltip": "仅在您将 captain-definition 文件放在项目的子目录中时编辑", "apps.deploy_cli_description_part1": "使用 CLI 部署命令。这是最简单的方法,因为它只需要一个简单的命令,如 %s。在文档中了解更多信息", - "apps.deploy_cli_description_part2": "如果您正在使用 CI/CD 运行 caprover deploy 并且不希望使用密码,您可以使用特定于应用的令牌", + "apps.deploy_cli_description_part2": "如果您正在使用 CI/CD 运行 %s 并且不希望使用密码,您可以使用特定于应用的令牌", "apps.deploy_copied_to_clipboard": "已复制到剪贴板!", "apps.deploy_current_version_tooltip": "当前版本", "apps.deploy_failed_deploy_tooltip": "部署失败",