Restore matrix impl and remove $tc

This commit is contained in:
N-Pex 2025-05-06 11:28:47 +02:00
parent c47b975723
commit 7a801f3ec3
8 changed files with 1140 additions and 696 deletions

View file

@ -28,7 +28,7 @@
</div>
</div>
</div>
<div class="num-members">{{ $tc("room.members", memberCount) }}</div>
<div class="num-members">{{ $t("room.members", memberCount) }}</div>
</v-col>
<v-col cols="auto" class="text-end ma-0 pa-0 ms-1">
<v-avatar :class="{ 'avatar-32': true, 'clickable': true, 'popup-open': showProfileInfo }" size="26"
@ -117,11 +117,11 @@ export default {
notificationsText() {
const invitationCount = this.$matrix.invites.length
if (invitationCount > 0) {
return this.$tc('room.invitations', invitationCount);
return this.$t('room.invitations', invitationCount);
}
const missedMessagesCount = this.$matrix.joinedRooms.reduce((value, r) => ((r.roomId !== this.$matrix.currentRoomId && r.getCanonicalAlias() !== this.$matrix.currentRoomId) ? (value + r.getUnreadNotificationCount("total")) : value), 0);
if (missedMessagesCount > 0) {
return this.$tc('room.unseen_messages', missedMessagesCount);
return this.$t('room.unseen_messages', missedMessagesCount);
}
return "";
},

View file

@ -8,7 +8,7 @@
<div class="room-name-inline text-truncate" :title="room.name">
{{ room.name }}
</div>
<div class="num-members">{{ $tc("room.members", room.getJoinedMemberCount()) }}</div>
<div class="num-members">{{ $t("room.members", room.getJoinedMemberCount()) }}</div>
</v-col>
<v-col cols="auto" class="text-end ma-0 pa-0">{{ exportDate }}</v-col>

View file

@ -119,7 +119,7 @@ export default {
dayForEvent(event) {
let dayDiff = util.dayDiffToday(event.getTs());
if (dayDiff < 7) {
return this.$tc("message.time_ago", dayDiff);
return this.$t("message.time_ago", dayDiff);
} else {
return util.formatDay(event.getTs());
}

View file

@ -79,7 +79,7 @@
</div>
</div>
<div v-else-if="status == mainStatuses.SENT" class="file-drop-sending-container">
<div class="file-drop-files-sent">{{ $tc((this.messageInput && this.messageInput.length > 0) ?
<div class="file-drop-files-sent">{{ $t((this.messageInput && this.messageInput.length > 0) ?
"file_mode.files_sent_with_note" : "file_mode.files_sent", attachmentsSent.length) }}</div>
<div class="file-drop-section">
<v-textarea disabled full-width solo flat auto-grow v-model="messageInput" no-resize class="input-area-text"

View file

@ -16,7 +16,7 @@
</transition-group>
</div>
</template>
<span>{{ $tc("message.seen_by_count", seenBy.length) }}</span>
<span>{{ $t("message.seen_by_count", seenBy.length) }}</span>
</v-tooltip>
</div>
<BottomSheet
@ -24,7 +24,7 @@
ref="seenByListBottomSheet"
>
<v-list>
<v-subheader class="text-uppercase"> {{ $tc("message.seen_by") }}</v-subheader>
<v-subheader class="text-uppercase"> {{ $t("message.seen_by") }}</v-subheader>
<v-list-item v-for="(member, index) in seenBy" :key="index" class="text-left">
<v-list-item-icon>
<v-avatar size="40" color="grey">
@ -96,7 +96,7 @@ export default {
seenByTimeStamp(timestamp) {
let dayDiff = utils.dayDiffToday(timestamp);
if (dayDiff < 3) {
return this.$tc("message.time_ago", dayDiff) + ' '+utils.formatTime(timestamp);
return this.$t("message.time_ago", dayDiff) + ' '+utils.formatTime(timestamp);
} else {
return utils.formatTime(timestamp);
}

View file

@ -306,11 +306,11 @@ export default {
if (ti < 60) {
s = this.$t("global.time.recently");
} else if (ti < 3600 && Math.round(ti / 60) < 60) {
s = this.$tc("global.time.minutes", Math.round(ti / 60));
s = this.$t("global.time.minutes", Math.round(ti / 60));
} else if (ti < 86400 && Math.round(ti / 60 / 60) < 24) {
s = this.$tc("global.time.hours", Math.round(ti / 60 / 60));
s = this.$t("global.time.hours", Math.round(ti / 60 / 60));
} else {
s = this.$tc("global.time.days", Math.round(ti / 60 / 60 / 24));
s = this.$t("global.time.days", Math.round(ti / 60 / 60 / 24));
}
return this.toLocalNumbers(s);
},

View file

@ -182,6 +182,8 @@ app.use(i18n);
app.use(matrix, { store: store, i18n: i18n });
app.config.globalProperties.$root = app;
//app.use(matrix);
//app.use(config);
// app.use(analytics);

File diff suppressed because it is too large Load diff