diff --git a/commet/assets/l10n/intl_en.arb b/commet/assets/l10n/intl_en.arb index a5388551a..18bf351ac 100644 --- a/commet/assets/l10n/intl_en.arb +++ b/commet/assets/l10n/intl_en.arb @@ -262,13 +262,13 @@ "type": "text", "placeholders": {} }, - "placeholderRoomAddress": "#awesome-room:matrix.org", + "placeholderRoomAddress": "#awesome-room:example.com", "@placeholderRoomAddress": { "description": "Placeholder / Example for a room address", "type": "text", "placeholders": {} }, - "placeholderSpaceAddress": "#awesome-space:matrix.org", + "placeholderSpaceAddress": "#awesome-space:example.com", "@placeholderSpaceAddress": { "description": "Placeholder / Example for a space address", "type": "text", diff --git a/commet/assets/l10n/intl_es.arb b/commet/assets/l10n/intl_es.arb index cb77a01e0..b99834368 100644 --- a/commet/assets/l10n/intl_es.arb +++ b/commet/assets/l10n/intl_es.arb @@ -17,7 +17,7 @@ "type": "text", "placeholders": {} }, - "placeholderSpaceAddress": "#awesome-space:matrix.org", + "placeholderSpaceAddress": "#awesome-space:example.com", "@placeholderSpaceAddress": { "description": "Placeholder / Example for a space address", "type": "text", @@ -506,7 +506,7 @@ "type": "text", "placeholders": {} }, - "placeholderRoomAddress": "#awesome-room:matrix.org", + "placeholderRoomAddress": "#awesome-room:example.com", "@placeholderRoomAddress": { "description": "Placeholder / Example for a room address", "type": "text", diff --git a/commet/assets/l10n/intl_et.arb b/commet/assets/l10n/intl_et.arb index e5a7fccb8..34ce0f1ef 100644 --- a/commet/assets/l10n/intl_et.arb +++ b/commet/assets/l10n/intl_et.arb @@ -62,7 +62,7 @@ "type": "text", "placeholders": {} }, - "labelEmojiPickerGifTab": "GIF", + "labelEmojiPickerGifTab": "Gif", "@labelEmojiPickerGifTab": { "description": "Label for the gif search tab in the emoji picker", "type": "text", @@ -972,7 +972,7 @@ "type": "text", "placeholders": {} }, - "labelThemeAmoled": "AMOLED", + "labelThemeAmoled": "Amoled", "@labelThemeAmoled": { "description": "Label for the light theme", "type": "text", @@ -990,7 +990,7 @@ "type": "text", "placeholders": {} }, - "labelGifSearchToggle": "GIF-piltide otsing", + "labelGifSearchToggle": "Gif-piltide otsing", "@labelGifSearchToggle": { "description": "Label for the toggle for enabling and disabling gif search", "type": "text", @@ -1202,7 +1202,7 @@ "type": "text", "placeholders": {} }, - "labelGifSearchDescription": "GIF-piltide otsinguks kasuta teenust Tenor. Otsingupäringud suuname läbi {proxyUrl} proksiserveri", + "labelGifSearchDescription": "Gif-piltide otsinguks kasuta teenust Tenor. Otsingupäringud suuname läbi {proxyUrl} proksiserveri", "@labelGifSearchDescription": { "description": "Explains that gifs will be fetched via proxy", "type": "text", @@ -1543,5 +1543,113 @@ "description": "Prompt to import a set of emoticons from an existing pack", "type": "text", "placeholders": {} + }, + "noPinnedMessages": "Ühtegi sõnumit pole esiletõstetud!", + "@noPinnedMessages": { + "description": "Placeholder label in the pinned messages menu that is shown when there are no pinned messages", + "type": "text", + "placeholders": {} + }, + "labelMessageEffectsTitle": "Sõnumiefektid", + "@labelMessageEffectsTitle": { + "description": "Header for the settings tile for message effects, such as confetti", + "type": "text", + "placeholders": {} + }, + "labelMessageEffectsDescription": "Sõnumitele võid saatmisel lisada erinevaid efekte, nagu serpentiinid", + "@labelMessageEffectsDescription": { + "description": "Label describing what message effects are", + "type": "text", + "placeholders": {} + }, + "promptPinMessage": "Tõsta sõnum esile", + "@promptPinMessage": { + "description": "Label for the menu option to pin a message", + "type": "text", + "placeholders": {} + }, + "promptUnpinMessage": "Lõpeta sõnumi esiletõstmine", + "@promptUnpinMessage": { + "description": "Label for the menu option to unpin a message", + "type": "text", + "placeholders": {} + }, + "promptReplyInThread": "Vasta jutulõngas", + "@promptReplyInThread": { + "description": "Label for the menu option to reply to a message inside a thread", + "type": "text", + "placeholders": {} + }, + "promptShowSource": "Näita lähtekoodi", + "@promptShowSource": { + "description": "Label for the menu option to view the JSON source of an event", + "type": "text", + "placeholders": {} + }, + "promptReplayMessageEffect": "Korda efekti uuesti", + "@promptReplayMessageEffect": { + "description": "If a message was sent with an effect, this prompts to replay the effect", + "type": "text", + "placeholders": {} + }, + "messagePlaceholderUserUpdatedNameDetailed": "{user} muutis oma uueks kuvatavaks nimeks '{newName}'", + "@messagePlaceholderUserUpdatedNameDetailed": { + "description": "Message body for when a user updates their display name", + "type": "text", + "placeholders": { + "user": {}, + "newName": {} + } + }, + "messageUserRetractedInvite": "{sender} võttis kasutaja „{user}“ kutse tagasi", + "@messageUserRetractedInvite": { + "description": "Message body for when a user's invitation to a room was withdrawn", + "type": "text", + "placeholders": { + "sender": {}, + "user": {} + } + }, + "messageUserAcceptedInvite": "{user} nõustus kutsega", + "@messageUserAcceptedInvite": { + "description": "Message body for when a user accepted an invitation to a room", + "type": "text", + "placeholders": { + "user": {} + } + }, + "messageUserBanned": "{sender} seadis suhtluskeelu kasutajale „{user}“", + "@messageUserBanned": { + "description": "Message body for when a user bans another user from the room", + "type": "text", + "placeholders": { + "sender": {}, + "user": {} + } + }, + "messageUserPinnedEvent": "{user} tõstis sõnumi esile!", + "@messageUserPinnedEvent": { + "description": "Message body for when a user adds an event to the room's pinned messages", + "type": "text", + "placeholders": { + "user": {} + } + }, + "messageUserUnpinnedEvent": "{user} eemaldas esiletõstetud sõnumi", + "@messageUserUnpinnedEvent": { + "description": "Message body for when a user removes an event from the room's pinned messages", + "type": "text", + "placeholders": { + "user": {} + } + }, + "messageUserUnbanned": "{sender} eemaldas kasutaja „{user}“ suhtluskeelu", + "@messageUserUnbanned": { + "description": "Message body for when a user reverts a ban of another user", + "type": "text", + "placeholders": { + "sender": {}, + "user": {} + } } } diff --git a/commet/assets/l10n/intl_eu.arb b/commet/assets/l10n/intl_eu.arb index 68f8d6a51..bb2749bc7 100644 --- a/commet/assets/l10n/intl_eu.arb +++ b/commet/assets/l10n/intl_eu.arb @@ -184,7 +184,7 @@ "type": "text", "placeholders": {} }, - "labelRestoreMatrixBackupTitle": "Leheneratu babeskopia erabiliz", + "labelRestoreMatrixBackupTitle": "Leheneratu babeskopia", "@labelRestoreMatrixBackupTitle": { "description": "Title of the popup dialog for restoring message backup", "type": "text", @@ -396,7 +396,7 @@ "type": "text", "placeholders": {} }, - "unifiedPushExplainer": "# Unified Push\nCommeten bertsio honek ez du Google Play Services erabiltzen. Push jakinarazpenak jasotzeko, [Unified Push](https://unifiedpush.org/) erabili beharko duzu.\n\nUnified Push-ekin bateragarria den banaketa aplikazio bat instalatuta baduzu, ondoren konfigura dezakezu\n", + "unifiedPushExplainer": "# Unified Push\nCommeten bertsio honek ez du Google Play Services erabiltzen. Push jakinarazpenak jasotzeko, [Unified Push](https://unifiedpush.org/) erabili beharko duzu.\n\nUnified Push-ekin bateragarria den banaketa aplikazio bat instalatuta baduzu, hemen konfigura dezakezu\n", "@unifiedPushExplainer": { "description": "Explains the need for unified push. Supports markdown", "type": "text", @@ -1537,5 +1537,113 @@ "placeholders": { "proxyUrl": {} } + }, + "noPinnedMessages": "Ez da mezurik finkatu!", + "@noPinnedMessages": { + "description": "Placeholder label in the pinned messages menu that is shown when there are no pinned messages", + "type": "text", + "placeholders": {} + }, + "messagePlaceholderUserUpdatedNameDetailed": "{user}(e)k pantaila-izena '{newName}'(e)ra aldatu du", + "@messagePlaceholderUserUpdatedNameDetailed": { + "description": "Message body for when a user updates their display name", + "type": "text", + "placeholders": { + "user": {}, + "newName": {} + } + }, + "messageUserRetractedInvite": "{sender}(e)k {user}(r)i egindako gonbidapena atzera bota du", + "@messageUserRetractedInvite": { + "description": "Message body for when a user's invitation to a room was withdrawn", + "type": "text", + "placeholders": { + "sender": {}, + "user": {} + } + }, + "messageUserAcceptedInvite": "{user}(e)k gonbidapena onartu du", + "@messageUserAcceptedInvite": { + "description": "Message body for when a user accepted an invitation to a room", + "type": "text", + "placeholders": { + "user": {} + } + }, + "messageUserBanned": "{sender}(e)k debekua ezarri dio {user}(r)i", + "@messageUserBanned": { + "description": "Message body for when a user bans another user from the room", + "type": "text", + "placeholders": { + "sender": {}, + "user": {} + } + }, + "messageUserUnbanned": "{sender}(e)k debekua kendu dio {user}(r)i", + "@messageUserUnbanned": { + "description": "Message body for when a user reverts a ban of another user", + "type": "text", + "placeholders": { + "sender": {}, + "user": {} + } + }, + "messageUserPinnedEvent": "{user}()ek mezu bat finkatu du!", + "@messageUserPinnedEvent": { + "description": "Message body for when a user adds an event to the room's pinned messages", + "type": "text", + "placeholders": { + "user": {} + } + }, + "messageUserUnpinnedEvent": "{user}(e)k mezu bat finkatzeari utzi dio", + "@messageUserUnpinnedEvent": { + "description": "Message body for when a user removes an event from the room's pinned messages", + "type": "text", + "placeholders": { + "user": {} + } + }, + "labelMessageEffectsTitle": "Mezu-efektuak", + "@labelMessageEffectsTitle": { + "description": "Header for the settings tile for message effects, such as confetti", + "type": "text", + "placeholders": {} + }, + "labelMessageEffectsDescription": "Mezuak efektu gehigarriekin bidal daitezke, konfetiekin esaterako", + "@labelMessageEffectsDescription": { + "description": "Label describing what message effects are", + "type": "text", + "placeholders": {} + }, + "promptPinMessage": "Finkatu mezua", + "@promptPinMessage": { + "description": "Label for the menu option to pin a message", + "type": "text", + "placeholders": {} + }, + "promptUnpinMessage": "Utzi mezua finkatzeari", + "@promptUnpinMessage": { + "description": "Label for the menu option to unpin a message", + "type": "text", + "placeholders": {} + }, + "promptReplyInThread": "Erantzun harian", + "@promptReplyInThread": { + "description": "Label for the menu option to reply to a message inside a thread", + "type": "text", + "placeholders": {} + }, + "promptShowSource": "Erakutsi iturburua", + "@promptShowSource": { + "description": "Label for the menu option to view the JSON source of an event", + "type": "text", + "placeholders": {} + }, + "promptReplayMessageEffect": "Erreproduzitu berriz efektua", + "@promptReplayMessageEffect": { + "description": "If a message was sent with an effect, this prompts to replay the effect", + "type": "text", + "placeholders": {} } } diff --git a/commet/assets/l10n/intl_ja.arb b/commet/assets/l10n/intl_ja.arb index a1b32d680..afbe4108b 100644 --- a/commet/assets/l10n/intl_ja.arb +++ b/commet/assets/l10n/intl_ja.arb @@ -1274,7 +1274,7 @@ "type": "text", "placeholders": {} }, - "placeholderRoomAddress": "#awesome-room:matrix.org", + "placeholderRoomAddress": "#awesome-room:example.com", "@placeholderRoomAddress": { "description": "Placeholder / Example for a room address", "type": "text", @@ -1292,7 +1292,7 @@ "type": "text", "placeholders": {} }, - "placeholderSpaceAddress": "#awesome-space:matrix.org", + "placeholderSpaceAddress": "#awesome-space:example.com", "@placeholderSpaceAddress": { "description": "Placeholder / Example for a space address", "type": "text", diff --git a/commet/assets/l10n/intl_ko.arb b/commet/assets/l10n/intl_ko.arb index 60a59a153..d789fda65 100644 --- a/commet/assets/l10n/intl_ko.arb +++ b/commet/assets/l10n/intl_ko.arb @@ -1168,13 +1168,13 @@ "type": "text", "placeholders": {} }, - "placeholderRoomAddress": "#awesome-room:matrix.org", + "placeholderRoomAddress": "#awesome-room:example.com", "@placeholderRoomAddress": { "description": "Placeholder / Example for a room address", "type": "text", "placeholders": {} }, - "placeholderSpaceAddress": "#awesome-space:matrix.org", + "placeholderSpaceAddress": "#awesome-space:example.com", "@placeholderSpaceAddress": { "description": "Placeholder / Example for a space address", "type": "text", diff --git a/commet/assets/l10n/intl_pt_BR.arb b/commet/assets/l10n/intl_pt_BR.arb index 9ed8aca48..9d0ab669b 100644 --- a/commet/assets/l10n/intl_pt_BR.arb +++ b/commet/assets/l10n/intl_pt_BR.arb @@ -417,7 +417,7 @@ "type": "text", "placeholders": {} }, - "labelEmojiPickerStickerTab": "Sticker", + "labelEmojiPickerStickerTab": "Figurinha", "@labelEmojiPickerStickerTab": { "description": "Label for the sticker tab in the emoji picker", "type": "text", @@ -619,7 +619,7 @@ "type": "text", "placeholders": {} }, - "promptStickerName": "Nome do sticker", + "promptStickerName": "Nome da figurinha", "@promptStickerName": { "description": "Prompt for the input of a sticker", "type": "text", @@ -910,7 +910,7 @@ "type": "text", "placeholders": {} }, - "labelRestoreMatrixBackupTitle": "Restaurar de cópia de segurança", + "labelRestoreMatrixBackupTitle": "Restaurar cópia de segurança", "@labelRestoreMatrixBackupTitle": { "description": "Title of the popup dialog for restoring message backup", "type": "text", @@ -1543,5 +1543,113 @@ "description": "Placeholder text for the passphrase text box", "type": "text", "placeholders": {} + }, + "noPinnedMessages": "Nenhuma mensagem foi fixa!", + "@noPinnedMessages": { + "description": "Placeholder label in the pinned messages menu that is shown when there are no pinned messages", + "type": "text", + "placeholders": {} + }, + "labelMessageEffectsTitle": "Efeitos de Mensagem", + "@labelMessageEffectsTitle": { + "description": "Header for the settings tile for message effects, such as confetti", + "type": "text", + "placeholders": {} + }, + "labelMessageEffectsDescription": "Mensagens podem ser enviadas com efeitos adicionais, como confete", + "@labelMessageEffectsDescription": { + "description": "Label describing what message effects are", + "type": "text", + "placeholders": {} + }, + "promptPinMessage": "Fixar Mensagem", + "@promptPinMessage": { + "description": "Label for the menu option to pin a message", + "type": "text", + "placeholders": {} + }, + "promptUnpinMessage": "Desafixar Mensagem", + "@promptUnpinMessage": { + "description": "Label for the menu option to unpin a message", + "type": "text", + "placeholders": {} + }, + "promptReplyInThread": "Responder No Tópico", + "@promptReplyInThread": { + "description": "Label for the menu option to reply to a message inside a thread", + "type": "text", + "placeholders": {} + }, + "promptReplayMessageEffect": "Reproduzir Efeito", + "@promptReplayMessageEffect": { + "description": "If a message was sent with an effect, this prompts to replay the effect", + "type": "text", + "placeholders": {} + }, + "promptShowSource": "Mostrar Fonte", + "@promptShowSource": { + "description": "Label for the menu option to view the JSON source of an event", + "type": "text", + "placeholders": {} + }, + "messagePlaceholderUserUpdatedNameDetailed": "{user} mudou seu nome para '{newName}'", + "@messagePlaceholderUserUpdatedNameDetailed": { + "description": "Message body for when a user updates their display name", + "type": "text", + "placeholders": { + "user": {}, + "newName": {} + } + }, + "messageUserRetractedInvite": "{sender} desconvidou {user}", + "@messageUserRetractedInvite": { + "description": "Message body for when a user's invitation to a room was withdrawn", + "type": "text", + "placeholders": { + "sender": {}, + "user": {} + } + }, + "messageUserUnbanned": "{sender} desbaniu {user}", + "@messageUserUnbanned": { + "description": "Message body for when a user reverts a ban of another user", + "type": "text", + "placeholders": { + "sender": {}, + "user": {} + } + }, + "messageUserPinnedEvent": "{user} fixou uma mensagem!", + "@messageUserPinnedEvent": { + "description": "Message body for when a user adds an event to the room's pinned messages", + "type": "text", + "placeholders": { + "user": {} + } + }, + "messageUserUnpinnedEvent": "{user} desafixou uma mensagem", + "@messageUserUnpinnedEvent": { + "description": "Message body for when a user removes an event from the room's pinned messages", + "type": "text", + "placeholders": { + "user": {} + } + }, + "messageUserBanned": "{sender} baniu {user}", + "@messageUserBanned": { + "description": "Message body for when a user bans another user from the room", + "type": "text", + "placeholders": { + "sender": {}, + "user": {} + } + }, + "messageUserAcceptedInvite": "{user} aceitou o convite", + "@messageUserAcceptedInvite": { + "description": "Message body for when a user accepted an invitation to a room", + "type": "text", + "placeholders": { + "user": {} + } } } diff --git a/commet/assets/l10n/intl_uk.arb b/commet/assets/l10n/intl_uk.arb index 65b4707a1..4052ecd15 100644 --- a/commet/assets/l10n/intl_uk.arb +++ b/commet/assets/l10n/intl_uk.arb @@ -271,13 +271,13 @@ "type": "text", "placeholders": {} }, - "labelSettingsMinimizeOnCloseToggle": "Мінімізація при закритті", + "labelSettingsMinimizeOnCloseToggle": "Згортати при закритті", "@labelSettingsMinimizeOnCloseToggle": { "description": "Label for the toggle to turn on and off minimize on close", "type": "text", "placeholders": {} }, - "labelSettingsMinimizeOnCloseExplanation": "При закритті вікна додаток буде згорнуто, а не закрито", + "labelSettingsMinimizeOnCloseExplanation": "При закритті вікна застосунок буде згорнуто, а не закрито", "@labelSettingsMinimizeOnCloseExplanation": { "description": "Explains what the 'minimize on close' setting does", "type": "text", @@ -423,7 +423,7 @@ "type": "text", "placeholders": {} }, - "placeholderSpaceAddress": "#awesome-space:matrix.org", + "placeholderSpaceAddress": "#awesome-space:example.com", "@placeholderSpaceAddress": { "description": "Placeholder / Example for a space address", "type": "text", @@ -473,7 +473,7 @@ "username": {} } }, - "messageSasEmojiVerificationPrompt": "Переконайтеся, що емодзі такі ж самі й в тому ж порядку, що й на іншому пристрої", + "messageSasEmojiVerificationPrompt": "Переконайтеся, що емоджі такі ж самі й в тому ж порядку, що й на іншому пристрої", "@messageSasEmojiVerificationPrompt": { "description": "Explains what to look for when verifying using emoji. Needs to portray that the emoji MUST be the same AND in the same order", "type": "text", @@ -736,7 +736,7 @@ "type": "text", "placeholders": {} }, - "promptEmojiName": "Назва емодзі", + "promptEmojiName": "Назва емоджі", "@promptEmojiName": { "description": "Prompt for the input of the name of an emoji", "type": "text", @@ -870,7 +870,7 @@ "type": "text", "placeholders": {} }, - "placeholderRoomAddress": "#awesome-room:matrix.org", + "placeholderRoomAddress": "#awesome-room:example.com", "@placeholderRoomAddress": { "description": "Placeholder / Example for a room address", "type": "text", @@ -930,7 +930,7 @@ "type": "text", "placeholders": {} }, - "fileDragDropPrompt": "Перетягніть файл, щоб завантажити його.", + "fileDragDropPrompt": "Перетягніть файл, щоб вивантажити...", "@fileDragDropPrompt": { "description": "Text that is shown when a user is dragging a file", "type": "text", @@ -984,7 +984,7 @@ "type": "text", "placeholders": {} }, - "labelEmojiPickerEmojiTab": "Emoji", + "labelEmojiPickerEmojiTab": "Емоджі", "@labelEmojiPickerEmojiTab": { "description": "Label for the emoji tab in emoji picker", "type": "text", @@ -1025,7 +1025,7 @@ "type": "text", "placeholders": {} }, - "labelChatPageFileTooLarge": "Цей файл завеликий!", + "labelChatPageFileTooLarge": "Цей файл завеликий для вивантаження!", "@labelChatPageFileTooLarge": { "description": "Text that is shown when the user attempts to upload a file that is greater than the allowed size", "type": "text", @@ -1049,7 +1049,7 @@ "type": "text", "placeholders": {} }, - "labelHomeAlerts": "Сповіщення", + "labelHomeAlerts": "Оповіщення", "@labelHomeAlerts": { "description": "Short label for header of alerts", "type": "text", @@ -1288,5 +1288,368 @@ "description": "Label for button in settings to log out of an account", "type": "text", "placeholders": {} + }, + "labelMatrixPermissionsRoleAdmin": "Адміністратор", + "@labelMatrixPermissionsRoleAdmin": { + "description": "Label for the room administrator role", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsRoleModerator": "Модератор", + "@labelMatrixPermissionsRoleModerator": { + "description": "Label for the room moderator role", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsRoleMember": "Учасник кімнати", + "@labelMatrixPermissionsRoleMember": { + "description": "Label for the room member role", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsSpaceManageChildrenDescription": "Дозволяє користувачеві керувати тим, які кімнати є частиною цього простору", + "@labelMatrixPermissionsSpaceManageChildrenDescription": { + "description": "Describes the permission to manage child rooms", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsSpaceManageChildrenTitle": "Керування дочірніми кімнатами", + "@labelMatrixPermissionsSpaceManageChildrenTitle": { + "description": "Title for permission to manage children", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsRoomSendMessagesTitle": "Надсилати повідомлення", + "@labelMatrixPermissionsRoomSendMessagesTitle": { + "description": "Title for the permission to send messages", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsRoomSendMessagesDescription": "Дозволяє користувачеві надсилати повідомлення в цій кімнаті", + "@labelMatrixPermissionsRoomSendMessagesDescription": { + "description": "Describes the permission to send messages", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsRoomHistoryVisibilityTitle": "Видимість історії", + "@labelMatrixPermissionsRoomHistoryVisibilityTitle": { + "description": "Title for the permission to add change room history settings", + "type": "text", + "placeholders": {} + }, + "labelInvitationBodyWithSender": "{user} запросив вас до кімнати", + "@labelInvitationBodyWithSender": { + "description": "Message body for when an invitation was received, and we have a name for the sender", + "type": "text", + "placeholders": { + "user": {} + } + }, + "labelInvitationsForUser": "Запрошення для {user}", + "@labelInvitationsForUser": { + "description": "Label for the list of incoming invitations, specifying which user these invitations are intended for", + "type": "text", + "placeholders": { + "user": {} + } + }, + "labelInvitations": "Запрошення", + "@labelInvitations": { + "description": "Label for the list of incoming invitations", + "type": "text", + "placeholders": {} + }, + "labelSpacePermissionSettings": "Дозволи", + "@labelSpacePermissionSettings": { + "description": "Label for space permission settings", + "type": "text", + "placeholders": {} + }, + "promptImportPack": "Імпортувати пакет", + "@promptImportPack": { + "description": "Prompt to import a set of emoticons from an existing pack", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsRoomDeleteMessagesDescription": "Дозволяє користувачеві видаляти повідомлення, надіслані іншими", + "@labelMatrixPermissionsRoomDeleteMessagesDescription": { + "description": "Describes the permission to delete messages", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsRoomAddReactionsTitle": "Додати реакції", + "@labelMatrixPermissionsRoomAddReactionsTitle": { + "description": "Title for the permission to add an emoji reaction to a message", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsRoomAddReactionsDescription": "Додати реакції до повідомлення", + "@labelMatrixPermissionsRoomAddReactionsDescription": { + "description": "describes the permission to add an emoji reaction to a message", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsChangeRoomTopicTitle": "Змінити тематику кімнати", + "@labelMatrixPermissionsChangeRoomTopicTitle": { + "description": "Title for the permission to add change the rooms topic", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsKickUserTitle": "Вигнати користувачів", + "@labelMatrixPermissionsKickUserTitle": { + "description": "Title for the permission to kick other users out of the room", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsBanUserTitle": "Забанити користувачів", + "@labelMatrixPermissionsBanUserTitle": { + "description": "Title for the permission to ban other users from the room", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsBanUserDescription": "Заборонити іншим користувачам доступ до кімнати", + "@labelMatrixPermissionsBanUserDescription": { + "description": "Description for the permission to ban other users from the room", + "type": "text", + "placeholders": {} + }, + "promptDownload": "Завантажити", + "@promptDownload": { + "description": "Generic prompt to download something", + "type": "text", + "placeholders": {} + }, + "labelEncryptedPreviewDescription": "Увімкнути використання проксі-сервера ({proxyUrl}) для отримання передперегляду адрес у зашифрованому чаті. Вміст цих запитів буде приховано від вашого домашнього сервера за допомогою функції Commet «передперегляд зашифрованих адрес»\nДізнатися більше: https://github.com/commetchat/encrypted_url_preview", + "@labelEncryptedPreviewDescription": { + "description": "Explains briefly how encrypted url preview works", + "type": "text", + "placeholders": { + "proxyUrl": {} + } + }, + "labelMessageEffectsTitle": "Ефекти повідомлень", + "@labelMessageEffectsTitle": { + "description": "Header for the settings tile for message effects, such as confetti", + "type": "text", + "placeholders": {} + }, + "labelMessageEffectsDescription": "Повідомлення можна надсилати з додатковими ефектами, наприклад, конфетті", + "@labelMessageEffectsDescription": { + "description": "Label describing what message effects are", + "type": "text", + "placeholders": {} + }, + "labelSettingsStickerCompatibilityExplanation": "У деяких клієнтах Matrix надсилання наклейки як «m.sticker» призведе до її некоректного завантаження. Якщо увімкнути цей параметр, наклейки надсилатимуться як «m.image», що забезпечить їхнє коректне відображення", + "@labelSettingsStickerCompatibilityExplanation": { + "description": "Explains what sticker compatibility mode does", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsChangeRoomTopicDescription": "Дозволяє користувачеві змінити тематику цієї кімнати", + "@labelMatrixPermissionsChangeRoomTopicDescription": { + "description": "Description for the permission to add change the rooms topic", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsChangeRoomPermissionsDescription": "Дозволяє користувачеві змінювати налаштування дозволів", + "@labelMatrixPermissionsChangeRoomPermissionsDescription": { + "description": "Description for the permission to change permissions of the room", + "type": "text", + "placeholders": {} + }, + "promptShowSource": "Показати джерело", + "@promptShowSource": { + "description": "Label for the menu option to view the JSON source of an event", + "type": "text", + "placeholders": {} + }, + "messageUserUnbanned": "{sender} розбанив {user}", + "@messageUserUnbanned": { + "description": "Message body for when a user reverts a ban of another user", + "type": "text", + "placeholders": { + "sender": {}, + "user": {} + } + }, + "noPinnedMessages": "Немає прикріплених повідомлень!", + "@noPinnedMessages": { + "description": "Placeholder label in the pinned messages menu that is shown when there are no pinned messages", + "type": "text", + "placeholders": {} + }, + "labelSpaceSubspacesList": "Простори", + "@labelSpaceSubspacesList": { + "description": "Header label for the list of child spaces in a space", + "type": "text", + "placeholders": {} + }, + "promptAttachmentProcessingSendOriginal": "Надіслати оригінал", + "@promptAttachmentProcessingSendOriginal": { + "description": "Prompt text for the option to send a file in its original state, without any further processing such as removing metadata", + "type": "text", + "placeholders": {} + }, + "labelImageContainsLocationInfo": "Попередження: це зображення містить метадані про розташування", + "@labelImageContainsLocationInfo": { + "description": "Prompt text for the option to send a file in its original state, without any further processing such as removing metadata", + "type": "text", + "placeholders": {} + }, + "labelStickerCompatibility": "Сумісність наліпок", + "@labelStickerCompatibility": { + "description": "Header for the settings to enable sticker compatibility mode", + "type": "text", + "placeholders": {} + }, + "labelEncryptedPreview": "Передперегляд URL-адрес у зашифрованих чатах (експериментально)", + "@labelEncryptedPreview": { + "description": "Label for the toggle for enabling and disabling encrypted url preview", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsRoomDeleteMessagesTitle": "Видалити повідомлення", + "@labelMatrixPermissionsRoomDeleteMessagesTitle": { + "description": "Title for permission to delete messages", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsRoomHistoryVisibilityDescription": "Дозволяє користувачеві змінювати видимість історії чату в цій кімнаті", + "@labelMatrixPermissionsRoomHistoryVisibilityDescription": { + "description": "describes the permission to change room history settings", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsRoomAvatarTitle": "Встановити зображення кімнати", + "@labelMatrixPermissionsRoomAvatarTitle": { + "description": "Title for the permission to add change the rooms avatar image", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsRoomAvatarDescription": "Змінити зображення кімнати", + "@labelMatrixPermissionsRoomAvatarDescription": { + "description": "Title for the permission to add change the rooms avatar image", + "type": "text", + "placeholders": {} + }, + "labelThemeAmoled": "Чорна тема", + "@labelThemeAmoled": { + "description": "Label for the light theme", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsChangeRoomNameTitle": "Змінити назву кімнати", + "@labelMatrixPermissionsChangeRoomNameTitle": { + "description": "Title for the permission to add change the rooms name", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsChangeRoomNameDescription": "Дозволяє користувачеві змінити назву цієї кімнати", + "@labelMatrixPermissionsChangeRoomNameDescription": { + "description": "Description for the permission to add change the rooms name", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsChangeRoomPermissionsTitle": "Змінити дозволи", + "@labelMatrixPermissionsChangeRoomPermissionsTitle": { + "description": "Title for the permission to change permissions of the room", + "type": "text", + "placeholders": {} + }, + "labelMatrixPermissionsKickUserDescription": "Вигнати інших користувачів з кімнати", + "@labelMatrixPermissionsKickUserDescription": { + "description": "Description for the permission to kick other users out of the room", + "type": "text", + "placeholders": {} + }, + "labelRoomSettingsPermissions": "Дозволи", + "@labelRoomSettingsPermissions": { + "description": "Label for room permission settings", + "type": "text", + "placeholders": {} + }, + "promptPinMessage": "Закріпити повідомлення", + "@promptPinMessage": { + "description": "Label for the menu option to pin a message", + "type": "text", + "placeholders": {} + }, + "promptUnpinMessage": "Відкріпити повідомлення", + "@promptUnpinMessage": { + "description": "Label for the menu option to unpin a message", + "type": "text", + "placeholders": {} + }, + "promptReplyInThread": "Відповісти в темі", + "@promptReplyInThread": { + "description": "Label for the menu option to reply to a message inside a thread", + "type": "text", + "placeholders": {} + }, + "promptReplayMessageEffect": "Повторення ефекта", + "@promptReplayMessageEffect": { + "description": "If a message was sent with an effect, this prompts to replay the effect", + "type": "text", + "placeholders": {} + }, + "messageUserEmote": "*{user} {emote}", + "@messageUserEmote": { + "description": "Message to display when a user does a custom emote (/me)", + "type": "text", + "placeholders": { + "user": {}, + "emote": {} + } + }, + "messagePlaceholderUserUpdatedNameDetailed": "{user} змінив своє ім'я на '{newName}'", + "@messagePlaceholderUserUpdatedNameDetailed": { + "description": "Message body for when a user updates their display name", + "type": "text", + "placeholders": { + "user": {}, + "newName": {} + } + }, + "messageUserRetractedInvite": "{sender} скасував запрошення {user}", + "@messageUserRetractedInvite": { + "description": "Message body for when a user's invitation to a room was withdrawn", + "type": "text", + "placeholders": { + "sender": {}, + "user": {} + } + }, + "messageUserAcceptedInvite": "{user} прийняв запрошення", + "@messageUserAcceptedInvite": { + "description": "Message body for when a user accepted an invitation to a room", + "type": "text", + "placeholders": { + "user": {} + } + }, + "messageUserBanned": "{sender} забанив {user}", + "@messageUserBanned": { + "description": "Message body for when a user bans another user from the room", + "type": "text", + "placeholders": { + "sender": {}, + "user": {} + } + }, + "messageUserPinnedEvent": "{user} закріпив повідомлення!", + "@messageUserPinnedEvent": { + "description": "Message body for when a user adds an event to the room's pinned messages", + "type": "text", + "placeholders": { + "user": {} + } + }, + "messageUserUnpinnedEvent": "{user} відкріпив повідомлення", + "@messageUserUnpinnedEvent": { + "description": "Message body for when a user removes an event from the room's pinned messages", + "type": "text", + "placeholders": { + "user": {} + } } } diff --git a/commet/assets/l10n/intl_zh.arb b/commet/assets/l10n/intl_zh.arb index 9a9a22b5c..74aa0e885 100644 --- a/commet/assets/l10n/intl_zh.arb +++ b/commet/assets/l10n/intl_zh.arb @@ -1314,7 +1314,7 @@ "type": "text", "placeholders": {} }, - "placeholderRoomAddress": "#awesome-room:matrix.org", + "placeholderRoomAddress": "#awesome-room:example.com", "@placeholderRoomAddress": { "description": "Placeholder / Example for a room address", "type": "text", @@ -1326,7 +1326,7 @@ "type": "text", "placeholders": {} }, - "placeholderSpaceAddress": "#awesome-space:matrix.org", + "placeholderSpaceAddress": "#awesome-space:example.com", "@placeholderSpaceAddress": { "description": "Placeholder / Example for a space address", "type": "text", diff --git a/commet/lib/client/matrix/matrix_room.dart b/commet/lib/client/matrix/matrix_room.dart index 452a4facf..8260fc8c4 100644 --- a/commet/lib/client/matrix/matrix_room.dart +++ b/commet/lib/client/matrix/matrix_room.dart @@ -643,4 +643,16 @@ class MatrixRoom extends Room { _onUpdate.add(null); } } + + @override + Future cancelSend(TimelineEvent event) async { + final mxEvent = event as MatrixTimelineEvent; + await mxEvent.event.cancelSend(); + } + + @override + Future retrySend(TimelineEvent event) async { + final mxEvent = event as MatrixTimelineEvent; + await mxEvent.event.sendAgain(); + } } diff --git a/commet/lib/client/matrix/matrix_timeline.dart b/commet/lib/client/matrix/matrix_timeline.dart index bcb48c751..e0b621156 100644 --- a/commet/lib/client/matrix/matrix_timeline.dart +++ b/commet/lib/client/matrix/matrix_timeline.dart @@ -82,8 +82,8 @@ class MatrixTimeline extends Timeline { } void onEventRemoved(index) { - events.removeAt(index); onRemove.add(index); + events.removeAt(index); } @override diff --git a/commet/lib/client/room.dart b/commet/lib/client/room.dart index f6d805929..d2494caeb 100644 --- a/commet/lib/client/room.dart +++ b/commet/lib/client/room.dart @@ -75,6 +75,10 @@ abstract class Room { List processedAttachments, }); + Future cancelSend(TimelineEvent event); + + Future retrySend(TimelineEvent event); + /// Add an emoticon reaction to a message Future addReaction( TimelineEvent reactingTo, Emoticon reaction); diff --git a/commet/lib/client/timeline.dart b/commet/lib/client/timeline.dart index 857ff90c4..3c56c26a5 100644 --- a/commet/lib/client/timeline.dart +++ b/commet/lib/client/timeline.dart @@ -62,9 +62,10 @@ enum EventRelationshipType { reply } abstract class Timeline { late List events = List.empty(growable: true); final Map _eventsDict = {}; - late StreamController onEventAdded = StreamController.broadcast(); - late StreamController onChange = StreamController.broadcast(); - late StreamController onRemove = StreamController.broadcast(); + late StreamController onEventAdded = + StreamController.broadcast(sync: true); + late StreamController onChange = StreamController.broadcast(sync: true); + late StreamController onRemove = StreamController.broadcast(sync: true); late Client client; late Room room; diff --git a/commet/lib/ui/atoms/dismiss_keyboard.dart b/commet/lib/ui/atoms/dismiss_keyboard.dart new file mode 100644 index 000000000..131b94825 --- /dev/null +++ b/commet/lib/ui/atoms/dismiss_keyboard.dart @@ -0,0 +1,20 @@ +import 'package:flutter/material.dart'; + +class DismissKeyboard extends StatelessWidget { + final Widget child; + const DismissKeyboard({Key? key, required this.child}) : super(key: key); + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () { + FocusScopeNode currentFocus = FocusScope.of(context); + if (!currentFocus.hasPrimaryFocus && + currentFocus.focusedChild != null) { + FocusManager.instance.primaryFocus?.unfocus(); + } + }, + child: child, + ); + } +} diff --git a/commet/lib/ui/atoms/keyboard_adaptor.dart b/commet/lib/ui/atoms/keyboard_adaptor.dart index a47ac9f16..1c9169827 100644 --- a/commet/lib/ui/atoms/keyboard_adaptor.dart +++ b/commet/lib/ui/atoms/keyboard_adaptor.dart @@ -1,5 +1,6 @@ import 'dart:math'; +import 'package:commet/ui/atoms/dismiss_keyboard.dart'; import 'package:commet/ui/atoms/scaled_safe_area.dart'; import 'package:commet/utils/scaled_app.dart'; import 'package:flutter/material.dart'; @@ -14,9 +15,10 @@ class KeyboardAdaptor extends StatelessWidget { var scaledQuery = MediaQuery.of(context).scale(); var offset = max(scaledQuery.viewInsets.bottom, scaledQuery.padding.bottom); - return ScaledSafeArea( - bottom: false, - child: Padding( - padding: EdgeInsets.fromLTRB(0, 0, 0, offset), child: child)); + return DismissKeyboard( + child: ScaledSafeArea( + bottom: false, + child: Padding( + padding: EdgeInsets.fromLTRB(0, 0, 0, offset), child: child))); } } diff --git a/commet/lib/ui/molecules/message_input.dart b/commet/lib/ui/molecules/message_input.dart index 42922978b..28775caa3 100644 --- a/commet/lib/ui/molecules/message_input.dart +++ b/commet/lib/ui/molecules/message_input.dart @@ -315,6 +315,15 @@ class MessageInputState extends State { } if (HardwareKeyboard.instance.isShiftPressed) { + String text = controller.text; + TextSelection textSelection = controller.selection; + String newText = + text.replaceRange(textSelection.start, textSelection.end, "\n"); + controller.text = newText; + controller.selection = textSelection.copyWith( + baseOffset: textSelection.start + 1, + extentOffset: textSelection.start + 1, + ); return KeyEventResult.ignored; } diff --git a/commet/lib/ui/molecules/room_timeline_widget/room_timeline_widget_view.dart b/commet/lib/ui/molecules/room_timeline_widget/room_timeline_widget_view.dart index 68683c441..5016b3028 100644 --- a/commet/lib/ui/molecules/room_timeline_widget/room_timeline_widget_view.dart +++ b/commet/lib/ui/molecules/room_timeline_widget/room_timeline_widget_view.dart @@ -186,7 +186,10 @@ class RoomTimelineWidgetViewState extends State { historyItemsCount = timeline.events.length - recentItemsCount; } var removed = eventKeys.removeAt(index); + assert(timeline.events[index].eventId == removed.$2); + + setState(() {}); } void onAfterFirstFrame(_) { diff --git a/commet/lib/ui/molecules/timeline_events/timeline_event_menu.dart b/commet/lib/ui/molecules/timeline_events/timeline_event_menu.dart index 66803b5f7..6903e44c0 100644 --- a/commet/lib/ui/molecules/timeline_events/timeline_event_menu.dart +++ b/commet/lib/ui/molecules/timeline_events/timeline_event_menu.dart @@ -54,6 +54,16 @@ class TimelineEventMenu { "If a message was sent with an effect, this prompts to replay the effect", name: "promptReplayMessageEffect"); + String get promptCancelEventSend => Intl.message("Cancel", + desc: + "When a message failed to send, this prompts to cancel sending the event", + name: "promptCancelEventSend"); + + String get promptRetryEventSend => Intl.message("Retry", + desc: + "When a message failed to send, this prompts to retry sending the event", + name: "promptRetryEventSend"); + TimelineEventMenu({ required this.timeline, required this.event, @@ -62,46 +72,81 @@ class TimelineEventMenu { this.onActionFinished, this.isThreadTimeline = false, }) { - bool canEditEvent = event is TimelineEventMessage && - timeline.room.permissions.canUserEditMessages && - event.senderId == timeline.room.client.self!.identifier && - setEditingEvent != null; - - bool canDeleteEvent = timeline.canDeleteEvent(event); + bool canEditEvent = false; + bool canSaveAttachment = false; + bool canAddReaction = false; + bool canReplyInThread = false; + bool canCopy = false; + bool canEditPinState = false; + bool canPin = false; + bool canUnpin = false; + bool hasEffect = false; + bool canReply = false; + bool canDeleteEvent = false; - bool canReply = event is TimelineEventMessage || - event is TimelineEventSticker || - event is TimelineEventEmote; + bool canRetrySend = event.status == TimelineEventStatus.error; + bool canCancelSend = event.status == TimelineEventStatus.error; - bool canSaveAttachment = false; - if (event is TimelineEventMessage) { - canSaveAttachment = - (event as TimelineEventMessage).attachments?.isNotEmpty == true; - } + var effects = timeline.room.client.getComponent(); var emoticons = timeline.room.getComponent(); - bool canAddReaction = - (event is TimelineEventMessage || event is TimelineEventSticker) && - emoticons != null; + var pins = timeline.room.getComponent(); - bool canReplyInThread = !isThreadTimeline && event is TimelineEventMessage; + if (event.status == TimelineEventStatus.synced) { + canEditEvent = event is TimelineEventMessage && + timeline.room.permissions.canUserEditMessages && + event.senderId == timeline.room.client.self!.identifier && + setEditingEvent != null; - bool canCopy = event is TimelineEventMessage; + canDeleteEvent = timeline.canDeleteEvent(event) && + event.status == TimelineEventStatus.synced; - var pins = timeline.room.getComponent(); + canReply = event is TimelineEventMessage || + event is TimelineEventSticker || + event is TimelineEventEmote; - bool canEditPinState = pins?.canPinMessages == true && - (event is TimelineEventMessage || - event is TimelineEventSticker || - event is TimelineEventEmote); - bool isPinned = pins?.isMessagePinned(event.eventId) == true; - bool canPin = canEditPinState && !isPinned; - bool canUnpin = canEditPinState && isPinned; + if (event is TimelineEventMessage) { + canSaveAttachment = + (event as TimelineEventMessage).attachments?.isNotEmpty == true; + } - var effects = timeline.room.client.getComponent(); + canAddReaction = + (event is TimelineEventMessage || event is TimelineEventSticker) && + emoticons != null; + + canReplyInThread = !isThreadTimeline && event is TimelineEventMessage; - bool hasEffect = effects?.hasEffect(event) == true; + canCopy = event is TimelineEventMessage; + + canEditPinState = pins?.canPinMessages == true && + (event is TimelineEventMessage || + event is TimelineEventSticker || + event is TimelineEventEmote); + + bool isPinned = pins?.isMessagePinned(event.eventId) == true; + + canPin = canEditPinState && !isPinned; + canUnpin = canEditPinState && isPinned; + + hasEffect = effects?.hasEffect(event) == true; + } primaryActions = [ + if (canRetrySend) + TimelineEventMenuEntry( + name: promptRetryEventSend, + icon: Icons.refresh, + action: (BuildContext context) { + timeline.room.retrySend(event); + onActionFinished?.call(); + }), + if (canCancelSend) + TimelineEventMenuEntry( + name: promptCancelEventSend, + icon: Icons.cancel, + action: (BuildContext context) { + timeline.room.cancelSend(event); + onActionFinished?.call(); + }), if (hasEffect) TimelineEventMenuEntry( name: promptReplayMessageEffect, @@ -143,7 +188,7 @@ class TimelineEventMenu { name: CommonStrings.promptAddReaction, icon: Icons.add_reaction, secondaryMenuBuilder: (context, dismissSecondaryMenu) { - return EmojiPicker(emoticons.availableEmoji, + return EmojiPicker(emoticons!.availableEmoji, preferredTooltipDirection: AxisDirection.left, onEmoticonPressed: (emote) async { timeline.room.addReaction(event, emote); diff --git a/commet/lib/ui/molecules/timeline_events/timeline_view_entry.dart b/commet/lib/ui/molecules/timeline_events/timeline_view_entry.dart index a51e67641..6d7d47a0e 100644 --- a/commet/lib/ui/molecules/timeline_events/timeline_view_entry.dart +++ b/commet/lib/ui/molecules/timeline_events/timeline_view_entry.dart @@ -18,8 +18,6 @@ import 'package:commet/ui/molecules/timeline_events/timeline_event_menu.dart'; import 'package:commet/ui/molecules/timeline_events/timeline_event_menu_dialog.dart'; import 'package:flutter/material.dart'; -import 'package:tiamat/tiamat.dart' as tiamat; - class TimelineViewEntry extends StatefulWidget { const TimelineViewEntry( {required this.timeline, @@ -118,6 +116,8 @@ class TimelineViewEntryState extends State return TimelineEventWidgetDisplayType.message; } else if (event is TimelineEventGeneric) { return TimelineEventWidgetDisplayType.generic; + } else if (event.status == TimelineEventStatus.error) { + return TimelineEventWidgetDisplayType.generic; } else { return TimelineEventWidgetDisplayType.hidden; } @@ -187,7 +187,8 @@ class TimelineViewEntryState extends State return Container(); } - if (status == TimelineEventStatus.sending) { + if (status == TimelineEventStatus.sending || + status == TimelineEventStatus.error) { result = Opacity( opacity: 0.5, child: result, @@ -195,10 +196,18 @@ class TimelineViewEntryState extends State } if (status == TimelineEventStatus.error) { - result = Column( + result = Row( + mainAxisSize: MainAxisSize.min, children: [ - result, - const tiamat.Text.error("Failed to send"), + Padding( + padding: const EdgeInsets.fromLTRB(8, 0, 8, 0), + child: Icon( + Icons.error, + size: 14, + color: Theme.of(context).colorScheme.error, + ), + ), + Expanded(child: result), ], ); } diff --git a/commet/lib/ui/pages/add_space_or_room/add_space_or_room_view.dart b/commet/lib/ui/pages/add_space_or_room/add_space_or_room_view.dart index 57f673a8e..804b9e449 100644 --- a/commet/lib/ui/pages/add_space_or_room/add_space_or_room_view.dart +++ b/commet/lib/ui/pages/add_space_or_room/add_space_or_room_view.dart @@ -137,12 +137,12 @@ class _AddSpaceOrRoomViewState extends State { name: "promptSpaceAddress", desc: "Short label to prompt for the input of a space address"); - String get placeholderRoomAddress => Intl.message("#awesome-room:matrix.org", + String get placeholderRoomAddress => Intl.message("#awesome-room:example.com", name: "placeholderRoomAddress", desc: "Placeholder / Example for a room address"); String get placeholderSpaceAddress => - Intl.message("#awesome-space:matrix.org", + Intl.message("#awesome-space:example.com", name: "placeholderSpaceAddress", desc: "Placeholder / Example for a space address"); diff --git a/commet/lib/ui/pages/settings/categories/space/settings_category_space.dart b/commet/lib/ui/pages/settings/categories/space/settings_category_space.dart index 1651ff5fa..248d5cd64 100644 --- a/commet/lib/ui/pages/settings/categories/space/settings_category_space.dart +++ b/commet/lib/ui/pages/settings/categories/space/settings_category_space.dart @@ -1,7 +1,9 @@ import 'package:commet/client/client.dart'; import 'package:commet/client/components/emoticon/emoticon_component.dart'; import 'package:commet/client/matrix/matrix_space.dart'; +import 'package:commet/main.dart'; import 'package:commet/ui/pages/settings/categories/room/permissions/matrix/matrix_room_permissions_page.dart'; +import 'package:commet/ui/pages/settings/categories/space/space_developer_settings_view.dart'; import 'package:commet/ui/pages/settings/categories/space/space_emoji_pack_settings.dart'; import 'package:commet/ui/pages/settings/categories/space/space_general_settings_page.dart'; import 'package:commet/ui/pages/settings/settings_category.dart'; @@ -84,6 +86,14 @@ class SettingsCategorySpace implements SettingsCategory { return MatrixRoomPermissionsPage( (space as MatrixSpace).matrixRoom); }), + if (preferences.developerMode) + SettingsTab( + label: labelSpaceDeveloperSettings, + icon: Icons.code, + makeScrollable: true, + pageBuilder: (context) { + return SpaceDeveloperSettingsView(space); + }), ]); } diff --git a/commet/lib/ui/pages/settings/categories/space/space_developer_settings_view.dart b/commet/lib/ui/pages/settings/categories/space/space_developer_settings_view.dart new file mode 100644 index 000000000..4a7a572ce --- /dev/null +++ b/commet/lib/ui/pages/settings/categories/space/space_developer_settings_view.dart @@ -0,0 +1,37 @@ +import 'package:commet/client/space.dart'; +import 'package:commet/ui/atoms/code_block.dart'; +import 'package:flutter/material.dart'; +import 'package:tiamat/tiamat.dart' as tiamat; + +class SpaceDeveloperSettingsView extends StatelessWidget { + final Space space; + const SpaceDeveloperSettingsView(this.space, {super.key}); + + @override + Widget build(BuildContext context) { + return Column( + children: [jsonDump(context)].map((e) { + return Padding( + padding: const EdgeInsets.fromLTRB(0, 3, 0, 3), + child: ClipRRect(borderRadius: BorderRadius.circular(10), child: e), + ); + }).toList()); + } + + Widget jsonDump(BuildContext context) { + return ExpansionTile( + title: const tiamat.Text.labelEmphasised("Room State"), + backgroundColor: Theme.of(context).colorScheme.surfaceContainerLow, + collapsedBackgroundColor: + Theme.of(context).colorScheme.surfaceContainerLow, + children: [ + SelectionArea( + child: Codeblock( + language: "json", + text: space.developerInfo, + ), + ) + ], + ); + } +}