diff --git a/app/javascript/mastodon/actions/notifications.js b/app/javascript/mastodon/actions/notifications.js index b09ca08545854314cb5f09aecf9a80f73a9f895d..8bae411c1edf316b408f8858759ecd4bda938f97 100644 --- a/app/javascript/mastodon/actions/notifications.js +++ b/app/javascript/mastodon/actions/notifications.js @@ -54,54 +54,64 @@ const excludeTypesFromSettings = state => state.getIn(['settings', 'notification export function refreshNotifications() { return (dispatch, getState) => { - dispatch(refreshNotificationsRequest()); - const params = {}; const ids = getState().getIn(['notifications', 'items']); + let skipLoading = false; + if (ids.size > 0) { params.since_id = ids.first().get('id'); } + if (getState().getIn(['notifications', 'loaded'])) { + skipLoading = true; + } + params.exclude_types = excludeTypesFromSettings(getState()); + dispatch(refreshNotificationsRequest(skipLoading)); + api(getState).get('/api/v1/notifications', { params }).then(response => { const next = getLinks(response).refs.find(link => link.rel === 'next'); - dispatch(refreshNotificationsSuccess(response.data, next ? next.uri : null)); + dispatch(refreshNotificationsSuccess(response.data, skipLoading, next ? next.uri : null)); fetchRelatedRelationships(dispatch, response.data); }).catch(error => { - dispatch(refreshNotificationsFail(error)); + dispatch(refreshNotificationsFail(error, skipLoading)); }); }; }; -export function refreshNotificationsRequest() { +export function refreshNotificationsRequest(skipLoading) { return { - type: NOTIFICATIONS_REFRESH_REQUEST + type: NOTIFICATIONS_REFRESH_REQUEST, + skipLoading }; }; -export function refreshNotificationsSuccess(notifications, next) { +export function refreshNotificationsSuccess(notifications, skipLoading, next) { return { type: NOTIFICATIONS_REFRESH_SUCCESS, notifications, accounts: notifications.map(item => item.account), statuses: notifications.map(item => item.status).filter(status => !!status), + skipLoading, next }; }; -export function refreshNotificationsFail(error) { +export function refreshNotificationsFail(error, skipLoading) { return { type: NOTIFICATIONS_REFRESH_FAIL, - error + error, + skipLoading }; }; export function expandNotifications() { return (dispatch, getState) => { - const url = getState().getIn(['notifications', 'next'], null); + const url = getState().getIn(['notifications', 'next'], null); + const lastId = getState().getIn(['notifications', 'items']).last(); if (url === null || getState().getIn(['notifications', 'isLoading'])) { return; @@ -109,7 +119,10 @@ export function expandNotifications() { dispatch(expandNotificationsRequest()); - const params = {}; + const params = { + max_id: lastId, + limit: 20 + }; params.exclude_types = excludeTypesFromSettings(getState()); diff --git a/app/javascript/mastodon/actions/timelines.js b/app/javascript/mastodon/actions/timelines.js index 6cd1f04b31ac338878660a7db9c94c877cccb8d7..5b37509a9d8cfea8df90bec6e4c1c85905eab999 100644 --- a/app/javascript/mastodon/actions/timelines.js +++ b/app/javascript/mastodon/actions/timelines.js @@ -86,6 +86,8 @@ export function refreshTimeline(timeline, id = null) { params = { ...params, since_id: newestId }; skipLoading = true; + } else if (getState().getIn(['timelines', timeline, 'loaded'])) { + skipLoading = true; } dispatch(refreshTimelineRequest(timeline, id, skipLoading)); diff --git a/app/javascript/mastodon/containers/mastodon.js b/app/javascript/mastodon/containers/mastodon.js index 637199686c54a62eb8d3a907fbde1afba29c5612..4e40d73efa3145b6cbe97924880533aa1fdcf70f 100644 --- a/app/javascript/mastodon/containers/mastodon.js +++ b/app/javascript/mastodon/containers/mastodon.js @@ -217,20 +217,34 @@ Container.propTypes = { children: PropTypes.node, }; -class Mastodon extends React.Component { +class Mastodon extends React.PureComponent { componentDidMount() { const { locale } = this.props; const streamingAPIBaseURL = store.getState().getIn(['meta', 'streaming_api_base_url']); const accessToken = store.getState().getIn(['meta', 'access_token']); + const setupPolling = () => { + this.polling = setInterval(() => { + store.dispatch(refreshTimeline('home')); + store.dispatch(refreshNotifications()); + }, 20000); + }; + + const clearPolling = () => { + clearInterval(this.polling); + this.polling = undefined; + }; + this.subscription = createStream(streamingAPIBaseURL, accessToken, 'user', { connected () { + clearPolling(); store.dispatch(connectTimeline('home')); }, disconnected () { + setupPolling(); store.dispatch(disconnectTimeline('home')); }, @@ -249,6 +263,7 @@ class Mastodon extends React.Component { }, reconnected () { + clearPolling(); store.dispatch(connectTimeline('home')); store.dispatch(refreshTimeline('home')); store.dispatch(refreshNotifications()); @@ -269,6 +284,11 @@ class Mastodon extends React.Component { this.subscription.close(); this.subscription = null; } + + if (typeof this.polling !== 'undefined') { + clearInterval(this.polling); + this.polling = null; + } } render () { diff --git a/app/javascript/mastodon/features/home_timeline/index.js b/app/javascript/mastodon/features/home_timeline/index.js index d7c43812259030547455d59dc5e4079e0bed9b3b..d6bfef8cd99ec122faf03856d74b5a30df95392c 100644 --- a/app/javascript/mastodon/features/home_timeline/index.js +++ b/app/javascript/mastodon/features/home_timeline/index.js @@ -12,18 +12,33 @@ const messages = defineMessages({ }); const mapStateToProps = state => ({ - hasUnread: state.getIn(['timelines', 'home', 'unread']) > 0 + hasUnread: state.getIn(['timelines', 'home', 'unread']) > 0, + hasFollows: state.getIn(['accounts_counters', state.getIn(['meta', 'me']), 'following_count']) > 0 }); class HomeTimeline extends React.PureComponent { render () { - const { intl, hasUnread } = this.props; + const { intl, hasUnread, hasFollows } = this.props; + + let emptyMessage; + + if (hasFollows) { + emptyMessage = <FormattedMessage id='empty_column.home.inactivity' defaultMessage="Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon." /> + } else { + emptyMessage = <FormattedMessage id='empty_column.home' defaultMessage="You aren't following anyone yet. Visit {public} or use search to get started and meet other users." values={{ public: <Link to='/timelines/public'><FormattedMessage id='empty_column.home.public_timeline' defaultMessage='the public timeline' /></Link> }} />; + } return ( <Column icon='home' active={hasUnread} heading={intl.formatMessage(messages.title)}> <ColumnSettingsContainer /> - <StatusListContainer {...this.props} scrollKey='home_timeline' type='home' emptyMessage={<FormattedMessage id='empty_column.home' defaultMessage="You aren't following anyone yet. Visit {public} or use search to get started and meet other users." values={{ public: <Link to='/timelines/public'><FormattedMessage id='empty_column.home.public_timeline' defaultMessage='the public timeline' /></Link> }} />} /> + + <StatusListContainer + {...this.props} + scrollKey='home_timeline' + type='home' + emptyMessage={emptyMessage} + /> </Column> ); } @@ -32,7 +47,8 @@ class HomeTimeline extends React.PureComponent { HomeTimeline.propTypes = { intl: PropTypes.object.isRequired, - hasUnread: PropTypes.bool + hasUnread: PropTypes.bool, + hasFollows: PropTypes.bool }; export default connect(mapStateToProps)(injectIntl(HomeTimeline)); diff --git a/app/javascript/mastodon/locales/ar.json b/app/javascript/mastodon/locales/ar.json index b4f05a73ef9cc482a3c90febb1145c7d59302843..c5f7b9a7b656e33a29f041480288d980c75e1aa8 100644 --- a/app/javascript/mastodon/locales/ar.json +++ b/app/javascript/mastodon/locales/ar.json @@ -29,6 +29,7 @@ "compose_form.lock_disclaimer": "Øسابك ليس {locked}. يمكن لأي شخص متابعتك Ùˆ عرض المنشورات.", "compose_form.lock_disclaimer.lock": "مقÙÙ„", "compose_form.placeholder": "Ùيمَ تÙكّر؟", + "compose_form.privacy_disclaimer": "Your private status will be delivered to mentioned users on {domains}. Do you trust {domainsCount, plural, one {that server} other {those servers}}? Post privacy only works on Mastodon instances. If {domains} {domainsCount, plural, one {is not a Mastodon instance} other {are not Mastodon instances}}, there will be no indication that your post is private, and it may be boosted or otherwise made visible to unintended recipients.", "compose_form.publish": "بوّق !", "compose_form.sensitive": "ضع علامة على الوسيط باعتباره Øسّاس", "compose_form.spoiler": "أخÙ٠النص واعرض تØذيرا", @@ -53,6 +54,7 @@ "empty_column.community": "الخط الزمني المØلي Ùارغ. اكتب شيئا ما للعامة كبداية.", "empty_column.hashtag": "ليس هناك بعد٠أي Ù…Øتوى ذو علاقة بهذا الوسم.", "empty_column.home": "إنك لا تتبع بعد أي شخص إلى Øد الآن. زر {public} أو استخدام Øقل البØØ« لكي تبدأ على التعر٠على مستخدمين آخرين.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "الخيط العام", "empty_column.notifications": "لم تتلق أي إشعار بعدÙ. تÙاعل مع المستخدمين الآخرين لإنشاء Ù…Øادثة.", "empty_column.public": "لا يوجد شيء هنا ! قم بتØرير شيء ما بشكل عام، أو اتبع مستخدمين آخرين ÙÙŠ الخوادم المثيلة الأخرى لملء خيط المØادثات العام.", @@ -149,24 +151,14 @@ "tabs_bar.compose": "تØرير", "tabs_bar.federated_timeline": "Federated", "tabs_bar.home": "الرئيسية", - "tabs_bar.mentions": "الإشارات", - "tabs_bar.public": "الخيط العام الموØد", + "tabs_bar.local_timeline": "Local", "tabs_bar.notifications": "الإخطارات", + "upload_area.title": "Drag & drop to upload", "upload_button.label": "إضاÙØ© وسائط", "upload_form.undo": "إلغاء", "upload_progress.label": "يرÙع...", - "notification.follow": "{name} يتبعك", - "notification.favourite": "{name} أعجب بمنشورك", - "notification.reblog": "{name} قام بترقية تبويقك", - "notification.mention": "{name} ذكرك", - "notifications.column_settings.alert": "إشعارات Ø³Ø·Ø Ø§Ù„Ù…ÙƒØªØ¨", - "notifications.column_settings.show": "إعرÙضها ÙÙŠ عمود", - "notifications.column_settings.follow": "متابعÙون جÙدÙد :", - "notifications.column_settings.favourite": "المÙÙَضَّلة :", - "notifications.column_settings.mention": "الإشارات :", - "notifications.column_settings.reblog": "الترقيّات:", + "video_player.expand": "وسّع الÙيديو", "video_player.toggle_sound": "تبديل الصوت", "video_player.toggle_visible": "إظهار / إخÙاء الÙيديو", - "video_player.expand": "وسّع الÙيديو", "video_player.video_error": "تعذر تشغيل الÙيديو" -} +} \ No newline at end of file diff --git a/app/javascript/mastodon/locales/bg.json b/app/javascript/mastodon/locales/bg.json index 38dbb8b61f1494e6c80cedc222be14b5ccd9492f..399220050e60b2bd29eb8a361a17056aa730f337 100644 --- a/app/javascript/mastodon/locales/bg.json +++ b/app/javascript/mastodon/locales/bg.json @@ -54,6 +54,7 @@ "empty_column.community": "The local timeline is empty. Write something publicly to get the ball rolling!", "empty_column.hashtag": "There is nothing in this hashtag yet.", "empty_column.home": "You aren't following anyone yet. Visit {public} or use search to get started and meet other users.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "the public timeline", "empty_column.notifications": "You don't have any notifications yet. Interact with others to start the conversation.", "empty_column.public": "There is nothing here! Write something publicly, or manually follow users from other instances to fill it up", diff --git a/app/javascript/mastodon/locales/de.json b/app/javascript/mastodon/locales/de.json index 1d79f0cb8befb29e3d373989f6338195336ffa81..f5b6a10e927045bb0625152337d58c4d39c02607 100644 --- a/app/javascript/mastodon/locales/de.json +++ b/app/javascript/mastodon/locales/de.json @@ -54,6 +54,7 @@ "empty_column.community": "Die lokale Zeitleiste ist leer. Schreibe etwas öffentlich, um den Ball ins Rollen zu bringen!", "empty_column.hashtag": "Es gibt noch nichts unter diesem Hashtag.", "empty_column.home": "Du folgst noch niemandem. Besuche {public} oder benutze die Suche, um zu starten oder andere Benutzer anzutreffen.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "die öffentliche Zeitleiste", "empty_column.notifications": "Du hast noch keine Mitteilungen. Interagiere mit anderen, um die Konversation zu starten.", "empty_column.public": "Hier ist nichts zu sehen! Schreibe etwas öffentlich oder folge Benutzern von anderen Instanzen, um es aufzufüllen.", diff --git a/app/javascript/mastodon/locales/defaultMessages.json b/app/javascript/mastodon/locales/defaultMessages.json index ea481e1545f18c2c685a3f54f6a03eb598eec0b8..03931aeff9bca72fb0a04e11d2750b08c535a414 100644 --- a/app/javascript/mastodon/locales/defaultMessages.json +++ b/app/javascript/mastodon/locales/defaultMessages.json @@ -713,6 +713,10 @@ { "defaultMessage": "the public timeline", "id": "empty_column.home.public_timeline" + }, + { + "defaultMessage": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", + "id": "empty_column.home.inactivity" } ], "path": "app/javascript/mastodon/features/home_timeline/index.json" diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 797a1caf2eae770e9b9ca8e619826573b21abae0..8a7a5e4e657e2fd48f60bc3618ffe3b9a31666a4 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -54,6 +54,7 @@ "empty_column.community": "The local timeline is empty. Write something publicly to get the ball rolling!", "empty_column.hashtag": "There is nothing in this hashtag yet.", "empty_column.home": "You aren't following anyone yet. Visit {public} or use search to get started and meet other users.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "the public timeline", "empty_column.notifications": "You don't have any notifications yet. Interact with others to start the conversation.", "empty_column.public": "There is nothing here! Write something publicly, or manually follow users from other instances to fill it up", diff --git a/app/javascript/mastodon/locales/eo.json b/app/javascript/mastodon/locales/eo.json index b71088490d37ce16f26e4a9829240dde14b43681..af6fbad694f94b36ff706344467db7afe743855c 100644 --- a/app/javascript/mastodon/locales/eo.json +++ b/app/javascript/mastodon/locales/eo.json @@ -54,6 +54,7 @@ "empty_column.community": "The local timeline is empty. Write something publicly to get the ball rolling!", "empty_column.hashtag": "There is nothing in this hashtag yet.", "empty_column.home": "You aren't following anyone yet. Visit {public} or use search to get started and meet other users.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "the public timeline", "empty_column.notifications": "You don't have any notifications yet. Interact with others to start the conversation.", "empty_column.public": "There is nothing here! Write something publicly, or manually follow users from other instances to fill it up", diff --git a/app/javascript/mastodon/locales/es.json b/app/javascript/mastodon/locales/es.json index c023a4b7e056a25cb7aae21a435f2f46f615c6a7..d4b836391348575a1d1e35aeb67d79d7c29f5662 100644 --- a/app/javascript/mastodon/locales/es.json +++ b/app/javascript/mastodon/locales/es.json @@ -54,6 +54,7 @@ "empty_column.community": "The local timeline is empty. Write something publicly to get the ball rolling!", "empty_column.hashtag": "There is nothing in this hashtag yet.", "empty_column.home": "You aren't following anyone yet. Visit {public} or use search to get started and meet other users.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "the public timeline", "empty_column.notifications": "You don't have any notifications yet. Interact with others to start the conversation.", "empty_column.public": "There is nothing here! Write something publicly, or manually follow users from other instances to fill it up", diff --git a/app/javascript/mastodon/locales/fa.json b/app/javascript/mastodon/locales/fa.json index 6e0b41756aed9b55885fc4b0c49f4f1055314165..d61ff9f6973a03e5efdcdeec7af7da2c8e908a50 100644 --- a/app/javascript/mastodon/locales/fa.json +++ b/app/javascript/mastodon/locales/fa.json @@ -54,6 +54,7 @@ "empty_column.community": "Ùهرست نوشته‌های Ù…ØÙ„ÛŒ خالی است. چیزی بنویسید تا چرخش بچرخد!", "empty_column.hashtag": "هنوز هیچ چیزی با این هشتگ نیست.", "empty_column.home": "شما هنوز پیگیر کسی نیستید. {public} را ببینید یا چیزی را جستجو کنید تا کاربران دیگر را ببینید.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "Ùهرست نوشته‌های همه‌جا", "empty_column.notifications": "هنوز هیچ اعلانی ندارید. به نوشته‌های دیگران واکنش نشان دهید تا Ú¯Ùتگو آغاز شود.", "empty_column.public": "این‌جا هنوز چیزی نیست! خودتان چیزی بنویسید یا کاربران دیگر را Ù¾ÛŒ بگیرید تا این‌جا پر شود", diff --git a/app/javascript/mastodon/locales/fi.json b/app/javascript/mastodon/locales/fi.json index 148a371aeb20957781ed05839dae66c6b59811e1..fce0fe65f688b8e778b76de466b0099ff3fbb708 100644 --- a/app/javascript/mastodon/locales/fi.json +++ b/app/javascript/mastodon/locales/fi.json @@ -54,6 +54,7 @@ "empty_column.community": "The local timeline is empty. Write something publicly to get the ball rolling!", "empty_column.hashtag": "There is nothing in this hashtag yet.", "empty_column.home": "You aren't following anyone yet. Visit {public} or use search to get started and meet other users.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "the public timeline", "empty_column.notifications": "You don't have any notifications yet. Interact with others to start the conversation.", "empty_column.public": "There is nothing here! Write something publicly, or manually follow users from other instances to fill it up", diff --git a/app/javascript/mastodon/locales/fr.json b/app/javascript/mastodon/locales/fr.json index c036a08f56fb685f6f7557cc1315d7d6022b3ce2..41a86d2b16e45a52a39f38934291fe6062c0dc43 100644 --- a/app/javascript/mastodon/locales/fr.json +++ b/app/javascript/mastodon/locales/fr.json @@ -30,7 +30,6 @@ "compose_form.lock_disclaimer.lock": "locked", "compose_form.placeholder": "Qu’avez-vous en tête ?", "compose_form.privacy_disclaimer": "Votre statut privé va être transmis aux personnes mentionnées sur {domains}. Avez-vous confiance en {domainsCount, plural, one {ce serveur} other {ces serveurs}} pour ne pas divulguer votre statut ? Les statuts privés ne fonctionnent que sur les instances de Mastodon. Si {domains} {domainsCount, plural, one {n’est pas une instance de Mastodon} other {ne sont pas des instances de Mastodon}}, il n’y aura aucune indication que votre statut est privé, et il pourrait être partagé ou rendu visible d’une autre manière à d’autres personnes imprévues.", - "compose_form.private": "Rendre privé", "compose_form.publish": "Pouet ", "compose_form.sensitive": "Marquer le média comme délicat", "compose_form.spoiler": "Masquer le texte derrière un avertissement", @@ -54,8 +53,9 @@ "emoji_button.travel": "Travel & Places", "empty_column.community": "Le fil public local est vide. Écrivez-donc quelque chose pour le remplir !", "empty_column.hashtag": "Il n’y a encore aucun contenu relatif à ce hashtag", - "empty_column.home.public_timeline": "le fil public", "empty_column.home": "Vous ne suivez encore personne. Visitez {public} ou bien utilisez la recherche pour vous connecter à d’autres utilisateursâ‹…trices.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", + "empty_column.home.public_timeline": "le fil public", "empty_column.notifications": "Vous n’avez pas encore de notification. Interagissez avec d’autres utilisateursâ‹…trices pour débuter la conversation.", "empty_column.public": "Il n’y a rien ici ! Écrivez quelque chose publiquement, ou bien suivez manuellement des utilisateursâ‹…trices d’autres instances pour remplir le fil public.", "follow_request.authorize": "Autoriser", @@ -106,6 +106,7 @@ "onboarding.page_one.welcome": "Bienvenue sur Mastodon !", "onboarding.page_six.admin": "L’administrateurâ‹…trice de votre instance est {admin}", "onboarding.page_six.almost_done": "Nous y sommes presque…", + "onboarding.page_six.appetoot": "Bon Appetoot!", "onboarding.page_six.apps_available": "De nombreuses {apps} sont disponibles pour iOS, Android et autres. Et maintenant… Bon Appetoot!", "onboarding.page_six.github": "Mastodon est un logiciel libre, gratuit et open-source. Vous pouvez rapporter des bogues, suggérer des fonctionnalités, ou contribuer à son développement sur {github}.", "onboarding.page_six.guidelines": "règles de la communauté", @@ -160,4 +161,4 @@ "video_player.toggle_sound": "Mettre/Couper le son", "video_player.toggle_visible": "Afficher/Cacher la vidéo", "video_player.video_error": "Video could not be played" -} +} \ No newline at end of file diff --git a/app/javascript/mastodon/locales/hr.json b/app/javascript/mastodon/locales/hr.json index 45c3cb7f62ffb825df45c77304f93f2822620ecc..d0a400b489a5435a657d9531faeb18c4a05a15f1 100644 --- a/app/javascript/mastodon/locales/hr.json +++ b/app/javascript/mastodon/locales/hr.json @@ -54,6 +54,7 @@ "empty_column.community": "Lokalni timeline je prazan. NapiÅ¡i neÅ¡to javno kako bi pokrenuo stvari!", "empty_column.hashtag": "JoÅ¡ ne postoji niÅ¡ta s ovim hashtagom.", "empty_column.home": "JoÅ¡ ne slijediÅ¡ nikoga. Posjeti {public} ili koristi tražilicu kako bi poÄeo i upoznao druge korisnike.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "javni timeline", "empty_column.notifications": "JoÅ¡ nemaÅ¡ notifikacija. Komuniciraj sa drugima kako bi zapoÄeo razgovor.", "empty_column.public": "Ovdje nema niÅ¡ta! NapiÅ¡i neÅ¡to javno, ili ruÄno slijedi korisnike sa drugih instanci kako bi popunio", diff --git a/app/javascript/mastodon/locales/hu.json b/app/javascript/mastodon/locales/hu.json index e1d9d36be063b9e7ca68f04b9bf9fe92e994f686..eb2949302a1cb15b3755fdba95f54114f00c3da6 100644 --- a/app/javascript/mastodon/locales/hu.json +++ b/app/javascript/mastodon/locales/hu.json @@ -54,6 +54,7 @@ "empty_column.community": "The local timeline is empty. Write something publicly to get the ball rolling!", "empty_column.hashtag": "There is nothing in this hashtag yet.", "empty_column.home": "You aren't following anyone yet. Visit {public} or use search to get started and meet other users.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "the public timeline", "empty_column.notifications": "You don't have any notifications yet. Interact with others to start the conversation.", "empty_column.public": "There is nothing here! Write something publicly, or manually follow users from other instances to fill it up", diff --git a/app/javascript/mastodon/locales/id.json b/app/javascript/mastodon/locales/id.json index d73915a36190daad800b7f4b804d21fb98c603de..d71e861ee1f00ce606c4cd145502f54c85e06007 100644 --- a/app/javascript/mastodon/locales/id.json +++ b/app/javascript/mastodon/locales/id.json @@ -54,6 +54,7 @@ "empty_column.community": "Linimasa lokal masih kosong. Tulis sesuatu secara publik dan buat roda berputar!", "empty_column.hashtag": "Tidak ada apapun dalam hashtag ini.", "empty_column.home": "Anda sedang tidak mengikuti siapapun. Kunjungi {public} atau gunakan pencarian untuk memulai dan bertemu pengguna lain.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "linimasa publik", "empty_column.notifications": "Anda tidak memiliki notifikasi apapun. Berinteraksi dengan orang lain untuk memulai percakapan.", "empty_column.public": "Tidak ada apapun disini! Tulis sesuatu, atau ikuti pengguna lain dari server lain untuk mengisinya secara manual", @@ -129,9 +130,6 @@ "report.placeholder": "Komentar tambahan", "report.submit": "Kirim", "report.target": "Melaporkan", - "search.status_by": "Status yang dibuat oleh {name}", - "search_results.total": "{count} {count, plural, one {hasil} other {hasil}}", - "status.cannot_reblog": "Postingan ini tidak dapat di-boost", "search.placeholder": "Pencarian", "search_results.total": "{count} {count, plural, one {hasil} other {hasil}}", "status.cannot_reblog": "This post cannot be boosted", @@ -162,6 +160,5 @@ "video_player.expand": "Tampilkan video", "video_player.toggle_sound": "Suara", "video_player.toggle_visible": "Tampilan", - "video_player.expand": "Tampilkan video", "video_player.video_error": "Video tidak dapat diputar" -} +} \ No newline at end of file diff --git a/app/javascript/mastodon/locales/io.json b/app/javascript/mastodon/locales/io.json index bcf89cfc2ab895a96c2f35d7526a386546f9eb31..e5fe43e4723bb61385ed438ecd3fa7d4a0e9356e 100644 --- a/app/javascript/mastodon/locales/io.json +++ b/app/javascript/mastodon/locales/io.json @@ -54,6 +54,7 @@ "empty_column.community": "La lokala tempolineo esas vakua. Skribez ulo publike por iniciar la agiveso!", "empty_column.hashtag": "Esas ankore nulo en ta gretovorto.", "empty_column.home": "Tu sequas ankore nulu. Vizitez {public} od uzez la serchilo por komencar e renkontrar altra uzeri.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "la publika tempolineo", "empty_column.notifications": "Tu havas ankore nula savigo. Komunikez kun altri por debutar la konverso.", "empty_column.public": "Esas nulo hike! Skribez ulo publike, o manuale sequez uzeri de altra instaluri por plenigar ol.", diff --git a/app/javascript/mastodon/locales/it.json b/app/javascript/mastodon/locales/it.json index 0342f1e1f5e2b4f7130949814000c4b55bd81a12..d84bf16a56e216645f16340cc595280b6af7f7a0 100644 --- a/app/javascript/mastodon/locales/it.json +++ b/app/javascript/mastodon/locales/it.json @@ -54,6 +54,7 @@ "empty_column.community": "La timeline locale è vuota. Condividi qualcosa pubblicamente per dare inizio alla festa!", "empty_column.hashtag": "Non c'è ancora nessun post con questo hashtag.", "empty_column.home": "Non stai ancora seguendo nessuno. Visita {public} o usa la ricerca per incontrare nuove persone.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "la timeline pubblica", "empty_column.notifications": "Non hai ancora nessuna notifica. Interagisci con altri per iniziare conversazioni.", "empty_column.public": "Qui non c'è nulla! Scrivi qualcosa pubblicamente, o aggiungi utenti da altri server per riempire questo spazio.", diff --git a/app/javascript/mastodon/locales/ja.json b/app/javascript/mastodon/locales/ja.json index c9ddde0837453393aacc92bb10f9865dab9db6d1..3d041c96d379248006f84c23b97177ecdc1c75bc 100644 --- a/app/javascript/mastodon/locales/ja.json +++ b/app/javascript/mastodon/locales/ja.json @@ -54,6 +54,7 @@ "empty_column.community": "ãƒãƒ¼ã‚«ãƒ«ã‚¿ã‚¤ãƒ ラインã¯ã¾ã 使ã‚ã‚Œã¦ã„ã¾ã›ã‚“。何ã‹æ›¸ã„ã¦ã¿ã¾ã—ょã†ï¼", "empty_column.hashtag": "ã“ã®ãƒãƒƒã‚·ãƒ¥ã‚¿ã‚°ã¯ã¾ã 使ã‚ã‚Œã¦ã„ã¾ã›ã‚“。", "empty_column.home": "ã¾ã 誰もフォãƒãƒ¼ã—ã¦ã„ã¾ã›ã‚“。{public}を見ã«è¡Œãã‹ã€æ¤œç´¢ã‚’使ã£ã¦ä»–ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’見ã¤ã‘ã¾ã—ょã†ã€‚", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "連åˆã‚¿ã‚¤ãƒ ライン", "empty_column.notifications": "ã¾ã 通知ãŒã‚ã‚Šã¾ã›ã‚“。他ã®äººã¨ãµã‚Œåˆã£ã¦ä¼šè©±ã‚’始ã‚ã¾ã—ょã†ã€‚", "empty_column.public": "ã“ã“ã«ã¯ã¾ã 何もã‚ã‚Šã¾ã›ã‚“ï¼å…¬é–‹ã§ä½•ã‹ã‚’投稿ã—ãŸã‚Šã€ä»–ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã‚’フォãƒãƒ¼ã—ãŸã‚Šã—ã¦ã„ã£ã±ã„ã«ã—ã¾ã—ょã†ï¼", diff --git a/app/javascript/mastodon/locales/nl.json b/app/javascript/mastodon/locales/nl.json index 730ef246d662bc27c07353857c6b9a81910fd7b3..565cd96b9d50e3e170c2e0641effd713ffa86fe1 100644 --- a/app/javascript/mastodon/locales/nl.json +++ b/app/javascript/mastodon/locales/nl.json @@ -54,6 +54,7 @@ "empty_column.community": "The local timeline is empty. Write something publicly to get the ball rolling!", "empty_column.hashtag": "There is nothing in this hashtag yet.", "empty_column.home": "You aren't following anyone yet. Visit {public} or use search to get started and meet other users.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "the public timeline", "empty_column.notifications": "You don't have any notifications yet. Interact with others to start the conversation.", "empty_column.public": "There is nothing here! Write something publicly, or manually follow users from other instances to fill it up", diff --git a/app/javascript/mastodon/locales/no.json b/app/javascript/mastodon/locales/no.json index 25dee25a3b45af10aaff53e3b73f6871df3517ab..e714a5c493dac54330d61858fbf3ea0c4b75a018 100644 --- a/app/javascript/mastodon/locales/no.json +++ b/app/javascript/mastodon/locales/no.json @@ -4,8 +4,8 @@ "account.edit_profile": "Rediger profil", "account.follow": "Følg", "account.followers": "Følgere", - "account.follows_you": "Følger deg", "account.follows": "Følger", + "account.follows_you": "Følger deg", "account.mention": "Nevn @{name}", "account.mute": "Demp @{name}", "account.posts": "Innlegg", @@ -54,6 +54,7 @@ "empty_column.community": "Den lokale tidslinjen er tom. Skriv noe offentlig for Ã¥ fÃ¥ snøballen til Ã¥ rulle!", "empty_column.hashtag": "Det er ingenting i denne hashtagen ennÃ¥.", "empty_column.home": "Du har ikke fulgt noen ennÃ¥. Besøk {publlic} eller bruk søk for Ã¥ komme i gang og møte andre brukere.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "en offentlig tidslinje", "empty_column.notifications": "Du har ingen varsler ennÃ¥. Kommuniser med andre for Ã¥ begynne samtalen.", "empty_column.public": "Det er ingenting her! Skriv noe offentlig, eller følg brukere manuelt fra andre instanser for Ã¥ fylle den opp", @@ -160,4 +161,4 @@ "video_player.toggle_sound": "Veksle lyd", "video_player.toggle_visible": "Veksle synlighet", "video_player.video_error": "Video could not be played" -} +} \ No newline at end of file diff --git a/app/javascript/mastodon/locales/oc.json b/app/javascript/mastodon/locales/oc.json index 5a23fe9f876bdd34d2e5b21e1430e94fe5c2f306..74cda821f83a8d2b7eff45687de652874147b2d3 100644 --- a/app/javascript/mastodon/locales/oc.json +++ b/app/javascript/mastodon/locales/oc.json @@ -54,6 +54,7 @@ "empty_column.community": "Lo fil public local es void. Escribètz quicòm per lo garnir !", "empty_column.hashtag": "I a pas encara de contengut ligat a aqueste hashtag", "empty_column.home": "Pel moment segètz pas segun. Visitatz {public} o utilizatz la recèrca per vos connectar a d’autras personas.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "lo fil public", "empty_column.notifications": "Avètz pas encara de notificacions. Respondètz a qualqu’un per començar una conversacion.", "empty_column.public": "I a pas res aquà ! Escribètz quicòm de public, o seguètz de personas d’autras instà ncias per garnir lo fil public.", diff --git a/app/javascript/mastodon/locales/pt-BR.json b/app/javascript/mastodon/locales/pt-BR.json index 12e9f6b5f0813ab9c7afa675b28071116961f358..13366effe860291c9abb58d6b641d33fd1397505 100644 --- a/app/javascript/mastodon/locales/pt-BR.json +++ b/app/javascript/mastodon/locales/pt-BR.json @@ -54,6 +54,7 @@ "empty_column.community": "Ainda não existem conteúdo local para mostrar!", "empty_column.hashtag": "Ainda não existe qualquer conteúdo com essa hashtag", "empty_column.home": "Ainda não segues qualquer utilizador. Visita {public} ou utiliza a pesquisa para procurar outros utilizadores.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "global", "empty_column.notifications": "Não tens notificações. Interage com outros utilizadores para iniciar uma conversa.", "empty_column.public": "Não há nada aqui! Escreve algo publicamente ou segue outros utilizadores para ver aqui os conteúdos públicos.", diff --git a/app/javascript/mastodon/locales/pt.json b/app/javascript/mastodon/locales/pt.json index 12e9f6b5f0813ab9c7afa675b28071116961f358..13366effe860291c9abb58d6b641d33fd1397505 100644 --- a/app/javascript/mastodon/locales/pt.json +++ b/app/javascript/mastodon/locales/pt.json @@ -54,6 +54,7 @@ "empty_column.community": "Ainda não existem conteúdo local para mostrar!", "empty_column.hashtag": "Ainda não existe qualquer conteúdo com essa hashtag", "empty_column.home": "Ainda não segues qualquer utilizador. Visita {public} ou utiliza a pesquisa para procurar outros utilizadores.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "global", "empty_column.notifications": "Não tens notificações. Interage com outros utilizadores para iniciar uma conversa.", "empty_column.public": "Não há nada aqui! Escreve algo publicamente ou segue outros utilizadores para ver aqui os conteúdos públicos.", diff --git a/app/javascript/mastodon/locales/ru.json b/app/javascript/mastodon/locales/ru.json index c13c959605372b6e9646008e7628995305b1f56f..9edc378599e12c0f3dcebe7d445d01293c4b2ef0 100644 --- a/app/javascript/mastodon/locales/ru.json +++ b/app/javascript/mastodon/locales/ru.json @@ -54,6 +54,7 @@ "empty_column.community": "Ð›Ð¾ÐºÐ°Ð»ÑŒÐ½Ð°Ñ Ð»ÐµÐ½Ñ‚Ð° пуÑта. Ðапишите что-нибудь, чтобы разогреть народ!", "empty_column.hashtag": "СтатуÑов Ñ Ñ‚Ð°ÐºÐ¸Ð¼ Ñ…Ñштегом еще не ÑущеÑтвует.", "empty_column.home": "Пока Ð’Ñ‹ ни на кого не подпиÑаны. ПолиÑтайте {public} или иÑпользуйте поиÑк, чтобы оÑвоитьÑÑ Ð¸ завеÑти новые знакомÑтва.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "публичные ленты", "empty_column.notifications": "У Ð’Ð°Ñ ÐµÑ‰Ðµ нет уведомлений. Заведите знакомÑтво Ñ Ð´Ñ€ÑƒÐ³Ð¸Ð¼Ð¸ пользователÑми, чтобы начать разговор.", "empty_column.public": "ЗдеÑÑŒ ничего нет! Опубликуйте что-нибудь или подпишитеÑÑŒ на пользователей Ñ Ð´Ñ€ÑƒÐ³Ð¸Ñ… узлов, чтобы заполнить ленту.", diff --git a/app/javascript/mastodon/locales/uk.json b/app/javascript/mastodon/locales/uk.json index fde28871dfdbd9b5cd14f15395fc84c3ff8cea4f..552a8713dc5dbca542e74d9c5455d1478440518b 100644 --- a/app/javascript/mastodon/locales/uk.json +++ b/app/javascript/mastodon/locales/uk.json @@ -54,6 +54,7 @@ "empty_column.community": "The local timeline is empty. Write something publicly to get the ball rolling!", "empty_column.hashtag": "There is nothing in this hashtag yet.", "empty_column.home": "You aren't following anyone yet. Visit {public} or use search to get started and meet other users.", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "the public timeline", "empty_column.notifications": "You don't have any notifications yet. Interact with others to start the conversation.", "empty_column.public": "There is nothing here! Write something publicly, or manually follow users from other instances to fill it up", diff --git a/app/javascript/mastodon/locales/zh-CN.json b/app/javascript/mastodon/locales/zh-CN.json index cf1e759c13a16360d5bd6aaa5d7c8a705f65b59c..bd46086d640413b820c932ca162fdb4d5aecb8e5 100644 --- a/app/javascript/mastodon/locales/zh-CN.json +++ b/app/javascript/mastodon/locales/zh-CN.json @@ -23,6 +23,7 @@ "column.mutes": "被é™éŸ³çš„用户", "column.notifications": "通知", "column.public": "跨站公共时间轴", + "column_back_button.label": "Back", "column_subheading.navigation": "导航", "column_subheading.settings": "设置", "compose_form.lock_disclaimer": "ä½ çš„è´¦æˆ·æ²¡ {locked}. 任何人å¯ä»¥é€šè¿‡å…³æ³¨ä½ æ¥æŸ¥çœ‹åªæœ‰å…³æ³¨è€…å¯è§çš„嘟文.", @@ -33,7 +34,6 @@ "compose_form.sensitive": "å°†åª’ä½“æ–‡ä»¶æ ‡ç¤ºä¸ºâ€œæ•æ„Ÿå†…容â€", "compose_form.spoiler": "将部分文本è—于è¦å‘Šæ¶ˆæ¯ä¹‹åŽ", "compose_form.spoiler_placeholder": "æ•æ„Ÿå†…容的è¦å‘Šæ¶ˆæ¯", - "emoji_button.label": "åŠ å…¥è¡¨æƒ…ç¬¦å·", "confirmation_modal.cancel": "å–消", "confirmations.block.confirm": "å±è”½", "confirmations.block.message": "想好了,真的è¦å±è”½ {name}?", @@ -44,6 +44,7 @@ "emoji_button.activity": "活动", "emoji_button.flags": "旗帜", "emoji_button.food": "食物和饮料", + "emoji_button.label": "åŠ å…¥è¡¨æƒ…ç¬¦å·", "emoji_button.nature": "自然", "emoji_button.objects": "物体", "emoji_button.people": "人物", @@ -53,6 +54,7 @@ "empty_column.community": "本站时间轴暂时未有内容,快贴文æ¥æŠ¢å¤´é¦™å•Šï¼", "empty_column.hashtag": "è¿™ä¸ªæ ‡ç¾æš‚时未有内容。", "empty_column.home": "ä½ è¿˜æ²¡æœ‰å…³æ³¨ä»»ä½•ç”¨æˆ·ã€‚å¿«çœ‹çœ‹{public},å‘其他用户æ讪å§ã€‚", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "公共时间轴", "empty_column.notifications": "ä½ æ²¡æœ‰ä»»ä½•é€šçŸ¥çºªå½•ï¼Œå¿«å‘其他用户æ讪å§ã€‚", "empty_column.public": "跨站公共时间轴暂时没有内容ï¼å¿«å†™ä¸€äº›å…¬å…±çš„嘟文,或者关注å¦ä¸€äº›æœåŠ¡ç«™çš„用户å§ï¼ä½ 和本站ã€å‹ç«™çš„交æµï¼Œå°†å†³å®šè¿™é‡Œå‡ºçŽ°çš„内容。", @@ -129,8 +131,8 @@ "report.submit": "æ交", "report.target": "Reporting", "search.placeholder": "æœç´¢", + "search_results.total": "{count, number} {count, plural, one {result} other {results}}", "status.cannot_reblog": "没法转嘟这æ¡å˜Ÿæ–‡å•¦â€¦â€¦", - "search.status_by": "按{name}æœç´¢å˜Ÿæ–‡", "status.delete": "åˆ é™¤", "status.favourite": "赞", "status.load_more": "åŠ è½½æ›´å¤š", diff --git a/app/javascript/mastodon/locales/zh-HK.json b/app/javascript/mastodon/locales/zh-HK.json index 772b7f8fb4429419073f3b43bda75522d64e1ccc..501c409ac48ad91d1d4584000e34c1b71a17d4bf 100644 --- a/app/javascript/mastodon/locales/zh-HK.json +++ b/app/javascript/mastodon/locales/zh-HK.json @@ -54,6 +54,7 @@ "empty_column.community": "本站時間軸暫時未有內容,快貼文來æ¶é 香啊ï¼", "empty_column.hashtag": "這個標籤暫時未有內容。", "empty_column.home": "ä½ é‚„æ²’æœ‰é—œæ³¨ä»»ä½•ç”¨æˆ¶ã€‚å¿«çœ‹çœ‹{public},å‘其他用戶æ訕å§ã€‚", + "empty_column.home.inactivity": "Your home feed is empty. If you have been inactive for a while, it will be regenerated for you soon.", "empty_column.home.public_timeline": "公共時間軸", "empty_column.notifications": "ä½ æ²’æœ‰ä»»ä½•é€šçŸ¥ç´€éŒ„ï¼Œå¿«å‘其他用戶æ訕å§ã€‚", "empty_column.public": "跨站公共時間軸暫時沒有內容ï¼å¿«å¯«ä¸€äº›å…¬å…±çš„æ–‡ç« ï¼Œæˆ–è€…é—œæ³¨å¦ä¸€äº›æœå‹™ç«™çš„用戶å§ï¼ä½ 和本站ã€å‹ç«™çš„交æµï¼Œå°‡æ±ºå®šé€™è£å‡ºç¾çš„內容。", diff --git a/app/javascript/mastodon/reducers/accounts_counters.js b/app/javascript/mastodon/reducers/accounts_counters.js index 2afc6c3d9237e1cd303f7f9790b78e8f6c99bc63..f0433c48c0b2c0d53e7acaeff9d34a039c08adfc 100644 --- a/app/javascript/mastodon/reducers/accounts_counters.js +++ b/app/javascript/mastodon/reducers/accounts_counters.js @@ -87,7 +87,11 @@ const initialState = Immutable.Map(); export default function accountsCounters(state = initialState, action) { switch(action.type) { case STORE_HYDRATE: - return state.merge(action.state.get('accounts_counters')); + return state.merge(action.state.get('accounts').map(item => Immutable.fromJS({ + followers_count: item.get('followers_count'), + following_count: item.get('following_count'), + statuses_count: item.get('statuses_count') + }))); case ACCOUNT_FETCH_SUCCESS: case NOTIFICATIONS_UPDATE: return normalizeAccount(state, action.account); diff --git a/app/javascript/mastodon/reducers/notifications.js b/app/javascript/mastodon/reducers/notifications.js index c567a3a59c48d5c4e77e18f96ab0210d07877f00..6d53a0ae602763670fcdacaaff331be0ea98e536 100644 --- a/app/javascript/mastodon/reducers/notifications.js +++ b/app/javascript/mastodon/reducers/notifications.js @@ -29,11 +29,19 @@ const notificationToMap = notification => Immutable.Map({ }); const normalizeNotification = (state, notification) => { - if (!state.get('top')) { + const top = state.get('top'); + + if (!top) { state = state.update('unread', unread => unread + 1); } - return state.update('items', list => list.unshift(notificationToMap(notification))); + return state.update('items', list => { + if (top && list.size > 40) { + list = list.take(20); + } + + return list.unshift(notificationToMap(notification)); + }); }; const normalizeNotifications = (state, notifications, next) => {