diff --git a/translations/ar.json b/translations/ar.json index 8c29f449b..b9e8d8cd2 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "نسخ ولصق في النص الخاص بك", "shrug": "هز كتفيه", "DM warning": "لا يتم تشفير الرسائل المباشرة من طرف إلى طرف. لا تشارك أي معلومات حساسة للغاية هنا.", - "Transcript": "نص" + "Transcript": "نص", + "Color contrast is too low": "تباين الألوان منخفض جدًا" } diff --git a/translations/ca.json b/translations/ca.json index a9c118186..1991807d4 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "Copia i enganxa al teu text", "shrug": "arronsar les espatlles", "DM warning": "Els missatges directes no estan xifrats d'extrem a extrem. No compartiu cap informació molt sensible aquí.", - "Transcript": "Transcripció" + "Transcript": "Transcripció", + "Color contrast is too low": "El contrast de color és massa baix" } diff --git a/translations/cy.json b/translations/cy.json index b7f96b940..f99c7ed63 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "Copïwch a gludwch i'ch testun", "shrug": "shrug", "DM warning": "Nid yw negeseuon uniongyrchol wedi'u hamgryptio o'r dechrau i'r diwedd. Peidiwch â rhannu unrhyw wybodaeth hynod sensitif yma.", - "Transcript": "Trawsgrifiad" + "Transcript": "Trawsgrifiad", + "Color contrast is too low": "Mae cyferbyniad lliw yn rhy isel" } diff --git a/translations/de.json b/translations/de.json index f57fd9646..e5b728fcd 100644 --- a/translations/de.json +++ b/translations/de.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "Kopieren und in Ihren Text einfügen", "shrug": "zucken", "DM warning": "Direktnachrichten sind nicht Ende-zu-Ende verschlüsselt. Geben Sie hier keine hochsensiblen Informationen weiter.", - "Transcript": "Abschrift" + "Transcript": "Abschrift", + "Color contrast is too low": "Der Farbkontrast ist zu gering" } diff --git a/translations/el.json b/translations/el.json index 2d7d326bf..9cdf972e9 100644 --- a/translations/el.json +++ b/translations/el.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "Αντιγράψτε και επικολλήστε στο κείμενό σας", "shrug": "σήκωμα των ώμων", "DM warning": "Τα άμεσα μηνύματα δεν είναι κρυπτογραφημένα από άκρο σε άκρο. Μην μοιράζεστε καμία εξαιρετικά ευαίσθητη πληροφορία εδώ.", - "Transcript": "Αντίγραφο" + "Transcript": "Αντίγραφο", + "Color contrast is too low": "Η χρωματική αντίθεση είναι πολύ χαμηλή" } diff --git a/translations/en.json b/translations/en.json index 5f220e82c..cce3649f1 100644 --- a/translations/en.json +++ b/translations/en.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "Copy and paste into your text", "shrug": "shrug", "DM warning": "Direct messages are not end-to-end encrypted. Do not share any highly sensitive information here.", - "Transcript": "Transcript" + "Transcript": "Transcript", + "Color contrast is too low": "Color contrast is too low" } diff --git a/translations/es.json b/translations/es.json index 5dcf0de6a..6007430d8 100644 --- a/translations/es.json +++ b/translations/es.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "Copia y pega en tu texto", "shrug": "encogimiento de hombros", "DM warning": "Los mensajes directos no están cifrados de extremo a extremo. No comparta ninguna información altamente confidencial aquí.", - "Transcript": "Transcripción" + "Transcript": "Transcripción", + "Color contrast is too low": "El contraste de color es demasiado bajo" } diff --git a/translations/fr.json b/translations/fr.json index 373cff572..7a471240a 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "Copiez et collez dans votre texte", "shrug": "hausser les épaules", "DM warning": "Les messages directs ne sont pas chiffrés de bout en bout. Ne partagez aucune information hautement sensible ici.", - "Transcript": "Transcription" + "Transcript": "Transcription", + "Color contrast is too low": "Le contraste des couleurs est trop faible" } diff --git a/translations/ga.json b/translations/ga.json index 0094c1a4f..1a32a9b30 100644 --- a/translations/ga.json +++ b/translations/ga.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "Cóipeáil agus greamaigh isteach i do théacs", "shrug": "shrug", "DM warning": "Níl teachtaireachtaí díreacha criptithe ó cheann go ceann. Ná roinn aon fhaisnéis an-íogair anseo.", - "Transcript": "Athscríbhinn" + "Transcript": "Athscríbhinn", + "Color contrast is too low": "Tá codarsnacht dath ró-íseal" } diff --git a/translations/hi.json b/translations/hi.json index 2bb8a63cc..ae9141fd0 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "अपने टेक्स्ट में कॉपी और पेस्ट करें", "shrug": "कंधे उचकाने की क्रिया", "DM warning": "डायरेक्ट मैसेज एंड-टू-एंड एन्क्रिप्टेड नहीं होते हैं। यहां कोई अति संवेदनशील जानकारी साझा न करें।", - "Transcript": "प्रतिलिपि" + "Transcript": "प्रतिलिपि", + "Color contrast is too low": "रंग कंट्रास्ट बहुत कम है" } diff --git a/translations/it.json b/translations/it.json index ff7c18f9d..5dc4845ed 100644 --- a/translations/it.json +++ b/translations/it.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "Copia e incolla nel tuo testo", "shrug": "scrollare le spalle", "DM warning": "I messaggi diretti non sono crittografati end-to-end. Non condividere qui alcuna informazione altamente sensibile.", - "Transcript": "Trascrizione" + "Transcript": "Trascrizione", + "Color contrast is too low": "Il contrasto del colore è troppo basso" } diff --git a/translations/ja.json b/translations/ja.json index 58a6dd600..6bb22327f 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "コピーしてテキストに貼り付けます", "shrug": "肩をすくめる", "DM warning": "ダイレクトメッセージはエンドツーエンドで暗号化されません。 ここでは機密性の高い情報を共有しないでください。", - "Transcript": "トランスクリプト" + "Transcript": "トランスクリプト", + "Color contrast is too low": "色のコントラストが低すぎる" } diff --git a/translations/ko.json b/translations/ko.json index a98f6466c..123c26f42 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "텍스트에 복사하여 붙여넣기", "shrug": "어깨를 으쓱하다", "DM warning": "다이렉트 메시지는 종단 간 암호화되지 않습니다. 여기에 매우 민감한 정보를 공유하지 마십시오.", - "Transcript": "성적 증명서" + "Transcript": "성적 증명서", + "Color contrast is too low": "색상 대비가 너무 낮습니다." } diff --git a/translations/ku.json b/translations/ku.json index 7a20c6695..71ef6f0b1 100644 --- a/translations/ku.json +++ b/translations/ku.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "Di nivîsa xwe de kopî bikin û bixin", "shrug": "şuştin", "DM warning": "Peyamên rasterast bi dawî-bi-dawî ne şîfrekirî ne. Li vir agahdariya pir hesas parve nekin.", - "Transcript": "Transcript" + "Transcript": "Transcript", + "Color contrast is too low": "Berevajî reng pir kêm e" } diff --git a/translations/nl.json b/translations/nl.json index f199ac29b..59f01d702 100644 --- a/translations/nl.json +++ b/translations/nl.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "Kopieer en plak in je tekst", "shrug": "schouderophalend", "DM warning": "Directe berichten zijn niet end-to-end versleuteld. Deel hier geen zeer gevoelige informatie.", - "Transcript": "Vertaling" + "Transcript": "Vertaling", + "Color contrast is too low": "Kleurcontrast is te laag" } diff --git a/translations/oc.json b/translations/oc.json index 14d6bc176..016cdbef9 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -549,5 +549,6 @@ "Copy and paste into your text": "Copy and paste into your text", "shrug": "shrug", "DM warning": "Direct messages are not end-to-end encrypted. Do not share any highly sensitive information here.", - "Transcript": "Transcript" + "Transcript": "Transcript", + "Color contrast is too low": "Color contrast is too low" } diff --git a/translations/pl.json b/translations/pl.json index f0458db43..077dd11a0 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "Skopiuj i wklej do swojego tekstu", "shrug": "wzruszać ramionami", "DM warning": "Wiadomości na czacie nie są szyfrowane metodą end-to-end. Nie udostępniaj tutaj żadnych wysoce wrażliwych informacji.", - "Transcript": "Transkrypcja" + "Transcript": "Transkrypcja", + "Color contrast is too low": "Kontrast kolorów jest zbyt niski" } diff --git a/translations/pt.json b/translations/pt.json index de71f4bd7..eb594d052 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "Copie e cole no seu texto", "shrug": "dar de ombros", "DM warning": "As mensagens diretas não são criptografadas de ponta a ponta. Não compartilhe nenhuma informação altamente sensível aqui.", - "Transcript": "Transcrição" + "Transcript": "Transcrição", + "Color contrast is too low": "O contraste de cores é muito baixo" } diff --git a/translations/ru.json b/translations/ru.json index bbc9dd157..f82cc2c70 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "Скопируйте и вставьте в свой текст", "shrug": "пожимание плечами", "DM warning": "Прямые сообщения не подвергаются сквозному шифрованию. Не делитесь здесь особо конфиденциальной информацией.", - "Transcript": "Стенограмма" + "Transcript": "Стенограмма", + "Color contrast is too low": "Цветовой контраст слишком низкий" } diff --git a/translations/sw.json b/translations/sw.json index faa5b24e0..4f8c99e2c 100644 --- a/translations/sw.json +++ b/translations/sw.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "Nakili na ubandike kwenye maandishi yako", "shrug": "piga mabega", "DM warning": "Ujumbe wa moja kwa moja haujasimbwa kutoka mwisho hadi mwisho. Usishiriki maelezo yoyote nyeti sana hapa.", - "Transcript": "Nakala" + "Transcript": "Nakala", + "Color contrast is too low": "Utofautishaji wa rangi uko chini sana" } diff --git a/translations/tr.json b/translations/tr.json index 80887499f..d1ab905da 100644 --- a/translations/tr.json +++ b/translations/tr.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "Metninize kopyalayıp yapıştırın", "shrug": "omuz silkmek", "DM warning": "Doğrudan mesajlar uçtan uca şifrelenmez. Son derece hassas bilgileri burada paylaşmayın.", - "Transcript": "Transcript" + "Transcript": "Transcript", + "Color contrast is too low": "Renk kontrastı çok düşük" } diff --git a/translations/uk.json b/translations/uk.json index 80b07c3c0..559788e5d 100644 --- a/translations/uk.json +++ b/translations/uk.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "Скопіюйте та вставте у свій текст", "shrug": "знизати плечима", "DM warning": "Прямі повідомлення не наскрізне шифруються. Не публікуйте тут дуже конфіденційну інформацію.", - "Transcript": "Стенограма" + "Transcript": "Стенограма", + "Color contrast is too low": "Колірна контрастність надто низька" } diff --git a/translations/yi.json b/translations/yi.json index 563169306..afe00dbb5 100644 --- a/translations/yi.json +++ b/translations/yi.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "קאָפּי און פּאַפּ אין דיין טעקסט", "shrug": "שעפּן זיך", "DM warning": "דירעקט אַרטיקלען זענען נישט ענקריפּטיד פון סוף צו סוף. דו זאלסט נישט טיילן קיין העכסט שפּירעוודיק אינפֿאָרמאַציע דאָ.", - "Transcript": "טראַנסקריפּט" + "Transcript": "טראַנסקריפּט", + "Color contrast is too low": "קאָליר קאַנטראַסט איז אויך נידעריק" } diff --git a/translations/zh.json b/translations/zh.json index d0c2c6f1e..b5db64510 100644 --- a/translations/zh.json +++ b/translations/zh.json @@ -553,5 +553,6 @@ "Copy and paste into your text": "复制并粘贴到您的文本中", "shrug": "耸耸肩", "DM warning": "直接消息不是端到端加密的。 不要在这里分享任何高度敏感的信息。", - "Transcript": "成绩单" + "Transcript": "成绩单", + "Color contrast is too low": "颜色对比度太低" } diff --git a/webapp_theme_designer.py b/webapp_theme_designer.py index b88752b20..66ad9b3d4 100644 --- a/webapp_theme_designer.py +++ b/webapp_theme_designer.py @@ -223,6 +223,23 @@ def html_theme_designer(css_cache: {}, base_dir: str, 'name="submitThemeDesigner" accesskey="' + submit_key + '">' + \ translate['Submit'] + '\n \n' + background = None + contrast_warning = '' + if theme_json.get('main-bg-color'): + background = theme_json['main-bg-color'] + foreground = None + if theme_json.get('main-fg-color'): + foreground = theme_json['main-fg-color'] + contrast = color_contrast(background, foreground) + if contrast: + if contrast < 4.5: + contrast_warning = '⚠️ ' + theme_form += \ + '

\n' + table_str = ' \n' table_str += ' \n' table_str += ' \n' @@ -238,9 +255,14 @@ def html_theme_designer(css_cache: {}, base_dir: str, if 'font-size' in variable_name: variable_name_str = variable_name.replace('-', ' ') variable_name_str = variable_name_str.title() + variable_name_label = variable_name_str + if contrast_warning: + if variable_name == 'main-bg-color' or \ + variable_name == 'main-fg-color': + variable_name_label = contrast_warning + variable_name_str font_str += \ ' ' + variable_name_label + '' font_str += \ '