fix: show last message when pinned (#5316)
* fix: show last message when pinned * add the Pinned_a_message and the message as a quote * tweak at locales
This commit is contained in:
parent
b205b54e3b
commit
1d681917b8
File diff suppressed because one or more lines are too long
|
@ -12,7 +12,7 @@ const formatMsg = ({ lastMessage, type, showLastMessage, username, useRealName }
|
|||
if (!showLastMessage) {
|
||||
return '';
|
||||
}
|
||||
if (!lastMessage || !lastMessage.u || lastMessage.pinned) {
|
||||
if (!lastMessage || !lastMessage.u) {
|
||||
return I18n.t('No_Message');
|
||||
}
|
||||
if (lastMessage.t === 'jitsi_call_started') {
|
||||
|
|
|
@ -91,6 +91,11 @@ const Message = React.memo((props: IMessage) => {
|
|||
<MessageAvatar small {...props} />
|
||||
<View style={[styles.messageContent, props.isHeader && styles.messageContentWithHeader]}>
|
||||
<Content {...props} />
|
||||
{props.isInfo && props.type === 'message_pinned' ? (
|
||||
<View pointerEvents='none'>
|
||||
<Attachments {...props} />
|
||||
</View>
|
||||
) : null}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
|
|
@ -158,7 +158,7 @@ export const getInfoMessage = ({ type, role, msg, author, comment }: TInfoMessag
|
|||
case 'subscription-role-removed':
|
||||
return I18n.t('Removed_user_as_role', { user: msg, role });
|
||||
case 'message_pinned':
|
||||
return I18n.t('Message_pinned');
|
||||
return I18n.t('Pinned_a_message');
|
||||
|
||||
// without author name
|
||||
case 'ul':
|
||||
|
|
|
@ -204,7 +204,6 @@
|
|||
"Members": "أفراد",
|
||||
"Mentions": "الإشارات",
|
||||
"Message_actions": "إجراءات الرسالة",
|
||||
"Message_pinned": "الرسالة مثبتة",
|
||||
"Message_removed": "الرسالة حذفت",
|
||||
"Message_starred": "الرسالة مميزة",
|
||||
"Message_unstarred": "الرسالة غير مميزة",
|
||||
|
|
|
@ -223,7 +223,6 @@
|
|||
"Members": "Mitglieder",
|
||||
"Mentions": "Erwähnungen",
|
||||
"Message_actions": "Nachrichtenaktionen",
|
||||
"Message_pinned": "Eine Nachricht wurde angeheftet",
|
||||
"Message_removed": "Nachricht entfernt",
|
||||
"Message_starred": "Nachricht favorisiert",
|
||||
"Message_unstarred": "Nachricht nicht mehr favorisiert",
|
||||
|
|
|
@ -223,7 +223,6 @@
|
|||
"Members": "Members",
|
||||
"Mentions": "Mentions",
|
||||
"Message_actions": "Message actions",
|
||||
"Message_pinned": "Message pinned",
|
||||
"Message_removed": "message removed",
|
||||
"Message_starred": "Message starred",
|
||||
"Message_unstarred": "Message unstarred",
|
||||
|
@ -754,5 +753,6 @@
|
|||
"The_room_does_not_exist": "The room does not exist or you may not have access permission",
|
||||
"Supported_versions_expired_title": "{{workspace_name}} is running an unsupported version of Rocket.Chat",
|
||||
"Supported_versions_expired_description": "An admin needs to update the workspace to a supported version in order to reenable access from mobile and desktop apps.",
|
||||
"Supported_versions_warning_update_required": "Update required"
|
||||
"Supported_versions_warning_update_required": "Update required",
|
||||
"Pinned_a_message": "Pinned a message:"
|
||||
}
|
||||
|
|
|
@ -123,7 +123,6 @@
|
|||
"Members": "Miembros",
|
||||
"Mentions": "Menciones",
|
||||
"Message_actions": "Acciones de mensaje",
|
||||
"Message_pinned": "Mensaje fijado",
|
||||
"Message_removed": "Mensaje eliminado",
|
||||
"message": "mensaje",
|
||||
"messages": "mensajes",
|
||||
|
|
|
@ -223,7 +223,6 @@
|
|||
"Members": "Jäsenet",
|
||||
"Mentions": "Maininnat",
|
||||
"Message_actions": "Viestitoimet",
|
||||
"Message_pinned": "Viesti kiinnitetty",
|
||||
"Message_removed": "viesti poistettu",
|
||||
"Message_starred": "Viesti merkitty tähdellä",
|
||||
"Message_unstarred": "Viestin tähtimerkintä poistettu",
|
||||
|
|
|
@ -211,7 +211,6 @@
|
|||
"Members": "Membres",
|
||||
"Mentions": "Mentions",
|
||||
"Message_actions": "Actions de message",
|
||||
"Message_pinned": "Message épinglé",
|
||||
"Message_removed": "Message supprimé",
|
||||
"Message_starred": "Message suivi",
|
||||
"Message_unstarred": "Message non suivi",
|
||||
|
|
|
@ -218,7 +218,6 @@
|
|||
"Members": "Membri",
|
||||
"Mentions": "Menzioni",
|
||||
"Message_actions": "Azioni messaggio",
|
||||
"Message_pinned": "Messaggio appuntato",
|
||||
"Message_removed": "Messaggio rimosso",
|
||||
"Message_starred": "Messaggio importante",
|
||||
"Message_unstarred": "Messaggio non importante",
|
||||
|
|
|
@ -206,7 +206,6 @@
|
|||
"Members": "メンバー",
|
||||
"Mentions": "メンション",
|
||||
"Message_actions": "メッセージアクション",
|
||||
"Message_pinned": "メッセージをピン留め",
|
||||
"Message_removed": "メッセージを除く",
|
||||
"message": "メッセージ",
|
||||
"messages": "メッセージ",
|
||||
|
|
|
@ -211,7 +211,6 @@
|
|||
"Members": "Leden",
|
||||
"Mentions": "Vermeldingen",
|
||||
"Message_actions": "Berichtacties",
|
||||
"Message_pinned": "Bericht vastgezet",
|
||||
"Message_removed": "Bericht verwijderd",
|
||||
"Message_starred": "Bericht met ster",
|
||||
"Message_unstarred": "Bericht zonder ster",
|
||||
|
|
|
@ -223,7 +223,6 @@
|
|||
"Members": "Membros",
|
||||
"Mentions": "Menções",
|
||||
"Message_actions": "Ações",
|
||||
"Message_pinned": "Fixou uma mensagem",
|
||||
"Message_removed": "mensagem removida",
|
||||
"Message_starred": "Mensagem adicionada aos favoritos",
|
||||
"Message_unstarred": "Mensagem removida dos favoritos",
|
||||
|
|
|
@ -206,7 +206,6 @@
|
|||
"Members": "Membros",
|
||||
"Mentions": "Menções",
|
||||
"Message_actions": "Acções de mensagem",
|
||||
"Message_pinned": "Mensagem afixada",
|
||||
"Message_removed": "Mensagem removida",
|
||||
"Message_starred": "Mensagem estrelada",
|
||||
"Message_unstarred": "Mensagem não estrelada",
|
||||
|
@ -350,5 +349,6 @@
|
|||
"Open_Livechats": "Chats em andamento",
|
||||
"Broadcast_hint": "Apenas utilizadores autorizados podem escrever novas mensagens, mas os outros utilizadores poderão responder",
|
||||
"and_N_more": "e mais {{count}}",
|
||||
"Audio": "Áudio"
|
||||
"Audio": "Áudio",
|
||||
"Pinned_a_message": "Fixou uma mensagem:"
|
||||
}
|
|
@ -219,7 +219,6 @@
|
|||
"Members": "Пользователи",
|
||||
"Mentions": "Упоминания",
|
||||
"Message_actions": "Действия с сообщением",
|
||||
"Message_pinned": "Сообщение прикреплено",
|
||||
"Message_removed": "Сообщение удалено",
|
||||
"Message_starred": "Сообщение отмечено звездой",
|
||||
"Message_unstarred": "Отметка сообщения звездой удалена",
|
||||
|
|
|
@ -218,7 +218,6 @@
|
|||
"Members": "Člani",
|
||||
"Mentions": "Omembe",
|
||||
"Message_actions": "Sporočila",
|
||||
"Message_pinned": "Sporočilo pripeto",
|
||||
"Message_removed": "Sporočilo odstranjeno",
|
||||
"Message_starred": "Sporočilo v zvezdi",
|
||||
"Message_unstarred": "Sporočilo neokuženo",
|
||||
|
|
|
@ -223,7 +223,6 @@
|
|||
"Members": "Medlemmar",
|
||||
"Mentions": "Omnämnanden",
|
||||
"Message_actions": "Åtgärder för meddelanden",
|
||||
"Message_pinned": "Meddelandet har fästs",
|
||||
"Message_removed": "meddelande borttaget",
|
||||
"Message_starred": "Meddelandet har stjärnmarkerats",
|
||||
"Message_unstarred": "Stjärnmarkering borttagen för meddelande",
|
||||
|
|
|
@ -202,7 +202,6 @@
|
|||
"Members": "Üyeler",
|
||||
"Mentions": "Bahsetmeler",
|
||||
"Message_actions": "İleti işlemleri",
|
||||
"Message_pinned": "İleti sabitlendi",
|
||||
"Message_removed": "İleti kaldırıldı",
|
||||
"Message_starred": "İletia yıldız eklendi",
|
||||
"Message_unstarred": "İletiın yıldızı kaldırıldı",
|
||||
|
|
|
@ -198,7 +198,6 @@
|
|||
"Members": "成员",
|
||||
"Mentions": "被提及",
|
||||
"Message_actions": "信息操作",
|
||||
"Message_pinned": "信息被钉选",
|
||||
"Message_removed": "信息被删除",
|
||||
"Message_starred": "信息被标注",
|
||||
"Message_unstarred": "信息被取消标注",
|
||||
|
|
|
@ -204,7 +204,6 @@
|
|||
"Members": "成員",
|
||||
"Mentions": "被提及",
|
||||
"Message_actions": "訊息操作",
|
||||
"Message_pinned": "訊息被釘選",
|
||||
"Message_removed": "訊息被刪除",
|
||||
"Message_starred": "訊息被標註",
|
||||
"Message_unstarred": "訊息被取消標註",
|
||||
|
|
Loading…
Reference in New Issue