Browse Source

fix for showing of promoted posts, zh localizaion of notifications, replacement of couldnt_find_any_posts string by common slider

master
Simon Grim 10 years ago
parent
commit
91a2fdec18
  1. 2
      css/style.css
  2. 4
      home.html
  3. 14
      js/interface_localization.js
  4. 6
      js/twister_actions.js
  5. 6
      js/twister_timeline.js
  6. 2
      theme_calm/css/style.css

2
css/style.css

@ -1741,7 +1741,7 @@ ol.toptrends-list { @@ -1741,7 +1741,7 @@ ol.toptrends-list {
.postboard-loading
{
text-align: right;
text-align: center;
}
.postboard-loading div
{

4
home.html

@ -496,10 +496,12 @@ @@ -496,10 +496,12 @@
<button class="postboard-news" style="display:none;"></button>
</h2>
<span class="no-posts-found-message" style="display:none;">Couldn't find any posts with this hashtag. Still searching.</span>
<ol id="profile-posts" class="postboard-posts">
</ol>
<div class="postboard-loading" style="display: none;">
<div></div>
</div>
</div>
<!-- ÁREA DE POSTS END -->
</div>

14
js/interface_localization.js

@ -896,19 +896,19 @@ if(preferredLanguage == "zh"){ @@ -896,19 +896,19 @@ if(preferredLanguage == "zh"){
"Network status": "网络状态",
"New direct message...": "新的即时信息...",
"New Post...": "新推文...",
"You got": "You got",
"You got": "你收到",
"in postboard": "在时间线里",
"in search result": "在搜索结果里",
"in top trends": "在热词趋势里",
"new_posts": "%{smart_count} 新推文",
"new_mentions": "%{smart_count} new mention |||| %{smart_count} new mentions",
"new_direct_messages": "%{smart_count} new direct message |||| %{smart_count} new direct messages",
"new_mentions": "%{smart_count} 新的提及 |||| %{smart_count} 新的提及",
"new_direct_messages": "%{smart_count} 新私信 |||| %{smart_count} 新私信",
"nobody": "nobody", // used to promote a post without attaching the user
"Not available": "用户名不可用", // username is not available
"notify_desktop_error": "Twister cannot perform desktop notification: unknown error occured.",
"notify_desktop_perm_denied": "Twister cannot perform desktop notification: permission denied.\n\nIf you want to get notifications, allow them for %{this_domain} in settings of your browser.",
"notify_desktop_test": "All the twisters gonna twist.\nNow you are welcome too.",
"notify_desktop_title": "Watch out, it's twister over here!",
"notify_desktop_error": "Twister 无法发出桌面提醒: 发生未知错误.",
"notify_desktop_perm_denied": "Twister 无法发出桌面提醒: 权限被拒绝.\n\n如果你想收到提醒, 在你的浏览器设置中允许 %{this_domain} 发出提醒.",
"notify_desktop_test": "我们都用 Twister.\n欢迎你加入.",
"notify_desktop_title": "注意, twister 在这!",
"Number of blocks in block chain:": "块链中的块数:",
"Number of CPUs to use": "使用CPU数目 ",
"Only alphanumeric and underscore allowed.": "只允许字母和下划线",

6
js/twister_actions.js

@ -326,6 +326,7 @@ function clearHashtagProcessed() { @@ -326,6 +326,7 @@ function clearHashtagProcessed() {
}
function requestHashtag(postboard,hashtag,resource, timeoutArgs) {
postboard.closest("div").find(".postboard-loading").show();
dhtget( hashtag, resource, "m",
function(args, data) {
processHashtag(args.postboard, args.hashtag, data);
@ -361,9 +362,6 @@ function processHashtag(postboard, hashtag, data) { @@ -361,9 +362,6 @@ function processHashtag(postboard, hashtag, data) {
}
}
if(!postboard.children().length && !_hashtagPendingPosts.length && hashtag != defaultScreenName)
postboard.closest("div").find(".no-posts-found-message").show();
if( _hashtagPendingPosts.length ) {
if( !postboard.children().length || autoUpdateHashtag ) {
displayHashtagPending(postboard);
@ -371,8 +369,8 @@ function processHashtag(postboard, hashtag, data) { @@ -371,8 +369,8 @@ function processHashtag(postboard, hashtag, data) {
var newTweetsBar = postboard.closest("div").find(".postboard-news");
newTweetsBar.text(polyglot.t("new_posts", _hashtagPendingPosts.length));
newTweetsBar.fadeIn("slow");
postboard.closest("div").find(".postboard-loading").hide();
}
postboard.closest("div").find(".no-posts-found-message").hide();
}
}
}

6
js/twister_timeline.js

@ -189,7 +189,7 @@ function showPosts(req, posts) @@ -189,7 +189,7 @@ function showPosts(req, posts)
var streamItemsParent = $.MAL.getStreamPostsParent();
for( var i = 0; i < posts.length; i++ ) {
if ( req.users.indexOf(posts[i]['userpost']['n']) > -1 ) {
if (req.users.indexOf(posts[i]['userpost']['n']) > -1 || req.getspam) { // FIXME maybe it's unecessary check but currently we got unwanted adverting posts which are coming with requested ones from 'getposts' sometimes
var post = posts[i];
//console.log(post);
var streamPost = postToElem(post, "original", req.getspam);
@ -349,6 +349,10 @@ function willBeHidden(post){ @@ -349,6 +349,10 @@ function willBeHidden(post){
if (post['userpost']['n'] === defaultScreenName)
return false;
// currently we don't need to filter promoted posts anyhow
if (typeof(post['userpost']['lastk']) === 'undefined' )
return false;
if (typeof(post['userpost']['rt']) !== 'undefined') {
// hope it is not too egocentric to overcome HideCloseRTsOpt this way
if (post['userpost']['rt']['n'] === defaultScreenName)

2
theme_calm/css/style.css

@ -2159,7 +2159,7 @@ textarea.splited-post { @@ -2159,7 +2159,7 @@ textarea.splited-post {
.postboard-loading
{
text-align: right;
text-align: center;
}
.postboard-loading div
{

Loading…
Cancel
Save