show "channel" instead of "online" in message view caption
This commit is contained in:
+2
-1
@@ -171,5 +171,6 @@
|
|||||||
"tags_not_found": "Keine Schlagworte definiert. Erstellen Sie welche.",
|
"tags_not_found": "Keine Schlagworte definiert. Erstellen Sie welche.",
|
||||||
"tags_editor_no_tags": "Schlagworte hinzufügen",
|
"tags_editor_no_tags": "Schlagworte hinzufügen",
|
||||||
"title_manage_tags": "Verwalten",
|
"title_manage_tags": "Verwalten",
|
||||||
"channel_prompt": "Dies ist ein Kanal"
|
"channel_prompt": "Dies ist ein Sender",
|
||||||
|
"channel": "Sender"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,7 @@
|
|||||||
"online_now": "online now",
|
"online_now": "online now",
|
||||||
"last_seen_timestamp": "Last seen",
|
"last_seen_timestamp": "Last seen",
|
||||||
"title_not_found": "Not found",
|
"title_not_found": "Not found",
|
||||||
|
"channel": "channel",
|
||||||
"unnamed_topic": "Unnamed",
|
"unnamed_topic": "Unnamed",
|
||||||
"messages_not_readable": "no access to messages",
|
"messages_not_readable": "no access to messages",
|
||||||
"peers_messaging_disabled": "Peer's messaging is disabled.",
|
"peers_messaging_disabled": "Peer's messaging is disabled.",
|
||||||
|
|||||||
+2
-1
@@ -171,5 +171,6 @@
|
|||||||
"tags_not_found": "No hay etiquetas definidas. Añade unas.",
|
"tags_not_found": "No hay etiquetas definidas. Añade unas.",
|
||||||
"tags_editor_no_tags": "Añadir etiquetas",
|
"tags_editor_no_tags": "Añadir etiquetas",
|
||||||
"title_manage_tags": "Gestionar",
|
"title_manage_tags": "Gestionar",
|
||||||
"channel_prompt": "Este es un canal"
|
"channel_prompt": "Este es un canal",
|
||||||
|
"channel": "canal"
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -174,5 +174,6 @@
|
|||||||
"granted_permissions": "승낙하다",
|
"granted_permissions": "승낙하다",
|
||||||
"messages_not_readable": "메시지에 액세스 할 수 없습니다",
|
"messages_not_readable": "메시지에 액세스 할 수 없습니다",
|
||||||
"deleted_content": "내용이 삭제되었습니다",
|
"deleted_content": "내용이 삭제되었습니다",
|
||||||
"channel_prompt": "이 채널입니다"
|
"channel_prompt": "이 채널입니다",
|
||||||
|
"channel": "채널"
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -171,5 +171,6 @@
|
|||||||
"invalid_security_token": "Токен некорректен",
|
"invalid_security_token": "Токен некорректен",
|
||||||
"no_connection": "Нет связи",
|
"no_connection": "Нет связи",
|
||||||
"code_doesnot_match": "Код не совпадает",
|
"code_doesnot_match": "Код не совпадает",
|
||||||
"channel_prompt": "Создать канал"
|
"channel_prompt": "Создать канал",
|
||||||
|
"channel": "канал"
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -171,5 +171,6 @@
|
|||||||
"invalid_security_token": "无效的安全令牌",
|
"invalid_security_token": "无效的安全令牌",
|
||||||
"no_connection": "无连接",
|
"no_connection": "无连接",
|
||||||
"code_doesnot_match": "代码不匹配",
|
"code_doesnot_match": "代码不匹配",
|
||||||
"channel_prompt": "这是一个频道"
|
"channel_prompt": "这是一个频道",
|
||||||
|
"channel": "频道"
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-5
@@ -172,7 +172,8 @@
|
|||||||
"tags_not_found": "Keine Schlagworte definiert. Erstellen Sie welche.",
|
"tags_not_found": "Keine Schlagworte definiert. Erstellen Sie welche.",
|
||||||
"tags_editor_no_tags": "Schlagworte hinzufügen",
|
"tags_editor_no_tags": "Schlagworte hinzufügen",
|
||||||
"title_manage_tags": "Verwalten",
|
"title_manage_tags": "Verwalten",
|
||||||
"channel_prompt": "Dies ist ein Kanal"
|
"channel_prompt": "Dies ist ein Sender",
|
||||||
|
"channel": "Sender"
|
||||||
},
|
},
|
||||||
"en": {
|
"en": {
|
||||||
"validate_credential_action": "confirm",
|
"validate_credential_action": "confirm",
|
||||||
@@ -241,6 +242,7 @@
|
|||||||
"online_now": "online now",
|
"online_now": "online now",
|
||||||
"last_seen_timestamp": "Last seen",
|
"last_seen_timestamp": "Last seen",
|
||||||
"title_not_found": "Not found",
|
"title_not_found": "Not found",
|
||||||
|
"channel": "channel",
|
||||||
"unnamed_topic": "Unnamed",
|
"unnamed_topic": "Unnamed",
|
||||||
"messages_not_readable": "no access to messages",
|
"messages_not_readable": "no access to messages",
|
||||||
"peers_messaging_disabled": "Peer's messaging is disabled.",
|
"peers_messaging_disabled": "Peer's messaging is disabled.",
|
||||||
@@ -522,7 +524,8 @@
|
|||||||
"tags_not_found": "No hay etiquetas definidas. Añade unas.",
|
"tags_not_found": "No hay etiquetas definidas. Añade unas.",
|
||||||
"tags_editor_no_tags": "Añadir etiquetas",
|
"tags_editor_no_tags": "Añadir etiquetas",
|
||||||
"title_manage_tags": "Gestionar",
|
"title_manage_tags": "Gestionar",
|
||||||
"channel_prompt": "Este es un canal"
|
"channel_prompt": "Este es un canal",
|
||||||
|
"channel": "canal"
|
||||||
},
|
},
|
||||||
"ko": {
|
"ko": {
|
||||||
"validate_credential_action": "확인",
|
"validate_credential_action": "확인",
|
||||||
@@ -697,7 +700,8 @@
|
|||||||
"granted_permissions": "승낙하다",
|
"granted_permissions": "승낙하다",
|
||||||
"messages_not_readable": "메시지에 액세스 할 수 없습니다",
|
"messages_not_readable": "메시지에 액세스 할 수 없습니다",
|
||||||
"deleted_content": "내용이 삭제되었습니다",
|
"deleted_content": "내용이 삭제되었습니다",
|
||||||
"channel_prompt": "이 채널입니다"
|
"channel_prompt": "이 채널입니다",
|
||||||
|
"channel": "채널"
|
||||||
},
|
},
|
||||||
"ru": {
|
"ru": {
|
||||||
"contacts_not_found": "Чатов нет<br />¯∖_(ツ)_/¯",
|
"contacts_not_found": "Чатов нет<br />¯∖_(ツ)_/¯",
|
||||||
@@ -872,7 +876,8 @@
|
|||||||
"invalid_security_token": "Токен некорректен",
|
"invalid_security_token": "Токен некорректен",
|
||||||
"no_connection": "Нет связи",
|
"no_connection": "Нет связи",
|
||||||
"code_doesnot_match": "Код не совпадает",
|
"code_doesnot_match": "Код не совпадает",
|
||||||
"channel_prompt": "Создать канал"
|
"channel_prompt": "Создать канал",
|
||||||
|
"channel": "канал"
|
||||||
},
|
},
|
||||||
"zh": {
|
"zh": {
|
||||||
"archived_contacts": "已归档联系人 ({count})",
|
"archived_contacts": "已归档联系人 ({count})",
|
||||||
@@ -1047,6 +1052,7 @@
|
|||||||
"invalid_security_token": "无效的安全令牌",
|
"invalid_security_token": "无效的安全令牌",
|
||||||
"no_connection": "无连接",
|
"no_connection": "无连接",
|
||||||
"code_doesnot_match": "代码不匹配",
|
"code_doesnot_match": "代码不匹配",
|
||||||
"channel_prompt": "这是一个频道"
|
"channel_prompt": "这是一个频道",
|
||||||
|
"channel": "频道"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+19
-10
@@ -26,12 +26,12 @@ import { bytesToHumanSize, shortDateFormat } from '../lib/strformat.js';
|
|||||||
const NOTIFICATION_EXEC_INTERVAL = 300;
|
const NOTIFICATION_EXEC_INTERVAL = 300;
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
online_now: {
|
'online_now': {
|
||||||
id: 'online_now',
|
id: 'online_now',
|
||||||
defaultMessage: 'online now',
|
defaultMessage: 'online now',
|
||||||
description: 'Indicator that the user or topic is currently online',
|
description: 'Indicator that the user or topic is currently online',
|
||||||
},
|
},
|
||||||
last_seen: {
|
'last_seen': {
|
||||||
id: 'last_seen_timestamp',
|
id: 'last_seen_timestamp',
|
||||||
defaultMessage: 'Last seen',
|
defaultMessage: 'Last seen',
|
||||||
description: 'Label for the timestamp of when the user or topic was last online'
|
description: 'Label for the timestamp of when the user or topic was last online'
|
||||||
@@ -40,6 +40,11 @@ const messages = defineMessages({
|
|||||||
id: 'title_not_found',
|
id: 'title_not_found',
|
||||||
defaultMessage: 'Not found',
|
defaultMessage: 'Not found',
|
||||||
description: 'Title shown when topic is not found'
|
description: 'Title shown when topic is not found'
|
||||||
|
},
|
||||||
|
'channel': {
|
||||||
|
id: 'channel',
|
||||||
|
defaultMessage: 'channel',
|
||||||
|
description: 'Subtitle shown for channels in MessagesView instead of last seen'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -816,14 +821,18 @@ class MessagesView extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let lastSeen = null;
|
let lastSeen = null;
|
||||||
const cont = this.props.tinode.getMeTopic().getContact(this.state.topic);
|
if (isChannel) {
|
||||||
if (cont && Tinode.topicType(cont.topic) == 'p2p') {
|
lastSeen = formatMessage(messages.channel);
|
||||||
if (cont.online) {
|
} else {
|
||||||
lastSeen = formatMessage(messages.online_now);
|
const cont = this.props.tinode.getMeTopic().getContact(this.state.topic);
|
||||||
} else if (cont.seen) {
|
if (cont && Tinode.isP2PTopicName(cont.topic)) {
|
||||||
lastSeen = formatMessage(messages.last_seen) + ": " +
|
if (cont.online) {
|
||||||
shortDateFormat(cont.seen.when, this.props.intl.locale);
|
lastSeen = formatMessage(messages.online_now);
|
||||||
// TODO: also handle user agent in c.seen.ua
|
} else if (cont.seen) {
|
||||||
|
lastSeen = formatMessage(messages.last_seen) + ": " +
|
||||||
|
shortDateFormat(cont.seen.when, this.props.intl.locale);
|
||||||
|
// TODO: also handle user agent in c.seen.ua
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const avatar = this.state.avatar || true;
|
const avatar = this.state.avatar || true;
|
||||||
|
|||||||
+18
-15
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user