Change the title of spoiler button by state

The title will give the precise representation of the current state. It
would be helpful for blind people.
This commit is contained in:
Akihiko Odaki 2018-03-13 15:58:13 +09:00
parent fa5c867e0e
commit 0dccb398bd
39 changed files with 83 additions and 41 deletions

View File

@ -4,12 +4,13 @@ import { changeComposeSpoilerness } from '../../../actions/compose';
import { injectIntl, defineMessages } from 'react-intl';
const messages = defineMessages({
title: { id: 'compose_form.spoiler', defaultMessage: 'Hide text behind warning' },
marked: { id: 'compose_form.spoiler.marked', defaultMessage: 'Text is hidden behind warning' },
unmarked: { id: 'compose_form.spoiler.unmarked', defaultMessage: 'Text is not hidden' },
});
const mapStateToProps = (state, { intl }) => ({
label: 'CW',
title: intl.formatMessage(messages.title),
title: intl.formatMessage(state.getIn(['compose', 'spoiler']) ? messages.marked : messages.unmarked),
active: state.getIn(['compose', 'spoiler']),
ariaControls: 'cw-spoiler-input',
});

View File

@ -61,7 +61,8 @@
"compose_form.publish": "بوّق",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "ضع علامة على الوسيط باعتباره حسّاس",
"compose_form.spoiler": "أخفِ النص واعرض تحذيرا",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "تنبيه عن المحتوى",
"confirmation_modal.cancel": "إلغاء",
"confirmations.block.confirm": "حجب",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Раздумай",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Отбележи съдържанието като деликатно",
"compose_form.spoiler": "Скрий текста зад предупреждение",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Content warning",
"confirmation_modal.cancel": "Cancel",
"confirmations.block.confirm": "Block",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Toot",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Marca el contingut multimèdia com a sensible",
"compose_form.spoiler": "Amaga el text darrera darrere un avís",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Escriu l'avís aquí",
"confirmation_modal.cancel": "Cancel·la",
"confirmations.block.confirm": "Bloca",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Tröt",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Medien als heikel markieren",
"compose_form.spoiler": "Text hinter Warnung verbergen",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Inhaltswarnung",
"confirmation_modal.cancel": "Abbrechen",
"confirmations.block.confirm": "Blockieren",

View File

@ -777,8 +777,12 @@
{
"descriptors": [
{
"defaultMessage": "Hide text behind warning",
"id": "compose_form.spoiler"
"defaultMessage": "Text is hidden behind warning",
"id": "compose_form.spoiler.marked"
},
{
"defaultMessage": "Text is not hidden",
"id": "compose_form.spoiler.unmarked"
}
],
"path": "app/javascript/mastodon/features/compose/containers/spoiler_button_container.json"

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Toot",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Mark media as sensitive",
"compose_form.spoiler": "Hide text behind warning",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Write your warning here",
"confirmation_modal.cancel": "Cancel",
"confirmations.block.confirm": "Block",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Hup",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Marki aŭdovidaĵon tikla",
"compose_form.spoiler": "Kaŝi tekston malantaŭ averto",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Skribu vian averton ĉi tie",
"confirmation_modal.cancel": "Nuligi",
"confirmations.block.confirm": "Bloki",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Tootear",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Marcar contenido como sensible",
"compose_form.spoiler": "Ocultar texto tras una advertencia",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Advertencia de contenido",
"confirmation_modal.cancel": "Cancelar",
"confirmations.block.confirm": "Bloquear",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "بوق",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "تصاویر حساس هستند",
"compose_form.spoiler": "نوشته را پشت هشدار پنهان کنید",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "هشدار محتوا",
"confirmation_modal.cancel": "بی‌خیال",
"confirmations.block.confirm": "مسدود کن",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Toot",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Merkitse media herkäksi",
"compose_form.spoiler": "Piiloita teksti varoituksen taakse",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Content warning",
"confirmation_modal.cancel": "Peruuta",
"confirmations.block.confirm": "Estä",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Pouet",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Marquer le média comme sensible",
"compose_form.spoiler": "Masquer le texte derrière un avertissement",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Écrivez ici votre avertissement",
"confirmation_modal.cancel": "Annuler",
"confirmations.block.confirm": "Bloquer",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Toot",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Marcar medios como sensibles",
"compose_form.spoiler": "Agochar texto detrás de un aviso",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Escriba o aviso aquí",
"confirmation_modal.cancel": "Cancelar",
"confirmations.block.confirm": "Bloquear",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "ללחוש",
"compose_form.publish_loud": "לחצרץ!",
"compose_form.sensitive": "סימון תוכן כרגיש",
"compose_form.spoiler": "הסתרה מאחורי אזהרת תוכן",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "אזהרת תוכן",
"confirmation_modal.cancel": "ביטול",
"confirmations.block.confirm": "לחסום",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Toot",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Označi media sadržaj kao osjetljiv",
"compose_form.spoiler": "Sakrij text iza upozorenja",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Upozorenje o sadržaju",
"confirmation_modal.cancel": "Otkaži",
"confirmations.block.confirm": "Blokiraj",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Tülk",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Tartalom érzékenynek jelölése",
"compose_form.spoiler": "Szöveg figyelmeztetés mögé rejtése",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Figyelmeztetését írja ide",
"confirmation_modal.cancel": "Bezár",
"confirmations.block.confirm": "Letilt",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Թթել",
"compose_form.publish_loud": "Թթե՜լ",
"compose_form.sensitive": "Նշել բովանդակությունը որպես կասկածելի",
"compose_form.spoiler": "Թաքցնել տեքստը նախազգուշացման ետեւում",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Գրիր նախազգուշացումդ այստեղ",
"confirmation_modal.cancel": "Չեղարկել",
"confirmations.block.confirm": "Արգելափակել",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Toot",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Tandai media sensitif",
"compose_form.spoiler": "Sembunyikan teks dibalik peringatan",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Peringatan konten",
"confirmation_modal.cancel": "Batal",
"confirmations.block.confirm": "Blokir",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Siflar",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Markizar kontenajo kom trubliva",
"compose_form.spoiler": "Celar texto dop averto",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Averto di kontenajo",
"confirmation_modal.cancel": "Cancel",
"confirmations.block.confirm": "Block",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Toot",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Segnala file come sensibile",
"compose_form.spoiler": "Nascondi testo con avvertimento",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Content warning",
"confirmation_modal.cancel": "Cancel",
"confirmations.block.confirm": "Block",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "トゥート",
"compose_form.publish_loud": "{publish}",
"compose_form.sensitive": "メディアを閲覧注意としてマークする",
"compose_form.spoiler": "テキストを隠す",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "ここに警告を書いてください",
"confirmation_modal.cancel": "キャンセル",
"confirmations.block.confirm": "ブロック",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "툿",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "이 미디어를 민감한 미디어로 취급",
"compose_form.spoiler": "텍스트 숨기기",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "경고",
"confirmation_modal.cancel": "취소",
"confirmations.block.confirm": "차단",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Toot",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Media als gevoelig markeren (nsfw)",
"compose_form.spoiler": "Tekst achter waarschuwing verbergen",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Waarschuwingstekst",
"confirmation_modal.cancel": "Annuleren",
"confirmations.block.confirm": "Blokkeren",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Tut",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Merk media som følsomt",
"compose_form.spoiler": "Skjul tekst bak advarsel",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Innholdsadvarsel",
"confirmation_modal.cancel": "Avbryt",
"confirmations.block.confirm": "Blokkèr",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Tut",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Marcar lo mèdia coma sensible",
"compose_form.spoiler": "Rescondre lo tèxte darrièr un avertiment",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Escrivètz lavertiment aquí",
"confirmation_modal.cancel": "Anullar",
"confirmations.block.confirm": "Blocar",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Wyślij",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Oznacz treści jako wrażliwe",
"compose_form.spoiler": "Ukryj tekst za ostrzeżeniem",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Wprowadź swoje ostrzeżenie o zawartości",
"confirmation_modal.cancel": "Anuluj",
"confirmations.block.confirm": "Zablokuj",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Publicar",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Marcar mídia como conteúdo sensível",
"compose_form.spoiler": "Esconder texto com aviso de conteúdo",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Aviso de conteúdo",
"confirmation_modal.cancel": "Cancelar",
"confirmations.block.confirm": "Bloquear",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Publicar",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Marcar media como conteúdo sensível",
"compose_form.spoiler": "Esconder texto com aviso",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Aviso de conteúdo",
"confirmation_modal.cancel": "Cancelar",
"confirmations.block.confirm": "Block",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Трубить",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Отметить как чувствительный контент",
"compose_form.spoiler": "Скрыть текст за предупреждением",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Напишите свое предупреждение здесь",
"confirmation_modal.cancel": "Отмена",
"confirmations.block.confirm": "Заблокировать",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Toot",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Označ médiá ako chúlostivé",
"compose_form.spoiler": "Skryť text za varovanie",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Sem napíšte vaše varovanie",
"confirmation_modal.cancel": "Zrušiť",
"confirmations.block.confirm": "Blokovať",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Tutni",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Obeleži multimediju kao osetljivu",
"compose_form.spoiler": "Sakrij tekst ispod upozorenja",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Ovde upišite upozorenje",
"confirmation_modal.cancel": "Poništi",
"confirmations.block.confirm": "Blokiraj",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Тутни",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Обележи мултимедију као осетљиву",
"compose_form.spoiler": "Сакриј текст испод упозорења",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Овде упишите упозорење",
"confirmation_modal.cancel": "Поништи",
"confirmations.block.confirm": "Блокирај",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Toot",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Markera media som känslig",
"compose_form.spoiler": "Dölj text bakom varning",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Skriv din varning här",
"confirmation_modal.cancel": "Ångra",
"confirmations.block.confirm": "Blockera",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Toot",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Mark media as sensitive",
"compose_form.spoiler": "Hide text behind warning",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Content warning",
"confirmation_modal.cancel": "Cancel",
"confirmations.block.confirm": "Block",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Toot",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Görseli hassas olarak işaretle",
"compose_form.spoiler": "Metni uyarı arkasına gizle",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "İçerik uyarısı",
"confirmation_modal.cancel": "İptal",
"confirmations.block.confirm": "Engelle",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "Дмухнути",
"compose_form.publish_loud": "{publish}!",
"compose_form.sensitive": "Відмітити як непристойний зміст",
"compose_form.spoiler": "Приховати текст за попередженням",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "Попередження щодо прихованого тексту",
"confirmation_modal.cancel": "Відмінити",
"confirmations.block.confirm": "Заблокувати",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "嘟嘟",
"compose_form.publish_loud": "{publish}",
"compose_form.sensitive": "将媒体文件标记为敏感内容",
"compose_form.spoiler": "折叠嘟文内容",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "折叠部分的警告消息",
"confirmation_modal.cancel": "取消",
"confirmations.block.confirm": "屏蔽",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "發文",
"compose_form.publish_loud": "{publish}",
"compose_form.sensitive": "將媒體檔案標示為「敏感內容」",
"compose_form.spoiler": "將部份文字藏於警告訊息之後",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "敏感警告訊息",
"confirmation_modal.cancel": "取消",
"confirmations.block.confirm": "封鎖",

View File

@ -61,7 +61,8 @@
"compose_form.publish": "貼掉",
"compose_form.publish_loud": "{publish}",
"compose_form.sensitive": "將此媒體標為敏感",
"compose_form.spoiler": "將訊息隱藏在警告訊息之後",
"compose_form.spoiler.marked": "Text is hidden behind warning",
"compose_form.spoiler.unmarked": "Text is not hidden",
"compose_form.spoiler_placeholder": "內容警告",
"confirmation_modal.cancel": "取消",
"confirmations.block.confirm": "封鎖",