diff --git a/app/containers/markdown/index.js b/app/containers/markdown/index.js index 93b793fc..42cb522a 100644 --- a/app/containers/markdown/index.js +++ b/app/containers/markdown/index.js @@ -375,7 +375,7 @@ class Markdown extends PureComponent { m = shortnameToUnicode(m); m = removeMarkdown(m); return ( - + {m} ); diff --git a/app/i18n/locales/de.js b/app/i18n/locales/de.js index 3324d75e..f64b1319 100644 --- a/app/i18n/locales/de.js +++ b/app/i18n/locales/de.js @@ -275,9 +275,6 @@ export default { No_results_found: 'Keine Ergebnisse gefunden', No_starred_messages: 'Keine markierten Nachrichten', No_thread_messages: 'Keine Threadnachrichten', - No_announcement_provided: 'Keine Ankündigung erfolgt.', - No_description_provided: 'Keine Beschreibung angegeben.', - No_topic_provided: 'Kein Thema bereitgestellt', No_Message: 'Keine Nachricht', No_messages_yet: 'Noch keine Nachrichten', No_Reactions: 'Keine Reaktionen', diff --git a/app/i18n/locales/en.js b/app/i18n/locales/en.js index fc6a565a..2c4ab076 100644 --- a/app/i18n/locales/en.js +++ b/app/i18n/locales/en.js @@ -275,9 +275,7 @@ export default { No_results_found: 'No results found', No_starred_messages: 'No starred messages', No_thread_messages: 'No thread messages', - No_announcement_provided: 'No announcement provided.', - No_description_provided: 'No description provided.', - No_topic_provided: 'No topic provided.', + No_label_provided: 'No {{label}} provided.', No_Message: 'No Message', No_messages_yet: 'No messages yet', No_Reactions: 'No Reactions', diff --git a/app/i18n/locales/es-ES.js b/app/i18n/locales/es-ES.js index 9b408ee9..c893da66 100644 --- a/app/i18n/locales/es-ES.js +++ b/app/i18n/locales/es-ES.js @@ -255,9 +255,6 @@ export default { No_results_found: 'No hay resultados', No_starred_messages: 'No hay mensajes destacados', No_thread_messages: 'No hay hilots', - No_announcement_provided: 'No se ha indicado un anuncio', - No_description_provided: 'No se ha indicado descripción', - No_topic_provided: 'No se ha indicado asunto.', No_Message: 'Sin mensajes', No_messages_yet: 'No hay todavía mensajes', No_Reactions: 'No hay reacciones', diff --git a/app/i18n/locales/fr.js b/app/i18n/locales/fr.js index 1903cedf..3dde29c6 100644 --- a/app/i18n/locales/fr.js +++ b/app/i18n/locales/fr.js @@ -215,9 +215,6 @@ export default { No_pinned_messages: 'Aucun message épinglé', No_results_found: 'Aucun résultat trouvé', No_starred_messages: 'Pas de messages suivis', - No_announcement_provided: 'Aucune annonce fournie.', - No_description_provided: 'Aucune description fournie.', - No_topic_provided: 'Aucun sujet fourni.', No_Message: 'Aucun message', No_Reactions: 'Aucune réaction', Not_logged: 'Non connecté', diff --git a/app/i18n/locales/it.js b/app/i18n/locales/it.js index 5e7f44fc..c4b97fa6 100644 --- a/app/i18n/locales/it.js +++ b/app/i18n/locales/it.js @@ -266,9 +266,6 @@ export default { No_results_found: 'Nessun risultato', No_starred_messages: 'Nessun messaggio preferito', No_thread_messages: 'Nessun messaggio thread', - No_announcement_provided: 'Nessun annuncio inserito.', - No_description_provided: 'Nessuna descrizione inserita.', - No_topic_provided: 'Nessun argomento inserito.', No_Message: 'Nessun messaggio', No_messages_yet: 'Non ci sono ancora messaggi', No_Reactions: 'Nessuna reazione', diff --git a/app/i18n/locales/ja.js b/app/i18n/locales/ja.js index 8f4b05e8..8f29d91d 100644 --- a/app/i18n/locales/ja.js +++ b/app/i18n/locales/ja.js @@ -296,9 +296,6 @@ export default { No_results_found: '結果なし', No_starred_messages: 'お気に入りされたメッセージはありません', No_thread_messages: 'スレッドのメッセージはありません', - No_announcement_provided: 'アナウンスはありません。', - No_description_provided: '概要はありません。', - No_topic_provided: 'トピックはありません。', No_Message: 'メッセージなし', No_messages_yet: 'まだメッセージはありません', No_Reactions: 'リアクションなし', diff --git a/app/i18n/locales/nl.js b/app/i18n/locales/nl.js index 68170e48..dd870381 100644 --- a/app/i18n/locales/nl.js +++ b/app/i18n/locales/nl.js @@ -266,9 +266,6 @@ export default { No_results_found: 'Geen resultaten gevonden', No_starred_messages: 'Geen berichten met ster gemarkeerd', No_thread_messages: 'Geen thread berichten', - No_announcement_provided: 'Geen announcement opgegeven.', - No_description_provided: 'Geen beschrijving opgegeven.', - No_topic_provided: 'Geen onderwerp opgegeven.', No_Message: 'Geen bericht', No_messages_yet: 'Nog geen berichten', No_Reactions: 'Geen reacties', diff --git a/app/i18n/locales/pt-BR.js b/app/i18n/locales/pt-BR.js index 557ec7a1..1d0b5429 100644 --- a/app/i18n/locales/pt-BR.js +++ b/app/i18n/locales/pt-BR.js @@ -257,9 +257,7 @@ export default { No_results_found: 'Nenhum resultado encontrado', No_starred_messages: 'Não há mensagens favoritas', No_thread_messages: 'Não há tópicos', - No_announcement_provided: 'Sem anúncio.', - No_description_provided: 'Sem descrição.', - No_topic_provided: 'Sem tópico.', + No_label_provided: 'Sem {{label}}.', No_Message: 'Não há mensagens', No_messages_yet: 'Não há mensagens ainda', No_Reactions: 'Sem reações', diff --git a/app/i18n/locales/pt-PT.js b/app/i18n/locales/pt-PT.js index 1c32d4d6..cf24203d 100644 --- a/app/i18n/locales/pt-PT.js +++ b/app/i18n/locales/pt-PT.js @@ -216,9 +216,6 @@ export default { No_pinned_messages: 'Nenhuma mensagem afixada', No_results_found: 'Nenhum resultado encontrado', No_starred_messages: 'Nenhuma mensagem marcada com estrela', - No_announcement_provided: 'Nenhum anúncio fornecido.', - No_description_provided: 'Nenhuma descrição fornecida.', - No_topic_provided: 'Nenhum tópico fornecido.', No_Message: 'Nenhuma mensagem', No_Reactions: 'Nenhuma reação', Not_logged: 'Não ligado', diff --git a/app/i18n/locales/ru.js b/app/i18n/locales/ru.js index b254dca9..4fdb7e74 100644 --- a/app/i18n/locales/ru.js +++ b/app/i18n/locales/ru.js @@ -249,9 +249,6 @@ export default { No_results_found: 'Ничего не найдено', No_starred_messages: 'Нет отмеченных сообщений', No_thread_messages: 'Нет сообщений в теме', - No_announcement_provided: 'Нет объявлений.', - No_description_provided: 'Нет описания.', - No_topic_provided: 'Нет темы.', No_Message: 'Нет сообщения', No_messages_yet: 'Пока нет сообщений', No_Reactions: 'Нет реакций', diff --git a/app/i18n/locales/zh-CN.js b/app/i18n/locales/zh-CN.js index a977bf2b..a88cffb1 100644 --- a/app/i18n/locales/zh-CN.js +++ b/app/i18n/locales/zh-CN.js @@ -212,9 +212,6 @@ export default { No_pinned_messages: '没有固定的消息', No_snippeted_messages: '没有代码片段的消息', No_starred_messages: '没有加星标的消息', - No_announcement_provided: '没有公告.', - No_description_provided: '没有描述.', - No_topic_provided: '没有话题.', No_Message: '没有消息', No_Reactions: '没有回复', Not_logged: '没有记录', diff --git a/app/views/RoomInfoView/index.js b/app/views/RoomInfoView/index.js index 579fb1ba..7b0d1436 100644 --- a/app/views/RoomInfoView/index.js +++ b/app/views/RoomInfoView/index.js @@ -168,15 +168,14 @@ class RoomInfoView extends React.Component { isDirect = () => this.t === 'd' - renderItem = ({ label, content, testID }) => { + renderItem = ({ label, content }) => { const { theme } = this.props; return ( - {I18n.t(label)} + {label} @@ -222,9 +221,8 @@ class RoomInfoView extends React.Component { return null; } return this.renderItem({ - label: 'Timezone', - content: `${ moment().utcOffset(utcOffset).format(Message_TimeFormat) } (UTC ${ utcOffset })`, - testID: 'room-info-view-timezone' + label: I18n.t('Timezone'), + content: `${ moment().utcOffset(utcOffset).format(Message_TimeFormat) } (UTC ${ utcOffset })` }); } return null; @@ -249,9 +247,8 @@ class RoomInfoView extends React.Component { } renderBroadcast = () => this.renderItem({ - label: 'Broadcast_Channel', - content: I18n.t('Broadcast_channel_Description'), - testID: 'room-info-view-broadcast' + label: I18n.t('Broadcast_Channel'), + content: I18n.t('Broadcast_channel_Description') }); renderCustomFields = () => { @@ -309,9 +306,9 @@ class RoomInfoView extends React.Component { const { description, topic, announcement } = room; return ( <> - {this.renderItem({ label: 'Description', content: description })} - {this.renderItem({ label: 'Topic', content: topic })} - {this.renderItem({ label: 'Announcement', content: announcement })} + {this.renderItem({ label: I18n.t('Description'), content: description })} + {this.renderItem({ label: I18n.t('Topic'), content: topic })} + {this.renderItem({ label: I18n.t('Announcement'), content: announcement })} {room.broadcast ? this.renderBroadcast() : null} ); diff --git a/app/views/RoomView/Header/Header.js b/app/views/RoomView/Header/Header.js index bd48af0e..3fb90f90 100644 --- a/app/views/RoomView/Header/Header.js +++ b/app/views/RoomView/Header/Header.js @@ -68,18 +68,30 @@ Typing.propTypes = { }; const HeaderTitle = React.memo(({ - title, scale, connecting, theme + title, tmid, prid, scale, connecting, theme }) => { if (connecting) { title = I18n.t('Connecting'); } + + if (!tmid && !prid) { + return ( + + {title} + + ); + } + return ( ); @@ -87,6 +99,8 @@ const HeaderTitle = React.memo(({ HeaderTitle.propTypes = { title: PropTypes.string, + tmid: PropTypes.string, + prid: PropTypes.string, scale: PropTypes.number, connecting: PropTypes.bool, theme: PropTypes.string @@ -126,6 +140,8 @@ const Header = React.memo(({ { }); it('should have description', async() => { - // await expect(element(by.id('room-info-view-description'))).toBeVisible(); - await expect(element(by.label('description'))).toBeVisible(); + await expect(element(by.label('Description'))).toBeVisible(); }); it('should have topic', async() => { - // await expect(element(by.id('room-info-view-topic'))).toBeVisible(); - await expect(element(by.label('topic'))).toBeVisible(); + await expect(element(by.label('Topic'))).toBeVisible(); }); it('should have announcement', async() => { - // await expect(element(by.id('room-info-view-announcement'))).toBeVisible(); - await expect(element(by.label('announcement'))).toBeVisible(); + await expect(element(by.label('Announcement'))).toBeVisible(); }); it('should have edit button', async() => { diff --git a/e2e/12-broadcast.spec.js b/e2e/12-broadcast.spec.js index 678e0fb2..50572116 100644 --- a/e2e/12-broadcast.spec.js +++ b/e2e/12-broadcast.spec.js @@ -62,8 +62,7 @@ describe('Broadcast room', () => { await waitFor(element(by.id('room-actions-view'))).toBeVisible().withTimeout(5000); await element(by.id('room-actions-info')).tap(); await waitFor(element(by.id('room-info-view'))).toBeVisible().withTimeout(2000); - await waitFor(element(by.id('room-info-view-broadcast'))).toBeVisible().withTimeout(2000); - await expect(element(by.id('room-info-view-broadcast'))).toBeVisible(); + await expect(element(by.label('Broadcast Channel'))).toBeVisible(); await tapBack(); await waitFor(element(by.id('room-actions-view'))).toBeVisible().withTimeout(2000); await tapBack();