mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
trust level 0 is highlighted in light gray as opposed to having special semantics around account age.
This commit is contained in:
parent
9068fdae99
commit
86cf7b1524
18 changed files with 21 additions and 28 deletions
|
@ -8,6 +8,11 @@
|
|||
**/
|
||||
Discourse.Post = Discourse.Model.extend({
|
||||
|
||||
|
||||
new_user:(function(){
|
||||
return this.get('trust_level') === 0;
|
||||
}).property('trust_level'),
|
||||
|
||||
url: (function() {
|
||||
return Discourse.Utilities.postUrl(this.get('topic.slug') || this.get('topic_slug'), this.get('topic_id'), this.get('post_number'));
|
||||
}).property('post_number', 'topic_id', 'topic.slug'),
|
||||
|
|
1
app/models/site_setting.rb
Normal file → Executable file
1
app/models/site_setting.rb
Normal file → Executable file
|
@ -157,7 +157,6 @@ class SiteSetting < ActiveRecord::Base
|
|||
setting(:body_min_entropy, 7)
|
||||
setting(:max_word_length, 30)
|
||||
|
||||
setting(:new_user_period_days, 2)
|
||||
setting(:visitor_max_links, 2)
|
||||
setting(:visitor_max_images, 0)
|
||||
|
||||
|
|
13
app/serializers/post_serializer.rb
Normal file → Executable file
13
app/serializers/post_serializer.rb
Normal file → Executable file
|
@ -37,21 +37,16 @@ class PostSerializer < ApplicationSerializer
|
|||
:bookmarked,
|
||||
:raw,
|
||||
:actions_summary,
|
||||
:new_user?,
|
||||
:moderator?,
|
||||
:avatar_template,
|
||||
:user_id,
|
||||
:draft_sequence,
|
||||
:hidden,
|
||||
:hidden_reason_id,
|
||||
:deleted_at
|
||||
:deleted_at,
|
||||
:trust_level
|
||||
|
||||
|
||||
def new_user?
|
||||
# 21 calls = 5ms ... if there was a proper date in the RHS it would be 1ms
|
||||
object.user.created_at > SiteSetting.new_user_period_days.days.ago
|
||||
end
|
||||
|
||||
def moderator?
|
||||
object.user.moderator?
|
||||
end
|
||||
|
@ -128,6 +123,10 @@ class PostSerializer < ApplicationSerializer
|
|||
object.user.name
|
||||
end
|
||||
|
||||
def trust_level
|
||||
object.user.trust_level
|
||||
end
|
||||
|
||||
def reply_to_user
|
||||
{
|
||||
username: object.reply_to_user.username,
|
||||
|
|
|
@ -388,6 +388,9 @@ pseudo:
|
|||
unread: '[[ Ťĥéřé ářé ɳó ɱóřé ůɳřéáď ťóƿíčš ťó řéáď. ]]'
|
||||
favorited: '[[ Ťĥéřé ářé ɳó ɱóřé ƒáνóříťéď ťóƿíčš ťó řéáď. ]]'
|
||||
category: '[[ Ťĥéřé ářé ɳó ɱóřé {{category}} ťóƿíčš. ]]'
|
||||
rank_details:
|
||||
show: '[[ šĥóŵ ťóƿíč řáɳǩ ďéťáíłš ]]'
|
||||
title: '[[ Ťóƿíč Řáɳǩ Ďéťáíłš ]]'
|
||||
topic:
|
||||
create_in: '[[ Čřéáťé {{categoryName}} Ťóƿíč ]]'
|
||||
create: '[[ Čřéáťé Ťóƿíč ]]'
|
||||
|
@ -463,8 +466,8 @@ pseudo:
|
|||
ƿóšťš. ]]'
|
||||
tracking:
|
||||
title: '[[ Ťřáčǩíɳǧ ]]'
|
||||
description: '[[ ýóů ŵíłł ƀé ɳóťíƒíéď óƒ ůɳřéáď ƿóšťš, @ɳáɱé ɱéɳťíóɳš, áɳď
|
||||
řéƿłíéš ťó ýóůř ƿóšťš. ]]'
|
||||
description: '[[ ýóů ŵíłł ƀé ɳóťíƒíéď óƒ @ɳáɱé ɱéɳťíóɳš áɳď řéƿłíéš ťó ýóůř
|
||||
ƿóšťš, ƿłůš ýóů ŵíłł šéé á čóůɳť óƒ ůɳřéáď áɳď ɳéŵ ƿóšťš. ]]'
|
||||
regular:
|
||||
title: '[[ Řéǧůłář ]]'
|
||||
description: '[[ ýóů ŵíłł ƀé ɳóťíƒíéď óɳłý íƒ šóɱéóɳé ɱéɳťíóɳš ýóůř @ɳáɱé
|
||||
|
@ -711,7 +714,7 @@ pseudo:
|
|||
other: '[[ {{categoryName}} ({{count}}) ]]'
|
||||
help: '[[ łáťéšť ťóƿíčš íɳ ťĥé {{categoryName}} čáťéǧóřý ]]'
|
||||
browser_update: '[[ Ůɳƒóřťůɳáťéłý, <á ĥřéƒ="ĥťťƿ://ŵŵŵ.ďíščóůřšé.óřǧ/ƒáƣ/#ƀřóŵšéř">ýóůř
|
||||
ƀřóŵšéř íš ťóó ółď ťó ŵóřǩ óɳ ťĥíš Ďíščóůřšé ƒóřůɱ</á>. Рłéášé <á ĥřéƒ="%{url}">ůƿǧřáďé
|
||||
ƀřóŵšéř íš ťóó ółď ťó ŵóřǩ óɳ ťĥíš Ďíščóůřšé ƒóřůɱ</á>. Рłéášé <á ĥřéƒ="ĥťťƿ://ƀřóŵšéĥáƿƿý.čóɱ">ůƿǧřáďé
|
||||
ýóůř ƀřóŵšéř</á>. ]]'
|
||||
admin_js:
|
||||
type_to_filter: '[[ ťýƿé ťó ƒíłťéř... ]]'
|
||||
|
|
1
config/locales/server.cs.yml
Normal file → Executable file
1
config/locales/server.cs.yml
Normal file → Executable file
|
@ -480,7 +480,6 @@ cs:
|
|||
max_word_length: "Maximální povolená délka slova ve znacích v názvu tématu"
|
||||
title_min_entropy: "Minimální entropie (unikátní znaky) požadovaná v názvu tématu"
|
||||
body_min_entropy: "Minimální entropie (unikátní znaky) požadovaná v obsahu příspěvku"
|
||||
new_user_period_days: "Jak dlouho je uživatel zvýrazněn jako nový, ve dnech"
|
||||
|
||||
title_fancy_entities: "Převádět HTML entity v názvech témat"
|
||||
|
||||
|
|
|
@ -417,7 +417,6 @@ da:
|
|||
max_word_length: "The maximum allowed word length, in characters, in a topic title"
|
||||
title_min_entropy: "The minimum allowed entropy (unique characters) required for a topic title"
|
||||
body_min_entropy: "The minimum allowed entropy (unique characters) required for a post body"
|
||||
new_user_period_days: "How long a user is highlighted as being new, in days"
|
||||
title_fancy_entities: "Convert fancy HTML entities in topic titles"
|
||||
|
||||
min_title_similar_length: "The minimum length of a title before it will be checked for similar topics"
|
||||
|
|
|
@ -439,7 +439,6 @@ de:
|
|||
max_word_length: "Maximale Wortlänge in Zeichen in Thementiteln."
|
||||
title_min_entropy: "Minimal nötige Entropie (einzigartige Zeichen) in einem Thementitel."
|
||||
body_min_entropy: "Minimal nötige Entropie (einzigartige Zeichen) in einem Beitragstext."
|
||||
new_user_period_days: "Tage, die ein Nutzer als neu hervorgehoben wird."
|
||||
|
||||
title_fancy_entities: "Konvertiere HTML-Entitys in Thementiteln."
|
||||
|
||||
|
|
|
@ -450,7 +450,6 @@ en:
|
|||
max_word_length: "The maximum allowed word length, in characters, in a topic title"
|
||||
title_min_entropy: "The minimum allowed entropy (unique characters) required for a topic title"
|
||||
body_min_entropy: "The minimum allowed entropy (unique characters) required for a post body"
|
||||
new_user_period_days: "How long a user is highlighted as being new, in days"
|
||||
|
||||
title_fancy_entities: "Convert fancy HTML entities in topic titles"
|
||||
|
||||
|
|
1
config/locales/server.es.yml
Normal file → Executable file
1
config/locales/server.es.yml
Normal file → Executable file
|
@ -407,7 +407,6 @@ es:
|
|||
max_word_length: "The maximum allowed word length, in characters, in a topic title"
|
||||
title_min_entropy: "The minimum allowed entropy (unique characters) required for a topic title"
|
||||
body_min_entropy: "The minimum allowed entropy (unique characters) required for a post body"
|
||||
new_user_period_days: "How long a user is highlighted as being new, in days"
|
||||
title_fancy_entities: "Convert fancy HTML entities in topic titles"
|
||||
|
||||
notification_types:
|
||||
|
|
|
@ -455,7 +455,6 @@ fr:
|
|||
max_word_length: "Le nombre maximum de mots dans un titre de discussion"
|
||||
title_min_entropy: "L'entropie minimale (ie. nombre de caractères) d'un titre de discussion"
|
||||
body_min_entropy: "L'entropie minimale (ie. nombre de caractères) du contenu d'un message"
|
||||
new_user_period_days: "Combien de temps en jours, un utilisateur est-il consideré comme nouveau."
|
||||
title_fancy_entities: "Convertir les entitées HTML dans les titres des discussion"
|
||||
|
||||
min_title_similar_length: "La taille minimale du titre avant que l'on vérifie l'existence de discussions identiques"
|
||||
|
|
|
@ -422,7 +422,6 @@ id:
|
|||
max_word_length: "The maximum allowed word length, in characters, in a topic title"
|
||||
title_min_entropy: "The minimum allowed entropy (unique characters) required for a topic title"
|
||||
body_min_entropy: "The minimum allowed entropy (unique characters) required for a post body"
|
||||
new_user_period_days: "How long a user is highlighted as being new, in days"
|
||||
title_fancy_entities: "Convert fancy HTML entities in topic titles"
|
||||
|
||||
min_title_similar_length: "The minimum length of a title before it will be checked for similar topics"
|
||||
|
|
|
@ -423,7 +423,6 @@ it:
|
|||
max_word_length: "Numero massimo di caratteri che compongono una parola del titolo di un topic"
|
||||
title_min_entropy: "Entropia (caratteri unici) richiesta per il titolo di un topic"
|
||||
body_min_entropy: "Entropia (caratteri unici) richiesta per il contenuto di un post"
|
||||
new_user_period_days: "Per quanti giorni un utente è considerato 'nuovo'"
|
||||
title_fancy_entities: "Converti caratteri HTML strani nei titoli dei topic"
|
||||
|
||||
min_title_similar_length: "Lunghezza minima di un titolo per attivare il controllo su topic simili"
|
||||
|
|
|
@ -342,8 +342,6 @@ nl:
|
|||
title_min_entropy: "De minimale entropie die een topictitel moet bevatten"
|
||||
body_min_entropy: "De minimale entropie die de inhoud van een post moet bevatten"
|
||||
|
||||
new_user_period_days: "Hoe lang een gebruiker als nieuw wordt aangetoond, in dagen."
|
||||
|
||||
|
||||
|
||||
notification_types:
|
||||
|
|
|
@ -11,6 +11,10 @@ pseudo:
|
|||
via: '[[ %{username} νíá %{site_name} ]]'
|
||||
is_reserved: '[[ íš řéšéřνéď ]]'
|
||||
too_many_mentions:
|
||||
zero: '[[ Šóřřý, ýóů čáɳ''ť ɱéɳťíóɳ óťĥéř ůšéřš. ]]'
|
||||
one: '[[ Šóřřý, ýóů čáɳ óɳłý ɱéɳťíóɳ óɳé óťĥéř ůšéř íɳ á ƿóšť. ]]'
|
||||
other: '[[ Šóřřý, ýóů čáɳ óɳłý ɱéɳťíóɳ %{count} ůšéřš íɳ á ƿóšť. ]]'
|
||||
too_many_mentions_visitor:
|
||||
zero: '[[ Šóřřý, νíšíťóřš čáɳ''ť ɱéɳťíóɳ óťĥéř ůšéřš. ]]'
|
||||
one: '[[ Šóřřý, νíšíťóřš čáɳ óɳłý ɱéɳťíóɳ óɳé óťĥéř ůšéř íɳ á ƿóšť. ]]'
|
||||
other: '[[ Šóřřý, νíšíťóřš čáɳ óɳłý ɱéɳťíóɳ %{count} ůšéřš íɳ á ƿóšť. ]]'
|
||||
|
@ -523,8 +527,6 @@ pseudo:
|
|||
ƒóř á ťóƿíč ťíťłé ]]'
|
||||
body_min_entropy: '[[ Ťĥé ɱíɳíɱůɱ áłłóŵéď éɳťřóƿý (ůɳíƣůé čĥářáčťéřš) řéƣůířéď
|
||||
ƒóř á ƿóšť ƀóďý ]]'
|
||||
new_user_period_days: '[[ Ĥóŵ łóɳǧ á ůšéř íš ĥíǧĥłíǧĥťéď áš ƀéíɳǧ ɳéŵ, íɳ ďáýš
|
||||
]]'
|
||||
title_fancy_entities: '[[ Čóɳνéřť ƒáɳčý ĤŤϺŁ éɳťíťíéš íɳ ťóƿíč ťíťłéš ]]'
|
||||
min_title_similar_length: '[[ Ťĥé ɱíɳíɱůɱ łéɳǧťĥ óƒ á ťíťłé ƀéƒóřé íť ŵíłł ƀé
|
||||
čĥéčǩéď ƒóř šíɱíłář ťóƿíčš ]]'
|
||||
|
|
|
@ -348,8 +348,6 @@ pt:
|
|||
title_min_entropy: "The minimum entropy for a topic title"
|
||||
body_min_entropy: "The minimum entropy for post body"
|
||||
|
||||
new_user_period_days: "How long a user is highlighted as being new, in days."
|
||||
|
||||
notification_types:
|
||||
mentioned: "%{display_username} mencionou-te em %{link}"
|
||||
liked: "%{display_username} gostou do teu post em %{link}"
|
||||
|
|
|
@ -422,7 +422,6 @@ sv:
|
|||
max_word_length: "The maximum allowed word length, in characters, in a topic title"
|
||||
title_min_entropy: "The minimum allowed entropy (unique characters) required for a topic title"
|
||||
body_min_entropy: "The minimum allowed entropy (unique characters) required for a post body"
|
||||
new_user_period_days: "How long a user is highlighted as being new, in days"
|
||||
title_fancy_entities: "Convert fancy HTML entities in topic titles"
|
||||
|
||||
min_title_similar_length: "The minimum length of a title before it will be checked for similar topics"
|
||||
|
|
|
@ -431,7 +431,6 @@ zh_CN:
|
|||
max_word_length: "在主题的标题中,允许的词语长度的最大字符数"
|
||||
title_min_entropy: "在主题的标题中,允许的最低熵值(单个字符)"
|
||||
body_min_entropy: "在一个帖子内文中,允许的最低熵值(单个字符)"
|
||||
new_user_period_days: "在多少天以内一个用户会被高亮显示为新用户"
|
||||
title_fancy_entities: "转换主题标题中的 HTML 实体"
|
||||
|
||||
min_title_similar_length: "开始检查相似主题的帖子标题的最小长度"
|
||||
|
|
|
@ -431,7 +431,6 @@ zh_TW:
|
|||
max_word_length: "在主題的標題中,允許的詞語長度的最大字符數"
|
||||
title_min_entropy: "在主題的標題中,允許的最低熵值(單個字符)"
|
||||
body_min_entropy: "在一個帖子內文中,允許的最低熵值(單個字符)"
|
||||
new_user_period_days: "在多少天以內一個用戶會被高亮顯示爲新用戶"
|
||||
title_fancy_entities: "轉換主題標題中的 HTML 實體"
|
||||
|
||||
min_title_similar_length: "開始檢查相似主題的帖子標題的最小長度"
|
||||
|
|
Loading…
Reference in a new issue