Rename "Best Of" to "Summary"

This commit is contained in:
Robin Ward 2013-11-18 12:48:26 -05:00
parent 34e451ef25
commit 4ce81e1b01
61 changed files with 212 additions and 227 deletions

View file

@ -1,20 +1,20 @@
/**
The controls for toggling the summarized view on/off
@class DiscourseToggleBestOfComponent
@class DiscourseToggleSummaryComponent
@extends Ember.Component
@namespace Discourse
@module Discourse
**/
Discourse.DiscourseToggleBestOfComponent = Ember.Component.extend({
templateName: 'components/discourse-toggle-best-of',
Discourse.DiscourseToggleSummaryComponent = Ember.Component.extend({
templateName: 'components/discourse-toggle-summary',
tagName: 'section',
classNames: ['information'],
postStream: Em.computed.alias('topic.postStream'),
actions: {
toggleBestOf: function() {
this.get('postStream').toggleBestOf();
toggleSummary: function() {
this.get('postStream').toggleSummary();
}
}
});

View file

@ -97,7 +97,7 @@ Discourse.PostStream = Em.Object.extend({
**/
streamFilters: function() {
var result = {};
if (this.get('bestOf')) { result.filter = "best_of"; }
if (this.get('summary')) { result.filter = "summary"; }
var userFilters = this.get('userFilters');
if (userFilters) {
@ -106,7 +106,7 @@ Discourse.PostStream = Em.Object.extend({
}
return result;
}.property('userFilters.[]', 'bestOf'),
}.property('userFilters.[]', 'summary'),
/**
The text describing the current filters. For display in the pop up at the bottom of the
@ -117,9 +117,9 @@ Discourse.PostStream = Em.Object.extend({
filterDesc: function() {
var streamFilters = this.get('streamFilters');
if (streamFilters.filter && streamFilters.filter === "best_of") {
return I18n.t("topic.filters.best_of", {
n_best_posts: I18n.t("topic.filters.n_best_posts", { count: this.get('filteredPostsCount') }),
if (streamFilters.filter && streamFilters.filter === "summary") {
return I18n.t("topic.filters.summary", {
n_summarized_posts: I18n.t("topic.filters.n_summarized_posts", { count: this.get('filteredPostsCount') }),
of_n_posts: I18n.t("topic.filters.of_n_posts", { count: this.get('topic.posts_count') })
});
} else if (streamFilters.username_filters) {
@ -184,19 +184,19 @@ Discourse.PostStream = Em.Object.extend({
@returns {Ember.Deferred} a promise that resolves when the filter has been cancelled.
**/
cancelFilter: function() {
this.set('bestOf', false);
this.set('summary', false);
this.get('userFilters').clear();
return this.refresh();
},
/**
Toggle best of mode on the stream.
Toggle summary mode for the stream.
@method toggleBestOf
@returns {Ember.Deferred} a promise that resolves when the best of stream has loaded.
@method toggleSummary
@returns {Ember.Deferred} a promise that resolves when the summary stream has loaded.
**/
toggleBestOf: function() {
this.toggleProperty('bestOf');
toggleSummary: function() {
this.toggleProperty('summary');
this.refresh();
},
@ -691,7 +691,7 @@ Discourse.PostStream.reopenClass({
stream: Em.A(),
userFilters: Em.Set.create(),
postIdentityMap: Em.Map.create(),
bestOf: false,
summary: false,
loaded: false,
loadingAbove: false,
loadingBelow: false,

View file

@ -340,9 +340,9 @@ Discourse.Topic.reopenClass({
});
}
// Add the best of filter if we have it
if (opts.bestOf === true) {
data.best_of = true;
// Add the summary of filter if we have it
if (opts.summary === true) {
data.summary = true;
}
// Check the preload store. If not, load it via JSON

View file

@ -18,8 +18,8 @@ Discourse.TopicFromParamsRoute = Discourse.Route.extend({
var queryParams = Discourse.URL.get('queryParams');
if (queryParams) {
// Set bestOf on the postStream if present
postStream.set('bestOf', Em.get(queryParams, 'filter') === 'best_of');
// Set summary on the postStream if present
postStream.set('summary', Em.get(queryParams, 'filter') === 'summary');
// Set any username filters on the postStream
var userFilters = Em.get(queryParams, 'username_filters') || Em.get(queryParams, 'username_filters[]');

View file

@ -44,7 +44,7 @@
<td class='num likes'>
{{#if topic.like_count}}
<a href='{{unbound topic.url}}{{#if topic.has_best_of}}?filter=best_of{{/if}}'>{{unbound topic.like_count}} <i class='icon-heart'></i></a>
<a href='{{unbound topic.url}}{{#if topic.has_summary}}?filter=summary{{/if}}'>{{unbound topic.like_count}} <i class='icon-heart'></i></a>
{{/if}}
</td>

View file

@ -1,9 +0,0 @@
<h3><i class='icon icon-bullhorn'></i> {{i18n best_of.title}}</h3>
{{#if postStream.bestOf}}
<p>{{{i18n best_of.enabled_description}}}</p>
<button class='btn' {{action toggleBestOf}}>{{i18n best_of.disable}}</button>
{{else}}
<p>{{{i18n best_of.description count="topic.posts_count"}}}</p>
<button class='btn' {{action toggleBestOf}}>{{i18n best_of.enable}}</button>
{{/if}}

View file

@ -0,0 +1,7 @@
{{#if postStream.summary}}
<p>{{{i18n summary.enabled_description}}}</p>
<button class='btn' {{action toggleSummary}}>{{i18n summary.disable}}</button>
{{else}}
<p>{{{i18n summary.description count="topic.posts_count"}}}</p>
<button class='btn' {{action toggleSummary}}>{{i18n summary.enable}}</button>
{{/if}}

View file

@ -57,7 +57,7 @@
<td class='num likes'>
{{#if like_count}}
<a href='{{url}}{{#if has_best_of}}?filter=best_of{{/if}}' title='{{i18n topic.likes count="like_count"}}'>{{number like_count numberKey="likes_long"}} <i class='icon-heart'></i></a>
<a href='{{url}}{{#if has_summary}}?filter=summary{{/if}}' title='{{i18n topic.likes count="like_count"}}'>{{number like_count numberKey="likes_long"}} <i class='icon-heart'></i></a>
{{/if}}
</td>

View file

@ -45,7 +45,7 @@
<div class='num posts'><a href="{{lastUnreadUrl}}">{{number posts_count numberKey="posts_long"}}</a></div>
{{#if like_count}}
<div class='num likes'><a href='{{url}}{{#if has_best_of}}?filter=best_of{{/if}}' title='{{i18n topic.likes count="like_count"}}'><i class='icon-heart'></i> {{number like_count numberKey="likes_long"}}</a></div>
<div class='num likes'><a href='{{url}}{{#if has_summary}}?filter=summary{{/if}}' title='{{i18n topic.likes count="like_count"}}'><i class='icon-heart'></i> {{number like_count numberKey="likes_long"}}</a></div>
{{/if}}
<div class='last-poster'>

View file

@ -30,9 +30,9 @@ Discourse.TopicMapView = Discourse.ContainerView.extend({
appendMapInformation: function(container) {
var topic = this.get('topic');
// If we have a best of capability
if (topic.get('has_best_of')) {
container.attachViewWithArgs({ topic: topic }, Discourse.DiscourseToggleBestOfComponent);
// If we have a summary capability
if (topic.get('has_summary')) {
container.attachViewWithArgs({ topic: topic }, Discourse.DiscourseToggleSummaryComponent);
}
// If we have a private message

View file

@ -175,8 +175,8 @@ class Post < ActiveRecord::Base
order('sort_order desc, post_number desc')
end
def self.best_of
where(["(post_number = 1) or (percent_rank <= ?)", SiteSetting.best_of_percent_filter.to_f / 100.0])
def self.summary
where(["(post_number = 1) or (percent_rank <= ?)", SiteSetting.summary_percent_filter.to_f / 100.0])
end
def update_flagged_posts_count

View file

@ -692,7 +692,7 @@ end
# closed :boolean default(FALSE), not null
# archived :boolean default(FALSE), not null
# bumped_at :datetime not null
# has_best_of :boolean default(FALSE), not null
# has_summary :boolean default(FALSE), not null
# meta_data :hstore
# vote_count :integer default(0), not null
# archetype :string(255) default("regular"), not null

View file

@ -3,7 +3,7 @@ class TopicListItemSerializer < ListableTopicSerializer
attributes :views,
:like_count,
:starred,
:has_best_of,
:has_summary,
:archetype,
:rank_details,
:last_poster_username,

View file

@ -16,7 +16,7 @@ class TopicViewSerializer < ApplicationSerializer
:visible,
:closed,
:archived,
:has_best_of,
:has_summary,
:archetype,
:slug,
:category_id,

View file

@ -355,8 +355,7 @@ cs:
unmute: Zrušit ignorování
last_post: Poslední příspěvek
best_of:
title: "Nejlepší příspěvky"
summary:
enabled_description: Právě máte zobrazeny "nejlepší příspěvky" tohoto tématu.
description: "V tomto tématu je <b>{{count}}</b> příspěvků. A to už je hodně! Nechcete ušetřit čas při čtení tím, že zobrazíte pouze příspěvky, které mají nejvíce interakcí a odpovědí?"
enable: 'Přepnout na "nejlepší příspěvky"'
@ -724,8 +723,8 @@ cs:
few: "od {{count}} vybraného uživatele"
other: "od {{count}} vybraných uživatelů"
best_of: "{{n_best_posts}} {{of_n_posts}}."
n_best_posts:
summary: "{{n_summarized_posts}} {{of_n_posts}}."
n_summarized_posts:
one: "Je zobrazen 1 nejlepší příspěvek"
few: "Jsou zobrazeny {{count}} nejlepší příspěvky"
other: "Je zobrazeno {{count}} nejlepších příspěvků"

View file

@ -212,8 +212,7 @@ da:
unmute: Unmute
last_post: Sidste indlæg
best_of:
title: "Topindlæg"
summary:
description: "Der er <b>{{count}}</b> indlæg i dette emne. Det er mange! Vil du gerne spare lidt tid, ved kun at se de indlæg der har flest interaktioner og svar?"
button: 'Vis kun “Topindlæg”'
@ -502,7 +501,7 @@ da:
filters:
user: "Du ser kun endlæg fra specifikke brugere."
best_of: "Du ser kun “Topindlæg”."
summary: "Du ser kun “Topindlæg”."
cancel: "Se alle indlæg i emnet."
move_selected:

View file

@ -363,8 +363,7 @@ de:
unmute: Wieder beachten
last_post: Letzter Beitrag
best_of:
title: "Top-Beiträge"
summary:
enabled_description: Du siehst gerade die Top-Beiträge dieses Themas.
description: "Es gibt <b>{{count}}</b> Beiträge zu diesem Thema. Das sind eine Menge! Möchtest Du Zeit sparen und nur die Beiträge mit den meisten Antworten und Nutzerreaktionen betrachten?"
enable: 'Nur die Top-Beiträge anzeigen'
@ -730,8 +729,8 @@ de:
one: "von einem Benutzer"
other: "von {{count}} Benutzern"
best_of: "Du betrachtest {{n_best_posts}} {{of_n_posts}}."
n_best_posts:
summary: "Du betrachtest {{n_summarized_posts}} {{of_n_posts}}."
n_summarized_posts:
one: "den besten Beitrag"
other: "{{count}} besten Beiträge"
of_n_posts:

View file

@ -380,12 +380,11 @@ en:
unmute: Unmute
last_post: Last post
best_of:
title: "Best Of"
enabled_description: "You're viewing only the best posts in this topic. To see all posts again, click below."
description: "There are <b>{{count}}</b> posts in this topic. That's a lot! Would you like to save time by showing only the best posts?"
enable: 'Switch to "Best Of" view'
disable: 'Cancel "Best Of"'
summary:
enabled_description: "You're viewing a summary of this topic. To see all posts again, click below."
description: "There are <b>{{count}}</b> posts in this topic. That's a lot! Would you like to save time by showing only the most relevant posts?"
enable: 'Switch to Summary view'
disable: 'Cancel Summary view'
private_message_info:
title: "Private Message"
@ -758,10 +757,10 @@ en:
one: "made by 1 specific user"
other: "made by {{count}} specific users"
best_of: "You're viewing the {{n_best_posts}} {{of_n_posts}}."
n_best_posts:
one: "1 best post"
other: "{{count}} best posts"
summary: "You're viewing the {{n_summarized_posts}} {{of_n_posts}}."
n_summarized_posts:
one: "1 summarized post"
other: "{{count}} summarized posts"
of_n_posts:
one: "of 1 in the topic"
other: "of {{count}} in the topic"

View file

@ -297,8 +297,7 @@ es:
unmute: Quitar silencio
last_post: Última publicación
best_of:
title: "Lo Mejor De"
summary:
description: "Hay <b>{{count}}</b> publicaciones en este tema. ¡Son muchas! ¿Te gustaría ahorrar algo de tiempo viendo sólo las publicaciones con más interacciones y respuestas?"
button: 'Cambiar a la vista "Lo Mejor De"'
@ -602,8 +601,8 @@ es:
one: "hechos por 1 usuario específico"
other: "hechos por {{count}} usuarios específicos"
best_of: "Estás viendo el {{n_best_posts}} {{of_n_posts}}."
n_best_posts:
summary: "Estás viendo el {{n_summarized_posts}} {{of_n_posts}}."
n_summarized_posts:
one: "1 mejor mensaje"
other: "{{count}} mejores mensajes"
of_n_posts:

View file

@ -378,8 +378,7 @@ fr:
unmute: Activer
last_post: Dernier message
best_of:
title: "les meilleurs"
summary:
enabled_description: "Vous êtes actuellement en train de consulter seulement les messages les plus populaires de cette discussion. Pour voir tous les messages, cliquez ci-dessous."
description: "Il y a <b>{{count}}</b> messages dans cette discussion. C'est beaucoup ! Voulez-vous gagner du temps en n'affichant que les meilleurs messages ?"
enable: 'Basculer dans la vue : "les meilleurs"'
@ -730,8 +729,8 @@ fr:
by_n_users:
one: "de l'utilisateur"
other: "rédigés par {{count}} utilisateurs"
best_of: "Vous voyez seulement {{n_best_posts}} {{of_n_posts}} de cette discussion."
n_best_posts:
summary: "Vous voyez seulement {{n_summarized_posts}} {{of_n_posts}} de cette discussion."
n_summarized_posts:
one: "le message"
other: "les {{count}} messages"
of_n_posts:

View file

@ -206,10 +206,9 @@ id:
unmute: Unmute
last_post: Last post
best_of:
title: "Best Of"
description: "There are <b>{{count}}</b> posts in this topic. That's a lot! Would you like to save time by showing only the best posts?"
button: 'Switch to "Best Of" view'
summary:
description: "There are <b>{{count}}</b> posts in this topic. That's a lot! Would you like to save time by showing only the most relevant posts?"
button: 'Switch to "Summary" view'
private_message_info:
title: "Private Message"
@ -463,7 +462,7 @@ id:
filters:
user: "You're viewing only posts by specific user(s)."
best_of: "You're viewing only the 'Best Of' posts."
summary: "You're viewing only the 'Summary' posts."
cancel: "Show all posts in this topic again."
move_selected:

View file

@ -361,12 +361,11 @@ it:
unmute: Annulla ignora
last_post: Ultimo post
best_of:
title: "Best Of"
enabled_description: Stai guardando il "Best Of" di questo topic.
summary:
enabled_description: Stai guardando il "Summary" di questo topic.
description: "Ci sono <b>{{count}}</b> post in questo topic. Sono tanti! Vuoi risparmiare tempo leggendo solo i post con più interazioni e risposte?"
enable: 'Passa a "Best Of"'
disable: 'Annulla "Best Of"'
enable: 'Passa a "Summary"'
disable: 'Annulla "Summary"'
private_message_info:
title: "Conversazione Privata"
@ -705,8 +704,8 @@ it:
one: "da 1 utente specifico"
other: "da {{count}} utenti specifici"
best_of: "Stai vedendo i {{n_best_posts}} {{of_n_posts}}."
n_best_posts:
summary: "Stai vedendo i {{n_summarized_posts}} {{of_n_posts}}."
n_summarized_posts:
one: "1 best post"
other: "{{count}} best post"
of_n_posts:

View file

@ -374,8 +374,7 @@ ko:
unmute: 음소거 해제
last_post: 최근 게시물
best_of:
title: "인기 토픽"
summary:
enabled_description: "당신은 해당 토픽의 인기 게시물 을 보고 있습니다. 모든 게시물을 보려면 아래를 클릭하세요."
description: "해당 토픽에는 <b>{{count}}</b>개의 게시글이 있습니다. . 아주 많군요!! 인기 게시물만 봄으로 시간을 절약하겠습니까?"
enable: '인기 토픽 보기로 전환하여 봅니다'
@ -749,8 +748,8 @@ ko:
one: "1 명의 유저에 의해 만들어짐"
other: "{{count}} 명의 유저에 의해 만들어짐"
best_of: "당신은 {{n_best_posts}} {{of_n_posts}}를 보고 있습니다."
n_best_posts:
summary: "당신은 {{n_summarized_posts}} {{of_n_posts}}를 보고 있습니다."
n_summarized_posts:
one: "1 개의 인기 게시글"
other: "{{count}} 개의 인기 게시글"
of_n_posts:

View file

@ -272,8 +272,7 @@ nb_NO:
unmute: "Udemp"
last_post: "Siste Innlegg"
best_of:
title: "De Beste"
summary:
enabled_description: "Du er for øyeblikket i De Beste modus i dette emnet."
description: "Det er <b>{{count}}</b> innlegg i dette emnet. Det er mange! Will du spare tid ved å vise bare de beste innleggene?"
enable: 'Bytt til "De Beste" modus'
@ -617,8 +616,8 @@ nb_NO:
one: "skrevet av 1 spesifikk bruker"
other: "skrevet av {{count}} spesifikke brukere"
best_of: "Du ser på {{n_best_posts}} {{of_n_posts}}."
n_best_posts:
summary: "Du ser på {{n_summarized_posts}} {{of_n_posts}}."
n_summarized_posts:
one: "1 beste innlegg"
other: "{{count}} beste innlegg"
of_n_posts:

View file

@ -379,8 +379,7 @@ nl:
unmute: Tonen
last_post: Laatste bericht
best_of:
title: Best of
summary:
enabled_description: "Je kijkt nu naar de beste berichten van deze topic. Klik hieronder om alle berichten te zien."
description: "Er zijn <b>{{count}}</b> berichten in deze topic. Dat zijn een hoop! Zou je tijd willen besparen door alleen de berichten te zien met de meeste interactie en reacties?"
enable: "Schakel naar 'Best of'-weergave"
@ -754,8 +753,8 @@ nl:
one: van één specifiek lid
other: "van {{count}} specifieke leden"
best_of: "Je ziet momenteel alleen {{n_best_posts}} {{of_n_posts}}"
n_best_posts:
summary: "Je ziet momenteel alleen {{n_summarized_posts}} {{of_n_posts}}"
n_summarized_posts:
one: "het enige 'Best of' bericht."
other: "de {{count}} 'Best of' berichten"
of_n_posts:

View file

@ -296,8 +296,7 @@ pseudo:
first_post: '[[ Ƒířšť ƿóšť ]]'
mute: '[[ Ϻůťé ]]'
unmute: '[[ Ůɳɱůťé ]]'
best_of:
title: '[[ Ɓéšť Óƒ ]]'
summary:
enabled_description: '[[ Ýóů ářé čůřřéɳťłý νíéŵíɳǧ ťĥé "Ɓéšť Óƒ" νíéŵ óƒ ťĥíš
ťóƿíč. ]]'
description: '[[ Ťĥéřé ářé <ƀ>{{count}}</ƀ> ƿóšťš íɳ ťĥíš ťóƿíč. Ťĥáť''š á łóť!
@ -669,8 +668,8 @@ pseudo:
by_n_users:
one: '[[ ɱáďé ƀý 1 šƿéčíƒíč ůšéř ]]'
other: '[[ ɱáďé ƀý {{count}} šƿéčíƒíč ůšéřš ]]'
best_of: '[[ Ýóů''řé νíéŵíɳǧ ťĥé {{n_best_posts}} {{of_n_posts}}. ]]'
n_best_posts:
summary: '[[ Ýóů''řé νíéŵíɳǧ ťĥé {{n_summarized_posts}} {{of_n_posts}}. ]]'
n_summarized_posts:
one: '[[ 1 ƀéšť ƿóšť ]]'
other: '[[ {{count}} ƀéšť ƿóšťš ]]'
of_n_posts:

View file

@ -206,8 +206,7 @@ pt:
unmute: Reativar
last_post: Último post
best_of:
title: "Melhor De"
summary:
description: "Há <b>{{count}}</b> posts neste tópico. Isso é muito! Gostarias de poupar tempo alterando a vista para mostrar apenas os posts com mais interações e respostas?"
button: 'Alterar para a vista "Melhor De"'
@ -431,7 +430,7 @@ pt:
filters:
user: "Estás a ver apenas os posts de um utilizador especifico."
best_of: "Estás a ver apenas os posts em 'Melhor De'."
summary: "Estás a ver apenas os posts em 'Melhor De'."
cancel: "Mostrar todos os posts neste tópico outra vez."
move_selected:

View file

@ -371,8 +371,7 @@ pt_BR:
unmute: Reativar
last_post: Último post
best_of:
title: "Melhor De"
summary:
enabled_description: "Você está vendo somente as melhores postagens neste tópico. Para ver todas as postagens de novo clique abaixo."
description: "Há <b>{{count}}</b> postagen neste tópico. Isso é muito! Gostaria de poupar tempo alterando a vista para mostrar apenas as postagens com mais interações e respostas?"
enable: 'Alternar para visualização "Os Melhores"'
@ -747,8 +746,8 @@ pt_BR:
one: "feito por 1 usuário específico"
other: "feito por {count}} usuários específicos"
best_of: "Você está vendo apenas {{n_best_posts}} {{of_n_posts}}."
n_best_posts:
summary: "Você está vendo apenas {{n_summarized_posts}} {{of_n_posts}}."
n_summarized_posts:
one: "1 melhor postagem"
other: "{{count}} melhores postagens"
of_n_posts:

View file

@ -390,8 +390,7 @@ ru:
first_post: 'Первое сообщение'
mute: Отключить
unmute: Включить
best_of:
title: 'Наиболее популярное'
summary:
enabled_description: 'Вы просматриваете только популярные сообщения в данной теме. Для просмотра всех сообщений нажмите кнопку ниже.'
description: 'В теме <b>{{count}}</b> сообщений. Хотите сэкономить время и просмотреть только те сообщения, которые привлекли к себе больше всего внимания и ответов?'
enable: 'Просмотреть наиболее популярные сообщения'
@ -727,8 +726,8 @@ ru:
other: 'от {{count}} пользователей'
few: 'от {{count}} пользователя'
many: 'от {{count}} пользователей'
best_of: 'Отображено только {{n_best_posts}} из {{of_n_posts}}.'
n_best_posts:
summary: 'Отображено только {{n_summarized_posts}} из {{of_n_posts}}.'
n_summarized_posts:
one: '1 лучшее'
other: '{{count}} лучших'
few: '{{count}} лучших'

View file

@ -216,8 +216,7 @@ sv:
unmute: Avdämpa
last_post: Sista inlägget
best_of:
title: "Bäst Av"
summary:
enabled_description: Just nu visar du "Bäst Av"-läget för denna tråd.
description: "Det finns <b>{{count}}</b> inlägg i den här tråden. Det är många! Vill du spara tid genom att byta så du bara ser de inlägg med flest interaktioner och svar?"
enable: 'Byt till "Bäst Av"-läget'
@ -526,8 +525,8 @@ sv:
one: "skapat av 1 specifik användare"
other: "skapat av {{count}} specifika användare"
best_of: "Du visar bara {{n_best_posts}} {{of_n_posts}}."
n_best_posts:
summary: "Du visar bara {{n_summarized_posts}} {{of_n_posts}}."
n_summarized_posts:
one: "1 bästa inlägg"
other: "{{count}} bästa inlägg"
of_n_posts:

View file

@ -378,8 +378,7 @@ zh_CN:
unmute: 解除防打扰
last_post: 最后一帖
best_of:
title: "优秀"
summary:
enabled_description: 你现在正在浏览本主题的“优秀”视图。
description: "此主题中有 <b>{{count}}</b> 个帖子,是不是有点多哦!你愿意切换到只显示最多交互和回复的帖子视图么?"
enable: '切换到“优秀”视图'
@ -755,8 +754,8 @@ zh_CN:
one: "一个指定用户"
other: "{{count}} 个用户中的"
best_of: "你在浏览 {{n_best_posts}} {{of_n_posts}}."
n_best_posts:
summary: "你在浏览 {{n_summarized_posts}} {{of_n_posts}}."
n_summarized_posts:
one: "一个优秀帖子"
other: "{{count}} 优秀帖子"
of_n_posts:

View file

@ -332,8 +332,7 @@ zh_TW:
unmute: 解除防打擾
last_post: 最後一帖
best_of:
title: "優秀"
summary:
enabled_description: 你現在正在浏覽本主題的“優秀”視圖。
description: "此主題中有 <b>{{count}}</b> 個帖子,是不是有點多哦!你願意切換到只顯示最多交互和回複的帖子視圖麽?"
enable: '切換到“優秀”視圖'
@ -661,8 +660,8 @@ zh_TW:
one: "一個指定用戶"
other: "{{count}} 個用戶中的"
best_of: "你在浏覽 {{n_best_posts}} {{of_n_posts}}."
n_best_posts:
summary: "你在浏覽 {{n_summarized_posts}} {{of_n_posts}}."
n_summarized_posts:
one: "一個優秀帖子"
other: "{{count}} 優秀帖子"
of_n_posts:

View file

@ -514,10 +514,10 @@ cs:
notification_email: "Návratová emailová adresa, která se použije u systémových emailů, jako jsou notifikace o zapomenutém heslu, nových účtech, atd."
email_custom_headers: "Seznam vlastních hlaviček emailů, oddělený svislítkem"
use_ssl: "Má být web přístupný přes SSL? (NEPODPOROVÁNO, EXPERIMENTÁLNÍ FUNKCE)"
best_of_score_threshold: "Minimální skóre příspěvku, aby byl zařazen mezi 'nejlepší'"
best_of_posts_required: "Minimální počet příspěvků v tématu, aby byl povolen mód 'nejlepší příspěvky'"
best_of_likes_required: "Minimální počet 'líbí se' v tématu, aby byl povolen mód 'nejlepší příspěvky'"
best_of_percent_filter: "Když si uživatel zobrazí 'nejlepší příspěvky', zobrazí se tolik % příspěvků"
summary_score_threshold: "Minimální skóre příspěvku, aby byl zařazen mezi 'nejlepší'"
summary_posts_required: "Minimální počet příspěvků v tématu, aby byl povolen mód 'nejlepší příspěvky'"
summary_likes_required: "Minimální počet 'líbí se' v tématu, aby byl povolen mód 'nejlepší příspěvky'"
summary_percent_filter: "Když si uživatel zobrazí 'nejlepší příspěvky', zobrazí se tolik % příspěvků"
enable_private_messages: "Povolit uživatelům s věrohodností 1, aby zasílali soukromé zprávy a zahajovali soukromé konverzace"
enable_long_polling: "'Message bus' smí používat dlouhé výzvy"

View file

@ -324,9 +324,9 @@ da:
favicon_url: "A favicon for your site, see http://en.wikipedia.org/wiki/Favicon"
notification_email: "The return email address used when sending system emails such as notifying users of lost passwords, new accounts etc"
use_ssl: "Should the site be accessible via SSL? (NOT IMPLEMENTED, EXPERIMENTAL)"
best_of_score_threshold: "The minimum score of a post to be included in the 'best of'"
best_of_posts_required: "Minimum posts in a topic before 'best of' mode is enabled"
best_of_likes_required: "Minimum likes in a topic before the 'best of' mode will be enabled"
summary_score_threshold: "The minimum score of a post to be included in the 'summary'"
summary_posts_required: "Minimum posts in a topic before 'summary' mode is enabled"
summary_likes_required: "Minimum likes in a topic before the 'summary' mode will be enabled"
enable_private_messages: "Allow basic (1) trust level users to create private messages and reply to private messages"
enable_long_polling: "Message bus used for notification can use long polling"

View file

@ -487,10 +487,10 @@ de:
notification_email: "Die Antwortadresse, die in Systemmails (zum Beispiel zur Passwortwiederherstellung, neuen Konten, etc.) eingetragen wird."
email_custom_headers: "Eine Pipe-getrennte (|) Liste von eigenen Mail Headern"
use_ssl: "Soll die Seite via SSL nutzbar sein?"
best_of_score_threshold: "Der Minimalscore eines Beitrags, um zu den Top Beiträgen zu zählen."
best_of_posts_required: "Minimale Zahl der Beiträge zu einem Thema bevor der Modus 'Top Beiträge' aktiviert wird."
best_of_likes_required: "Minimale Zahl der „Gefällt mir“ in einem Thema, bevor der Modus 'Top Beiträge' aktiviert wird."
best_of_percent_filter: "Prozentzahl der Top Beiträge, die gezeigt werden, wenn eine Nutzer in diese Ansicht wechselt."
summary_score_threshold: "Der Minimalscore eines Beitrags, um zu den Top Beiträgen zu zählen."
summary_posts_required: "Minimale Zahl der Beiträge zu einem Thema bevor der Modus 'Top Beiträge' aktiviert wird."
summary_likes_required: "Minimale Zahl der „Gefällt mir“ in einem Thema, bevor der Modus 'Top Beiträge' aktiviert wird."
summary_percent_filter: "Prozentzahl der Top Beiträge, die gezeigt werden, wenn eine Nutzer in diese Ansicht wechselt."
enable_private_messages: "Erlaube Nutzern mit Stufe 1, private Nachrichten zu Gespräche."
enable_long_polling: "Nachrichtenbus für Benachrichtigungen kann Long-Polling nutzen."

View file

@ -530,10 +530,10 @@ en:
notification_email: "The return email address used when sending system emails such as notifying users of lost passwords, new accounts etc"
email_custom_headers: "A pipe-delimited list of custom email headers"
use_ssl: "Should the site be accessible via SSL? (NOT IMPLEMENTED, EXPERIMENTAL)"
best_of_score_threshold: "The minimum score of a post to be included in the 'best of'"
best_of_posts_required: "Minimum posts in a topic before 'best of' mode is enabled"
best_of_likes_required: "Minimum likes in a topic before the 'best of' mode will be enabled"
best_of_percent_filter: "When a user clicks best of, show the top % of posts"
summary_score_threshold: "The minimum score of a post to be included in the 'summary'"
summary_posts_required: "Minimum posts in a topic before 'summary' mode is enabled"
summary_likes_required: "Minimum likes in a topic before the 'summary' mode will be enabled"
summary_percent_filter: "When a user clicks summary, show the top % of posts"
enable_private_messages: "Allow basic (1) trust level users to create private messages and reply to private messages"
enable_long_polling: "Message bus used for notification can use long polling"

View file

@ -312,9 +312,9 @@ es:
favicon_url: "Un favicon para tu sitio, ve http://en.wikipedia.org/wiki/Favicon"
notification_email: "La dirección de emaul de respuesta utilizada cuando se envían emails del sistema tales como notificar a los usuarios de recuperación de contraseña, nuevas cuentas etc"
use_ssl: "¿Debería ser el sitio accesible por SSL? (NO IMPLEMENTADO, EXPERIMENTAL)"
best_of_score_threshold: "La mínima puntuación de un post para ser incluido en los 'best of'"
best_of_posts_required: "Mínimo número de posts en un topic antes de que el modo 'best of' sea activado "
best_of_likes_required: "Mínimo número de me gustas en un topic antes de que el modo 'best of' sea activado"
summary_score_threshold: "La mínima puntuación de un post para ser incluido en los 'summary'"
summary_posts_required: "Mínimo número de posts en un topic antes de que el modo 'summary' sea activado "
summary_likes_required: "Mínimo número de me gustas en un topic antes de que el modo 'summary' sea activado"
enable_private_messages: "Permitir el nivel básico de confianza en los usuarios (1) para crear mensajes privados y contestar a mensajes privados"
enable_long_polling: "Los mensajes usados para notificaciones pueden usar el long polling"

View file

@ -481,10 +481,10 @@ fr:
notification_email: "L'adresse email utilisée pour notifier les utilisateurs de mots de passe perdus, d'activation de compte, etc."
email_custom_headers: "Une liste délimité par des (|) pipes d'entêtes d'email"
use_ssl: "Le site doit-il être accessible via SSL? (NON IMPLEMENTE, EXPERIMENTAL)"
best_of_score_threshold: "Le score minimum pour qu'un message soit inclus dans les 'messages populaires'"
best_of_posts_required: "Une discussion nécessite ce nombre de messages avant d'activer le mode 'discussions populaires'"
best_of_likes_required: "Minimum de J'aime avant d'activer le mode 'discussions populaires'."
best_of_percent_filter: "% des meilleurs messages à afficher lorsqu'un utilisateur active le mode 'discussions populaires'."
summary_score_threshold: "Le score minimum pour qu'un message soit inclus dans les 'messages populaires'"
summary_posts_required: "Une discussion nécessite ce nombre de messages avant d'activer le mode 'discussions populaires'"
summary_likes_required: "Minimum de J'aime avant d'activer le mode 'discussions populaires'."
summary_percent_filter: "% des meilleurs messages à afficher lorsqu'un utilisateur active le mode 'discussions populaires'."
enable_private_messages: "Autoriser les utilisateurs de niveau 1 à créer des messages et conversations privés."
enable_long_polling: "Utiliser les requêtes longues pour le flux de notifications."
long_polling_interval: "Intervalle en millisecondes avant de lancer une nouvelle requête longue."

View file

@ -322,10 +322,10 @@ id:
favicon_url: "A favicon for your site, see http://en.wikipedia.org/wiki/Favicon"
notification_email: "The return email address used when sending system emails such as notifying users of lost passwords, new accounts etc"
use_ssl: "Should the site be accessible via SSL? (NOT IMPLEMENTED, EXPERIMENTAL)"
best_of_score_threshold: "The minimum score of a post to be included in the 'best of'"
best_of_posts_required: "Minimum posts in a topic before 'best of' mode is enabled"
best_of_likes_required: "Minimum likes in a topic before the 'best of' mode will be enabled"
best_of_percent_filter: "When a user clicks best of, show the top % of posts"
summary_score_threshold: "The minimum score of a post to be included in the 'summary'"
summary_posts_required: "Minimum posts in a topic before 'summary' mode is enabled"
summary_likes_required: "Minimum likes in a topic before the 'summary' mode will be enabled"
summary_percent_filter: "When a user clicks summary, show the top % of posts"
enable_private_messages: "Allow basic (1) trust level users to create private messages and reply to private messages"
enable_long_polling: "Message bus used for notification can use long polling"

View file

@ -441,10 +441,10 @@ it:
favicon_url: "La favicon del tuo sito, per informazioni http://en.wikipedia.org/wiki/Favicon"
notification_email: "L'indirizzo email usato quando vengono inviate email di sistema come la notifica agli utenti di recupero password o nuovo account"
use_ssl: "Il sito è accessibile tramite SSL?"
best_of_score_threshold: "Il punteggio minimo di un post per essere inserito nei 'best of'"
best_of_posts_required: "Numero di post in un topic prima che la modalità 'best of' venga attivata"
best_of_likes_required: "Numero minimo di likes in un topic prima che la modalità 'best of' venga attivata"
best_of_percent_filter: "Quando un utente clicca best of, mostra i primi % post"
summary_score_threshold: "Il punteggio minimo di un post per essere inserito nei 'summary'"
summary_posts_required: "Numero di post in un topic prima che la modalità 'summary' venga attivata"
summary_likes_required: "Numero minimo di likes in un topic prima che la modalità 'summary' venga attivata"
summary_percent_filter: "Quando un utente clicca summary, mostra i primi % post"
enable_private_messages: "Autorizza gli utenti trust level 1 a creare messaggi privati e conversazioni"
enable_long_polling: "Message bus used for notification can use long polling"

View file

@ -441,10 +441,10 @@ ko:
favicon_url: "A favicon for your site, see http://en.wikipedia.org/wiki/Favicon"
notification_email: "The return email address used when sending system emails such as notifying users of lost passwords, new accounts etc"
use_ssl: "Should the site be accessible via SSL? (NOT IMPLEMENTED, EXPERIMENTAL)"
best_of_score_threshold: "The minimum score of a post to be included in the 'best of'"
best_of_posts_required: "Minimum posts in a topic before 'best of' mode is enabled"
best_of_likes_required: "Minimum likes in a topic before the 'best of' mode will be enabled"
best_of_percent_filter: "When a user clicks best of, show the top % of posts"
summary_score_threshold: "The minimum score of a post to be included in the 'summary'"
summary_posts_required: "Minimum posts in a topic before 'summary' mode is enabled"
summary_likes_required: "Minimum likes in a topic before the 'summary' mode will be enabled"
summary_percent_filter: "When a user clicks summary, show the top % of posts"
enable_private_messages: "Allow basic (1) trust level users to create private messages and reply to private messages"
enable_long_polling: "Message bus used for notification can use long polling"

View file

@ -524,10 +524,10 @@ nl:
notification_email: "Het afzenderadres dat wordt gebruikt voor mails waarmee leden op de hoogte worden gesteld van verloren wachtwoorden, nieuwe accounts etc."
email_custom_headers: "Een lijst van custom email headers, gescheiden door een pipe (|)"
use_ssl: "Moet de site toegankelijk zijn via SSL? (NOG NIET GEIMPLEMENTEERD, EXPERIMENTEEL)"
best_of_score_threshold: "De minimumscore van bericht om inbegrepen te worden in 'Best of'"
best_of_posts_required: "Minimum aantal berichten nodig in een topic voordat de 'Best of'-modus wordt aangezet."
best_of_likes_required: "Minimum aantal 'vind ik leuk' nodig voordat de 'Best of'-modus wordt aangezet."
best_of_percent_filter: "Als iemand op 'Best of' klikt, laat dan de top % van de berichten zien"
summary_score_threshold: "De minimumscore van bericht om inbegrepen te worden in 'Best of'"
summary_posts_required: "Minimum aantal berichten nodig in een topic voordat de 'Best of'-modus wordt aangezet."
summary_likes_required: "Minimum aantal 'vind ik leuk' nodig voordat de 'Best of'-modus wordt aangezet."
summary_percent_filter: "Als iemand op 'Best of' klikt, laat dan de top % van de berichten zien"
enable_private_messages: "Sta nieuwe leden (trustlevel 1) toe privé-berichten te maken en er op te kunnen reageren"
enable_long_polling: "De 'message bus' die gebruikt wordt voor notificaties kan 'long polling' gebruiken."

View file

@ -573,13 +573,13 @@ pseudo:
šůčĥ áš ɳóťíƒýíɳǧ ůšéřš óƒ łóšť ƿáššŵóřďš, ɳéŵ áččóůɳťš éťč ]]'
use_ssl: '[[ Šĥóůłď ťĥé šíťé ƀé áččéššíƀłé νíá ŠŠŁ? (ЍÓŤ ÍϺРŁÉϺÉЍŤÉĎ, ÉХРÉŘÍϺÉЍŤÁŁ)
]]'
best_of_score_threshold: '[[ Ťĥé ɱíɳíɱůɱ ščóřé óƒ á ƿóšť ťó ƀé íɳčłůďéď íɳ ťĥé
summary_score_threshold: '[[ Ťĥé ɱíɳíɱůɱ ščóřé óƒ á ƿóšť ťó ƀé íɳčłůďéď íɳ ťĥé
''ƀéšť óƒ'' ]]'
best_of_posts_required: '[[ Ϻíɳíɱůɱ ƿóšťš íɳ á ťóƿíč ƀéƒóřé ''ƀéšť óƒ'' ɱóďé íš
summary_posts_required: '[[ Ϻíɳíɱůɱ ƿóšťš íɳ á ťóƿíč ƀéƒóřé ''ƀéšť óƒ'' ɱóďé íš
éɳáƀłéď ]]'
best_of_likes_required: '[[ Ϻíɳíɱůɱ łíǩéš íɳ á ťóƿíč ƀéƒóřé ťĥé ''ƀéšť óƒ'' ɱóďé
summary_likes_required: '[[ Ϻíɳíɱůɱ łíǩéš íɳ á ťóƿíč ƀéƒóřé ťĥé ''ƀéšť óƒ'' ɱóďé
ŵíłł ƀé éɳáƀłéď ]]'
best_of_percent_filter: '[[ Ŵĥéɳ á ůšéř čłíčǩš ƀéšť óƒ, šĥóŵ ťĥé ťóƿ % óƒ ƿóšťš
summary_percent_filter: '[[ Ŵĥéɳ á ůšéř čłíčǩš ƀéšť óƒ, šĥóŵ ťĥé ťóƿ % óƒ ƿóšťš
]]'
enable_private_messages: '[[ Áłłóŵ ƀášíč (1) ťřůšť łéνéł ůšéřš ťó čřéáťé ƿříνáťé
ɱéššáǧéš áɳď řéƿłý ťó ƿříνáťé ɱéššáǧéš ]]'

View file

@ -263,9 +263,9 @@ pt:
favicon_url: "Um favicon para o teu site"
notification_email: "O endereço de email a ser usado para notificar os utilizadores de password esquecida, novas contas, etc."
use_ssl: "Deverá o site estár acessivel via SSL?"
best_of_score_threshold: "A pontuação mínima de um post para ser incluído no 'melhor de'"
best_of_posts_required: "Um tópico precisa deste número de posts antes de ser ativado o modo 'melhor de'."
best_of_likes_required: "Um tópico precisa deste número de gostos antes de ser ativado o mode 'melhor de'."
summary_score_threshold: "A pontuação mínima de um post para ser incluído no 'melhor de'"
summary_posts_required: "Um tópico precisa deste número de posts antes de ser ativado o modo 'melhor de'."
summary_likes_required: "Um tópico precisa deste número de gostos antes de ser ativado o mode 'melhor de'."
enable_private_messages: "permitir membros a ter conversas com mensagens privadas"
enable_long_polling: "Message bus used for notification can use long polling."

View file

@ -513,10 +513,10 @@ pt_BR:
notification_email: "O endereço de email a ser usado para notificar os utilizadores de password esquecida, novas contas, etc."
email_custom_headers: "A lista delimitada por barras verticais de cabeçalhos de e-mail personalizados"
use_ssl: "O site deve ser acessível via SSL?"
best_of_score_threshold: "A pontuação mínima de uma postagem para ser incluído no 'melhor de'"
best_of_posts_required: "Um tópico precisa deste número de posts antes de ser ativado o modo 'melhor de'."
best_of_likes_required: "Um tópico precisa deste número de curtidas antes de ser ativado o modo 'melhor de'."
best_of_percent_filter: "Quando um usuário clicar em Os Melhores, exibir os % posts"
summary_score_threshold: "A pontuação mínima de uma postagem para ser incluído no 'melhor de'"
summary_posts_required: "Um tópico precisa deste número de posts antes de ser ativado o modo 'melhor de'."
summary_likes_required: "Um tópico precisa deste número de curtidas antes de ser ativado o modo 'melhor de'."
summary_percent_filter: "Quando um usuário clicar em Os Melhores, exibir os % posts"
enable_private_messages: "permitir membros a ter conversas com mensagens particulares"
enable_long_polling: "O sistema de mensagens das notificações pode fazer solicitações longas."

View file

@ -515,10 +515,10 @@ ru:
notification_email: 'Обратный электронный адрес, используемый для отправки системных электронных писем пользователям, таких как оповещение пользователей о потерянном пароле, новой учетной записи и т.д.'
email_custom_headers: 'Разделенный чертой список дополнительных заголовков в почтовых сообщениях'
use_ssl: 'Будет ли сайт доступен по SSL? (НЕ РЕАЛИЗОВАНО, ЭКСПЕРИМЕНТАЛЬНАЯ ФУНКЦИЯ)'
best_of_score_threshold: 'Минимальная оценка сообщения, чтобы оно было включено в список «лучших сообщений»'
best_of_posts_required: 'Минимальное количество сообщений в теме для активации режима «лучшие»'
best_of_likes_required: 'Минимальное количество симпатий для активации режима «лучшие»'
best_of_percent_filter: 'Когда пользователь нажимает «Лучшие», показывать топ % сообщений'
summary_score_threshold: 'Минимальная оценка сообщения, чтобы оно было включено в список «лучших сообщений»'
summary_posts_required: 'Минимальное количество сообщений в теме для активации режима «лучшие»'
summary_likes_required: 'Минимальное количество симпатий для активации режима «лучшие»'
summary_percent_filter: 'Когда пользователь нажимает «Лучшие», показывать топ % сообщений'
enable_private_messages: 'Разрешить пользователям базового (1) уровня доверия посылать личные сообщения и отвечать на них'
enable_long_polling: 'Использовать механизм long polling для уведомлений о событиях'
long_polling_interval: 'Время до того, как начнется новый long poll, в миллисекундах'

View file

@ -364,10 +364,10 @@ sv:
favicon_url: "En favicon för till webbplats, se http://en.wikipedia.org/wiki/Favicon"
notification_email: "Avsändaradressen som används vid utskick av systemmail som t.ex. glömt lösenord, nya konton etc"
use_ssl: "Ska denna webbplats vara åtkomlig via SSL?"
best_of_score_threshold: "The minimum score of a post to be included in the 'best of'"
best_of_posts_required: "Minimum posts in a topic before 'best of' mode is enabled"
best_of_likes_required: "Minimum likes in a topic before the 'best of' mode will be enabled"
best_of_percent_filter: "When a user clicks best of, show the top % of posts"
summary_score_threshold: "The minimum score of a post to be included in the 'summary'"
summary_posts_required: "Minimum posts in a topic before 'summary' mode is enabled"
summary_likes_required: "Minimum likes in a topic before the 'summary' mode will be enabled"
summary_percent_filter: "When a user clicks summary, show the top % of posts"
enable_private_messages: "Allow basic (1) trust level users to create private messages and reply to private messages"
enable_long_polling: "Message bus used for notification can use long polling"

View file

@ -460,10 +460,10 @@ zh_CN:
favicon_url: "你的站点图标favicon参考 http://zh.wikipedia.org/wiki/Favicon"
notification_email: "邮件回复地址,当发送系统邮件,例如通知用户找回密码、新用户注册等等时,所使用的发信人地址"
use_ssl: "使用 SSL 安全套接层来访问本站吗?"
best_of_score_threshold: "将一个帖子包含到“优秀”帖子中所需的最小分值"
best_of_posts_required: "在一个主题中启用“优秀”模式所要求的最小帖子数量"
best_of_likes_required: "在一个主题中启用“优秀”模式所要求的最小赞数量"
best_of_percent_filter: "当用户点击“优秀”,显示前 % 几的帖子"
summary_score_threshold: "将一个帖子包含到“优秀”帖子中所需的最小分值"
summary_posts_required: "在一个主题中启用“优秀”模式所要求的最小帖子数量"
summary_likes_required: "在一个主题中启用“优秀”模式所要求的最小赞数量"
summary_percent_filter: "当用户点击“优秀”,显示前 % 几的帖子"
enable_private_messages: "用户创建私信和私下交流要达到的用户级别"
enable_long_polling: "启用消息总线使通知功能可以使用长轮询long polling"

View file

@ -441,10 +441,10 @@ zh_TW:
favicon_url: "你的站點圖標favicon參考 http://zh.wikipedia.org/wiki/Favicon"
notification_email: "郵件回複地址,當發送系統郵件,例如通知用戶找回密碼、新用戶注冊等等時,所使用的發信人地址"
use_ssl: "使用 SSL 安全套接層來訪問本站嗎?"
best_of_score_threshold: "將一個帖子包含到“優秀”帖子中所需的最小分值"
best_of_posts_required: "在一個主題中啓用“優秀”模式所要求的最小帖子數量"
best_of_likes_required: "在一個主題中啓用“優秀”模式所要求的最小贊數量"
best_of_percent_filter: "當用戶點擊“優秀”,顯示前 % 幾的帖子"
summary_score_threshold: "將一個帖子包含到“優秀”帖子中所需的最小分值"
summary_posts_required: "在一個主題中啓用“優秀”模式所要求的最小帖子數量"
summary_likes_required: "在一個主題中啓用“優秀”模式所要求的最小贊數量"
summary_percent_filter: "當用戶點擊“優秀”,顯示前 % 幾的帖子"
enable_private_messages: "用戶創建私信和私下交流要達到的用戶級別"
enable_long_polling: "啓用消息總線使通知功能可以使用長輪詢long polling"

View file

@ -240,8 +240,8 @@ Discourse::Application.routes.draw do
get 't/:slug/:topic_id/wordpress' => 'topics#wordpress', constraints: {topic_id: /\d+/}
get 't/:slug/:topic_id/moderator-liked' => 'topics#moderator_liked', constraints: {topic_id: /\d+/}
get 't/:topic_id/wordpress' => 'topics#wordpress', constraints: {topic_id: /\d+/}
get 't/:slug/:topic_id/best_of' => 'topics#show', defaults: {best_of: true}, constraints: {topic_id: /\d+/, post_number: /\d+/}
get 't/:topic_id/best_of' => 'topics#show', constraints: {topic_id: /\d+/, post_number: /\d+/}
get 't/:slug/:topic_id/summary' => 'topics#show', defaults: {summary: true}, constraints: {topic_id: /\d+/, post_number: /\d+/}
get 't/:topic_id/summary' => 'topics#show', constraints: {topic_id: /\d+/, post_number: /\d+/}
put 't/:slug/:topic_id' => 'topics#update', constraints: {topic_id: /\d+/}
put 't/:slug/:topic_id/star' => 'topics#star', constraints: {topic_id: /\d+/}
put 't/:topic_id/star' => 'topics#star', constraints: {topic_id: /\d+/}

View file

@ -371,10 +371,10 @@ uncategorized:
active_user_rate_limit_secs: 60
previous_visit_timeout_hours: 1
staff_like_weight: 3
best_of_score_threshold: 15
best_of_posts_required: 50
best_of_likes_required: 1
best_of_percent_filter: 20
summary_score_threshold: 15
summary_posts_required: 50
summary_likes_required: 1
summary_percent_filter: 20
send_welcome_message: true
allow_import: false
educate_until_posts:

View file

@ -1,7 +1,7 @@
class AddHasBestOfToForumThreads < ActiveRecord::Migration
def change
add_column :forum_threads, :has_best_of, :boolean, default: false, null: false
add_column :forum_threads, :has_summary, :boolean, default: false, null: false
change_column :posts, :score, :float
end

View file

@ -0,0 +1,5 @@
class RenameBestOfToSummary < ActiveRecord::Migration
def change
rename_column :topics, :has_best_of, :has_summary
end
end

View file

@ -95,7 +95,7 @@ class ComposerMessagesFinder
topic = Topic.where(id: @details[:topic_id]).first
return if topic.blank? ||
topic.user_id == @user.id ||
topic.posts_count < SiteSetting.best_of_posts_required
topic.posts_count < SiteSetting.summary_posts_required
posts_by_user = @user.posts.where(topic_id: topic.id).count

View file

@ -32,7 +32,7 @@ class ScoreCalculator
# Update the topics
exec_sql "UPDATE topics AS t
SET has_best_of = (t.like_count >= :likes_required AND
SET has_summary = (t.like_count >= :likes_required AND
t.posts_count >= :posts_required AND
x.max_score >= :score_required),
score = x.avg_score
@ -44,16 +44,16 @@ class ScoreCalculator
WHERE x.topic_id = t.id AND
(
(t.score <> x.avg_score OR t.score IS NULL) OR
(t.has_best_of IS NULL OR t.has_best_of <> (
(t.has_summary IS NULL OR t.has_summary <> (
t.like_count >= :likes_required AND
t.posts_count >= :posts_required AND
x.max_score >= :score_required
))
)
",
likes_required: SiteSetting.best_of_likes_required,
posts_required: SiteSetting.best_of_posts_required,
score_required: SiteSetting.best_of_score_threshold
likes_required: SiteSetting.summary_likes_required,
posts_required: SiteSetting.summary_posts_required,
score_required: SiteSetting.summary_score_threshold
# Update percentage rank of topics
exec_sql("UPDATE topics SET percent_rank = x.percent_rank

View file

@ -258,7 +258,7 @@ class TopicView
def setup_filtered_posts
@filtered_posts = @topic.posts
@filtered_posts = @filtered_posts.with_deleted if @user.try(:staff?)
@filtered_posts = @filtered_posts.best_of if @filter == 'best_of'
@filtered_posts = @filtered_posts.summary if @filter == 'summary'
@filtered_posts = @filtered_posts.where('posts.post_type <> ?', Post.types[:moderator_action]) if @best.present?
return unless @username_filters.present?
usernames = @username_filters.map{|u| u.downcase}

View file

@ -181,7 +181,7 @@ describe ComposerMessagesFinder do
SiteSetting.stubs(:educate_until_posts).returns(10)
user.stubs(:post_count).returns(11)
SiteSetting.stubs(:best_of_posts_required).returns(1)
SiteSetting.stubs(:summary_posts_required).returns(1)
Fabricate(:post, topic: topic, user: user)
Fabricate(:post, topic: topic, user: user)
@ -207,8 +207,8 @@ describe ComposerMessagesFinder do
finder.check_dominating_topic.should be_blank
end
it "does not notify if the `best_of_posts_required` has not been reached" do
SiteSetting.stubs(:best_of_posts_required).returns(100)
it "does not notify if the `summary_posts_required` has not been reached" do
SiteSetting.stubs(:summary_posts_required).returns(100)
finder.check_dominating_topic.should be_blank
end
@ -222,8 +222,8 @@ describe ComposerMessagesFinder do
finder.check_dominating_topic.should be_present
end
it "doesn't notify a user if the topic has less than `best_of_posts_required` posts" do
SiteSetting.stubs(:best_of_posts_required).returns(5)
it "doesn't notify a user if the topic has less than `summary_posts_required` posts" do
SiteSetting.stubs(:summary_posts_required).returns(5)
finder.check_dominating_topic.should be_blank
end

View file

@ -34,29 +34,29 @@ describe ScoreCalculator do
end
context 'best_of' do
context 'summary' do
it "won't update the site settings when the site settings don't match" do
ScoreCalculator.new(reads: 3).calculate
topic.reload
topic.has_best_of.should be_false
topic.has_summary.should be_false
end
it "removes the best_of flag if the topic no longer qualifies" do
topic.update_column(:has_best_of, true)
it "removes the summary flag if the topic no longer qualifies" do
topic.update_column(:has_summary, true)
ScoreCalculator.new(reads: 3).calculate
topic.reload
topic.has_best_of.should be_false
topic.has_summary.should be_false
end
it "won't update the site settings when the site settings don't match" do
SiteSetting.expects(:best_of_likes_required).returns(0)
SiteSetting.expects(:best_of_posts_required).returns(1)
SiteSetting.expects(:best_of_score_threshold).returns(100)
SiteSetting.expects(:summary_likes_required).returns(0)
SiteSetting.expects(:summary_posts_required).returns(1)
SiteSetting.expects(:summary_score_threshold).returns(100)
ScoreCalculator.new(reads: 3).calculate
topic.reload
topic.has_best_of.should be_true
topic.has_summary.should be_true
end
end

View file

@ -701,14 +701,14 @@ describe Post do
end
context 'best_of' do
context 'summary' do
let!(:p1) { Fabricate(:post, post_args.merge(score: 4, percent_rank: 0.33)) }
let!(:p2) { Fabricate(:post, post_args.merge(score: 10, percent_rank: 0.66)) }
let!(:p3) { Fabricate(:post, post_args.merge(score: 5, percent_rank: 0.99)) }
it "returns the OP and posts above the threshold in best of mode" do
SiteSetting.stubs(:best_of_percent_filter).returns(66)
Post.best_of.order(:post_number).should == [p1, p2]
it "returns the OP and posts above the threshold in summary mode" do
SiteSetting.stubs(:summary_percent_filter).returns(66)
Post.summary.order(:post_number).should == [p1, p2]
end
end

View file

@ -712,7 +712,7 @@ describe Topic do
it 'is a regular topic by default' do
topic.archetype.should == Archetype.default
topic.has_best_of.should be_false
topic.has_summary.should be_false
topic.percent_rank.should == 1.0
topic.should be_visible
topic.pinned_at.should be_blank

View file

@ -113,9 +113,9 @@ test("cancelFilter", function() {
this.stub(postStream, "refresh");
postStream.set('bestOf', true);
postStream.set('summary', true);
postStream.cancelFilter();
ok(!postStream.get('bestOf'), "best of is cancelled");
ok(!postStream.get('summary'), "summary is cancelled");
postStream.toggleParticipant(participant);
postStream.cancelFilter();
@ -143,14 +143,14 @@ test("streamFilters", function() {
ok(postStream.get('hasNoFilters'), "there are no filters by default");
blank(postStream.get("filterDesc"), "there is no description of the filter");
postStream.set('bestOf', true);
deepEqual(postStream.get('streamFilters'), {filter: "best_of"}, "postFilters contains the bestOf flag");
postStream.set('summary', true);
deepEqual(postStream.get('streamFilters'), {filter: "summary"}, "postFilters contains the summary flag");
ok(!postStream.get('hasNoFilters'), "now there are filters present");
present(postStream.get("filterDesc"), "there is a description of the filter");
postStream.toggleParticipant(participant.username);
deepEqual(postStream.get('streamFilters'), {
filter: "best_of",
filter: "summary",
username_filters: ['eviltrout']
}, "streamFilters contains the username we filtered");
});
@ -363,9 +363,9 @@ test('triggerNewPostInStream', function() {
postStream.triggerNewPostInStream(null);
ok(!postStream.appendMore.calledOnce, "asking for a null id does nothing");
postStream.toggleBestOf();
postStream.toggleSummary();
postStream.triggerNewPostInStream(1);
ok(!postStream.appendMore.calledOnce, "it will not trigger when bestOf is active");
ok(!postStream.appendMore.calledOnce, "it will not trigger when summary is active");
postStream.cancelFilter();
postStream.toggleParticipant('eviltrout');