Skip to content

Commit

Permalink
Add warning if repo and/or category has not been filled out
Browse files Browse the repository at this point in the history
  • Loading branch information
laymonage committed Dec 4, 2022
1 parent 5fed4a2 commit 58b8c34
Show file tree
Hide file tree
Showing 21 changed files with 29 additions and 0 deletions.
8 changes: 8 additions & 0 deletions components/Configuration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,14 @@ export default function Configuration({ directConfig, onDirectConfigChange }: IC
<p>
<Trans i18nKey="config:addTheFollowingScriptTag" />
</p>
{!config.repositoryId || (!config.category && config.mapping !== 'number') ? (
<div className="flash flash-warn mb-4">
<Trans
i18nKey="config:youHaveNotConfiguredRepositoryCategory"
components={{ arepo: <a href="#repository" />, acategory: <a href="#category" /> }}
/>
</div>
) : null}
<div dir="ltr" className="highlight highlight-text-html-basic relative">
<pre>
<span className="pl-kos">{'<'}</span>
Expand Down
1 change: 1 addition & 0 deletions locales/ar/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

"enableGiscus": "تفعيل غيسكوس",
"addTheFollowingScriptTag": "أضف <code><script></code> الوسم التالي إلى قالب موقعك في المكان الذي تريد أن تظهر فيه التعليقات. إذا كان هناك عنصر ذو صنف <code>giscus</code> ستظهر التعليقات بداخله.",
"youHaveNotConfiguredRepositoryCategory": "لم تقم بتكوين <arepo>المستودع</arepo> و / أو <acategory>الفئة</acategory> الخاصة بك. لن يتم عرض قيم هذه الحقول حتى تقوم بملئها.",
"copy": "نسخ",

"[enterRepoHere]": "[ضع رابط المستودع هنا]",
Expand Down
1 change: 1 addition & 0 deletions locales/de/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@

"enableGiscus": "giscus aktivieren",
"addTheFollowingScriptTag": "Füge den folgenden <code><script></code> tag zu der Vorlage deiner Webseite hinzu, in welcher du die Kommentare anzeigen möchtest. Wenn ein Element mit dem Namen <code><giscus></code> existiert werden die Kommentare an dieser Stelle platziert.",
"youHaveNotConfiguredRepositoryCategory": "Sie haben Ihr <arepo>Repository</arepo> und/oder Ihre <acategory>Kategorie</acategory> nicht konfiguriert. Die Werte für diese Felder werden erst angezeigt, wenn Sie sie ausgefüllt haben.",
"copy": "Kopieren",

"[enterRepoHere]": "[GIB REPO NAMEN HIER EIN]",
Expand Down
1 change: 1 addition & 0 deletions locales/en/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

"enableGiscus": "Enable giscus",
"addTheFollowingScriptTag": "Add the following <code><script></code> tag to your website's template where you want the comments to appear. If an element with the class <code>giscus</code> exists, the comments will be placed there instead.",
"youHaveNotConfiguredRepositoryCategory": "You have not configured your <arepo>repository</arepo> and/or <acategory>category</acategory>. The values for those fields will not show up until you fill them out.",
"copy": "Copy",

"[enterRepoHere]": "[ENTER REPO HERE]",
Expand Down
1 change: 1 addition & 0 deletions locales/es/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

"enableGiscus": "Habilitar giscus",
"addTheFollowingScriptTag": "Agregue la siguiente etiqueta <code> <script> </code> a la plantilla de su sitio web donde desea que aparezcan los comentarios. Si existe un elemento con la clase <code> giscus </code>, los comentarios se mostrarán allí.",
"youHaveNotConfiguredRepositoryCategory": "No has configurado tu <arepo>repositorio</arepo> y/o <acategory>categoría</acategory>. Los valores de esos campos no se mostrarán hasta que los complete.",
"copy": "Copiar",

"[enterRepoHere]": "[URL REPOSITORIO]",
Expand Down
1 change: 1 addition & 0 deletions locales/fr/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

"enableGiscus": "Activer giscus",
"addTheFollowingScriptTag": "Ajouter le code suivant (tag HTML <code><script></code>) dans le gabarit de vos pages web à l'endroit où vous souhaitez afficher les commentaires. Si un élément HTML possède la classe CSS <code>giscus</code> existe, les commentaires seront à cet endroit.",
"youHaveNotConfiguredRepositoryCategory": "Vous n'avez pas configuré votre <arepo>référentiel</arepo> et/ou <acategory>catégorie</acategory>. Les valeurs de ces champs ne seront pas affichées tant que vous ne les aurez pas remplis.",
"copy": "Copier",

"[enterRepoHere]": "[ENTER REPO HERE]",
Expand Down
1 change: 1 addition & 0 deletions locales/id/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

"enableGiscus": "Aktifkan giscus",
"addTheFollowingScriptTag": "Tambahkan tag <code><script></code> berikut ke template halaman web Anda di mana Anda ingin komentarnya muncul. Apabila sudah terdapat elemen dengan kelas <code>giscus</code>, maka komentarnya akan diletakkan di sana.",
"youHaveNotConfiguredRepositoryCategory": "Anda belum mengonfigurasi <arepo>repositori</arepo> dan/atau <acategory>kategori</acategory> Anda. Nilai untuk kolom tersebut tidak akan ditampilkan sampai Anda mengisinya.",
"copy": "Salin",

"[enterRepoHere]": "[MASUKKAN REPOSITORI DI SINI]",
Expand Down
1 change: 1 addition & 0 deletions locales/it/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

"enableGiscus": "Abilita giscus",
"addTheFollowingScriptTag": "Aggiungi il seguente tag <code><script></code> al template del tuo sito web in cui desideri che vengano visualizzati i commenti. Se esiste un elemento con la classe <code>giscus</code>, i commenti verranno invece inseriti lì.",
"youHaveNotConfiguredRepositoryCategory": "Non hai configurato il tuo <arepo>repository</arepo> e/o la tua <acategory>categoria</acategory>. I valori per quei campi non verranno mostrati finché non li compili.",
"copy": "Copia",

"[enterRepoHere]": "[INSERISCI REPO]",
Expand Down
1 change: 1 addition & 0 deletions locales/ja/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

"enableGiscus": "giscusを有効にする",
"addTheFollowingScriptTag": "下記の <code><script></code> コードタグをお使いのWebサイトのコメントを表示したい場所に追加してください。もし、<code>giscus</code>クラスを持つ要素が存在する場合、giscusは当該要素にコメントを表示します。",
"youHaveNotConfiguredRepositoryCategory": "<arepo>リポジトリ</arepo>や<acategory>カテゴリ</acategory>を構成していません。 これらのフィールドの値は、入力するまで表示されません。",
"copy": "コピー",

"[enterRepoHere]": "[リポジトリを記述]",
Expand Down
1 change: 1 addition & 0 deletions locales/ko/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

"enableGiscus": "giscus 사용",
"addTheFollowingScriptTag": "댓글을 표시할 웹 사이트 템플릿에 다음 <code><script></code> 태그를 추가합니다. <code>giscus</code> 클래스가 있는 요소가 있으면 댓글이 대신 나타납니다.",
"youHaveNotConfiguredRepositoryCategory": "<arepo>저장소</arepo> 및/또는 <acategory>카테고리</acategory> 구성하지 않았습니다. 해당 필드의 값은 채울 때까지 표시되지 않습니다.",
"copy": "복사하기",

"[enterRepoHere]": "[ENTER REPO HERE]",
Expand Down
1 change: 1 addition & 0 deletions locales/nl/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

"enableGiscus": "Giscus inschakelen",
"addTheFollowingScriptTag": "Add the following <code><script></code> tag to your website's template where you want the comments to appear. If an element with the class <code>giscus</code> exists, the comments will be placed there instead.",
"youHaveNotConfiguredRepositoryCategory": "U heeft uw <arepo>repository</arepo> en/of <acategory>categorie</acategory> niet geconfigureerd. De waarden voor die velden worden pas weergegeven als u ze invult.",
"copy": "Kopieer",

"[enterRepoHere]": "[VUL REPO HIER IN]",
Expand Down
1 change: 1 addition & 0 deletions locales/pl/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

"enableGiscus": "Enable giscus",
"addTheFollowingScriptTag": "Add the following <code><script></code> tag to your website's template where you want the comments to appear. If an element with the class <code>giscus</code> exists, the comments will be placed there instead.",
"youHaveNotConfiguredRepositoryCategory": "Nie skonfigurowałeś swojego <arepo>repozytorium</arepo> i/lub <acategory>kategorii</acategory>. Wartości w tych polach nie będą widoczne, dopóki ich nie wypełnisz.",
"copy": "Copy",

"[enterRepoHere]": "[ENTER REPO HERE]",
Expand Down
1 change: 1 addition & 0 deletions locales/pt/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

"enableGiscus": "Habilitar giscus",
"addTheFollowingScriptTag": "Adicione a seguinte tag <code><script></code> ao modelo do seu site onde você deseja que os comentários apareçam. Se existir um elemento com a classe <code>giscus</code>, os comentários serão colocados lá.",
"youHaveNotConfiguredRepositoryCategory": "Você não configurou seu <arepo>repositório</arepo> e/ou <acategory>categoria</acategory>. Os valores desses campos não serão mostrados até que você os preencha.",
"copy": "Copy",

"[enterRepoHere]": "[INSIRA O REPOSITÓRIO AQUI]",
Expand Down
1 change: 1 addition & 0 deletions locales/ro/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

"enableGiscus": "Enable giscus",
"addTheFollowingScriptTag": "Add the following <code><script></code> tag to your website's template where you want the comments to appear. If an element with the class <code>giscus</code> exists, the comments will be placed there instead.",
"youHaveNotConfiguredRepositoryCategory": "Nu v-ați configurat <arepo>depozitul</arepo> și/sau <acategory>categoria</acategory>. Valorile pentru acele câmpuri nu vor fi afișate până când nu le completați.",
"copy": "Copy",

"[enterRepoHere]": "[ENTER REPO HERE]",
Expand Down
1 change: 1 addition & 0 deletions locales/ru/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

"enableGiscus": "Включить giscus",
"addTheFollowingScriptTag": "Добавьте тэг <code><script></code> в шаблон вашего сайта, где бы вы хотели видеть комментарии. Если существует элемент с классом <code>giscus</code>, то комментарии будут размещены вместо него.",
"youHaveNotConfiguredRepositoryCategory": "Вы не настроили свой <arepo>репозиторий</arepo> и/или <acategory>категорию</acategory>. Значения этих полей не будут отображаться, пока вы их не заполните.",
"copy": "Скопировать",

"[enterRepoHere]": "[ВВЕДИТЕ REPO]",
Expand Down
1 change: 1 addition & 0 deletions locales/th/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

"enableGiscus": "เปิดใช้งาน giscus",
"addTheFollowingScriptTag": "ใส่โค้ด <code><script></code> ด้านล่างนี้ลงในเทมเพลตเว็บไซต์ของคุณในส่วนที่คุณต้องการให้ความคิดเห็นปรากฏอยู่ หากมี element ที่มี class <code>giscus</code> อยู่, ความคิดเห็นจะปรากฏตรง element นั้นแทน",
"youHaveNotConfiguredRepositoryCategory": "คุณยังไม่ได้กำหนดค่าพื้นที่<arepo>เก็บ</arepo>ข้อมูลและ/หรือ<acategory>หมวดหมู่</acategory>ของคุณ ค่าสำหรับฟิลด์เหล่านั้นจะไม่แสดงจนกว่าคุณจะกรอกข้อมูล",
"copy": "คัดลอก",

"[enterRepoHere]": "[ใส่คลังเก็บที่น่ี]",
Expand Down
1 change: 1 addition & 0 deletions locales/tr/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

"enableGiscus": "Giscus'ı etkinleştir",
"addTheFollowingScriptTag": "Yorumların sitenizde görünmesini istediğiniz yerine <code><script></code> scriptini ekleyin. Eğer <code>giscus</code> classına sahip bir element bulunursa, yorumlar burada gözükür.",
"youHaveNotConfiguredRepositoryCategory": "<arepo>Deponuzu</arepo> ve/veya <acategory>kategorinizi</acategory> yapılandırmadınız. Bu alanların değerleri, siz onları doldurana kadar gösterilmeyecektir.",
"copy": "Kopyala",

"[enterRepoHere]": "[DEPO İSMİ GİRİN]",
Expand Down
1 change: 1 addition & 0 deletions locales/vi/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@

"enableGiscus": "Bật giscus",
"addTheFollowingScriptTag": "Thêm thẻ <code><script></code> sau vào website của bạn nơi bạn muốn comment xuất hiện. Nếu một phần tử có class <code>giscus</code> tồn tại, các comment sẽ được đặt ở đó.",
"youHaveNotConfiguredRepositoryCategory": "Bạn chưa định cấu hình <arepo>Repository</arepo> và/hoặc <acategory>thể loại</acategory> của mình. Các giá trị cho các trường đó sẽ không được hiển thị cho đến khi bạn điền vào.",
"copy": "Copy",

"[enterRepoHere]": "[NHẬP REPO TẠI ĐÂY]",
Expand Down
1 change: 1 addition & 0 deletions locales/zh-CN/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@

"enableGiscus": "启用 giscus",
"addTheFollowingScriptTag": "在你想让评论出现的位置添加以下 <code><script></code> 标签。但如果已经存在带有 <code>giscus</code> 类的元素,则评论会被放在那里。",
"youHaveNotConfiguredRepositoryCategory": "您尚未配置<arepo>仓库</arepo>和/或<acategory>分类</acategory>。 在您填写这些字段之前,不会显示这些字段的值。",
"copy": "复制",

"[enterRepoHere]": "[在此输入仓库]",
Expand Down
1 change: 1 addition & 0 deletions locales/zh-TW/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@

"enableGiscus": "啟用 giscus",
"addTheFollowingScriptTag": "在你想放置留言區的位置加上下列的 <code><script></code> 標籤。但如果已經存在使用 <code>giscus</code> class 的元素,留言區會出現在那邊。",
"youHaveNotConfiguredRepositoryCategory": "您尚未配置<arepo>儲存庫</arepo>和/或<acategory>分類</acategory>。 在您填寫這些字段之前,不會顯示這些字段的值。",
"copy": "複製",

"[enterRepoHere]": "[在此輸入儲存庫名稱]",
Expand Down
2 changes: 2 additions & 0 deletions styles/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
*/

* {
@apply scroll-mt-24;

border-color: var(--color-border-default, var(--color-border-primary));
}

Expand Down

0 comments on commit 58b8c34

Please sign in to comment.