show "channel" instead of "online" in message view caption

This commit is contained in:
or-else
2020-09-14 15:54:14 -07:00
parent 9401a8d483
commit 58983588a4
12 changed files with 62 additions and 38 deletions
+2 -1
View File
@@ -171,5 +171,6 @@
"tags_not_found": "Keine Schlagworte definiert. Erstellen Sie welche.",
"tags_editor_no_tags": "Schlagworte hinzufügen",
"title_manage_tags": "Verwalten",
"channel_prompt": "Dies ist ein Kanal"
"channel_prompt": "Dies ist ein Sender",
"channel": "Sender"
}
+1
View File
@@ -65,6 +65,7 @@
"online_now": "online now",
"last_seen_timestamp": "Last seen",
"title_not_found": "Not found",
"channel": "channel",
"unnamed_topic": "Unnamed",
"messages_not_readable": "no access to messages",
"peers_messaging_disabled": "Peer's messaging is disabled.",
+2 -1
View File
@@ -171,5 +171,6 @@
"tags_not_found": "No hay etiquetas definidas. Añade unas.",
"tags_editor_no_tags": "Añadir etiquetas",
"title_manage_tags": "Gestionar",
"channel_prompt": "Este es un canal"
"channel_prompt": "Este es un canal",
"channel": "canal"
}
+2 -1
View File
@@ -174,5 +174,6 @@
"granted_permissions": "승낙하다",
"messages_not_readable": "메시지에 액세스 할 수 없습니다",
"deleted_content": "내용이 삭제되었습니다",
"channel_prompt": "이 채널입니다"
"channel_prompt": "이 채널입니다",
"channel": "채널"
}
+2 -1
View File
@@ -171,5 +171,6 @@
"invalid_security_token": "Токен некорректен",
"no_connection": "Нет связи",
"code_doesnot_match": "Код не совпадает",
"channel_prompt": "Создать канал"
"channel_prompt": "Создать канал",
"channel": "канал"
}
+2 -1
View File
@@ -171,5 +171,6 @@
"invalid_security_token": "无效的安全令牌",
"no_connection": "无连接",
"code_doesnot_match": "代码不匹配",
"channel_prompt": "这是一个频道"
"channel_prompt": "这是一个频道",
"channel": "频道"
}
+11 -5
View File
@@ -172,7 +172,8 @@
"tags_not_found": "Keine Schlagworte definiert. Erstellen Sie welche.",
"tags_editor_no_tags": "Schlagworte hinzufügen",
"title_manage_tags": "Verwalten",
"channel_prompt": "Dies ist ein Kanal"
"channel_prompt": "Dies ist ein Sender",
"channel": "Sender"
},
"en": {
"validate_credential_action": "confirm",
@@ -241,6 +242,7 @@
"online_now": "online now",
"last_seen_timestamp": "Last seen",
"title_not_found": "Not found",
"channel": "channel",
"unnamed_topic": "Unnamed",
"messages_not_readable": "no access to messages",
"peers_messaging_disabled": "Peer's messaging is disabled.",
@@ -522,7 +524,8 @@
"tags_not_found": "No hay etiquetas definidas. Añade unas.",
"tags_editor_no_tags": "Añadir etiquetas",
"title_manage_tags": "Gestionar",
"channel_prompt": "Este es un canal"
"channel_prompt": "Este es un canal",
"channel": "canal"
},
"ko": {
"validate_credential_action": "확인",
@@ -697,7 +700,8 @@
"granted_permissions": "승낙하다",
"messages_not_readable": "메시지에 액세스 할 수 없습니다",
"deleted_content": "내용이 삭제되었습니다",
"channel_prompt": "이 채널입니다"
"channel_prompt": "이 채널입니다",
"channel": "채널"
},
"ru": {
"contacts_not_found": "Чатов нет<br />¯∖_(ツ)_/¯",
@@ -872,7 +876,8 @@
"invalid_security_token": "Токен некорректен",
"no_connection": "Нет связи",
"code_doesnot_match": "Код не совпадает",
"channel_prompt": "Создать канал"
"channel_prompt": "Создать канал",
"channel": "канал"
},
"zh": {
"archived_contacts": "已归档联系人 ({count})",
@@ -1047,6 +1052,7 @@
"invalid_security_token": "无效的安全令牌",
"no_connection": "无连接",
"code_doesnot_match": "代码不匹配",
"channel_prompt": "这是一个频道"
"channel_prompt": "这是一个频道",
"channel": "频道"
}
}
+19 -10
View File
@@ -26,12 +26,12 @@ import { bytesToHumanSize, shortDateFormat } from '../lib/strformat.js';
const NOTIFICATION_EXEC_INTERVAL = 300;
const messages = defineMessages({
online_now: {
'online_now': {
id: 'online_now',
defaultMessage: 'online now',
description: 'Indicator that the user or topic is currently online',
},
last_seen: {
'last_seen': {
id: 'last_seen_timestamp',
defaultMessage: 'Last seen',
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',
defaultMessage: '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;
const cont = this.props.tinode.getMeTopic().getContact(this.state.topic);
if (cont && Tinode.topicType(cont.topic) == 'p2p') {
if (cont.online) {
lastSeen = formatMessage(messages.online_now);
} 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
if (isChannel) {
lastSeen = formatMessage(messages.channel);
} else {
const cont = this.props.tinode.getMeTopic().getContact(this.state.topic);
if (cont && Tinode.isP2PTopicName(cont.topic)) {
if (cont.online) {
lastSeen = formatMessage(messages.online_now);
} 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;
+18 -15
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long