Skip to content

Commit

Permalink
frontend/project: translate project deleted banner and make it a prop…
Browse files Browse the repository at this point in the history
…er banner
  • Loading branch information
haraldschilly committed Oct 15, 2024
1 parent 1d06656 commit d1989d8
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/ar_EG.json
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@
"project.start-button.button.txt": "{starting, select, true {بدء المشروع} other {ابدأ المشروع}}",
"project.start-button.trial.description": "لا توجد سعة لمشاريع <A>التجربة المجانية</A> على CoCalc في الوقت الحالي. {br} <A2>قم بترقية مشروعك</A2> باستخدام <A3>رخصة</A3> أو {A4}.",
"project.start-button.trial.message": "عدد كبير جدًا من المشاريع التجريبية المجانية",
"project.warnings.deleted.banner": "<h4>{icon} تحذير: هذا المشروع <strong>محذوف!</strong></h4> إذا كنت تنوي استخدام هذا المشروع، ينبغي عليك <strong>استعادته</strong> في إعدادات المشروع.",
"projects.filename-search.placeholder": "ابحث عن أسماء الملفات التي قمت بتحريرها...",
"projects.load-all.label": "عرض كل المشاريع...",
"projects.search.placeholder": "ابحث عن المشاريع (استخدم /re/ للبحث المنتظم)...",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@
"project.start-button.button.txt": "{starting, select, true {Projekt wird gestartet} other {Projekt starten}}",
"project.start-button.trial.description": "Es gibt derzeit keine Kapazität mehr für <A>Free Trial Projekte</A> auf CoCalc. {br} <A2>Upgrade dieses Projekt</A2> mit <A3>einer Lizenz</A3> oder {A4}.",
"project.start-button.trial.message": "Zu viele kostenlose Probeprojekte",
"project.warnings.deleted.banner": "<h4>{icon} Warnung: dieses Projekt ist <strong>gelöscht!</strong></h4> Wenn Sie dieses Projekt nutzen möchten, sollten Sie es in den Projekteinstellungen <strong>wiederherstellen</strong>.",
"projects.filename-search.placeholder": "Suche nach Dateien, die Sie bearbeitet haben...",
"projects.load-all.label": "Zeige alle Projekte...",
"projects.search.placeholder": "Suche nach Projekten (verwende /re/ für reguläre Ausdrücke)",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/es_ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@
"project.start-button.button.txt": "{starting, select, true {Iniciando proyecto} other {Iniciar proyecto}}",
"project.start-button.trial.description": "No hay más capacidad para <A>proyectos de Prueba Gratuita</A> en CoCalc en este momento. {br} <A2>Actualiza tu proyecto</A2> usando <A3>una licencia</A3> o {A4}.",
"project.start-button.trial.message": "Demasiados Proyectos de Prueba Gratuita",
"project.warnings.deleted.banner": "<h4>{icon} Advertencia: este proyecto está <strong>¡eliminado!</strong></h4> Si tienes la intención de usar este proyecto, debes <strong>recuperarlo</strong> en la configuración del proyecto.",
"projects.filename-search.placeholder": "Buscar nombres de archivos que editaste",
"projects.load-all.label": "Mostrar todos los proyectos...",
"projects.search.placeholder": "Buscar proyectos (use /re/ para regexp)...",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/fr_FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@
"project.start-button.button.txt": "{starting, select, true {Démarrage du projet} other {Démarrer le projet}}",
"project.start-button.trial.description": "Il n'y a plus de capacité pour les <A>projets d'essai gratuit</A> sur CoCalc pour le moment. {br} <A2>Améliorez votre projet</A2> en utilisant <A3>une licence</A3> ou {A4}.",
"project.start-button.trial.message": "Trop de projets d'essai gratuits",
"project.warnings.deleted.banner": "<h4>{icon} Avertissement : ce projet est <strong>supprimé !</strong></h4> Si vous avez l'intention d'utiliser ce projet, vous devriez <strong>le restaurer</strong> dans les paramètres du projet.",
"projects.filename-search.placeholder": "Rechercher les noms de fichiers que vous avez modifiés...",
"projects.load-all.label": "Afficher tous les projets...",
"projects.search.placeholder": "Rechercher des projets (utiliser /re/ pour les expressions régulières)...",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/he_IL.json
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@
"project.start-button.button.txt": "{starting, select, true {מפעיל פרויקט} other {הפעל פרויקט}}",
"project.start-button.trial.description": "אין יותר מקום עבור <A>פרויקטים לניסיון חינם</A> ב-CoCalc כרגע. {br} <A2>שדרג את הפרויקט שלך</A2> באמצעות <A3>רישיון</A3> או {A4}.",
"project.start-button.trial.message": "יותר מדי פרויקטים של ניסיון חינם",
"project.warnings.deleted.banner": "<h4>{icon} אזהרה: הפרויקט הזה <strong>נמחק!</strong></h4> אם אתה מתכוון להשתמש בפרויקט הזה, עליך <strong>לבטל את המחיקה שלו</strong> בהגדרות הפרויקט.",
"projects.filename-search.placeholder": "חפש קבצים שערכת...",
"projects.load-all.label": "הצג את כל הפרויקטים...",
"projects.search.placeholder": "חפש פרויקטים (השתמש ב-/re/ לחיפוש רגולרי)...",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/hi_IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@
"project.start-button.button.txt": "{starting, select, true {परियोजना शुरू हो रही है} other {परियोजना शुरू करें}}",
"project.start-button.trial.description": "CoCalc पर अभी <A>फ्री ट्रायल प्रोजेक्ट्स</A> के लिए और क्षमता नहीं है। {br} <A2>अपने प्रोजेक्ट को अपग्रेड करें</A2> <A3>लाइसेंस</A3> का उपयोग करके या {A4}।",
"project.start-button.trial.message": "बहुत सारे मुफ्त ट्रायल प्रोजेक्ट्स",
"project.warnings.deleted.banner": "<h4>{icon} चेतावनी: यह प्रोजेक्ट <strong>हटाया गया है!</strong></h4> यदि आप इस प्रोजेक्ट का उपयोग करना चाहते हैं, तो आपको प्रोजेक्ट सेटिंग्स में इसे <strong>अनहटाना</strong> चाहिए।",
"projects.filename-search.placeholder": "संपादित की गई फ़ाइल नाम खोजें...",
"projects.load-all.label": "सभी प्रोजेक्ट दिखाएँ...",
"projects.search.placeholder": "प्रोजेक्ट खोजें (regexp के लिए /re/ का उपयोग करें)...",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/hu_HU.json
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@
"project.start-button.button.txt": "{starting, select, true {Projekt indítása} other {Projekt indítása}}",
"project.start-button.trial.description": "Nincs több kapacitás az <A>Ingyenes Próba projektek</A> számára a CoCalc-on jelenleg. {br} <A2>Frissítse projektjét</A2> <A3>licenc</A3> használatával vagy {A4}.",
"project.start-button.trial.message": "Túl sok ingyenes próba projekt",
"project.warnings.deleted.banner": "<h4>{icon} Figyelem: ez a projekt <strong>törölve van!</strong></h4> Ha használni szeretné ezt a projektet, akkor <strong>vissza kell állítania</strong> a projekt beállításaiban.",
"projects.filename-search.placeholder": "Keressen a szerkesztett fájlnevek között...",
"projects.load-all.label": "Összes projekt megjelenítése...",
"projects.search.placeholder": "Projektek keresése (használja a /re/ a regexphez)...",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/it_IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@
"project.start-button.button.txt": "{starting, select, true {Avvio progetto} other {Avvia progetto}}",
"project.start-button.trial.description": "Non c'è più capacità per i <A>progetti Free Trial</A> su CoCalc in questo momento. {br} <A2>Aggiorna il tuo progetto</A2> utilizzando <A3>una licenza</A3> o {A4}.",
"project.start-button.trial.message": "Troppi Progetti di Prova Gratuita",
"project.warnings.deleted.banner": "<h4>{icon} Attenzione: questo progetto è <strong>eliminato!</strong></h4> Se intendi utilizzare questo progetto, dovresti <strong>ripristinarlo</strong> nelle impostazioni del progetto.",
"projects.filename-search.placeholder": "Cerca i nomi dei file che hai modificato...",
"projects.load-all.label": "Mostra tutti i progetti...",
"projects.search.placeholder": "Cerca progetti (usa /re/ per regexp)...",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/ja_JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@
"project.start-button.button.txt": "{starting, select, true {プロジェクトを開始しています} other {プロジェクトを開始}}",
"project.start-button.trial.description": "現在CoCalcでは<A>無料試用プロジェクト</A>の容量がありません。 {br} <A2>ライセンス</A2>を使用して<A3>プロジェクトをアップグレード</A3>するか{A4}。",
"project.start-button.trial.message": "無料トライアルプロジェクトが多すぎます",
"project.warnings.deleted.banner": "<h4>{icon} 警告: このプロジェクトは<strong>削除されました!</strong></h4> このプロジェクトを使用するつもりなら、プロジェクト設定で<strong>削除を取り消してください</strong>。",
"projects.filename-search.placeholder": "編集したファイル名を検索...",
"projects.load-all.label": "すべてのプロジェクトを表示...",
"projects.search.placeholder": "プロジェクトを検索 (/re/ を正規表現として使用)...",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/ko_KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@
"project.start-button.button.txt": "{starting, select, true {프로젝트 시작 중} other {프로젝트 시작}}",
"project.start-button.trial.description": "현재 CoCalc에는 <A>무료 체험 프로젝트</A>의 추가 용량이 없습니다. {br} <A2>라이선스를</A2> 사용하여 <A3>프로젝트를 업그레이드</A3>하거나 {A4}하십시오.",
"project.start-button.trial.message": "무료 체험 프로젝트가 너무 많음",
"project.warnings.deleted.banner": "<h4>{icon} 경고: 이 프로젝트는 <strong>삭제되었습니다!</strong></h4> 이 프로젝트를 사용하려면 프로젝트 설정에서 <strong>삭제 취소</strong>를 해야 합니다.",
"projects.filename-search.placeholder": "편집한 파일 이름 검색...",
"projects.load-all.label": "모든 프로젝트 보기...",
"projects.search.placeholder": "프로젝트 검색 (/re/ 정규식 사용)...",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/pl_PL.json
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@
"project.start-button.button.txt": "{starting, select, true {Uruchamianie projektu} other {Uruchom projekt}}",
"project.start-button.trial.description": "Nie ma już więcej miejsca na <A>projekty w bezpłatnej wersji próbnej</A> na CoCalc w tej chwili. {br} <A2>Uaktualnij swój projekt</A2> używając <A3>licencji</A3> lub {A4}.",
"project.start-button.trial.message": "Zbyt Wiele Projektów w Darmowej Wersji Próbnej",
"project.warnings.deleted.banner": "<h4>{icon} Ostrzeżenie: ten projekt jest <strong>usunięty!</strong></h4> Jeśli zamierzasz korzystać z tego projektu, powinieneś <strong>przywrócić go</strong> w ustawieniach projektu.",
"projects.filename-search.placeholder": "Szukaj nazw plików, które edytowałeś...",
"projects.load-all.label": "Pokaż wszystkie projekty...",
"projects.search.placeholder": "Wyszukaj projekty (użyj /re/ dla wyrażeń regularnych)...",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/pt_PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@
"project.start-button.button.txt": "{starting, select, true {A iniciar projeto} other {Iniciar projeto}}",
"project.start-button.trial.description": "Não há mais capacidade para <A>projetos de Teste Gratuito</A> no CoCalc neste momento. {br} <A2>Atualize o seu projeto</A2> usando <A3>uma licença</A3> ou {A4}.",
"project.start-button.trial.message": "Demasiados Projetos de Teste Gratuitos",
"project.warnings.deleted.banner": "<h4>{icon} Aviso: este projeto está <strong>eliminado!</strong></h4> Se pretender usar este projeto, deve <strong>restaurá-lo</strong> nas definições do projeto.",
"projects.filename-search.placeholder": "Procurar por nomes de ficheiros que editou...",
"projects.load-all.label": "Mostrar todos os projetos...",
"projects.search.placeholder": "Procurar projetos (use /re/ para regexp)...",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/ru_RU.json
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@
"project.start-button.button.txt": "{starting, select, true {Запуск проекта} other {Запустить проект}}",
"project.start-button.trial.description": "На CoCalc сейчас нет свободных ресурсов для <A>бесплатных пробных проектов</A>. {br} <A2>Обновите свой проект</A2> с помощью <A3>лицензии</A3> или {A4}.",
"project.start-button.trial.message": "Слишком много пробных проектов",
"project.warnings.deleted.banner": "<h4>{icon} Внимание: этот проект <strong>удален!</strong></h4> Если вы собираетесь использовать этот проект, вам следует <strong>восстановить его</strong> в настройках проекта.",
"projects.filename-search.placeholder": "Искать измененные вами файлы...",
"projects.load-all.label": "Показать все проекты...",
"projects.search.placeholder": "Искать проекты (используйте /re/ для regexp)...",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/tr_TR.json
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@
"project.start-button.button.txt": "{starting, select, true {Proje başlatılıyor} other {Projeyi başlat}}",
"project.start-button.trial.description": "Şu anda CoCalc üzerinde <A>Ücretsiz Deneme projeleri</A> için daha fazla kapasite yok. {br} <A2>Projenizi yükseltin</A2> <A3>bir lisans</A3> kullanarak veya {A4}.",
"project.start-button.trial.message": "Çok Fazla Ücretsiz Deneme Projesi",
"project.warnings.deleted.banner": "<h4>{icon} Uyarı: bu proje <strong>silindi!</strong></h4> Bu projeyi kullanmayı düşünüyorsanız, proje ayarlarında <strong>silinmesini geri alın</strong>.",
"projects.filename-search.placeholder": "Düzenlediğiniz dosya adlarını arayın...",
"projects.load-all.label": "Tüm projeleri göster...",
"projects.search.placeholder": "Projeleri ara (/re/ kullanarak düzenli ifade)...",
Expand Down
1 change: 1 addition & 0 deletions src/packages/frontend/i18n/trans/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@
"project.start-button.button.txt": "{starting, select, true {启动项目} other {启动项目}}",
"project.start-button.trial.description": "目前CoCalc上没有更多的<A>免费试用项目</A>容量。{br} 使用<A3>许可证</A3>或{A4} <A2>升级您的项目</A2>。",
"project.start-button.trial.message": "免费试用项目过多",
"project.warnings.deleted.banner": "<h4>{icon} 警告:此项目已<strong>删除!</strong></h4> 如果您打算使用此项目,应该在项目设置中<strong>取消删除</strong>。",
"projects.filename-search.placeholder": "搜索你编辑过的文件名",
"projects.load-all.label": "显示所有项目...",
"projects.search.placeholder": "搜索项目(使用 /re/ 进行正则表达式搜索)…",
Expand Down
22 changes: 13 additions & 9 deletions src/packages/frontend/project/warnings/deleted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,25 @@
* License: MS-RSL – see LICENSE.md for details
*/

import { FormattedMessage } from "react-intl";

import { Alert } from "@cocalc/frontend/antd-bootstrap";
import { Icon } from "@cocalc/frontend/components";

// A warning to put on pages when the project is deleted
export const DeletedProjectWarning: React.FC = () => {
return (
<Alert bsStyle="danger" style={{ margin: "15px auto", maxWidth: "900px" }}>
<h4>
<Icon name="exclamation-triangle" /> Warning: this project is{" "}
<strong>deleted!</strong>
</h4>
<p>
If you intend to use this project, you should{" "}
<strong>undelete it</strong> in project settings.
</p>
<Alert bsStyle="danger" banner style={{ width: "100%" }}>
<FormattedMessage
id="project.warnings.deleted.banner"
defaultMessage={`<h4>{icon} Warning: this project is <strong>deleted!</strong></h4>
If you intend to use this project, you should <strong>undelete it</strong> in project settings.`}
values={{
icon: <Icon name="exclamation-triangle" />,
strong: (c) => <strong>{c}</strong>,
h4: (c) => <h4>{c}</h4>,
}}
/>
</Alert>
);
};

0 comments on commit d1989d8

Please sign in to comment.