translate report and block buttons

This commit is contained in:
Martti Malmi 2023-02-06 21:04:11 +02:00
parent 5a2b75e321
commit 65b6b388de
21 changed files with 125 additions and 41 deletions

View File

@ -1,32 +0,0 @@
import Nostr from '../Nostr';
import BlockButton from './BlockButton';
class FlagButton extends BlockButton {
constructor() {
super();
this.cls = 'block';
this.key = 'flagged';
this.actionDone = 'flagged';
this.action = 'flag (public)';
this.activeClass = 'blocked';
this.hoverAction = 'unflag';
}
onClick(e) {
e.preventDefault();
const newValue = !this.state[this.key];
if (confirm(newValue ? 'Publicly flag this user?' : 'Unflag user?')) {
Nostr.flag(Nostr.toNostrHexAddress(this.props.id), newValue);
}
}
componentDidMount() {
Nostr.getFlaggedUsers((flags) => {
const flagged = flags?.has(Nostr.toNostrHexAddress(this.props.id));
this.setState({ flagged });
});
}
}
export default FlagButton;

View File

@ -0,0 +1,33 @@
import Nostr from '../Nostr';
import BlockButton from './BlockButton';
import { translate as t } from '../translations/Translation';
class ReportButton extends BlockButton {
constructor() {
super();
this.cls = 'block';
this.key = 'reported';
this.activeClass = 'blocked';
this.action = t('report_public');
this.actionDone = t('reported');
this.hoverAction = t('unreport');
}
onClick(e) {
e.preventDefault();
const newValue = !this.state[this.key];
if (confirm(newValue ? 'Publicly report this user?' : 'Unreport user?')) {
Nostr.flag(Nostr.toNostrHexAddress(this.props.id), newValue);
}
}
componentDidMount() {
Nostr.getFlaggedUsers((flags) => {
const reported = flags?.has(Nostr.toNostrHexAddress(this.props.id));
this.setState({ reported });
});
}
}
export default ReportButton;

View File

@ -9,6 +9,8 @@ export default {
"application_security_warning": "предупреждение за сигурност",
"autoplay_webtorrent_videos": "автоматично пускане на видео от торент",
"back": "назад",
"block": "блокиране",
"blocked": "блокирано",
"blocked_users": "блокирани потребители",
"call_ended": "приключен разговор",
"call_rejected": "отказан разговор",
@ -83,6 +85,8 @@ export default {
"replies": "отговори",
"replying_to": "отговори на",
"report (public)": "докладвай (публично)",
"report_public": "докладвай (публично)",
"reported": "докладвано",
"reposted": "споделено отново",
"resend_to_relays": "препрати на релета",
"restore_defaults": "възстанови пъроначални настройки",
@ -110,7 +114,9 @@ export default {
"turn_on_desktop_notifications": "активирай десктоп уведомления",
"type_a_message": "пиши съобщение",
"typing": "писане...",
"unblock": "разблокирай",
"unfollow_btn": "прекрати да следиш",
"unreport": "отмени докладването",
"use_picture": "използвай снимка",
"video_call": "видео обаждане",
"visibility": "видимост",

View File

@ -9,6 +9,8 @@ export default {
"application_security_warning": "Tato aplikace je ve stádiu vývoje. Není vhodné do ní vkládat citlivé informace.",
"autoplay_webtorrent_videos": "Automatické přehrávání videí",
"back": "Zpět",
"block": "Blokovat",
"blocked": "Blokováno",
"blocked_users": "Blokovaní uživatelé",
"call_ended": "Hovor ukončen",
"call_rejected": "Hovor zamítnut",
@ -83,8 +85,10 @@ export default {
"replies": "Odpovědět",
"replying_to": "Odpovědět:",
"report (public)": "Ohlásit (veřejně)",
"report_public": "Ohlásit (veřejně)",
"reported": "Ohlášeno",
"reposted": "přeposláno",
"resend_to_relays": "Poslat znovu relayím",
"resend_to_relays": "Poslat znovu relayům",
"restore_defaults": "Obnovit základní nastavení",
"save_backup_of_privkey_first": "Nejprve ulož zálohu soukromého klíče!",
"save_relays_publicly": "Veřejně uložit nastavení relayí",
@ -93,7 +97,7 @@ export default {
"search": "Hledat",
"search_posts": "Hledat příspěvky",
"send_message": "Poslat zprávu",
"settings": "Vyhledávat",
"settings": "Nastavení",
"show_attachment": "Zobrazit přílohy",
"show_beta_features": "Zobrazit funkce Beta",
"show_files": "Zobrazit soubory",
@ -110,7 +114,9 @@ export default {
"turn_on_desktop_notifications": "Zapnout desktop notifikace",
"type_a_message": "Napsat zprávu",
"typing": "Píše...",
"unblock": "Odblokovat",
"unfollow_btn": "Zrušit sledování",
"unreport": "Zrušit nahlášení",
"use_picture": "Použít obrázek",
"video_call": "Video hovor",
"visibility": "Viditelnost",

View File

@ -9,6 +9,8 @@ export default {
"application_security_warning": "Diese App befindet sich in einem frühen Stadium, benutze sie nicht für sensible Daten.",
"autoplay_webtorrent_videos": "Webtorrent Videos automatisch abspielen",
"back": "Zurück",
"block": "Blockieren",
"blocked": "Blockiert",
"blocked_users": "Geblockte Benutzer",
"call_ended": "Anruf beendet",
"call_rejected": "Anruf abgelehnt",
@ -83,6 +85,8 @@ export default {
"replies": "Antworten",
"replying_to": "Antwort an",
"report (public)": "Melden (Öffentlich)",
"report_public": "Melden (Öffentlich)",
"reported": "Gemeldet",
"reposted": "hat geteilt",
"resend_to_relays": "An Relays weitersenden",
"restore_defaults": "Einstellungen zurückstellen",
@ -110,7 +114,9 @@ export default {
"turn_on_desktop_notifications": "Desktop-Benachrichtigungen aktivieren",
"type_a_message": "Schreibe eine Nachricht",
"typing": "Schreibt...",
"unblock": "Entblocken",
"unfollow_btn": "Entfolgen",
"unreport": "Denunzierung aufheben",
"use_picture": "Bild benutzen",
"video_call": "Video Anruf",
"visibility": "Deine Beiträge, Antworten und Likes werden nur Ihren Followern und deren Netzwerk angezeigt.",

View File

@ -9,6 +9,8 @@ export default {
"application_security_warning": "The application is an unaudited proof-of-concept implementation, so don't use it for security critical purposes.",
"autoplay_webtorrent_videos": "Autoplay webtorrent videos",
"back": "Back",
"block": "Block",
"blocked": "Blocked",
"blocked_users": "Blocked Users",
"call_ended": "Call ended",
"call_rejected": "Call rejected",
@ -80,6 +82,8 @@ export default {
"remove_attachment": "Remove attachment",
"replies": "Replies",
"replying_to": "Replying to",
"report_public": "Report (public)",
"reported": "Reported",
"reposted": "reposted",
"resend_to_relays": "Resend to relays",
"restore_defaults": "Restore defaults",
@ -107,7 +111,9 @@ export default {
"turn_on_desktop_notifications": "Turn on desktop notifications",
"type_a_message": "Type a message",
"typing": "Typing...",
"unblock": "Unblock",
"unfollow_btn": "Unfollow",
"unreport": "Unreport",
"use_picture": "Use picture",
"video_call": "Video call",
"visibility": "Your posts, replies and likes are only shown to your followers and their network.",

View File

@ -8,6 +8,8 @@ export default {
"appearance": "Apariencia",
"autoplay_webtorrent_videos": "Reproducir webtorrent videos automáticamente",
"back": "Volver",
"block": "Bloquear",
"blocked": "Bloqueado",
"blocked_users": "Usuarios bloqueados",
"call_ended": "Llamada finalizada",
"call_rejected": "Llamada rechazada",
@ -80,6 +82,8 @@ export default {
"replies": "Repuestas",
"replying_to": "Responder a",
"report (public)": "Informe (público)",
"report_public": "Informe (público)",
"reported": "Informado",
"reposted": "Reposteado",
"resend_to_relays": "Reenviar a retransmisión",
"restore_defaults": "Restaurar los valores predeterminados",
@ -107,7 +111,9 @@ export default {
"turn_on_desktop_notifications": "Activa las notificaciones de escritorio",
"type_a_message": "Escribe un mensaje",
"typing": "Escribiendo...",
"unblock": "Desbloquear",
"unfollow_btn": "Deja de seguir",
"unreport": "Anular denuncia",
"use_picture": "Usar foto",
"video_call": "Videollamada",
"webrtc_connection_options": "Opciones de conexión de WebRTC",

View File

@ -9,6 +9,8 @@ export default {
"application_security_warning": "Sovellus on tarkastamaton koeversio. Älä käytä sitä turvallisuuskriittisiin tarkoituksiin.",
"autoplay_webtorrent_videos": "Käynnistä webtorrentin videot automaattisesti",
"back": "Takaisin",
"block": "Estä",
"blocked": "Estetty",
"blocked_users": "Estetyt käyttäjät",
"call_ended": "Puhelu päättyi",
"call_rejected": "Puhelu hylätty",
@ -83,6 +85,8 @@ export default {
"replies": "Vastaukset",
"replying_to": "Vastauksena käyttäjälle",
"report (public)": "Ilmianna (julkinen)",
"report_public": "Ilmianna (julkinen)",
"reported": "Ilmoitettu",
"reposted": "jakoi",
"resend_to_relays": "Uudelleenlähetä verkkoon",
"restore_defaults": "Palauta oletusarvot",
@ -109,7 +113,9 @@ export default {
"turn_on_desktop_notifications": "Ota käyttöön työpöytäilmoitukset",
"type_a_message": "Kirjoita viesti",
"typing": "Kirjoittaa...",
"unblock": "Poista esto",
"unfollow_btn": "Älä seuraa",
"unreport": "Peruuta ilmoitus",
"use_picture": "Käytä kuvaa",
"video_call": "Videopuhelu",
"visibility": "Näkyvyys",

View File

@ -6,6 +6,8 @@ export default {
"application_security_warning": "La aplicación es una implementación de prueba de concepto no auditada, así que no la use con fines críticos de seguridad.",
"autoplay_webtorrent_videos": "Lire automatiquement les vidéos webtorrent",
"back": "Retour",
"block": "Bloquer",
"blocked": "Bloqué",
"call_ended": "Appel terminé",
"call_rejected": "Appel rejeté",
"calling": "Appel en cours",
@ -60,6 +62,8 @@ export default {
"turn_on_desktop_notifications": "Activer les notifications de bureau",
"type_a_message": "Entrez un message",
"typing": "En train d'écrire...",
"unblock": "Débloquer",
"unreport": "Annuler la plainte",
"use_picture": "Utiliser votre picture",
"video_call": "Appel vidéo",
"webrtc_connection_options": "Options de connection WebRTC",

View File

@ -7,6 +7,8 @@ export default {
"answer": "תשובה",
"appearance": "מראה",
"back": "אחורה",
"block": "חסום",
"blocked": "חסום",
"call_ended": "תמה השיחה",
"calling": "מתקשר",
"cancel": "בטל",

View File

@ -9,6 +9,8 @@ export default {
"application_security_warning": "Aplikasi ini masih berupa perwujudan konsep yang belum diaudit, jadi jangan gunakan untuk tujuan keamanan yang kritis.",
"autoplay_webtorrent_videos": "Putar otomatis video dari webtorrent",
"back": "Kembali",
"block": "Blokir",
"blocked": "Diblokir",
"blocked_users": "Pengguna yang diblokir",
"call_ended": "Akhiri panggilan",
"call_rejected": "Tolak panggilan",
@ -105,7 +107,9 @@ export default {
"turn_on_desktop_notifications": "Nyalakan notifikasi di desktop",
"type_a_message": "Ketik pesan",
"typing": "Mengetik...",
"unblock": "Buka blokir",
"unfollow_btn": "Berhenti mengikuti",
"unreport": "Batalkan laporan",
"use_picture": "Pakai gambar",
"video_call": "Panggilan video",
"visibility": "Postingan, balasan, dan yang Anda sukai hanya ditampilkan ke pengikut Anda dan jaringan mereka.",
@ -115,4 +119,4 @@ export default {
"write_your_reply": "Tulis balasan Anda",
"you": "Anda",
"your_qr_code": "Kode QR Anda"
};
};

View File

@ -7,6 +7,8 @@ export default {
"answer": "rispondere",
"appearance": "Aspetto",
"back": "Indietro",
"block": "bloccare",
"blocked": "bloccato",
"blocked_users": "users bloccati",
"call_ended": "Chiamata conclusa",
"call_rejected": "Chiamata respinta",
@ -85,6 +87,8 @@ export default {
"turn_on_desktop_notifications": "Attiva le notifiche desktop",
"type_a_message": "Scrivi un messaggio",
"typing": "Sta scrivendo...",
"unblock": "sblocca",
"unreport": "annulla segnalazione",
"use_picture": "Usa foto",
"video_call": "Chiamata video",
"webrtc_connection_options": "Opzioni di connessione WebRTC",

View File

@ -9,6 +9,8 @@ export default {
"application_security_warning": "このアプリケーションは試験的に開発されているものです。セキュリティが必要とされる目的等には利用しないでください。",
"autoplay_webtorrent_videos": "WebTorrentビデオを自動再生",
"back": "戻る",
"block": "ブロック",
"blocked": "ブロック済み",
"blocked_users": "ブロックしたユーザー",
"call_ended": "通話終了",
"call_rejected": "通話拒否",
@ -83,6 +85,8 @@ export default {
"replies": "返信",
"replying_to": "返信先",
"report (public)": "公開報告",
"report_public": "公開報告",
"reported": "報告済み",
"reposted": "さんがリポストしました",
"resend_to_relays": "リレーに再送信",
"restore_defaults": "デフォルト設定に戻す",
@ -110,7 +114,9 @@ export default {
"turn_on_desktop_notifications": "デスクトップ通知をオンにする",
"type_a_message": "メッセージを入力",
"typing": "タイピング中...",
"unblock": "ブロック解除",
"unfollow_btn": "フォロー解除",
"unreport": "通報を取り消す",
"use_picture": "画像を使用",
"video_call": "ビデオ通話",
"visibility": "視認性",

View File

@ -9,6 +9,8 @@ export default {
"application_security_warning": "앺 보안 경고",
"autoplay_webtorrent_videos": "자동으로 웹토렌트 비디오 시작",
"back": "뒤로",
"block": "차단",
"blocked": "차단됨",
"blocked_users": "차단된 사용자",
"call_ended": "통화 종료",
"call_rejected": "응답 거부",
@ -82,6 +84,8 @@ export default {
"replies": "댓글",
"replying_to": "댓글 상대",
"report (public)": "신고하기 (공개)",
"report_public": "신고하기 (공개)",
"reported": "신고됨",
"reposted": "재 포스팅",
"resend_to_relays": "릴에이로 재전송",
"restore_defaults": "기본값으로 복귀",
@ -107,7 +111,9 @@ export default {
"turn_on_desktop_notifications": "데스크탑 통보 시작",
"type_a_message": "메시지 입력",
"typing": "타이핑 중...",
"unblock": "차단 해제",
"unfollow_btn": "팔로우 중지 버튼",
"unreport": "신고 취소",
"use_picture": "사진 사용",
"video_call": "화상채팅",
"webrtc_connection_options": "웹 알티씨 연결 선택사항",

View File

@ -9,6 +9,8 @@ export default {
"application_security_warning": "saugos pranešimas",
"autoplay_webtorrent_videos": "leisti automatiškai webtorrent vaizdo įrašus",
"back": "atgal",
"block": "blokuoti",
"blocked": "užblokuotas",
"blocked_users": "užblokuoti vartotojai",
"call_ended": "skabutis baigtas",
"call_rejected": "skambutis atmestas",
@ -81,6 +83,8 @@ export default {
"replies": "atsakymai",
"replying_to": "atsakoma į",
"report (public)": "pranešti (viešai)",
"report_public": "pranešti (viešai)",
"reported": "pranešta",
"reposted": "pasidalinta",
"resend_to_relays": "persiųsti rėlėms",
"restore_defaults": "atkurti pirminius nustatymus",
@ -107,7 +111,9 @@ export default {
"turn_on_desktop_notifications": "įjungti naršyklės nustatymus",
"type_a_message": "rašyti žinutę",
"typing": "rašoma...",
"unblock": "atrakinti",
"unfollow_btn": "nebesekti",
"unreport": "atšaukti pranešimą",
"use_picture": "naudoti nuotrauką",
"video_call": "video skambutis",
"visibility": "matomumas",

View File

@ -9,6 +9,8 @@ export default {
"application_security_warning": "Alerta de segurança",
"autoplay_webtorrent_videos": "tocar vídeos webtorrent automaticamente",
"back": "Voltar",
"block": "bloquear",
"blocked": "bloqueado",
"blocked_users": "usuários bloqueados",
"call_ended": "Chamada encerrada",
"call_rejected": "Chamada rejeitada",
@ -84,6 +86,7 @@ export default {
"turn_on_desktop_notifications": "Ativar notificações no desktop",
"type_a_message": "Digite uma mensagem",
"typing": "Digitando...",
"unblock": "Desbloquear",
"use_picture": "Usar foto",
"video_call": "Chamada de vídeo",
"webrtc_connection_options": "Opções de conexão WebRTC",

View File

@ -9,6 +9,8 @@ export default {
"application_security_warning": "Это приложение находится на ранней стадии, не используйте его для конфиденциальных данных.",
"autoplay_webtorrent_videos": "Автопроигрывание видеороликов webtorrent",
"back": "Назад",
"block": "Блокировать",
"blocked": "Заблокировано",
"blocked_users": "Заблокированные пользователи",
"call_ended": "Звонок завершен",
"call_rejected": "Звонок отклонен",
@ -83,6 +85,8 @@ export default {
"replies": "Ответы",
"replying_to": "Отвечая на",
"report (public)": "Составить отчет (публичный)",
"report_public": "Составить отчет (публичный)",
"reported": "Сообщено",
"reposted": "Пересылка сообщений",
"resend_to_relays": "Повторная отправка на реле",
"restore_defaults": "Восстановить исходные настройки",
@ -110,7 +114,9 @@ export default {
"turn_on_desktop_notifications": "Включить уведомления на рабочем столе",
"type_a_message": "Напишите сообщение",
"typing": "Печатает...",
"unblock": "Разблокировать",
"unfollow_btn": "больше не следуют",
"unreport": "Отменить жалобу",
"use_picture": "Использовать фото",
"video_call": "Видео-звонок",
"webrtc_connection_options": "Опции подключения через WebRTC",

View File

@ -5,6 +5,8 @@ export default {
"answer": "جواب",
"autoplay_webtorrent_videos": "خود بخود ویڈیو چلایٔیں",
"back": "واپس",
"block": "بلاک",
"blocked": "بلاک کردہ",
"call_ended": "کال ختم",
"call_rejected": "کال کاٹ دی",
"calling": "کال ہو رہی",
@ -57,6 +59,7 @@ export default {
"turn_on_desktop_notifications": "ڈیسک ٹاپ اطلاعات حاصل کریں",
"type_a_message": "پیغام لکھیے",
"typing": "لکھ رہے ہیں...",
"unblock": "بلاک ختم کریں",
"use_picture": "تصویر استعمال کریں",
"video_call": "ویڈیو کال",
"webrtc_connection_options": "WebRTC کے آپشن",

View File

@ -9,6 +9,8 @@ export default {
"application_security_warning": "程序安全警报",
"autoplay_webtorrent_videos": "自动播放 webtorrent 视频",
"back": "后退",
"block": "阻止",
"blocked": "已阻止",
"blocked_users": "已屏蔽用户",
"call_ended": "通话结束",
"call_rejected": "通话被拒绝",
@ -62,7 +64,7 @@ export default {
"no_followers_yet_info": "没有粉丝信息",
"no_notifications_yet": "没有通知",
"none": "无",
"nostr_extension_login": "通过Nostr扩展登录",
"nostr_extension_login": "Nostr扩展登录",
"note_to_self": "个人备忘录",
"now": "刚刚",
"on_call_with": "通话对象:",
@ -83,6 +85,8 @@ export default {
"replies": "回复",
"replying_to": "回复",
"report (public)": "公开举报",
"report_public": "公开举报",
"reported": "已举报",
"reposted": "已转发",
"resend_to_relays": "再次发送给中继",
"restore_defaults": "恢复默认值",
@ -110,7 +114,9 @@ export default {
"turn_on_desktop_notifications": "打开桌面消息提醒",
"type_a_message": "请输入消息",
"typing": "正在输入...",
"unblock": "解除屏蔽",
"unfollow_btn": "取消关注",
"unreport": "撤销举报",
"use_picture": "选取照片",
"video_call": "视频通话",
"visibility": "你的帖子、回复和点赞只显示给你的粉丝和他们的社交网络",

View File

@ -11,7 +11,7 @@ import BlockButton from '../components/BlockButton';
import CopyButton from '../components/CopyButton';
import Dropdown from '../components/Dropdown';
import FeedMessageForm from '../components/FeedMessageForm';
import FlagButton from '../components/FlagButton';
import ReportButton from '../components/ReportButton';
import FollowButton from '../components/FollowButton';
import Identicon from '../components/Identicon';
import MessageFeed from '../components/MessageFeed';
@ -150,7 +150,7 @@ class Profile extends View {
? ''
: html`
<${BlockButton} id=${this.props.id} />
<${FlagButton} id=${this.props.id} />
<${ReportButton} id=${this.props.id} />
`}
<//>
</div>

View File

@ -12,9 +12,6 @@ export default class WebRTCSettings extends Component {
<>
<div class="centered-container">
<h3>{t('webrtc_connection_options')}</h3>
<p>
<small>{t('webrtc_info')}</small>
</p>
<p>
<textarea
rows="4"