Merge pull request #5855 from eufelipemateus/translate-notifications

[Translation] transalte notifications
pull/5914/head
daniel 2025-04-01 00:01:51 -06:00 zatwierdzone przez GitHub
commit 7c51c57a73
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
6 zmienionych plików z 154 dodań i 119 usunięć

Wyświetl plik

@ -9,7 +9,7 @@
<div class="col-md-9 col-lg-9 col-xl-5 offset-xl-1"> <div class="col-md-9 col-lg-9 col-xl-5 offset-xl-1">
<template v-if="tabIndex === 0"> <template v-if="tabIndex === 0">
<h1 class="font-weight-bold"> <h1 class="font-weight-bold">
Notifications {{ $t("notifications.title")}}
</h1> </h1>
<p class="small mt-n2">&nbsp;</p> <p class="small mt-n2">&nbsp;</p>
</template> </template>
@ -19,7 +19,7 @@
<i class="far fa-chevron-circle-left fa-2x mr-3" title="Go back to notifications"></i> <i class="far fa-chevron-circle-left fa-2x mr-3" title="Go back to notifications"></i>
</a> </a>
<h1 class="font-weight-bold"> <h1 class="font-weight-bold">
Follow Requests {{ $t("notifications.followRequest") }}
</h1> </h1>
</div> </div>
</template> </template>
@ -141,13 +141,13 @@
class="btn btn-outline-success py-1 btn-sm font-weight-bold rounded-pill mr-2 mb-1" class="btn btn-outline-success py-1 btn-sm font-weight-bold rounded-pill mr-2 mb-1"
@click.prevent="handleFollowRequest('accept', index)" @click.prevent="handleFollowRequest('accept', index)"
> >
Accept {{ $t('notifications.accept') }}
</button> </button>
<button class="btn btn-outline-lighter py-1 btn-sm font-weight-bold rounded-pill mb-1" <button class="btn btn-outline-lighter py-1 btn-sm font-weight-bold rounded-pill mb-1"
@click.prevent="handleFollowRequest('reject', index)" @click.prevent="handleFollowRequest('reject', index)"
> >
Reject {{ $t("notifications.reject") }}
</button> </button>
</div> </div>
</div> </div>
@ -161,7 +161,7 @@
<div class="media align-items-center small"> <div class="media align-items-center small">
<i class="far fa-exclamation-triangle mx-2"></i> <i class="far fa-exclamation-triangle mx-2"></i>
<div class="media-body"> <div class="media-body">
<p class="mb-0 font-weight-bold">Filtering results may not include older notifications</p> <p class="mb-0 font-weight-bold">{{ $t("notifications.filteringResults") }}</p>
</div> </div>
</div> </div>
</div> </div>
@ -244,40 +244,40 @@
{ {
id: 'mentions', id: 'mentions',
name: 'Mentions', name: this.$t("notifications.mentions"),
description: 'Replies to your posts and posts you were mentioned in', description: this.$t("notifications.mentionsDescription"),
icon: 'far fa-at', icon: 'far fa-at',
types: ['comment', 'mention'] types: ['comment', 'mention']
}, },
{ {
id: 'likes', id: 'likes',
name: 'Likes', name: this.$t("notifications.likes"),
description: 'Accounts that liked your posts', description: this.$t("notifications.likesDescription"),
icon: 'far fa-heart', icon: 'far fa-heart',
types: ['favourite'] types: ['favourite']
}, },
{ {
id: 'followers', id: 'followers',
name: 'Followers', name: this.$t("notifications.followers"),
description: 'Accounts that followed you', description: this.$t("notifications.followersDescription"),
icon: 'far fa-user-plus', icon: 'far fa-user-plus',
types: ['follow'] types: ['follow']
}, },
{ {
id: 'reblogs', id: 'reblogs',
name: 'Reblogs', name: this.$t("notifications.reblogs"),
description: 'Accounts that shared or reblogged your posts', description:this.$t("notifications.reblogsDescription"),
icon: 'far fa-retweet', icon: 'far fa-retweet',
types: ['share'] types: ['share']
}, },
{ {
id: 'direct', id: 'direct',
name: 'DMs', name: this.$t("notifications.dms"),
description: 'Direct messages you have with other accounts', description: this.$t("notifications.dmsDescription"),
icon: 'far fa-envelope', icon: 'far fa-envelope',
types: ['direct'] types: ['direct']
}, },

Wyświetl plik

@ -7,13 +7,13 @@
<div class="media-body font-weight-light"> <div class="media-body font-weight-light">
<div v-if="n.type == 'favourite'"> <div v-if="n.type == 'favourite'">
<p class="my-0"> <p class="my-0">
<a :href="displayProfileUrl(n.account)" @click.prevent="getProfileUrl(n.account)" class="font-weight-bold text-dark text-break" :title="n.account.acct">&commat;{{n.account.acct}}</a> {{ $t('notifications.liked') }} <a class="font-weight-bold" :href="displayPostUrl(n.status)" @click.prevent="getPostUrl(n.status)">post</a>. <a :href="displayProfileUrl(n.account)" @click.prevent="getProfileUrl(n.account)" class="font-weight-bold text-dark text-break" :title="n.account.acct">&commat;{{n.account.acct}}</a> {{ $t('notifications.liked') }} <a class="font-weight-bold" :href="displayPostUrl(n.status)" @click.prevent="getPostUrl(n.status)">{{ $t("notifications.post")}}</a>.
</p> </p>
</div> </div>
<div v-else-if="n.type == 'comment'"> <div v-else-if="n.type == 'comment'">
<p class="my-0"> <p class="my-0">
<a :href="displayProfileUrl(n.account)" @click.prevent="getProfileUrl(n.account)" class="font-weight-bold text-dark text-break" :title="n.account.acct">&commat;{{n.account.acct}}</a> {{ $t('notifications.commented') }} <a class="font-weight-bold" :href="displayPostUrl(n.status)" @click.prevent="getPostUrl(n.status)">post</a>. <a :href="displayProfileUrl(n.account)" @click.prevent="getProfileUrl(n.account)" class="font-weight-bold text-dark text-break" :title="n.account.acct">&commat;{{n.account.acct}}</a> {{ $t('notifications.commented') }} <a class="font-weight-bold" :href="displayPostUrl(n.status)" @click.prevent="getPostUrl(n.status)">{{ $t("notifications.post")}}</a>.
</p> </p>
</div> </div>
@ -25,7 +25,7 @@
<div v-else-if="n.type == 'story:react'"> <div v-else-if="n.type == 'story:react'">
<p class="my-0"> <p class="my-0">
<a :href="displayProfileUrl(n.account)" @click.prevent="getProfileUrl(n.account)" class="font-weight-bold text-dark text-break" :title="n.account.acct">&commat;{{n.account.acct}}</a> {{ $t('notifications.reacted') }} <a class="font-weight-bold" v-bind:href="'/account/direct/t/'+n.account.id">story</a>. <a :href="displayProfileUrl(n.account)" @click.prevent="getProfileUrl(n.account)" class="font-weight-bold text-dark text-break" :title="n.account.acct">&commat;{{n.account.acct}}</a> {{ $t('notifications.reacted') }} <a class="font-weight-bold" v-bind:href="'/account/direct/t/'+n.account.id">{{ $t('notifications.story') }}</a>.
</p> </p>
</div> </div>
@ -141,30 +141,36 @@
return text.slice(0, limit) + '...' return text.slice(0, limit) + '...'
}, },
timeAgo(ts) { timeAgo(ts) {
let date = Date.parse(ts); let date = new Date(ts);
let seconds = Math.floor((new Date() - date) / 1000); let now = new Date();
let interval = Math.floor(seconds / 31536000); let seconds = Math.floor((now - date) / 1000);
if (interval >= 1) { let interval = Math.floor(seconds / 31536000);
return interval + "y"; if (interval >= 1) {
} return new Intl.RelativeTimeFormat(this.$i18n.locale, { numeric: 'auto' }).format(-interval, 'year');
interval = Math.floor(seconds / 604800); }
if (interval >= 1) { interval = Math.floor(seconds / 2592000);
return interval + "w"; if (interval >= 1) {
} return new Intl.RelativeTimeFormat(this.$i18n.locale, { numeric: 'auto' }).format(-interval, 'month');
interval = Math.floor(seconds / 86400); }
if (interval >= 1) { interval = Math.floor(seconds / 604800);
return interval + "d"; if (interval >= 1) {
} return new Intl.RelativeTimeFormat(this.$i18n.locale, { numeric: 'auto' }).format(-interval, 'week');
interval = Math.floor(seconds / 3600); }
if (interval >= 1) { interval = Math.floor(seconds / 86400);
return interval + "h"; if (interval >= 1) {
} return new Intl.RelativeTimeFormat(this.$i18n.locale, { numeric: 'auto' }).format(-interval, 'day');
interval = Math.floor(seconds / 60); }
if (interval >= 1) { interval = Math.floor(seconds / 3600);
return interval + "m"; if (interval >= 1) {
} return new Intl.RelativeTimeFormat(this.$i18n.locale, { numeric: 'auto' }).format(-interval, 'hour');
return Math.floor(seconds) + "s"; }
interval = Math.floor(seconds / 60);
if (interval >= 1) {
return new Intl.RelativeTimeFormat(this.$i18n.locale, { numeric: 'auto' }).format(-interval, 'minute');
}
return new Intl.RelativeTimeFormat(this.$i18n.locale, { numeric: 'auto' }).format(-seconds, 'second');
}, },
mentionUrl(status) { mentionUrl(status) {

Wyświetl plik

@ -3,7 +3,7 @@
<div class="card shadow-sm mb-3" style="overflow: hidden;border-radius: 15px !important;"> <div class="card shadow-sm mb-3" style="overflow: hidden;border-radius: 15px !important;">
<div class="card-body pb-0"> <div class="card-body pb-0">
<div class="d-flex justify-content-between align-items-center mb-3"> <div class="d-flex justify-content-between align-items-center mb-3">
<span class="text-muted font-weight-bold">Notifications</span> <span class="text-muted font-weight-bold">{{ $t("notifications.title")}}</span>
<div v-if="feed && feed.length"> <div v-if="feed && feed.length">
<router-link to="/i/web/notifications" class="btn btn-outline-light btn-sm mr-2" style="color: #B8C2CC !important"> <router-link to="/i/web/notifications" class="btn btn-outline-light btn-sm mr-2" style="color: #B8C2CC !important">
<i class="far fa-filter"></i> <i class="far fa-filter"></i>
@ -49,27 +49,28 @@
class="mr-2 rounded-circle shadow-sm" class="mr-2 rounded-circle shadow-sm"
:src="n.account.avatar" :src="n.account.avatar"
width="32" width="32"
height="32" height="32"
onerror="this.onerror=null;this.src='/storage/avatars/default.png';"> onerror="this.onerror=null;this.src='/storage/avatars/default.png';">
<div class="media-body font-weight-light small"> <div class="media-body font-weight-light small">
<div v-if="n.type == 'favourite'"> <div v-if="n.type == 'favourite'">
<p class="my-0"> <p class="my-0">
<a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}}</a> liked your <a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}}</a> {{ $t("notifications.liked")}}
<span v-if="n.status && n.status.hasOwnProperty('media_attachments')"> <span v-if="n.status && n.status.hasOwnProperty('media_attachments')">
<a class="font-weight-bold" v-bind:href="getPostUrl(n.status)" :id="'fvn-' + n.id" @click.prevent="goToPost(n.status)">post</a>. <a class="font-weight-bold" v-bind:href="getPostUrl(n.status)" :id="'fvn-' + n.id" @click.prevent="goToPost(n.status)">{{ $t("notifications.post")}}</a>.
<b-popover :target="'fvn-' + n.id" title="" triggers="hover" placement="top" boundary="window"> <b-popover :target="'fvn-' + n.id" title="" triggers="hover" placement="top" boundary="window">
<img :src="notificationPreview(n)" width="100px" height="100px" style="object-fit: cover;"> <img :src="notificationPreview(n)" width="100px" height="100px" style="object-fit: cover;">
</b-popover> </b-popover>
</span> </span>
<span v-else> <span v-else>
<a class="font-weight-bold" :href="getPostUrl(n.status)" @click.prevent="goToPost(n.status)">post</a>. <a class="font-weight-bold" :href="getPostUrl(n.status)" @click.prevent="goToPost(n.status)">{{ $t("notifications.post")}}</a>.
</span> </span>
</p> </p>
</div> </div>
<div v-else-if="n.type == 'autospam.warning'"> <div v-else-if="n.type == 'autospam.warning'">
<p class="my-0"> <p class="my-0">
Your recent <a :href="getPostUrl(n.status)" @click.prevent="goToPost(n.status)" class="font-weight-bold">post</a> has been unlisted. {{ $t("notifications.youRecent")}} <a :href="getPostUrl(n.status)" @click.prevent="goToPost(n.status)" class="font-weight-bold">{{ $t("notifications.post")}}</a> {{ $t("notifications.hasUnlisted")}}.
</p> </p>
<p class="mt-n1 mb-0"> <p class="mt-n1 mb-0">
<span class="small text-muted"><a href="#" class="font-weight-bold" @click.prevent="showAutospamInfo(n.status)">Click here</a> for more info.</span> <span class="small text-muted"><a href="#" class="font-weight-bold" @click.prevent="showAutospamInfo(n.status)">Click here</a> for more info.</span>
@ -77,64 +78,64 @@
</div> </div>
<div v-else-if="n.type == 'comment'"> <div v-else-if="n.type == 'comment'">
<p class="my-0"> <p class="my-0">
<a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}}</a> commented on your <a class="font-weight-bold" :href="getPostUrl(n.status)" @click.prevent="goToPost(n.status)">post</a>. <a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}}</a> {{ $t("notifications.commented")}} <a class="font-weight-bold" :href="getPostUrl(n.status)" @click.prevent="goToPost(n.status)">{{ $t("notifications.post")}}</a>.
</p> </p>
</div> </div>
<div v-else-if="n.type == 'group:comment'"> <div v-else-if="n.type == 'group:comment'">
<p class="my-0"> <p class="my-0">
<a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}}</a> commented on your <a class="font-weight-bold" :href="n.group_post_url">group post</a>. <a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}}</a> {{ $t("notifications.commented")}} <a class="font-weight-bold" :href="n.group_post_url">{{ $t("notifications.groupPost") }}</a>.
</p> </p>
</div> </div>
<div v-else-if="n.type == 'story:react'"> <div v-else-if="n.type == 'story:react'">
<p class="my-0"> <p class="my-0">
<a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}}</a> reacted to your <a class="font-weight-bold" v-bind:href="'/i/web/direct/thread/'+n.account.id">story</a>. <a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}}</a> {{ $t("notifications.reacted")}} <a class="font-weight-bold" v-bind:href="'/i/web/direct/thread/'+n.account.id">{{ $t("notifications.story")}}</a>.
</p> </p>
</div> </div>
<div v-else-if="n.type == 'story:comment'"> <div v-else-if="n.type == 'story:comment'">
<p class="my-0"> <p class="my-0">
<a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}}</a> commented on your <a class="font-weight-bold" v-bind:href="'/i/web/direct/thread/'+n.account.id">story</a>. <a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}}</a> {{ $t("notifications.commented")}} <a class="font-weight-bold" v-bind:href="'/i/web/direct/thread/'+n.account.id">{{ $t("notifications.story")}}</a>.
</p> </p>
</div> </div>
<div v-else-if="n.type == 'mention'"> <div v-else-if="n.type == 'mention'">
<p class="my-0"> <p class="my-0">
<a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}}</a> <a class="font-weight-bold" v-bind:href="mentionUrl(n.status)" @click.prevent="goToPost(n.status)">mentioned</a> you. <a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}}</a> <a class="font-weight-bold" v-bind:href="mentionUrl(n.status)" @click.prevent="goToPost(n.status)">{{ $t("notifications.mentioned")}}</a> {{ $t("notifications.you")}}.
</p> </p>
</div> </div>
<div v-else-if="n.type == 'follow'"> <div v-else-if="n.type == 'follow'">
<p class="my-0"> <p class="my-0">
<a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}}</a> followed you. <a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}}</a> {{ $t("notifications.followed")}} {{ $t("notifications.you")}}.
</p> </p>
</div> </div>
<div v-else-if="n.type == 'share'"> <div v-else-if="n.type == 'share'">
<p class="my-0"> <p class="my-0">
<a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}}</a> shared your <a class="font-weight-bold" :href="getPostUrl(n.status)" @click.prevent="goToPost(n.status)">post</a>. <a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}}</a> {{ $t("notifications.shared")}} <a class="font-weight-bold" :href="getPostUrl(n.status)" @click.prevent="goToPost(n.status)">{{ $t("notifications.post")}}</a>.
</p> </p>
</div> </div>
<div v-else-if="n.type == 'modlog'"> <div v-else-if="n.type == 'modlog'">
<p class="my-0"> <p class="my-0">
<a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{truncate(n.account.username)}}</a> updated a <a class="font-weight-bold" v-bind:href="n.modlog.url">modlog</a>. <a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{truncate(n.account.username)}}</a> {{ $t("notifications.updatedA")}} <a class="font-weight-bold" v-bind:href="n.modlog.url">modlog</a>.
</p> </p>
</div> </div>
<div v-else-if="n.type == 'tagged'"> <div v-else-if="n.type == 'tagged'">
<p class="my-0"> <p class="my-0">
<a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}}</a> tagged you in a <a class="font-weight-bold" v-bind:href="n.tagged.post_url">post</a>. <a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}}</a> {{ $t("notifications.tagged")}} <a class="font-weight-bold" v-bind:href="n.tagged.post_url">{{ $t("notifications.post")}}</a>.
</p> </p>
</div> </div>
<div v-else-if="n.type == 'direct'"> <div v-else-if="n.type == 'direct'">
<p class="my-0"> <p class="my-0">
<a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}}</a> sent a <router-link class="font-weight-bold" :to="'/i/web/direct/thread/'+n.account.id">dm</router-link>. <a :href="getProfileUrl(n.account)" class="font-weight-bold text-dark word-break" :title="n.account.acct">{{n.account.local == false ? '@':''}}{{truncate(n.account.username)}}</a> {{ $t("notifications.sentA")}} <router-link class="font-weight-bold" :to="'/i/web/direct/thread/'+n.account.id">dm</router-link>.
</p> </p>
</div> </div>
<div v-else-if="n.type == 'group.join.approved'"> <div v-else-if="n.type == 'group.join.approved'">
<p class="my-0"> <p class="my-0">
Your application to join the <a :href="n.group.url" class="font-weight-bold text-dark word-break" :title="n.group.name">{{truncate(n.group.name)}}</a> group was approved! {{ $t("notifications.yourApplication")}} <a :href="n.group.url" class="font-weight-bold text-dark word-break" :title="n.group.name">{{truncate(n.group.name)}}</a> {{ $t("notifications.wasApproved")}}
</p> </p>
</div> </div>
<div v-else-if="n.type == 'group.join.rejected'"> <div v-else-if="n.type == 'group.join.rejected'">
<p class="my-0"> <p class="my-0">
Your application to join <a :href="n.group.url" class="font-weight-bold text-dark word-break" :title="n.group.name">{{truncate(n.group.name)}}</a> was rejected. {{ $t("notifications.yourApplication")}} <a :href="n.group.url" class="font-weight-bold text-dark word-break" :title="n.group.name">{{truncate(n.group.name)}}</a> {{ $t("notifications.wasRejected")}}
</p> </p>
</div> </div>
@ -146,11 +147,11 @@
<div v-else> <div v-else>
<p class="my-0"> <p class="my-0">
We cannot display this notification at this time. {{ $t("notifications.cannotDisplay")}}
</p> </p>
</div> </div>
</div> </div>
<div class="small text-muted font-weight-bold" :title="n.created_at">{{timeAgo(n.created_at)}}</div> <div class="small text-muted font-weight-bold" style="font-size: 0.575em;" st :title="n.created_at">{{timeAgo(n.created_at)}}</div>
</div> </div>
</div> </div>

Wyświetl plik

@ -697,40 +697,36 @@ window.App.util = {
} }
return new Intl.NumberFormat(locale, { notation: notation , compactDisplay: "short" }).format(count); return new Intl.NumberFormat(locale, { notation: notation , compactDisplay: "short" }).format(count);
}), }),
timeAgo: function(ts) { timeAgo: (function(ts) {
const date = new Date(ts); let date = new Date(ts);
const now = new Date(); let now = new Date();
let seconds = Math.floor((now - date) / 1000);
const seconds = Math.floor((now - date) / 1000); let interval = Math.floor(seconds / 31536000);
if (interval >= 1) {
const secondsInYear = 60 * 60 * 24 * 365.25; return new Intl.RelativeTimeFormat(i18n.locale, { numeric: 'auto', style: 'short' }).format(-interval, 'year');
let interval = Math.floor(seconds / secondsInYear); }
if (interval >= 1) { interval = Math.floor(seconds / 2592000);
return interval + "y"; if (interval >= 1) {
} return new Intl.RelativeTimeFormat(i18n.locale, { numeric: 'auto', style: 'short' }).format(-interval, 'month');
}
interval = Math.floor(seconds / (60 * 60 * 24 * 7)); interval = Math.floor(seconds / 604800);
if (interval >= 1) { if (interval >= 1) {
return interval + "w"; return new Intl.RelativeTimeFormat(i18n.locale, { numeric: 'auto', style: 'short' }).format(-interval, 'week');
} }
interval = Math.floor(seconds / 86400);
interval = Math.floor(seconds / (60 * 60 * 24)); if (interval >= 1) {
if (interval >= 1) { return new Intl.RelativeTimeFormat(i18n.locale, { numeric: 'auto', style: 'short' }).format(-interval, 'day');
return interval + "d"; }
} interval = Math.floor(seconds / 3600);
if (interval >= 1) {
interval = Math.floor(seconds / (60 * 60)); return new Intl.RelativeTimeFormat(i18n.locale, { numeric: 'auto', style: 'short' }).format(-interval, 'hour');
if (interval >= 1) { }
return interval + "h"; interval = Math.floor(seconds / 60);
} if (interval >= 1) {
return new Intl.RelativeTimeFormat(i18n.locale, { numeric: 'auto', style: 'short' }).format(-interval, 'minute');
interval = Math.floor(seconds / 60); }
if (interval >= 1) { return new Intl.RelativeTimeFormat(i18n.locale, { numeric: 'auto', style: 'short' }).format(-seconds, 'second');
return interval + "m"; }),
}
return Math.floor(seconds) + "s";
},
timeAhead: (function(ts, short = true) { timeAhead: (function(ts, short = true) {
let date = Date.parse(ts); let date = Date.parse(ts);
let diff = date - Date.parse(new Date()); let diff = date - Date.parse(new Date());

Wyświetl plik

@ -81,6 +81,7 @@ return [
], ],
'notifications' => [ 'notifications' => [
'title' => 'Notifications',
'liked' => 'liked your', 'liked' => 'liked your',
'commented' => 'commented on your', 'commented' => 'commented on your',
'reacted' => 'reacted to your', 'reacted' => 'reacted to your',
@ -104,6 +105,23 @@ return [
'post' => 'post', 'post' => 'post',
'story' => 'story', 'story' => 'story',
'noneFound' => 'No notifications found', 'noneFound' => 'No notifications found',
'youRecent' => 'You recent',
'hasUnlisted' => 'has been unlisted',
'cannotDisplay' => 'We cannot display this notification at this time.',
'followRequest' => 'Follow Requests',
'filteringResults' => 'Filtering results may not include older notifications',
'mentions' => 'Mentions',
'mentionsDescription' => 'Replies to your posts and posts you were mentioned in',
'likes' => 'Likes',
'likesDescription' => 'Accounts that liked your posts',
'followers' => 'Followers',
'followersDescription' => 'Accounts that followed you',
'reblogs' => 'Reblogs',
'reblogsDescription' => 'Accounts that shared or reblogged your posts',
'dms' => 'DMs',
'dmsDescription' => 'Direct messages you have with other accounts',
'accept' => 'Accept',
'reject' => 'Reject'
], ],
'post' => [ 'post' => [

Wyświetl plik

@ -80,30 +80,44 @@ return [
'requests' => 'Pedidos' 'requests' => 'Pedidos'
], ],
'notifications' => [ 'notifications' => [
'liked' => 'curtiu seu', 'title' => 'Notificações',
'commented' => 'comentou em seu', 'liked' => 'curtiu sua',
'reacted' => 'reagiu ao seu', 'commented' => 'comentou na sua',
'shared' => 'compartilhou seu', 'reacted' => 'reagiu à sua',
'tagged' => 'marcou você em um', 'shared' => 'compartilhou a sua',
'tagged' => 'marcou você numa publicação',
'updatedA' => 'atualizou um(a)', 'updatedA' => 'atualizou',
'sentA' => 'enviou um', 'sentA' => 'enviou um',
'followed' => 'seguiu',
'followed' => 'seguiu', 'mentioned' => 'mencionou',
'mentioned' => 'mencionou', 'you' => 'você',
'you' => 'você', 'yourApplication' => 'A sua candidatura para se juntar',
'applicationApproved' => 'foi aprovada!',
'yourApplication' => 'A sua candidatura para se juntar', 'applicationRejected' => 'foi rejeitada. Você pode inscrever-se novamente em 6 meses.',
'applicationApproved' => 'foi aprovado!', 'dm' => 'mensagem direta',
'applicationRejected' => 'foi rejeitado. Você pode se inscrever novamente para participar em 6 meses.', 'groupPost' => 'publicação de grupo',
'modlog' => 'histórico de moderação',
'dm' => 'mensagem direta', 'post' => 'publicação',
'groupPost' => 'postagem do grupo', 'story' => 'estória',
'modlog' => 'histórico de moderação', 'noneFound' => 'Nenhuma notificação encontrada',
'post' => 'publicação', 'youRecent' => 'Você recente',
'story' => 'história', 'hasUnlisted' => 'foi removida da lista',
'noneFound' => 'Nenhuma notificação encontrada', 'cannotDisplay' => 'Não podemos exibir esta notificação no momento.',
'followRequest' => 'Pedidos de Seguimento',
'filteringResults' => 'Os resultados do filtro podem não incluir notificações mais antigas',
'mentions' => 'Menções',
'mentionsDescription' => 'Respostas às suas publicações e publicações em que você foi mencionado',
'likes' => 'Curtidas',
'likesDescription' => 'Contas que curtiram das suas publicações',
'followers' => 'Seguidores',
'followersDescription' => 'Contas que seguiram você',
'reblogs' => 'Reblogs',
'reblogsDescription' => 'Contas que compartilharam ou reblogaram suas publicações',
'dms' => 'DMs',
'dmsDescription' => 'Mensagens diretas que você tem com outras contas',
'accept' => 'Aceitar',
'reject' => 'Rejeitar'
], ],
'post' => [ 'post' => [