diff --git a/functions.php b/functions.php index 54a05c4..2076dea 100644 --- a/functions.php +++ b/functions.php @@ -7,12 +7,13 @@ * @package Sakura */ -define( 'SAKURA_VERSION', '3.2.8' ); +define( 'SAKURA_VERSION', '3.3.0' ); define( 'BUILD_VERSION', '3' ); define( 'JSDELIVR_VERSION', '3.6.7' ); //ini_set('display_errors', true); //error_reporting(E_ALL); +error_reporting(E_ALL ^ E_NOTICE); if ( !function_exists( 'akina_setup' ) ) : /** @@ -27,8 +28,6 @@ if ( !function_exists( 'optionsframework_init' ) ) { define( 'OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/inc/' ); require_once dirname( __FILE__ ) . '/inc/options-framework.php'; } - - function akina_setup() { /* @@ -214,6 +213,7 @@ add_action( 'wp_enqueue_scripts', 'sakura_scripts' ); */ require get_template_directory() .'/inc/decorate.php'; require get_template_directory() .'/inc/swicher.php'; +require get_template_directory() .'/inc/api.php'; /** * Custom template tags for this theme. @@ -233,6 +233,7 @@ require get_template_directory() . '/inc/categories-images.php'; //Comment Location Start function convertip($ip) { + error_reporting(E_ALL ^ E_NOTICE); $dat_path = dirname(__FILE__).'/inc/QQWry.Dat'; if(!$fd = @fopen($dat_path, 'rb')){ return 'IP date file not exists or access denied'; @@ -468,7 +469,7 @@ function set_post_views() { $post_id = intval($post->ID); $count_key = 'views'; $views = get_post_custom($post_id); - $views = intval($views['views'][0]); + $views = array_key_exists("views",$views) ? intval($views['views'][0]) : 0; if(is_single() || is_page()) { if(!update_post_meta($post_id, 'views', ($views + 1))) { add_post_meta($post_id, 'views', 1, true); @@ -487,7 +488,7 @@ function get_post_views($post_id) { } else { $count_key = 'views'; $views = get_post_custom($post_id); - $views = intval($views['views'][0]); + $views = array_key_exists("views",$views) ? intval($views['views'][0]) : 0; $post_views = intval(post_custom('views')); if($views == '') { return 0; @@ -1286,7 +1287,7 @@ function memory_archives_list() { /* Remove the "Dashboard" from the admin menu for non-admin users */ function remove_dashboard () { global $current_user, $menu, $submenu; - get_currentuserinfo(); + wp_get_current_user(); if( ! in_array( 'administrator', $current_user->roles ) ) { reset( $menu ); @@ -1603,13 +1604,17 @@ function output_comments_qq_columns( $column_name, $comment_id ){ */ add_filter( 'get_avatar', 'change_avatar', 10, 3 ); function change_avatar($avatar){ - global $comment; - if( get_comment_meta( $comment->comment_ID, 'new_field_qq', true ) ){ - $qq_number = get_comment_meta( $comment->comment_ID, 'new_field_qq', true ); - return '😀'; - }else{ - return $avatar ; - } + global $comment; + if ($comment) { + if( get_comment_meta( $comment->comment_ID, 'new_field_qq', true )){ + $qq_number = get_comment_meta( $comment->comment_ID, 'new_field_qq', true ); + return '😀'; + }else{ + return $avatar ; + } + } else{ + return $avatar ; + } } // default feature image @@ -1628,68 +1633,6 @@ add_action( 'pre_get_posts', function( $q ){ $q->set( 'post__not_in', get_option( 'sticky_posts' ) ); }); -/* - * 定制实时搜索 rest api - * @rest api接口路径:https://sakura.2heng.xin/wp-json/cache_search/v1/json/ - * @可在cache_search_json()函数末尾通过设置 HTTP header 控制 json 缓存时间 - */ -function cache_search_json() { - $vowels = array("[", "{","]","}","<",">","\r\n", "\r", "\n","-","'",'"','`'," ",":",";",'\\'," ","toc"); - $regex = <<])*>|begin[\S\s]*\/begin|hermit[\S\s]*\/hermit|img[\S\s]*\/img|{{.*?}}|:.*?:/m -EOS; - - $posts = new WP_Query('posts_per_page=-1&post_status=publish&post_type=post'); - while ($posts->have_posts()) : $posts->the_post(); - $output .= '{"type":"post","link":"'.get_post_permalink().'","title":'.json_encode(get_the_title()).',"comments":"'.get_comments_number('0', '1', '%').'","text":'.json_encode(str_replace($vowels, " ",preg_replace($regex,' ',get_the_content()))).'},'; - endwhile; - wp_reset_postdata(); - - $pages = get_pages(); - foreach ($pages as $page) { - $output .= '{"type":"page","link":"'.get_page_link($page).'","title":'.json_encode($page->post_title).',"comments":"'.$page->comment_count.'","text":'.json_encode(str_replace($vowels, " ",preg_replace($regex,' ',$page->post_content))).'},'; - } - - $tags = get_tags(); - foreach ($tags as $tag) { - $output .= '{"type":"tag","link":"'.get_term_link($tag).'","title":'.json_encode($tag->name).',"comments":"","text":""},'; - } - - $categories = get_categories(); - foreach ($categories as $category) { - $output .= '{"type":"category","link":"'.get_term_link($category).'","title":'.json_encode($category->name).',"comments":"","text":""},'; - } - if(akina_option('live_search_comment')){ - $comments = get_comments(); - foreach ($comments as $comment) { - $is_private = get_comment_meta($comment->comment_ID, '_private', true); - if($is_private){ - $output .= '{"type":"comment","link":"'.get_comment_link($comment).'","title":'.json_encode(get_the_title($comment->comment_post_ID)).',"comments":"","text":'.json_encode($comment->comment_author.":".__("The comment is private","sakura")/*该评论为私密评论*/).'},'; - continue; - }else{ - $output .= '{"type":"comment","link":"'.get_comment_link($comment).'","title":'.json_encode(get_the_title($comment->comment_post_ID)).',"comments":"","text":'.json_encode(str_replace($vowels, " ",preg_replace($regex," ",$comment->comment_author.":".$comment->comment_content))).'},'; - } - } - } - - $output = substr($output,0,strlen($output)-1); - - $data = '['.$output.']'; - $result = new WP_REST_Response(json_decode($data), 200); - $result->set_headers(array('Content-Type' => 'application/json', - 'Cache-Control' => 'max-age=3600')); // json 缓存控制 - - return $result; -} -if(akina_option('live_search')){ - add_action( 'rest_api_init', function () { - register_rest_route( 'cache_search/v1', '/json/', array( - 'methods' => 'GET', - 'callback' => 'cache_search_json', - ) ); - } ); -} - //评论回复 function sakura_comment_notify($comment_id){ if ( !$_POST['mail-notify'] ) @@ -1697,4 +1640,4 @@ function sakura_comment_notify($comment_id){ } add_action('comment_post', 'sakura_comment_notify'); -//code end +//code end \ No newline at end of file diff --git a/inc/QQWry.Dat b/inc/QQWry.Dat index acd9ca1..1565a4d 100644 Binary files a/inc/QQWry.Dat and b/inc/QQWry.Dat differ diff --git a/inc/api.php b/inc/api.php new file mode 100644 index 0000000..8c29f6d --- /dev/null +++ b/inc/api.php @@ -0,0 +1,257 @@ + 'POST', + 'callback' => 'upload_image', + )); + register_rest_route('sakura/v1', '/cache_search/json', array( + 'methods' => 'GET', + 'callback' => 'cache_search_json', + )); +}); + +/** + * Image uploader response + */ +function upload_image(WP_REST_Request $req) +{ + // see: https://developer.wordpress.org/rest-api/requests/ + + // handle file params $file === $_FILES + /** + * curl \ + * -F "filecomment=This is an img file" \ + * -F "cmt_img_file=@screenshot.jpg" \ + * https://dev.2heng.xin/wp-json/sakura/v1/image/upload + */ + // $file = $req->get_file_params(); + + switch (akina_option("img_upload_api")) { + case 'imgur': + $image = file_get_contents($_FILES["cmt_img_file"]["tmp_name"]); + $API_Request = Imgur_API($image); + break; + case 'smms': + $image = $_FILES; + $API_Request = SMMS_API($image); + break; + case 'chevereto': + $image = file_get_contents($_FILES["cmt_img_file"]["tmp_name"]); + $API_Request = Chevereto_API($image); + break; + } + + $result = new WP_REST_Response($API_Request, $API_Request->status); + $result->set_headers(array('Content-Type' => 'application/json')); + return $result; +} + +/** + * Chevereto upload interface + */ +function Chevereto_API($image) +{ + $fields = array( + 'source' => base64_encode($image), + 'key' => akina_option('chevereto_api_key') + ); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, akina_option('cheverto_url').'/api/1/upload'); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); + + $reply = curl_exec($ch); + curl_close($ch); + + $reply = json_decode($reply); + + if ($reply->status_txt == 'OK' && $reply->status_code == 200) { + $status = 200; + $success = true; + $message = "success"; + $link = $reply->image->image->url; + $proxy = akina_option('cmt_image_proxy') . $link; + } else { + $status = $reply->status_code; + $success = false; + $message = $reply->error->message; + $link = 'https://view.moezx.cc/images/2019/10/28/default_d_h_large.gif'; + $proxy = akina_option('cmt_image_proxy') . $link; + } + $output = array( + 'status' => $status, + 'success' => $success, + 'message' => $message, + 'link' => $link, + 'proxy' => $proxy, + ); + return $output; +} + +/** + * Imgur upload interface + */ +function Imgur_API($image) +{ + $client_id = akina_option('imgur_client_id'); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, akina_option('imgur_upload_image_proxy')); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Client-ID ' . $client_id)); + curl_setopt($ch, CURLOPT_POSTFIELDS, array('image' => base64_encode($image))); + + $reply = curl_exec($ch); + curl_close($ch); + + $reply = json_decode($reply); + + if ($reply->success && $reply->status == 200) { + $status = 200; + $success = true; + $message = "success"; + $link = $reply->data->link; + $proxy = akina_option('cmt_image_proxy') . $link; + } else { + $status = $reply->status; + $success = false; + $message = $reply->data->error; + $link = 'https://view.moezx.cc/images/2019/10/28/default_d_h_large.gif'; + $proxy = akina_option('cmt_image_proxy') . $link; + } + $output = array( + 'status' => $status, + 'success' => $success, + 'message' => $message, + 'link' => $link, + 'proxy' => $proxy, + ); + return $output; +} + +/** + * smms upload interface + */ +function SMMS_API($image) +{ + $client_id = akina_option('smms_client_id'); + + $filename = $image['cmt_img_file']['name']; + $filedata = $image['cmt_img_file']['tmp_name']; + $filesize = $image['cmt_img_file']['size']; + + $url = "https://sm.ms/api/v2/upload"; + $headers = array(); + array_push($headers, "Content-Type: multipart/form-data"); + array_push($headers, "Authorization: Basic " . $client_id); + array_push($headers, "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97"); + + $finfo = new \finfo(FILEINFO_MIME_TYPE); + $mimetype = $finfo->file($filedata); + + $fields = array('smfile' => curl_file_create($filedata, $mimetype, $filename)); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); + + $reply = curl_exec($ch); + curl_close($ch); + + $reply = json_decode($reply); + + if ($reply->success && $reply->code == 'success') { + $status = 200; + $success = true; + $message = $reply->message; + $link = $reply->data->url; + $proxy = akina_option('cmt_image_proxy') . $link; + } else if (preg_match("/Image upload repeated limit/i", $reply->message, $matches)) { + $status = 200; // sm.ms 接口不规范,建议检测到重复的情况下返回标准化的 code,并单独把 url 放进一个字段 + $success = true; + $message = $reply->message; + $link = str_replace('Image upload repeated limit, this image exists at: ', '', $reply->message); + $proxy = akina_option('cmt_image_proxy') . $link; + } else { + $status = 400; + $success = false; + $message = $reply->message; + $link = 'https://view.moezx.cc/images/2019/10/28/default_d_h_large.gif'; + $proxy = akina_option('cmt_image_proxy') . $link; + } + $output = array( + 'status' => $status, + 'success' => $success, + 'message' => $message, + 'link' => $link, + 'proxy' => $proxy, + ); + return $output; +} + +/* + * 定制实时搜索 rest api + * @rest api接口路径:https://sakura.2heng.xin/wp-json/cache_search/v1/json/ + * @可在cache_search_json()函数末尾通过设置 HTTP header 控制 json 缓存时间 + */ +function cache_search_json() +{ + $vowels = array("[", "{", "]", "}", "<", ">", "\r\n", "\r", "\n", "-", "'", '"', '`', " ", ":", ";", '\\', " ", "toc"); + $regex = <<])*>|begin[\S\s]*\/begin|hermit[\S\s]*\/hermit|img[\S\s]*\/img|{{.*?}}|:.*?:/m +EOS; + + $posts = new WP_Query('posts_per_page=-1&post_status=publish&post_type=post'); + while ($posts->have_posts()): $posts->the_post(); + $output .= '{"type":"post","link":"' . get_post_permalink() . '","title":' . json_encode(get_the_title()) . ',"comments":"' . get_comments_number('0', '1', '%') . '","text":' . json_encode(str_replace($vowels, " ", preg_replace($regex, ' ', get_the_content()))) . '},'; + endwhile; + wp_reset_postdata(); + + $pages = get_pages(); + foreach ($pages as $page) { + $output .= '{"type":"page","link":"' . get_page_link($page) . '","title":' . json_encode($page->post_title) . ',"comments":"' . $page->comment_count . '","text":' . json_encode(str_replace($vowels, " ", preg_replace($regex, ' ', $page->post_content))) . '},'; + } + + $tags = get_tags(); + foreach ($tags as $tag) { + $output .= '{"type":"tag","link":"' . get_term_link($tag) . '","title":' . json_encode($tag->name) . ',"comments":"","text":""},'; + } + + $categories = get_categories(); + foreach ($categories as $category) { + $output .= '{"type":"category","link":"' . get_term_link($category) . '","title":' . json_encode($category->name) . ',"comments":"","text":""},'; + } + if (akina_option('live_search_comment')) { + $comments = get_comments(); + foreach ($comments as $comment) { + $is_private = get_comment_meta($comment->comment_ID, '_private', true); + if ($is_private) { + $output .= '{"type":"comment","link":"' . get_comment_link($comment) . '","title":' . json_encode(get_the_title($comment->comment_post_ID)) . ',"comments":"","text":' . json_encode($comment->comment_author . ":" . __("The comment is private", "sakura") /*该评论为私密评论*/) . '},'; + continue; + } else { + $output .= '{"type":"comment","link":"' . get_comment_link($comment) . '","title":' . json_encode(get_the_title($comment->comment_post_ID)) . ',"comments":"","text":' . json_encode(str_replace($vowels, " ", preg_replace($regex, " ", $comment->comment_author . ":" . $comment->comment_content))) . '},'; + } + } + } + + $output = substr($output, 0, strlen($output) - 1); + + $data = '[' . $output . ']'; + $result = new WP_REST_Response(json_decode($data), 200); + $result->set_headers(array('Content-Type' => 'application/json', + 'Cache-Control' => 'max-age=3600')); // json 缓存控制 + + return $result; +} \ No newline at end of file diff --git a/inc/theme_plus.php b/inc/theme_plus.php index afd4490..c554094 100644 --- a/inc/theme_plus.php +++ b/inc/theme_plus.php @@ -260,7 +260,7 @@ function Exuser_center(){ ?> // 登录成功 function login_ok(){ global $current_user; - get_currentuserinfo(); + wp_get_current_user(); ?> @@ -464,7 +464,7 @@ function the_video_headPattern_normal(){ * 导航栏用户菜单 */ function header_user_menu(){ - global $current_user;get_currentuserinfo(); + global $current_user;wp_get_current_user(); if(is_user_logged_in()){ $ava = akina_option('focus_logo') ? akina_option('focus_logo') : get_avatar_url( $current_user->user_email ); ?> @@ -510,7 +510,9 @@ function header_user_menu(){ // 上一篇 function get_prev_thumbnail_url() { $prev_post = get_previous_post(); - if ( has_post_thumbnail($prev_post->ID) ) { + if (!$prev_post) { + return get_random_bg_url(); // 首页图 + } else if ( has_post_thumbnail($prev_post->ID) ) { $img_src = wp_get_attachment_image_src( get_post_thumbnail_id( $prev_post->ID ), 'large'); return $img_src[0]; // 特色图 } diff --git a/js/sakura-app.js b/js/sakura-app.js index dd32459..b0bbe4a 100644 --- a/js/sakura-app.js +++ b/js/sakura-app.js @@ -63,7 +63,7 @@ function imgError(ele, type) { default: ele.src = 'https://view.moezx.cc/images/2018/05/13/image-404.png'; } -} +} function post_list_show_animation() { if ($("article").hasClass("post-list-thumb")) { @@ -73,6 +73,7 @@ function post_list_show_animation() { } var io = new IntersectionObserver(callback, options); var articles = document.querySelectorAll('.post-list-thumb'); + function callback(entries) { entries.forEach((article) => { if (article.target.classList.contains("post-list-show")) { @@ -157,9 +158,9 @@ try { code_highlight_style(); } catch (e) {} -if (Poi.reply_link_version == 'new'){ - $('body').on('click','.comment-reply-link',function(){ - addComment.moveForm( "comment-"+$(this).attr('data-commentid'), $(this).attr('data-commentid'), "respond", $(this).attr('data-postid') ); +if (Poi.reply_link_version == 'new') { + $('body').on('click', '.comment-reply-link', function () { + addComment.moveForm("comment-" + $(this).attr('data-commentid'), $(this).attr('data-commentid'), "respond", $(this).attr('data-postid')); return false; }); } @@ -179,9 +180,9 @@ function attach_image() { for (var i = 0; i < this.files.length; i++) { var f = this.files[i]; var formData = new FormData(); - formData.append('smfile', f); + formData.append('cmt_img_file', f); $.ajax({ - url: 'https://sm.ms/api/upload', + url: '/wp-json/sakura/v1/image/upload', type: 'POST', processData: false, contentType: false, @@ -195,18 +196,28 @@ function attach_image() { setTimeout(function () { cached.html(''); }, 1000); - var get_the_url = res.data.url; - $('#upload-img-show').append(''); - lazyload(); - addComment.createButterbar("图片上传成功~
Uploaded successfully~"); - grin(res.data.url.replace('https://i.loli.net/', '{UPLOAD}'), type = 'Img'); + if (res.status == 200) { + var get_the_url = res.proxy; + $('#upload-img-show').append(''); + lazyload(); + addComment.createButterbar("图片上传成功~
Uploaded successfully~"); + grin(get_the_url, type = 'Img'); + } else { + addComment.createButterbar("上传失败!
Uploaded failed!
文件名/Filename: "+f.name+"
code: "+res.status+"
"+res.message, 3000); + } }, - error: function () { + error: function (jqXHR, textStatus, errorThrown) { cached.html(''); alert("上传失败,请重试.\nUpload failed, please try again."); setTimeout(function () { cached.html(''); }, 1000); + // console.info(jqXHR.responseText); + // console.info(jqXHR.status); + // console.info(jqXHR.readyState); + // console.info(jqXHR.statusText); + // console.info(textStatus); + // console.info(errorThrown); } }) } @@ -297,6 +308,7 @@ function checkskinSecter() { $(".headertop-bar-sakura").removeClass('headertop-bar-sakura').addClass('headertop-bar'); } } + function checkBgImgCookie() { var bgurl = getCookie("bgImgSetting"); if (!bgurl) { @@ -306,7 +318,7 @@ function checkBgImgCookie() { } } if (document.body.clientWidth > 860) { - setTimeout(function() { + setTimeout(function () { checkBgImgCookie(); }, 100); } @@ -317,15 +329,16 @@ function no_right_click() { }); } no_right_click(); -$(document).ready(function() { - function checkskin_bg(a){ +$(document).ready(function () { + function checkskin_bg(a) { return a == "none" ? "" : a } + function changeBG() { - var cached=$(".menu-list"); - cached.find("li").each(function() { + var cached = $(".menu-list"); + cached.find("li").each(function () { var tagid = this.id; - cached.on("click", "#" + tagid, function(){ + cached.on("click", "#" + tagid, function () { if (tagid == "white-bg") { mashiro_global.variables.skinSecter = true; checkskinSecter(); @@ -372,14 +385,14 @@ $(document).ready(function() { function closeSkinMenu() { $(".skin-menu").removeClass('show'); - setTimeout(function() { + setTimeout(function () { $(".changeSkin-gear").css("visibility", "visible"); }, 300); } - $(".changeSkin-gear").click(function() { + $(".changeSkin-gear").click(function () { $(".skin-menu").toggleClass('show'); }) - $(".skin-menu #close-skinMenu").click(function() { + $(".skin-menu #close-skinMenu").click(function () { closeSkinMenu(); }); add_upload_tips(); @@ -514,16 +527,16 @@ function coverVideoIni() { if ($('video').hasClass('hls')) { var video = addComment.I('coverVideo'); var video_src = $('#coverVideo').attr('data-src'); - if(Hls.isSupported()) { + if (Hls.isSupported()) { var hls = new Hls(); hls.loadSource(video_src); hls.attachMedia(video); - hls.on(Hls.Events.MANIFEST_PARSED,function() { + hls.on(Hls.Events.MANIFEST_PARSED, function () { video.play(); }); } else if (video.canPlayType('application/vnd.apple.mpegurl')) { video.src = video_src; - video.addEventListener('loadedmetadata',function() { + video.addEventListener('loadedmetadata', function () { video.play(); }); } @@ -533,7 +546,9 @@ function coverVideoIni() { function copy_code_block() { $('pre code').each(function (i, block) { - $(block).attr({ id: 'hljs-' + i }); + $(block).attr({ + id: 'hljs-' + i + }); $(this).after(''); }); var clipboard = new ClipboardJS('.copy-code'); @@ -548,7 +563,7 @@ function tableOfContentScroll(flag) { if (flag) { var id = 1, heading_fix = mashiro_option.entry_content_theme == "sakura" ? $("article").hasClass("type-post") ? $("div").hasClass("pattern-attachment-img") ? -75 : 200 : 375 : window.innerHeight / 2; - $(".entry-content , .links").children("h1,h2,h3,h4,h5").each(function() { + $(".entry-content , .links").children("h1,h2,h3,h4,h5").each(function () { var hyphenated = "toc-head-" + id; this.id = hyphenated; id++; @@ -557,7 +572,7 @@ function tableOfContentScroll(flag) { tocSelector: '.toc', contentSelector: ['.entry-content', '.links'], headingSelector: 'h1, h2, h3, h4, h5', - headingsOffset: heading_fix-window.innerHeight/2, + headingsOffset: heading_fix - window.innerHeight / 2, }); } } @@ -722,7 +737,7 @@ $(function () { getqqinfo(); }); -if(mashiro_option.float_player_on) { +if (mashiro_option.float_player_on) { function aplayerF() { 'use strict'; var aplayers = [], @@ -761,7 +776,7 @@ if(mashiro_option.float_player_on) { console.log(a) } var lrcTag = 1; - $(".aplayer.aplayer-fixed").click(function(){ + $(".aplayer.aplayer-fixed").click(function () { if (lrcTag == 1) { for (var f = 0; f < aplayers.length; f++) try { aplayers[f].lrc.show(); @@ -772,18 +787,24 @@ if(mashiro_option.float_player_on) { lrcTag = 2; }); var apSwitchTag = 0; - var aplayerlist=$(".aplayer-list"); - aplayerlist.removeClass( "aplayer-list-hide" ).css({maxHeight:'0px'}); + var aplayerlist = $(".aplayer-list"); + aplayerlist.removeClass("aplayer-list-hide").css({ + maxHeight: '0px' + }); $(".aplayer.aplayer-fixed .aplayer-body").addClass("ap-hover"); - $(".aplayer-miniswitcher").click(function(){ + $(".aplayer-miniswitcher").click(function () { if (apSwitchTag == 0) { - aplayerlist.removeClass( "aplayer-list-hide" ).animate({maxHeight:'250px'}); - $(".aplayer.aplayer-fixed .aplayer-body").removeClass( "ap-hover" ); + aplayerlist.removeClass("aplayer-list-hide").animate({ + maxHeight: '250px' + }); + $(".aplayer.aplayer-fixed .aplayer-body").removeClass("ap-hover"); apSwitchTag = 1; } else { - aplayerlist.css({maxHeight:'0px'}); - $(".aplayer.aplayer-fixed .aplayer-body").addClass( "ap-hover" ); - apSwitchTag =0; + aplayerlist.css({ + maxHeight: '0px' + }); + $(".aplayer.aplayer-fixed .aplayer-body").addClass("ap-hover"); + apSwitchTag = 0; } }); } @@ -824,12 +845,13 @@ if(mashiro_option.float_player_on) { document.addEventListener('DOMContentLoaded', loadMeting, !1); } if (document.body.clientWidth > 860) { - aplayerF (); + aplayerF(); } } function getqqinfo() { - var is_get_by_qq = false,cached = $('input'); + var is_get_by_qq = false, + cached = $('input'); if (!getCookie('user_qq') && !getCookie('user_qq_email') && !getCookie('user_author')) { cached.filter('#qq,#author,#email,#url').val(''); } @@ -1284,20 +1306,22 @@ var home = location.href, AH: function () { if (Poi.windowheight == 'auto') { if ($('h1.main-title').length > 0) { - var _height = $(window).height()+"px"; + var _height = $(window).height() + "px"; $('#centerbg').css({ 'height': _height }); $('#bgvideo').css({ 'min-height': _height }); - window.resizeFlag= null; + window.resizeFlag = null; $(window).resize(function () { //直接resize性能爆炸,改成延时 - if(resizeFlag=null){ + if (resizeFlag = null) { clearTimeout(resizeFlag); } - resizeFlag = setTimeout(function(){ Siren.AH();}, 1000); + resizeFlag = setTimeout(function () { + Siren.AH(); + }, 1000); }) } } else { @@ -1349,131 +1373,134 @@ var home = location.href, $('.js-toggle-search').on('click', function () { $('.js-toggle-search').toggleClass('is-active'); $('.js-search').toggleClass('is-visible'); - $('html').css('overflow-y','hidden'); + $('html').css('overflow-y', 'hidden'); if (mashiro_option.live_search) { - var QueryStorage = []; - search_a("https://"+document.domain+"/wp-json/cache_search/v1/json/"); - - var otxt = addComment.I("search-input"), - list = addComment.I("PostlistBox"), - Record = list.innerHTML, - searchFlag = null; - otxt.oninput = function () { - if(searchFlag=null){ - clearTimeout(searchFlag); - } - searchFlag = setTimeout(function(){ - query(QueryStorage, otxt.value, Record); - div_href(); - }, 250); - }; + var QueryStorage = []; + search_a("https://" + document.domain + "/wp-json/sakura/v1/cache_search/json"); - function search_a(val) { - if(sessionStorage.getItem('search')!=null){ - QueryStorage = JSON.parse(sessionStorage.getItem('search')); - query(QueryStorage, $("#search-input").val(), Record); - div_href(); - }else{ - var _xhr = new XMLHttpRequest(); - _xhr.open("GET", val, true) - _xhr.send(); - _xhr.onreadystatechange = function () { - if (_xhr.readyState == 4 && _xhr.status == 200) { - json = _xhr.responseText; - if (json != "") { - sessionStorage.setItem('search',json); - QueryStorage = JSON.parse(json); - query(QueryStorage, otxt.value, Record); - div_href(); + var otxt = addComment.I("search-input"), + list = addComment.I("PostlistBox"), + Record = list.innerHTML, + searchFlag = null; + otxt.oninput = function () { + if (searchFlag = null) { + clearTimeout(searchFlag); + } + searchFlag = setTimeout(function () { + query(QueryStorage, otxt.value, Record); + div_href(); + }, 250); + }; + + function search_a(val) { + if (sessionStorage.getItem('search') != null) { + QueryStorage = JSON.parse(sessionStorage.getItem('search')); + query(QueryStorage, $("#search-input").val(), Record); + div_href(); + } else { + var _xhr = new XMLHttpRequest(); + _xhr.open("GET", val, true) + _xhr.send(); + _xhr.onreadystatechange = function () { + if (_xhr.readyState == 4 && _xhr.status == 200) { + json = _xhr.responseText; + if (json != "") { + sessionStorage.setItem('search', json); + QueryStorage = JSON.parse(json); + query(QueryStorage, otxt.value, Record); + div_href(); + } } } } } - } - if (!Object.values) Object.values = function (obj) { - if (obj !== Object(obj)) - throw new TypeError('Object.values called on a non-object'); - var val = [], - key; - for (key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - val.push(obj[key]); + if (!Object.values) Object.values = function (obj) { + if (obj !== Object(obj)) + throw new TypeError('Object.values called on a non-object'); + var val = [], + key; + for (key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + val.push(obj[key]); + } } + return val; } - return val; - } - function Cx(arr, q) { - q = q.replace(q,"^(?=.*?"+q+").+$").replace(/\s/g,")(?=.*?"); - i = arr.filter( - v => Object.values(v).some( - v => new RegExp(q + '').test(v) - ) - ); - return i; - } - function div_href(){ - $(".ins-selectable").each(function(){ - $(this).click(function(){ - $("#Ty").attr('href',$(this).attr('href')); - $("#Ty").click(); - $(".search_close").click(); - }); - }); - } - function search_result(keyword, link, fa, title, iconfont, comments, text){ - if(keyword){ - var s = keyword.trim().split(" "), - a = title.indexOf(s[s.length-1]), - b = text.indexOf(s[s.length-1]); - title=a<60 ? title.slice(0,80):title.slice(a-30,a+30); - title=title.replace(s[s.length-1], ' ' + s[s.length-1].toUpperCase() + ' '); - text=b<60 ? text.slice(0,80):text.slice(b-30,b+30); - text=text.replace(s[s.length-1], ' ' + s[s.length-1].toUpperCase() + ' '); - } - return '
' + title + ' ' + comments + '' + '

' + text + '

'; - } - function query(B, A, z) { - var x, v, s, y = "", - w = "", - u = "", - r = "", - p = "", - F = "", - H = "", - G = '
', - D = "
", - E = "", - C = Cx(B, A.trim()); - for (x = 0; x < Object.keys(C).length; x++) { - H = C[x]; - switch (v = H.type) { - case "post": - w = w + search_result(A, H.link, "file", H.title, "mark", H.comments, H.text); - break; - case "tag": - p = p + search_result("", H.link, "tag", H.title, "none", "", ""); - break; - case "category": - r = r + search_result("", H.link, "folder", H.title, "none", "", ""); - break; - case "page": - u = u + search_result(A, H.link, "file", H.title, "mark", H.comments, H.text); - break; - case "comment": - F = F + search_result(A, H.link, "comment", H.title, "none", "", H.text); - break - } - } - w && (y = y + G + "文章" + E + w + D), u && (y = y + G + "页面" + E + u + D), r && (y = y + G + "分类" + E + r + D), p && (y = y + G + "标签" + E + p + D), F && (y = y + G + "评论" + E + F + D), s = addComment.I("PostlistBox"), s.innerHTML = y - } + function Cx(arr, q) { + q = q.replace(q, "^(?=.*?" + q + ").+$").replace(/\s/g, ")(?=.*?"); + i = arr.filter( + v => Object.values(v).some( + v => new RegExp(q + '').test(v) + ) + ); + return i; + } + + function div_href() { + $(".ins-selectable").each(function () { + $(this).click(function () { + $("#Ty").attr('href', $(this).attr('href')); + $("#Ty").click(); + $(".search_close").click(); + }); + }); + } + + function search_result(keyword, link, fa, title, iconfont, comments, text) { + if (keyword) { + var s = keyword.trim().split(" "), + a = title.indexOf(s[s.length - 1]), + b = text.indexOf(s[s.length - 1]); + title = a < 60 ? title.slice(0, 80) : title.slice(a - 30, a + 30); + title = title.replace(s[s.length - 1], ' ' + s[s.length - 1].toUpperCase() + ' '); + text = b < 60 ? text.slice(0, 80) : text.slice(b - 30, b + 30); + text = text.replace(s[s.length - 1], ' ' + s[s.length - 1].toUpperCase() + ' '); + } + return '
' + title + ' ' + comments + '' + '

' + text + '

'; + } + + function query(B, A, z) { + var x, v, s, y = "", + w = "", + u = "", + r = "", + p = "", + F = "", + H = "", + G = '
', + D = "
", + E = "", + C = Cx(B, A.trim()); + for (x = 0; x < Object.keys(C).length; x++) { + H = C[x]; + switch (v = H.type) { + case "post": + w = w + search_result(A, H.link, "file", H.title, "mark", H.comments, H.text); + break; + case "tag": + p = p + search_result("", H.link, "tag", H.title, "none", "", ""); + break; + case "category": + r = r + search_result("", H.link, "folder", H.title, "none", "", ""); + break; + case "page": + u = u + search_result(A, H.link, "file", H.title, "mark", H.comments, H.text); + break; + case "comment": + F = F + search_result(A, H.link, "comment", H.title, "none", "", H.text); + break + } + } + w && (y = y + G + "文章" + E + w + D), u && (y = y + G + "页面" + E + u + D), r && (y = y + G + "分类" + E + r + D), p && (y = y + G + "标签" + E + p + D), F && (y = y + G + "评论" + E + F + D), s = addComment.I("PostlistBox"), s.innerHTML = y + } } }); $('.search_close').on('click', function () { if ($('.js-search').hasClass('is-visible')) { $('.js-toggle-search').toggleClass('is-active'); $('.js-search').toggleClass('is-visible'); - $('html').css('overflow-y','unset'); + $('html').css('overflow-y', 'unset'); } }); $('#show-nav').on('click', function () { @@ -1492,7 +1519,8 @@ var home = location.href, NH: function () { var h1 = 0; $(window).scroll(function () { - var s = $(document).scrollTop(),cached = $('.site-header'); + var s = $(document).scrollTop(), + cached = $('.site-header'); if (s == h1) { cached.removeClass('yya'); } @@ -1505,16 +1533,18 @@ var home = location.href, $body = (window.opera) ? (document.compatMode == "CSS1Compat" ? $('html') : $('body')) : $('html,body'); var load_post_timer; var intersectionObserver = new IntersectionObserver(function (entries) { - if (entries[0].intersectionRatio <= 0) return; - var page_next = $('#pagination a').attr("href"); - var load_key = addComment.I("add_post_time"); - if(page_next!=undefined && load_key ){ - var load_time = addComment.I("add_post_time").title; - if(load_time !="233"){ - console.log("%c 自动加载时倒计时 %c","background:#9a9da2; color:#ffffff; border-radius:4px;","","",load_time); - load_post_timer=setTimeout(function(){load_post();},load_time*1000); - } - } + if (entries[0].intersectionRatio <= 0) return; + var page_next = $('#pagination a').attr("href"); + var load_key = addComment.I("add_post_time"); + if (page_next != undefined && load_key) { + var load_time = addComment.I("add_post_time").title; + if (load_time != "233") { + console.log("%c 自动加载时倒计时 %c", "background:#9a9da2; color:#ffffff; border-radius:4px;", "", "", load_time); + load_post_timer = setTimeout(function () { + load_post(); + }, load_time * 1000); + } + } }); intersectionObserver.observe( document.querySelector('.footer-device') @@ -1524,7 +1554,8 @@ var home = location.href, load_post(); return false; }); - function load_post() { + + function load_post() { $('#pagination a').addClass("loading").text(""); $.ajax({ type: "POST", @@ -1539,17 +1570,19 @@ var home = location.href, post_list_show_animation(); if (nextHref != undefined) { $("#pagination a").attr("href", nextHref); - //加载完成上滑 + //加载完成上滑 var tempScrollTop = $(window).scrollTop(); $(window).scrollTop(tempScrollTop); - $body.animate({ scrollTop: tempScrollTop + 300 }, 666) + $body.animate({ + scrollTop: tempScrollTop + 300 + }, 666) } else { $("#pagination").html("很高兴你翻到这里,但是真的没有了..."); } } }); return false; - } + } }, XCS: function () { var __cancel = jQuery('#cancel-comment-reply-link'), @@ -1748,8 +1781,8 @@ $(function () { $(document).pjax('a[target!=_top]', '#page', { fragment: '#page', timeout: 8000, - }).on('pjax:beforeSend', () => { //离开页面停止播放 - $('.normal-cover-video').each(function() { + }).on('pjax:beforeSend', () => { //离开页面停止播放 + $('.normal-cover-video').each(function () { this.pause(); this.src = ''; this.load = ''; @@ -1784,7 +1817,7 @@ $(function () { if ($('.js-search.is-visible').length > 0) { $('.js-toggle-search').toggleClass('is-active'); $('.js-search').toggleClass('is-visible'); - $('html').css('overflow-y','unset'); + $('html').css('overflow-y', 'unset'); } }); window.addEventListener('popstate', function (e) { @@ -1838,4 +1871,4 @@ if ((isWebkit || isOpera || isIe) && document.getElementById && window.addEventL element.focus(); } }, false); -} +} \ No newline at end of file diff --git a/languages/en_US.mo b/languages/en_US.mo index 20e5aea..b2bd4df 100644 Binary files a/languages/en_US.mo and b/languages/en_US.mo differ diff --git a/languages/en_US.po b/languages/en_US.po index 2f342ab..360c122 100644 --- a/languages/en_US.po +++ b/languages/en_US.po @@ -1,23 +1,23 @@ msgid "" msgstr "" "Project-Id-Version: Sakura\n" -"POT-Creation-Date: 2019-11-01 15:09+0800\n" -"PO-Revision-Date: 2019-11-01 22:45+0800\n" +"POT-Creation-Date: 2019-11-14 19:31+0800\n" +"PO-Revision-Date: 2019-11-14 19:31+0800\n" "Last-Translator: \n" "Language-Team: \n" "Language: en_US\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.4\n" +"X-Generator: Poedit 2.2\n" "X-Poedit-Basepath: ..\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-Flags-xgettext: --add-comments=translators:\n" "X-Poedit-WPHeader: style.css\n" "X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;" -"esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;" -"__ngettext_noop:1,2\n" +"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" +"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" +"_nx_noop:3c,1,2;__ngettext_noop:1,2\n" "X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPathExcluded-0: *.js\n" @@ -55,7 +55,6 @@ msgid " comment" msgstr "" #: comments.php:22 comments.php:27 -#, php-format msgid " comments" msgstr "" @@ -139,82 +138,84 @@ msgstr "" msgid "Search" msgstr "" -#: functions.php:53 +#: functions.php:52 msgid "Nav Menus" msgstr "" -#: functions.php:387 inc/theme_plus.php:187 layouts/authorprofile.php:11 options.php:123 +#: functions.php:388 inc/theme_plus.php:187 layouts/authorprofile.php:11 +#: options.php:123 msgid "Author" msgstr "" -#: functions.php:387 +#: functions.php:388 msgid "Blogger" msgstr "" -#: functions.php:391 +#: functions.php:392 msgid "Location" msgstr "" -#: functions.php:395 +#: functions.php:396 msgid "Private" msgstr "" -#: functions.php:397 +#: functions.php:398 msgid "Yes" msgstr "" -#: functions.php:399 +#: functions.php:400 msgid "No" msgstr "" -#: functions.php:402 +#: functions.php:403 msgid "Edit" msgstr "" -#: functions.php:483 +#: functions.php:484 msgid "" -"Please install pulgin WP-Statistics" +"Please install pulgin WP-Statistics" msgstr "" -#: functions.php:536 +#: functions.php:537 msgid "This guy is so lazy ╮(╯▽╰)╭" msgstr "" -#: functions.php:1257 +#: functions.php:1258 msgid "All expand/collapse" msgstr "" -#: functions.php:1272 +#: functions.php:1273 msgid " post(s)" msgstr "" -#: functions.php:1294 functions.php:1297 inc/theme_plus.php:479 +#: functions.php:1295 functions.php:1298 inc/theme_plus.php:479 msgid "Dashboard" msgstr "" -#: functions.php:1510 +#: functions.php:1511 msgid "ERROR: This email domain (@" msgstr "" -#: functions.php:1590 +#: functions.php:1591 msgid "QQ" msgstr "" -#: functions.php:1667 inc/theme_plus.php:726 -msgid "The comment is private" -msgstr "" - #: header.php:35 #, php-format msgid "page %s " msgstr "" +#: inc/api.php:241 inc/theme_plus.php:728 +msgid "The comment is private" +msgstr "" + #: inc/categories-images.php:45 inc/categories-images.php:66 msgid "category/tag image" msgstr "" -#: inc/categories-images.php:48 inc/categories-images.php:68 inc/categories-images.php:197 +#: inc/categories-images.php:48 inc/categories-images.php:68 +#: inc/categories-images.php:197 msgid "add image" msgstr "Add image" @@ -389,8 +390,8 @@ msgstr "" msgid "Sign out? " msgstr "" -#: inc/theme_plus.php:299 inc/theme_plus.php:354 inc/theme_plus.php:422 tpl/content-single.php:16 -#: tpl/single-image.php:18 +#: inc/theme_plus.php:299 inc/theme_plus.php:354 inc/theme_plus.php:422 +#: tpl/content-single.php:16 tpl/single-image.php:18 msgid "View" msgid_plural "Views" msgstr[0] "" @@ -479,8 +480,8 @@ msgstr "" #: options.php:139 msgid "" -"Adjust the theme scheme menu transparency, the smaller the value, the more transparent. The " -"default value is 0.8" +"Adjust the theme scheme menu transparency, the smaller the value, the more " +"transparent. The default value is 0.8" msgstr "" #: options.php:144 @@ -533,12 +534,13 @@ msgstr "" #: options.php:159 msgid "" -"The foreground switches the background of the webpage. There are 8 urls separated by commas. " -"The order corresponds to the foreground scheme tool button position (the order of the buttons " -"is from left to right, top to bottom). If no background is needed, fill in the corresponding " -"position as none.Note: If the theme is updated from v3.2.3 and below, be sure to " -"change the [Version Control] parameter under the [Other] tab of this configuration page to any " -"new value!" +"The foreground switches the background of the webpage. There are 8 urls " +"separated by commas. The order corresponds to the foreground scheme tool " +"button position (the order of the buttons is from left to right, top to " +"bottom). If no background is needed, fill in the corresponding position as " +"none.Note: If the theme is updated from v3.2.3 and below, be sure to " +"change the [Version Control] parameter under the [Other] tab of this " +"configuration page to any new value!" msgstr "" #: options.php:165 @@ -555,9 +557,9 @@ msgstr "" #: options.php:172 msgid "" -"The home page does not display the avatar above, but displays a paragraph of text (use the " -"avatar above if left blank).The text is recommended not to be too long, about 16 bytes is " -"appropriate." +"The home page does not display the avatar above, but displays a paragraph of " +"text (use the avatar above if left blank).The text is recommended not to be " +"too long, about 16 bytes is appropriate." msgstr "" #: options.php:178 @@ -614,20 +616,21 @@ msgstr "" #: options.php:220 msgid "" -"Enable by default, check off, display on the article page, separate page and category page" +"Enable by default, check off, display on the article page, separate page and " +"category page" msgstr "" #: options.php:226 msgid "Search button" msgstr "" -#: options.php:231 options.php:279 options.php:572 options.php:582 options.php:592 -#: options.php:602 +#: options.php:231 options.php:279 options.php:572 options.php:582 +#: options.php:592 options.php:602 msgid "Open" msgstr "" -#: options.php:232 options.php:280 options.php:573 options.php:583 options.php:593 -#: options.php:603 +#: options.php:232 options.php:280 options.php:573 options.php:583 +#: options.php:593 options.php:603 msgid "Close" msgstr "" @@ -657,7 +660,8 @@ msgstr "" #: options.php:256 msgid "" -"Home article feature images alignment (only for graphic mode, default left and right alternate)" +"Home article feature images alignment (only for graphic mode, default left " +"and right alternate)" msgstr "" #: options.php:261 @@ -678,9 +682,9 @@ msgstr "" #: options.php:268 msgid "" -"The default image displayed without the article feature image set, use random cover if left " -"blank (the image to be displayed is placed in the /wp-content/themes/Sakura/feature/gallery/ " -"directory)" +"The default image displayed without the article feature image set, use " +"random cover if left blank (the image to be displayed is placed in the /wp-" +"content/themes/Sakura/feature/gallery/ directory)" msgstr "" #: options.php:274 @@ -713,7 +717,8 @@ msgstr "" #: options.php:302 msgid "" -"(seconds) Set to automatically load the next page time, the default is not automatically loaded" +"(seconds) Set to automatically load the next page time, the default is not " +"automatically loaded" msgstr "" #: options.php:307 @@ -825,7 +830,9 @@ msgid "Live" msgstr "" #: options.php:402 -msgid "Check to enable, the video will continue to play automatically, you need to enable Pjax" +msgid "" +"Check to enable, the video will continue to play automatically, you need to " +"enable Pjax" msgstr "" #: options.php:408 @@ -834,8 +841,8 @@ msgstr "" #: options.php:409 msgid "" -"The source address of the video, the address is spliced below the video name, the slash is not " -"required at the end of the address" +"The source address of the video, the address is spliced below the video " +"name, the slash is not required at the end of the address" msgstr "" #: options.php:415 @@ -844,8 +851,9 @@ msgstr "" #: options.php:416 msgid "" -"abc.mp4, just fill in the video file name abc, multiple videos separated by commas such as " -"abc, efg, do not care about the order, because the loading is random extraction" +"abc.mp4, just fill in the video file name abc, multiple videos separated by " +"commas such as abc, efg, do not care about the order, because the loading is " +"random extraction" msgstr "" #: options.php:422 @@ -854,8 +862,8 @@ msgstr "" #: options.php:423 msgid "" -"Leave this blank to use the built-in API (put the images that need to be randomly displayed " -"into the /cover/gallery/ directory)" +"Leave this blank to use the built-in API (put the images that need to be " +"randomly displayed into the /cover/gallery/ directory)" msgstr "" #: options.php:429 @@ -886,7 +894,7 @@ msgstr "" msgid "Whether to turn on the top-feature" msgstr "" -#: options.php:443 options.php:1031 +#: options.php:443 options.php:1084 msgid "Default on" msgstr "" @@ -908,8 +916,8 @@ msgstr "" #: options.php:460 msgid "" -"Default is Discovery, you can also change it to other, of course you can't use it as an " -"advertisement!Not allowed!!" +"Default is Discovery, you can also change it to other, of course you can't " +"use it as an advertisement!Not allowed!!" msgstr "" #: options.php:467 @@ -1040,7 +1048,9 @@ msgid "Tencent QQ" msgstr "" #: options.php:639 -msgid "tencent://message/?uin={{QQ number}}. for example, tencent://message/?uin=123456" +msgid "" +"tencent://message/?uin={{QQ number}}. for example, tencent://message/?" +"uin=123456" msgstr "" #: options.php:645 @@ -1149,8 +1159,8 @@ msgstr "" #: options.php:737 msgid "" -"The name part of name@domain.com, only the frontend has js runtime environment can get the " -"full address, you can rest assured to fill in" +"The name part of name@domain.com, only the frontend has js runtime " +"environment can get the full address, you can rest assured to fill in" msgstr "" #: options.php:743 @@ -1171,10 +1181,11 @@ msgstr "" #: options.php:757 msgid "" -"You can design the background panel (/wp-admin/) style yourself below, but before you start, " -"please go to here to change the color scheme to custom." -"(Custom).
Tip: How to match colors? Maybe this can help you." +"You can design the background panel (/wp-admin/) style yourself below, but " +"before you start, please go to here to " +"change the color scheme to custom.(Custom).
Tip: How to match " +"colors? Maybe this can help " +"you." msgstr "" #: options.php:763 @@ -1183,8 +1194,8 @@ msgstr "" #: options.php:766 options.php:774 options.php:782 options.php:790 msgid "" -"(array) (optional) An array of CSS color definitions which are used to give the user a " -"feel for the theme." +"(array) (optional) An array of CSS color definitions which are used " +"to give the user a feel for the theme." msgstr "" #: options.php:771 @@ -1204,7 +1215,9 @@ msgid "Panel icon color——base" msgstr "" #: options.php:798 options.php:806 options.php:814 -msgid "(array) (optional) An array of CSS color definitions used to color any SVG icons." +msgid "" +"(array) (optional) An array of CSS color definitions used to color " +"any SVG icons." msgstr "" #: options.php:803 @@ -1249,9 +1262,10 @@ msgstr "" #: options.php:847 msgid "" -"Forcibly do not use the background address to log in, fill in the new landing page address, " -"such as http://www.xxx.com/login [Note] Before you fill out, test your new page can be opened " -"normally, so as not to enter the background or other problems happening" +"Forcibly do not use the background address to log in, fill in the new " +"landing page address, such as http://www.xxx.com/login [Note] Before you " +"fill out, test your new page can be opened normally, so as not to enter the " +"background or other problems happening" msgstr "" #: options.php:853 @@ -1276,8 +1290,8 @@ msgstr "" #: options.php:868 msgid "" -"After checken, the administrator redirects to the background and the user redirects to the " -"home page." +"After checken, the administrator redirects to the background and the user " +"redirects to the home page." msgstr "" #: options.php:874 @@ -1298,9 +1312,9 @@ msgstr "" #: options.php:887 msgid "" -"Note: Fill in the format http(s)://your CDN domain name/.
In other words, the original " -"path is http://your.domain/wp-content/uploads/2018/05/xx.png and the picture will load from " -"http://your CDN domain/2018/05/xx.png" +"Note: Fill in the format http(s)://your CDN domain name/.
In other " +"words, the original path is http://your.domain/wp-content/uploads/2018/05/xx." +"png and the picture will load from http://your CDN domain/2018/05/xx.png" msgstr "" #: options.php:893 @@ -1316,7 +1330,9 @@ msgid "Use js and css file of the theme (sakura-app.js、style.css) locally" msgstr "" #: options.php:901 -msgid "The js and css files of the theme do not load from jsDelivr, please open when DIY" +msgid "" +"The js and css files of the theme do not load from jsDelivr, please open " +"when DIY" msgstr "" #: options.php:908 @@ -1341,8 +1357,9 @@ msgstr "" #: options.php:932 msgid "" -"If you don't need the player just leave it blank.Fill in the \"song list\" ID of Netease Cloud " -"Music, eg: https://music.163.com/#/playlist?id=2288037900 The ID is 2288037900" +"If you don't need the player just leave it blank.Fill in the \"song list\" " +"ID of Netease Cloud Music, eg: https://music.163.com/#/playlist?" +"id=2288037900 The ID is 2288037900" msgstr "" #: options.php:938 @@ -1350,7 +1367,8 @@ msgid "Version Control" msgstr "" #: options.php:939 -msgid "Used to update frontend cookies and browser caches, any string can be used" +msgid "" +"Used to update frontend cookies and browser caches, any string can be used" msgstr "" #: options.php:945 @@ -1365,7 +1383,7 @@ msgstr "" msgid "Enable NProgress progress bar" msgstr "" -#: options.php:960 options.php:953 +#: options.php:953 options.php:960 msgid "Default off, check on" msgstr "" @@ -1379,8 +1397,8 @@ msgstr "" #: options.php:967 msgid "" -"Announcement content, the text exceeds 142 bytes will be scrolled display (mobile device is " -"invalid)" +"Announcement content, the text exceeds 142 bytes will be scrolled display " +"(mobile device is invalid)" msgstr "" #: options.php:973 @@ -1400,7 +1418,8 @@ msgid "Statistics Interface" msgstr "" #: options.php:992 -msgid "WP-Statistics plugin (Professional statistics, can exclude invalid access)" +msgid "" +"WP-Statistics plugin (Professional statistics, can exclude invalid access)" msgstr "" #: options.php:993 @@ -1428,124 +1447,206 @@ msgid "23k Views (chinese)" msgstr "" #: options.php:1009 -msgid "Enable live search" +msgid "Comment image upload API" msgstr "" -#: options.php:1010 -msgid "" -"Real-time search in the foreground, call the Rest API to update the cache every hour, you can " -"manually set the cache time in functions.php" +#: options.php:1014 +msgid "Imgur (https://imgur.com)" +msgstr "" + +#: options.php:1015 +msgid "SM.MS (https://sm.ms)" msgstr "" #: options.php:1016 +msgid "Chevereto (https://chevereto.com)" +msgstr "" + +#: options.php:1020 +msgid "Imgur Client ID" +msgstr "" + +#: options.php:1021 +msgid "" +"Register your application here, note we only need the Client ID here." +msgstr "" + +#: options.php:1027 +msgid "SM.MS Secret Token" +msgstr "" + +#: options.php:1028 +msgid "" +"Register your application here." +msgstr "" + +#: options.php:1034 +msgid "Chevereto API v1 key" +msgstr "" + +#: options.php:1035 +msgid "Get your API key here " +msgstr "" + +#: options.php:1041 +msgid "Chevereto URL" +msgstr "" + +#: options.php:1042 +msgid "" +"Your Chevereto homepage url, no slash in the end, eg. https://your.cherverto." +"com" +msgstr "" + +#: options.php:1048 +msgid "Comment images proxy" +msgstr "" + +#: options.php:1049 +msgid "" +"A front-ed proxy for the uploaded images. Leave it blank if you do not need." +msgstr "" + +#: options.php:1055 +msgid "Imgur upload proxy" +msgstr "" + +#: options.php:1056 +msgid "" +"A back-ed proxy to upload images. You may set a self hosted proxy with " +"Nginx, following my turtal. This feature is mainly for Chinese who " +"cannot access to Imgur due to the GFW. The default and official setting is " +"【https://api.imgur.com/3/image/】" +msgstr "" + +#: options.php:1062 +msgid "Enable live search" +msgstr "" + +#: options.php:1063 +msgid "" +"Real-time search in the foreground, call the Rest API to update the cache " +"every hour, you can manually set the cache time in functions.php" +msgstr "" + +#: options.php:1069 msgid "Include comments in live search" msgstr "" -#: options.php:1017 +#: options.php:1070 msgid "" -"Search for comments in real-time search (not recommended if there are too many comments on the " -"site)" +"Search for comments in real-time search (not recommended if there are too " +"many comments on the site)" msgstr "" -#: options.php:1023 +#: options.php:1076 msgid "Enable baguetteBox" msgstr "" -#: options.php:1024 +#: options.php:1077 msgid "" -"Default off,please read wiki" +"Default off,please read wiki" msgstr "" -#: options.php:1030 +#: options.php:1083 msgid "Enable lazyload in posts" msgstr "" -#: options.php:1037 +#: options.php:1090 msgid "lazyload spinner" msgstr "" -#: options.php:1038 +#: options.php:1091 msgid "The placeholder to display when the image loads, fill in the image url" msgstr "" -#: options.php:1044 +#: options.php:1097 msgid "Whether to enable the clipboard copyright" msgstr "" -#: options.php:1045 +#: options.php:1098 msgid "" -"Automatically add a copyright to the clipboard when copying more than 30 bytes, which is " -"enabled by default." +"Automatically add a copyright to the clipboard when copying more than 30 " +"bytes, which is enabled by default." msgstr "" -#: options.php:1051 +#: options.php:1104 msgid "Email address prefix" msgstr "" -#: options.php:1052 +#: options.php:1105 msgid "" -"For sending system mail, the sender address displayed in the user's mailbox, do not use " -"Chinese, the default system email address is bibi@your_domain_name" +"For sending system mail, the sender address displayed in the user's mailbox, " +"do not use Chinese, the default system email address is bibi@your_domain_name" msgstr "" -#: options.php:1058 +#: options.php:1111 msgid "Comments reply notification" msgstr "" -#: options.php:1059 +#: options.php:1112 msgid "" -"WordPress will use email to notify users when their comments receive a reply by default. Tick " -"this item allows users to set their own comments reply notification" +"WordPress will use email to notify users when their comments receive a reply " +"by default. Tick this item allows users to set their own comments reply " +"notification" msgstr "" -#: options.php:1065 +#: options.php:1118 msgid "Administrator comment notification" msgstr "" -#: options.php:1066 -msgid "Whether to use email notification when the administrator's comments receive a reply" +#: options.php:1119 +msgid "" +"Whether to use email notification when the administrator's comments receive " +"a reply" msgstr "" -#: options.php:1072 +#: options.php:1125 msgid "Enable private comment" msgstr "" -#: options.php:1073 +#: options.php:1126 msgid "Allow users to set their own comments to be invisible to others" msgstr "" -#: options.php:1079 +#: options.php:1132 msgid "Human verification" msgstr "" -#: options.php:1080 +#: options.php:1133 msgid "Enable human verification" msgstr "" -#: options.php:1086 +#: options.php:1139 msgid "Comment UA infomation" msgstr "" -#: options.php:1087 -msgid "Check to enable, display the user's browser, operating system information" +#: options.php:1140 +msgid "" +"Check to enable, display the user's browser, operating system information" msgstr "" -#: options.php:1093 +#: options.php:1146 msgid "Enable disqus" msgstr "" -#: options.php:1094 +#: options.php:1147 msgid "Enable disqus for comment" msgstr "" -#: options.php:1100 +#: options.php:1153 msgid "Time Zone adjustment" msgstr "" -#: options.php:1101 +#: options.php:1154 msgid "" -"If the comment has a time difference problem adjust here, fill in an integer, the calculation " -"method: actual_time = display_error_time - the_integer_you_entered (unit: hour)" +"If the comment has a time difference problem adjust here, fill in an " +"integer, the calculation method: actual_time = display_error_time - " +"the_integer_you_entered (unit: hour)" msgstr "" #: search.php:19 @@ -1557,15 +1658,18 @@ msgstr "Search result: %s" msgid "NOTHING" msgstr "" -#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content.php:34 tpl/content-thumb.php:53 +#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:53 +#: tpl/content.php:34 msgid "Comment" msgstr "" -#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content.php:34 tpl/content-thumb.php:53 +#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:53 +#: tpl/content.php:34 msgid "Comments" msgstr "" -#: tpl/content-image.php:38 tpl/content-status.php:34 tpl/content.php:37 tpl/content-thumb.php:52 +#: tpl/content-image.php:38 tpl/content-status.php:34 tpl/content-thumb.php:52 +#: tpl/content.php:37 msgid "Hit" msgid_plural "Hits" msgstr[0] "" @@ -1577,7 +1681,8 @@ msgstr "" #: tpl/content-none.php:21 #, php-format -msgid "Ready to post your first article? Click here to start." +msgid "" +"Ready to post your first article? Click here to start." msgstr "" #: tpl/content-none.php:25 @@ -1600,10 +1705,11 @@ msgstr "" msgid "Remember Me" msgstr "" -#: user/page-register.php:14 user/page-register.php:16 user/page-register.php:19 -#: user/page-register.php:24 user/page-register.php:26 user/page-register.php:29 -#: user/page-register.php:34 user/page-register.php:36 user/page-register.php:41 -#: user/page-register.php:47 +#: user/page-register.php:14 user/page-register.php:16 +#: user/page-register.php:19 user/page-register.php:24 +#: user/page-register.php:26 user/page-register.php:29 +#: user/page-register.php:34 user/page-register.php:36 +#: user/page-register.php:41 user/page-register.php:47 msgid "Error" msgstr "" @@ -1716,7 +1822,9 @@ msgstr "" #~ msgstr "\"Switch theme button\" transparency" #~ msgid "调整切换主题菜单透明度,值越小越透明,默认透明度0.8" -#~ msgstr "The smaller the value, the more transparent, the default transparency is 0.8" +#~ msgstr "" +#~ "The smaller the value, the more transparent, the default transparency is " +#~ "0.8" #~ msgid "全透明" #~ msgstr "Fully transparent 0" diff --git a/languages/sakura.pot b/languages/sakura.pot index d04367d..fd94044 100644 --- a/languages/sakura.pot +++ b/languages/sakura.pot @@ -3,14 +3,14 @@ msgid "" msgstr "" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" "Project-Id-Version: Sakura\n" -"POT-Creation-Date: 2019-11-01 22:45+0800\n" +"POT-Creation-Date: 2019-11-14 19:18+0800\n" "PO-Revision-Date: 2019-11-01 14:27+0800\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.4\n" +"X-Generator: Poedit 2.2\n" "X-Poedit-Basepath: ..\n" "X-Poedit-Flags-xgettext: --add-comments=translators:\n" "X-Poedit-WPHeader: style.css\n" @@ -55,7 +55,6 @@ msgid " comment" msgstr "" #: comments.php:22 comments.php:27 -#, php-format msgid " comments" msgstr "" @@ -139,77 +138,77 @@ msgstr "" msgid "Search" msgstr "" -#: functions.php:53 +#: functions.php:52 msgid "Nav Menus" msgstr "" -#: functions.php:387 inc/theme_plus.php:187 layouts/authorprofile.php:11 options.php:123 +#: functions.php:388 inc/theme_plus.php:187 layouts/authorprofile.php:11 options.php:123 msgid "Author" msgstr "" -#: functions.php:387 +#: functions.php:388 msgid "Blogger" msgstr "" -#: functions.php:391 +#: functions.php:392 msgid "Location" msgstr "" -#: functions.php:395 +#: functions.php:396 msgid "Private" msgstr "" -#: functions.php:397 +#: functions.php:398 msgid "Yes" msgstr "" -#: functions.php:399 +#: functions.php:400 msgid "No" msgstr "" -#: functions.php:402 +#: functions.php:403 msgid "Edit" msgstr "" -#: functions.php:483 +#: functions.php:484 msgid "" "Please install pulgin WP-Statistics" msgstr "" -#: functions.php:536 +#: functions.php:537 msgid "This guy is so lazy ╮(╯▽╰)╭" msgstr "" -#: functions.php:1257 +#: functions.php:1258 msgid "All expand/collapse" msgstr "" -#: functions.php:1272 +#: functions.php:1273 msgid " post(s)" msgstr "" -#: functions.php:1294 functions.php:1297 inc/theme_plus.php:479 +#: functions.php:1295 functions.php:1298 inc/theme_plus.php:479 msgid "Dashboard" msgstr "" -#: functions.php:1510 +#: functions.php:1511 msgid "ERROR: This email domain (@" msgstr "" -#: functions.php:1590 +#: functions.php:1591 msgid "QQ" msgstr "" -#: functions.php:1667 inc/theme_plus.php:726 -msgid "The comment is private" -msgstr "" - #: header.php:35 #, php-format msgid "page %s " msgstr "" +#: inc/api.php:241 inc/theme_plus.php:728 +msgid "The comment is private" +msgstr "" + #: inc/categories-images.php:45 inc/categories-images.php:66 msgid "category/tag image" msgstr "" @@ -886,7 +885,7 @@ msgstr "" msgid "Whether to turn on the top-feature" msgstr "" -#: options.php:443 options.php:1031 +#: options.php:443 options.php:1084 msgid "Default on" msgstr "" @@ -1363,7 +1362,7 @@ msgstr "" msgid "Enable NProgress progress bar" msgstr "" -#: options.php:960 options.php:953 +#: options.php:953 options.php:960 msgid "Default off, check on" msgstr "" @@ -1426,121 +1425,192 @@ msgid "23k Views (chinese)" msgstr "" #: options.php:1009 +msgid "Comment image upload API" +msgstr "" + +#: options.php:1014 +msgid "Imgur (https://imgur.com)" +msgstr "" + +#: options.php:1015 +msgid "SM.MS (https://sm.ms)" +msgstr "" + +#: options.php:1016 +msgid "Chevereto (https://chevereto.com)" +msgstr "" + +#: options.php:1020 +msgid "Imgur Client ID" +msgstr "" + +#: options.php:1021 +msgid "" +"Register your application here, note we " +"only need the Client ID here." +msgstr "" + +#: options.php:1027 +msgid "SM.MS Secret Token" +msgstr "" + +#: options.php:1028 +msgid "Register your application here." +msgstr "" + +#: options.php:1034 +msgid "Chevereto API v1 key" +msgstr "" + +#: options.php:1035 +msgid "Get your API key here " +msgstr "" + +#: options.php:1041 +msgid "Chevereto URL" +msgstr "" + +#: options.php:1042 +msgid "Your Chevereto homepage url, no slash in the end, eg. https://your.cherverto.com" +msgstr "" + +#: options.php:1048 +msgid "Comment images proxy" +msgstr "" + +#: options.php:1049 +msgid "A front-ed proxy for the uploaded images. Leave it blank if you do not need." +msgstr "" + +#: options.php:1055 +msgid "Imgur upload proxy" +msgstr "" + +#: options.php:1056 +msgid "" +"A back-ed proxy to upload images. You may set a self hosted proxy with Nginx, following my turtal. " +"This feature is mainly for Chinese who cannot access to Imgur due to the GFW. The default and " +"official setting is 【https://api.imgur.com/3/image/" +"】" +msgstr "" + +#: options.php:1062 msgid "Enable live search" msgstr "" -#: options.php:1010 +#: options.php:1063 msgid "" "Real-time search in the foreground, call the Rest API to update the cache every hour, you can " "manually set the cache time in functions.php" msgstr "" -#: options.php:1016 +#: options.php:1069 msgid "Include comments in live search" msgstr "" -#: options.php:1017 +#: options.php:1070 msgid "" "Search for comments in real-time search (not recommended if there are too many comments on the " "site)" msgstr "" -#: options.php:1023 +#: options.php:1076 msgid "Enable baguetteBox" msgstr "" -#: options.php:1024 +#: options.php:1077 msgid "" "Default off,please read wiki" msgstr "" -#: options.php:1030 +#: options.php:1083 msgid "Enable lazyload in posts" msgstr "" -#: options.php:1037 +#: options.php:1090 msgid "lazyload spinner" msgstr "" -#: options.php:1038 +#: options.php:1091 msgid "The placeholder to display when the image loads, fill in the image url" msgstr "" -#: options.php:1044 +#: options.php:1097 msgid "Whether to enable the clipboard copyright" msgstr "" -#: options.php:1045 +#: options.php:1098 msgid "" "Automatically add a copyright to the clipboard when copying more than 30 bytes, which is " "enabled by default." msgstr "" -#: options.php:1051 +#: options.php:1104 msgid "Email address prefix" msgstr "" -#: options.php:1052 +#: options.php:1105 msgid "" "For sending system mail, the sender address displayed in the user's mailbox, do not use " "Chinese, the default system email address is bibi@your_domain_name" msgstr "" -#: options.php:1058 +#: options.php:1111 msgid "Comments reply notification" msgstr "" -#: options.php:1059 +#: options.php:1112 msgid "" "WordPress will use email to notify users when their comments receive a reply by default. Tick " "this item allows users to set their own comments reply notification" msgstr "" -#: options.php:1065 +#: options.php:1118 msgid "Administrator comment notification" msgstr "" -#: options.php:1066 +#: options.php:1119 msgid "Whether to use email notification when the administrator's comments receive a reply" msgstr "" -#: options.php:1072 +#: options.php:1125 msgid "Enable private comment" msgstr "" -#: options.php:1073 +#: options.php:1126 msgid "Allow users to set their own comments to be invisible to others" msgstr "" -#: options.php:1079 +#: options.php:1132 msgid "Human verification" msgstr "" -#: options.php:1080 +#: options.php:1133 msgid "Enable human verification" msgstr "" -#: options.php:1086 +#: options.php:1139 msgid "Comment UA infomation" msgstr "" -#: options.php:1087 +#: options.php:1140 msgid "Check to enable, display the user's browser, operating system information" msgstr "" -#: options.php:1093 +#: options.php:1146 msgid "Enable disqus" msgstr "" -#: options.php:1094 +#: options.php:1147 msgid "Enable disqus for comment" msgstr "" -#: options.php:1100 +#: options.php:1153 msgid "Time Zone adjustment" msgstr "" -#: options.php:1101 +#: options.php:1154 msgid "" "If the comment has a time difference problem adjust here, fill in an integer, the calculation " "method: actual_time = display_error_time - the_integer_you_entered (unit: hour)" @@ -1555,15 +1625,15 @@ msgstr "" msgid "NOTHING" msgstr "" -#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content.php:34 tpl/content-thumb.php:53 +#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:53 tpl/content.php:34 msgid "Comment" msgstr "" -#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content.php:34 tpl/content-thumb.php:53 +#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:53 tpl/content.php:34 msgid "Comments" msgstr "" -#: tpl/content-image.php:38 tpl/content-status.php:34 tpl/content.php:37 tpl/content-thumb.php:52 +#: tpl/content-image.php:38 tpl/content-status.php:34 tpl/content-thumb.php:52 tpl/content.php:37 msgid "Hit" msgid_plural "Hits" msgstr[0] "" diff --git a/languages/zh_CN.mo b/languages/zh_CN.mo index d285bb6..bdebb1d 100644 Binary files a/languages/zh_CN.mo and b/languages/zh_CN.mo differ diff --git a/languages/zh_CN.po b/languages/zh_CN.po index 2db8fe3..2c4de4f 100644 --- a/languages/zh_CN.po +++ b/languages/zh_CN.po @@ -1,23 +1,23 @@ msgid "" msgstr "" "Project-Id-Version: Sakura\n" -"POT-Creation-Date: 2019-11-01 15:07+0800\n" -"PO-Revision-Date: 2019-11-01 22:45+0800\n" +"POT-Creation-Date: 2019-11-14 19:18+0800\n" +"PO-Revision-Date: 2019-11-14 19:31+0800\n" "Last-Translator: \n" "Language-Team: \n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.4\n" +"X-Generator: Poedit 2.2\n" "X-Poedit-Basepath: ..\n" "Plural-Forms: nplurals=1; plural=0;\n" "X-Poedit-Flags-xgettext: --add-comments=translators:\n" "X-Poedit-WPHeader: style.css\n" "X-Poedit-SourceCharset: UTF-8\n" -"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;" -"esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;" -"__ngettext_noop:1,2\n" +"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" +"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;" +"_nx_noop:3c,1,2;__ngettext_noop:1,2\n" "X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPathExcluded-0: *.js\n" @@ -55,7 +55,6 @@ msgid " comment" msgstr " 条评论" #: comments.php:22 comments.php:27 -#, php-format msgid " comments" msgstr " 条评论" @@ -137,84 +136,88 @@ msgstr "想要找点什么呢?" #: footer.php:85 msgid "Search" -msgstr "" +msgstr "搜索" -#: functions.php:53 +#: functions.php:52 msgid "Nav Menus" msgstr "导航菜单" -#: functions.php:387 inc/theme_plus.php:187 layouts/authorprofile.php:11 options.php:123 +#: functions.php:388 inc/theme_plus.php:187 layouts/authorprofile.php:11 +#: options.php:123 msgid "Author" msgstr "作者" -#: functions.php:387 +#: functions.php:388 msgid "Blogger" msgstr "博主" -#: functions.php:391 +#: functions.php:392 msgid "Location" msgstr "来自" -#: functions.php:395 +#: functions.php:396 msgid "Private" msgstr "私密" -#: functions.php:397 +#: functions.php:398 msgid "Yes" msgstr "是" -#: functions.php:399 +#: functions.php:400 msgid "No" msgstr "否" -#: functions.php:402 +#: functions.php:403 msgid "Edit" msgstr "编辑" -#: functions.php:483 +#: functions.php:484 msgid "" -"Please install pulgin WP-Statistics" +"Please install pulgin WP-Statistics" msgstr "" +"请安装插件 WP-Statistics" -#: functions.php:536 +#: functions.php:537 msgid "This guy is so lazy ╮(╯▽╰)╭" msgstr "这家伙好懒╮(╯▽╰)╭" -#: functions.php:1257 +#: functions.php:1258 msgid "All expand/collapse" msgstr "全部展开/收缩" -#: functions.php:1272 +#: functions.php:1273 msgid " post(s)" msgstr " 篇文章" -#: functions.php:1294 functions.php:1297 inc/theme_plus.php:479 +#: functions.php:1295 functions.php:1298 inc/theme_plus.php:479 msgid "Dashboard" msgstr "管理中心" -#: functions.php:1510 +#: functions.php:1511 msgid "ERROR: This email domain (@" msgstr "" -#: functions.php:1590 +#: functions.php:1591 msgid "QQ" msgstr "" -#: functions.php:1667 inc/theme_plus.php:726 -msgid "The comment is private" -msgstr "该评论为私密评论" - #: header.php:35 #, php-format msgid "page %s " msgstr "第 %s 页 " +#: inc/api.php:241 inc/theme_plus.php:728 +msgid "The comment is private" +msgstr "该评论为私密评论" + #: inc/categories-images.php:45 inc/categories-images.php:66 msgid "category/tag image" msgstr "分类/标签图像" -#: inc/categories-images.php:48 inc/categories-images.php:68 inc/categories-images.php:197 +#: inc/categories-images.php:48 inc/categories-images.php:68 +#: inc/categories-images.php:197 msgid "add image" msgstr "添加图像" @@ -323,7 +326,7 @@ msgstr " 在 %s中留言" #: inc/template-tags.php:72 tpl/content-page.php:35 #, php-format msgid "Edit %s" -msgstr "编辑" +msgstr "编辑 %s" #: inc/theme_plus.php:64 msgid " days ago" @@ -389,8 +392,8 @@ msgstr "登出" msgid "Sign out? " msgstr "登出? " -#: inc/theme_plus.php:299 inc/theme_plus.php:354 inc/theme_plus.php:422 tpl/content-single.php:16 -#: tpl/single-image.php:18 +#: inc/theme_plus.php:299 inc/theme_plus.php:354 inc/theme_plus.php:422 +#: tpl/content-single.php:16 tpl/single-image.php:18 msgid "View" msgid_plural "Views" msgstr[0] "次阅读" @@ -478,8 +481,8 @@ msgstr "切换主题菜单透明度" #: options.php:139 msgid "" -"Adjust the theme scheme menu transparency, the smaller the value, the more transparent. The " -"default value is 0.8" +"Adjust the theme scheme menu transparency, the smaller the value, the more " +"transparent. The default value is 0.8" msgstr "调整切换主题菜单透明度,值越小越透明。默认透明度0.8" #: options.php:144 @@ -532,16 +535,18 @@ msgstr "切换网页背景" #: options.php:159 msgid "" -"The foreground switches the background of the webpage. There are 8 urls separated by commas. " -"The order corresponds to the foreground scheme tool button position (the order of the buttons " -"is from left to right, top to bottom). If no background is needed, fill in the corresponding " -"position as none.Note: If the theme is updated from v3.2.3 and below, be sure to " -"change the [Version Control] parameter under the [Other] tab of this configuration page to any " -"new value!" +"The foreground switches the background of the webpage. There are 8 urls " +"separated by commas. The order corresponds to the foreground scheme tool " +"button position (the order of the buttons is from left to right, top to " +"bottom). If no background is needed, fill in the corresponding position as " +"none.Note: If the theme is updated from v3.2.3 and below, be sure to " +"change the [Version Control] parameter under the [Other] tab of this " +"configuration page to any new value!" msgstr "" -"前台切换网页背景,共8个url,使用英文逗号分隔,顺序对应前台切换主题按钮位置(按钮顺序从左至右," -"从上至下),如不需要背景则填写对应位置为none。注意:如果主题是从v3.2.3及以下更新过来的," -"请务必将本配置页的【其他】标签下的【版本控制】参数修改为任意新值!" +"前台切换网页背景,共8个url,使用英文逗号分隔,顺序对应前台切换主题按钮位置" +"(按钮顺序从左至右,从上至下),如不需要背景则填写对应位置为none。注" +"意:如果主题是从v3.2.3及以下更新过来的,请务必将本配置页的【其他】标签下的" +"【版本控制】参数修改为任意新值!" #: options.php:165 msgid "Personal avatar" @@ -557,12 +562,12 @@ msgstr "文字版LOGO" #: options.php:172 msgid "" -"The home page does not display the avatar above, but displays a paragraph of text (use the " -"avatar above if left blank).The text is recommended not to be too long, about 16 bytes is " -"appropriate." +"The home page does not display the avatar above, but displays a paragraph of " +"text (use the avatar above if left blank).The text is recommended not to be " +"too long, about 16 bytes is appropriate." msgstr "" -"首页不显示上方的头像,而是显示一段文字(此处留空则使用上方的头像)。文字建议不要过长,16个字节" -"左右为宜。" +"首页不显示上方的头像,而是显示一段文字(此处留空则使用上方的头像)。文字建议" +"不要过长,16个字节左右为宜。" #: options.php:178 msgid "logo" @@ -618,20 +623,21 @@ msgstr "头部装饰图" #: options.php:220 msgid "" -"Enable by default, check off, display on the article page, separate page and category page" +"Enable by default, check off, display on the article page, separate page and " +"category page" msgstr "默认开启,勾选关闭,显示在文章页面,独立页面以及分类页" #: options.php:226 msgid "Search button" msgstr "搜索按钮" -#: options.php:231 options.php:279 options.php:572 options.php:582 options.php:592 -#: options.php:602 +#: options.php:231 options.php:279 options.php:572 options.php:582 +#: options.php:592 options.php:602 msgid "Open" msgstr "启用" -#: options.php:232 options.php:280 options.php:573 options.php:583 options.php:593 -#: options.php:603 +#: options.php:232 options.php:280 options.php:573 options.php:583 +#: options.php:593 options.php:603 msgid "Close" msgstr "关闭" @@ -661,7 +667,8 @@ msgstr "方形" #: options.php:256 msgid "" -"Home article feature images alignment (only for graphic mode, default left and right alternate)" +"Home article feature images alignment (only for graphic mode, default left " +"and right alternate)" msgstr "首页文章特色图对齐方式(仅对图文风格生效,默认左右交替)" #: options.php:261 @@ -682,12 +689,12 @@ msgstr "默认文章特色图" #: options.php:268 msgid "" -"The default image displayed without the article feature image set, use random cover if left " -"blank (the image to be displayed is placed in the /wp-content/themes/Sakura/feature/gallery/ " -"directory)" +"The default image displayed without the article feature image set, use " +"random cover if left blank (the image to be displayed is placed in the /wp-" +"content/themes/Sakura/feature/gallery/ directory)" msgstr "" -"在未设置文章特色图的情况下展示的默认图像,留空则调用本地随机封面(要展示的图片放入 /wp-content/" -"themes/Sakura/feature/gallery/ 目录)" +"在未设置文章特色图的情况下展示的默认图像,留空则调用本地随机封面(要展示的图" +"片放入 /wp-content/themes/Sakura/feature/gallery/ 目录)" #: options.php:274 msgid "Comment shrink" @@ -719,7 +726,8 @@ msgstr "自动加载下一页" #: options.php:302 msgid "" -"(seconds) Set to automatically load the next page time, the default is not automatically loaded" +"(seconds) Set to automatically load the next page time, the default is not " +"automatically loaded" msgstr "(秒)设置自动加载下一页时间,默认不自动加载" #: options.php:307 @@ -831,7 +839,9 @@ msgid "Live" msgstr "" #: options.php:402 -msgid "Check to enable, the video will continue to play automatically, you need to enable Pjax" +msgid "" +"Check to enable, the video will continue to play automatically, you need to " +"enable Pjax" msgstr "选开启,视频自动续播,需要开启Pjax功能" #: options.php:408 @@ -840,8 +850,8 @@ msgstr "视频地址" #: options.php:409 msgid "" -"The source address of the video, the address is spliced below the video name, the slash is not " -"required at the end of the address" +"The source address of the video, the address is spliced below the video " +"name, the slash is not required at the end of the address" msgstr "视频的来源地址,该地址拼接下面的视频名,地址尾部不需要加斜杠" #: options.php:415 @@ -850,11 +860,12 @@ msgstr "视频名称" #: options.php:416 msgid "" -"abc.mp4, just fill in the video file name abc, multiple videos separated by commas such as " -"abc, efg, do not care about the order, because the loading is random extraction" +"abc.mp4, just fill in the video file name abc, multiple videos separated by " +"commas such as abc, efg, do not care about the order, because the loading is " +"random extraction" msgstr "" -"abc.mp4 ,只需要填写视频文件名 abc 即可,多个用英文逗号隔开如 abc,efg ,无需在意顺序,因为加载" -"是随机的抽取的" +"abc.mp4 ,只需要填写视频文件名 abc 即可,多个用英文逗号隔开如 abc,efg ,无需" +"在意顺序,因为加载是随机的抽取的" #: options.php:422 msgid "Cover image" @@ -862,8 +873,8 @@ msgstr "封面图" #: options.php:423 msgid "" -"Leave this blank to use the built-in API (put the images that need to be randomly displayed " -"into the /cover/gallery/ directory)" +"Leave this blank to use the built-in API (put the images that need to be " +"randomly displayed into the /cover/gallery/ directory)" msgstr "此处留空则使用内置API(将需要随机展示的图片放入 /cover/gallery/ 目录)" #: options.php:429 @@ -894,7 +905,7 @@ msgstr "点点" msgid "Whether to turn on the top-feature" msgstr "是否开启聚焦" -#: options.php:443 options.php:1031 +#: options.php:443 options.php:1084 msgid "Default on" msgstr "默认开启" @@ -916,8 +927,8 @@ msgstr "聚焦标题" #: options.php:460 msgid "" -"Default is Discovery, you can also change it to other, of course you can't use it as an " -"advertisement!Not allowed!!" +"Default is Discovery, you can also change it to other, of course you can't " +"use it as an advertisement!Not allowed!!" msgstr "默认为聚焦,你也可以修改为其他,当然不能当广告用!不允许!!" #: options.php:467 @@ -1048,7 +1059,9 @@ msgid "Tencent QQ" msgstr "腾讯QQ" #: options.php:639 -msgid "tencent://message/?uin={{QQ number}}. for example, tencent://message/?uin=123456" +msgid "" +"tencent://message/?uin={{QQ number}}. for example, tencent://message/?" +"uin=123456" msgstr "tencent://message/?uin={{QQ号码}},如tencent://message/?uin=123456" #: options.php:645 @@ -1157,9 +1170,11 @@ msgstr "邮箱-用户名" #: options.php:737 msgid "" -"The name part of name@domain.com, only the frontend has js runtime environment can get the " -"full address, you can rest assured to fill in" -msgstr "name@domain.com 的 name 部分,前端仅具有 js 运行环境时才能获取完整地址,可放心填写" +"The name part of name@domain.com, only the frontend has js runtime " +"environment can get the full address, you can rest assured to fill in" +msgstr "" +"name@domain.com 的 name 部分,前端仅具有 js 运行环境时才能获取完整地址,可放" +"心填写" #: options.php:743 msgid "Email-domain" @@ -1179,14 +1194,16 @@ msgstr "后台面板自定义配色方案" #: options.php:757 msgid "" -"You can design the background panel (/wp-admin/) style yourself below, but before you start, " -"please go to here to change the color scheme to custom." -"(Custom).
Tip: How to match colors? Maybe this can help you." +"You can design the background panel (/wp-admin/) style yourself below, but " +"before you start, please go to here to " +"change the color scheme to custom.(Custom).
Tip: How to match " +"colors? Maybe this can help " +"you." msgstr "" -"你可以在下面自行设计后台面板(/wp-admin/)样式,不过在开始之前请到这里将配色方案改为自定义(Custom)。
Tip: 如何搭配颜色?或许这个可以帮到你。" +"你可以在下面自行设计后台面板(/wp-admin/)样式,不过在开始之前请到这里将配色方案改为自定义(Custom)。
Tip: 如何搭配颜色?或许这个可以" +"帮到你。" #: options.php:763 msgid "Panel main color A" @@ -1194,8 +1211,8 @@ msgstr "面板主色调A" #: options.php:766 options.php:774 options.php:782 options.php:790 msgid "" -"(array) (optional) An array of CSS color definitions which are used to give the user a " -"feel for the theme." +"(array) (optional) An array of CSS color definitions which are used " +"to give the user a feel for the theme." msgstr "" #: options.php:771 @@ -1215,7 +1232,9 @@ msgid "Panel icon color——base" msgstr "面板图标配色——base" #: options.php:798 options.php:806 options.php:814 -msgid "(array) (optional) An array of CSS color definitions used to color any SVG icons." +msgid "" +"(array) (optional) An array of CSS color definitions used to color " +"any SVG icons." msgstr "" #: options.php:803 @@ -1260,12 +1279,14 @@ msgstr "指定登录地址" #: options.php:847 msgid "" -"Forcibly do not use the background address to log in, fill in the new landing page address, " -"such as http://www.xxx.com/login [Note] Before you fill out, test your new page can be opened " -"normally, so as not to enter the background or other problems happening" +"Forcibly do not use the background address to log in, fill in the new " +"landing page address, such as http://www.xxx.com/login [Note] Before you " +"fill out, test your new page can be opened normally, so as not to enter the " +"background or other problems happening" msgstr "" -"强制不使用后台地址登陆,填写新建的登陆页面地址,比如 http://www.xxx.com/login【注意】填写前先测" -"试下你新建的页面是可以正常打开的,以免造成无法进入后台等情况" +"强制不使用后台地址登陆,填写新建的登陆页面地址,比如 http://www.xxx.com/" +"login【注意】填写前先测试下你新建的页面是可以正常打开的,以免造成无法进入后台" +"等情况" #: options.php:853 msgid "Specify registered address" @@ -1289,8 +1310,8 @@ msgstr "登录后自动跳转" #: options.php:868 msgid "" -"After checken, the administrator redirects to the background and the user redirects to the " -"home page." +"After checken, the administrator redirects to the background and the user " +"redirects to the home page." msgstr "勾选开启,管理员跳转至后台,用户跳转至主页。" #: options.php:874 @@ -1311,12 +1332,13 @@ msgstr "图片库" #: options.php:887 msgid "" -"Note: Fill in the format http(s)://your CDN domain name/.
In other words, the original " -"path is http://your.domain/wp-content/uploads/2018/05/xx.png and the picture will load from " -"http://your CDN domain/2018/05/xx.png" +"Note: Fill in the format http(s)://your CDN domain name/.
In other " +"words, the original path is http://your.domain/wp-content/uploads/2018/05/xx." +"png and the picture will load from http://your CDN domain/2018/05/xx.png" msgstr "" -"注意:填写格式为 http(s)://你的CDN域名/。
也就是说,原路径为 http://your.domain/wp-content/" -"uploads/2018/05/xx.png 的图片将从 http://你的CDN域名/2018/05/xx.png 加载" +"注意:填写格式为 http(s)://你的CDN域名/。
也就是说,原路径为 http://your." +"domain/wp-content/uploads/2018/05/xx.png 的图片将从 http://你的CDN域" +"名/2018/05/xx.png 加载" #: options.php:893 msgid "Use the front-end library locally (lib.js、lib.css)" @@ -1331,7 +1353,9 @@ msgid "Use js and css file of the theme (sakura-app.js、style.css) locally" msgstr "本地调用主题 js、css 文件(sakura-app.js、style.css)" #: options.php:901 -msgid "The js and css files of the theme do not load from jsDelivr, please open when DIY" +msgid "" +"The js and css files of the theme do not load from jsDelivr, please open " +"when DIY" msgstr "主题的 js、css 文件不走 jsDelivr,DIY 时请开启" #: options.php:908 @@ -1356,18 +1380,20 @@ msgstr "页脚悬浮播放器" #: options.php:932 msgid "" -"If you don't need the player just leave it blank.Fill in the \"song list\" ID of Netease Cloud " -"Music, eg: https://music.163.com/#/playlist?id=2288037900 The ID is 2288037900" +"If you don't need the player just leave it blank.Fill in the \"song list\" " +"ID of Netease Cloud Music, eg: https://music.163.com/#/playlist?" +"id=2288037900 The ID is 2288037900" msgstr "" -"如果不需要播放器留空即可。填写网易云音乐的「歌单」ID,eg:https://music.163.com/#/playlist?" -"id=2288037900的ID是2288037900" +"如果不需要播放器留空即可。填写网易云音乐的「歌单」ID,eg:https://music.163." +"com/#/playlist?id=2288037900的ID是2288037900" #: options.php:938 msgid "Version Control" msgstr "版本控制" #: options.php:939 -msgid "Used to update frontend cookies and browser caches, any string can be used" +msgid "" +"Used to update frontend cookies and browser caches, any string can be used" msgstr "用于更新前端 cookie 及浏览器缓存,可使用任意字符串" #: options.php:945 @@ -1382,7 +1408,7 @@ msgstr "原理与Ajax相同" msgid "Enable NProgress progress bar" msgstr "开启NProgress加载进度条" -#: options.php:960 options.php:953 +#: options.php:953 options.php:960 msgid "Default off, check on" msgstr "默认不开启,勾选开启" @@ -1396,11 +1422,11 @@ msgstr "公告内容" #: options.php:967 msgid "" -"Announcement content, the text exceeds 142 bytes will be scrolled display (mobile device is " -"invalid)" +"Announcement content, the text exceeds 142 bytes will be scrolled display " +"(mobile device is invalid)" msgstr "" -"公告内容,文字超出142个字节将会被滚动显示(移动端无效),一个汉字 = 3字节,一个字母 = 1字节,自" -"己计算吧" +"公告内容,文字超出142个字节将会被滚动显示(移动端无效),一个汉字 = 3字节,一" +"个字母 = 1字节,自己计算吧" #: options.php:973 msgid "The categories of articles that don\\t not show on homepage" @@ -1419,7 +1445,8 @@ msgid "Statistics Interface" msgstr "统计接口" #: options.php:992 -msgid "WP-Statistics plugin (Professional statistics, can exclude invalid access)" +msgid "" +"WP-Statistics plugin (Professional statistics, can exclude invalid access)" msgstr "WP-Statistics 插件(专业性统计,可排除无效访问)" #: options.php:993 @@ -1447,132 +1474,225 @@ msgid "23k Views (chinese)" msgstr "23k 次访问(中式)" #: options.php:1009 +msgid "Comment image upload API" +msgstr "评论上传图片接口" + +#: options.php:1014 +msgid "Imgur (https://imgur.com)" +msgstr "" + +#: options.php:1015 +msgid "SM.MS (https://sm.ms)" +msgstr "" + +#: options.php:1016 +msgid "Chevereto (https://chevereto.com)" +msgstr "" + +#: options.php:1020 +msgid "Imgur Client ID" +msgstr "" + +#: options.php:1021 +msgid "" +"Register your application here, note we only need the Client ID here." +msgstr "" +"在这里注册你的 " +"application , 注意此处只需要填写 Client ID." + +#: options.php:1027 +msgid "SM.MS Secret Token" +msgstr "" + +#: options.php:1028 +msgid "" +"Register your application here." +msgstr "在这里获取 key." + +#: options.php:1034 +msgid "Chevereto API v1 key" +msgstr "" + +#: options.php:1035 +msgid "Get your API key here " +msgstr "在这里获取你的 API key:" + +#: options.php:1041 +msgid "Chevereto URL" +msgstr "" + +#: options.php:1042 +msgid "" +"Your Chevereto homepage url, no slash in the end, eg. https://your.cherverto." +"com" +msgstr "" +"你的 Chevereto 首页 url, 注意结尾没有 /, 例如:https://your.cherverto.com" + +#: options.php:1048 +msgid "Comment images proxy" +msgstr "评论图片代理" + +#: options.php:1049 +msgid "" +"A front-ed proxy for the uploaded images. Leave it blank if you do not need." +msgstr "前端显示的图片的代理" + +#: options.php:1055 +msgid "Imgur upload proxy" +msgstr "Imgur 上传代理" + +#: options.php:1056 +msgid "" +"A back-ed proxy to upload images. You may set a self hosted proxy with " +"Nginx, following my turtal. This feature is mainly for Chinese who " +"cannot access to Imgur due to the GFW. The default and official setting is " +"【https://api.imgur.com/3/image/】" +msgstr "" +"后端上传图片到 Imgur 的时候使用的代理。你可以参考我的教程,借助 " +"Nginx 部署自己的代理。目前 Imgur 在国内处于被墙状态,国内服务器上传和浏览器前" +"端显示都需要代理!如果服务器在国外不需要上传代理,此处填写默认值即可:【https://api.imgur.com/3/image/】" + +#: options.php:1062 msgid "Enable live search" msgstr "启用实时搜索" -#: options.php:1010 +#: options.php:1063 msgid "" -"Real-time search in the foreground, call the Rest API to update the cache every hour, you can " -"manually set the cache time in functions.php" +"Real-time search in the foreground, call the Rest API to update the cache " +"every hour, you can manually set the cache time in functions.php" msgstr "" -"前台实现实时搜索,调用 Rest API 每小时更新一次缓存,可在 functions.php 里手动设置缓存时间" +"前台实现实时搜索,调用 Rest API 每小时更新一次缓存,可在 functions.php 里手动" +"设置缓存时间" -#: options.php:1016 +#: options.php:1069 msgid "Include comments in live search" msgstr "实时搜索包含评论" -#: options.php:1017 +#: options.php:1070 msgid "" -"Search for comments in real-time search (not recommended if there are too many comments on the " -"site)" +"Search for comments in real-time search (not recommended if there are too " +"many comments on the site)" msgstr "在实时搜索中搜索评论(如果网站评论数量太多不建议开启)" -#: options.php:1023 +#: options.php:1076 msgid "Enable baguetteBox" msgstr "启用 baguetteBox" -#: options.php:1024 +#: options.php:1077 msgid "" -"Default off,please read wiki" -msgstr "默认禁用,请阅读说明" +"Default off,please read wiki" +msgstr "" +"默认禁用,请阅" +"读说明" -#: options.php:1030 +#: options.php:1083 msgid "Enable lazyload in posts" msgstr "文章内图片启用 lazyload" -#: options.php:1037 +#: options.php:1090 msgid "lazyload spinner" msgstr "lazyload 占位图" -#: options.php:1038 +#: options.php:1091 msgid "The placeholder to display when the image loads, fill in the image url" msgstr "图片加载时要显示的占位图,填写图片 url" -#: options.php:1044 +#: options.php:1097 msgid "Whether to enable the clipboard copyright" msgstr "是否开启剪贴板版权标识" -#: options.php:1045 +#: options.php:1098 msgid "" -"Automatically add a copyright to the clipboard when copying more than 30 bytes, which is " -"enabled by default." +"Automatically add a copyright to the clipboard when copying more than 30 " +"bytes, which is enabled by default." msgstr "复制超过30个字节时自动向剪贴板添加版权标识,默认开启。" -#: options.php:1051 +#: options.php:1104 msgid "Email address prefix" msgstr "发件地址前缀" -#: options.php:1052 +#: options.php:1105 msgid "" -"For sending system mail, the sender address displayed in the user's mailbox, do not use " -"Chinese, the default system email address is bibi@your_domain_name" +"For sending system mail, the sender address displayed in the user's mailbox, " +"do not use Chinese, the default system email address is bibi@your_domain_name" msgstr "" -"用于发送系统邮件,在用户的邮箱中显示的发件人地址,不要使用中文,默认系统邮件地址为 bibi@你的域" -"名" +"用于发送系统邮件,在用户的邮箱中显示的发件人地址,不要使用中文,默认系统邮件" +"地址为 bibi@你的域名" -#: options.php:1058 +#: options.php:1111 msgid "Comments reply notification" msgstr "邮件回复通知" -#: options.php:1059 +#: options.php:1112 msgid "" -"WordPress will use email to notify users when their comments receive a reply by default. Tick " -"this item allows users to set their own comments reply notification" +"WordPress will use email to notify users when their comments receive a reply " +"by default. Tick this item allows users to set their own comments reply " +"notification" msgstr "" -"WordPress默认会使用邮件通知用户评论收到回复,开启此项允许用户设置自己的评论收到回复时是否使用邮" -"件通知" +"WordPress默认会使用邮件通知用户评论收到回复,开启此项允许用户设置自己的评论收" +"到回复时是否使用邮件通知" -#: options.php:1065 +#: options.php:1118 msgid "Administrator comment notification" msgstr "邮件回复通知管理员" -#: options.php:1066 -msgid "Whether to use email notification when the administrator's comments receive a reply" +#: options.php:1119 +msgid "" +"Whether to use email notification when the administrator's comments receive " +"a reply" msgstr "当管理员评论收到回复时是否使用邮件通知" -#: options.php:1072 +#: options.php:1125 msgid "Enable private comment" msgstr "允许私密评论" -#: options.php:1073 +#: options.php:1126 msgid "Allow users to set their own comments to be invisible to others" msgstr "允许用户设置自己的评论对其他人不可见" -#: options.php:1079 +#: options.php:1132 msgid "Human verification" msgstr "机器人验证" -#: options.php:1080 +#: options.php:1133 msgid "Enable human verification" msgstr "开启机器人验证" -#: options.php:1086 +#: options.php:1139 msgid "Comment UA infomation" msgstr "评论UA信息" -#: options.php:1087 -msgid "Check to enable, display the user's browser, operating system information" +#: options.php:1140 +msgid "" +"Check to enable, display the user's browser, operating system information" msgstr "勾选开启,显示用户的浏览器,操作系统信息" -#: options.php:1093 +#: options.php:1146 msgid "Enable disqus" msgstr "开启多说插件支持" -#: options.php:1094 +#: options.php:1147 msgid "Enable disqus for comment" msgstr "多说已经凉了~~" -#: options.php:1100 +#: options.php:1153 msgid "Time Zone adjustment" msgstr "时区调整" -#: options.php:1101 +#: options.php:1154 msgid "" -"If the comment has a time difference problem adjust here, fill in an integer, the calculation " -"method: actual_time = display_error_time - the_integer_you_entered (unit: hour)" +"If the comment has a time difference problem adjust here, fill in an " +"integer, the calculation method: actual_time = display_error_time - " +"the_integer_you_entered (unit: hour)" msgstr "" -"如果评论出现时差问题在这里调整,填入一个整数,计算方法:实际时间=显示错误的时间-你输入的整数" -"(单位:小时)" +"如果评论出现时差问题在这里调整,填入一个整数,计算方法:实际时间=显示错误的时" +"间-你输入的整数(单位:小时)" #: search.php:19 #, php-format @@ -1581,17 +1701,20 @@ msgstr "关于 %s 的搜索结果: " #: tpl/content-category.php:30 msgid "NOTHING" -msgstr "" +msgstr "啥也没有呀" -#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content.php:34 tpl/content-thumb.php:53 +#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:53 +#: tpl/content.php:34 msgid "Comment" msgstr "条评论" -#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content.php:34 tpl/content-thumb.php:53 +#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:53 +#: tpl/content.php:34 msgid "Comments" msgstr "条评论" -#: tpl/content-image.php:38 tpl/content-status.php:34 tpl/content.php:37 tpl/content-thumb.php:52 +#: tpl/content-image.php:38 tpl/content-status.php:34 tpl/content-thumb.php:52 +#: tpl/content.php:37 msgid "Hit" msgid_plural "Hits" msgstr[0] "热度" @@ -1602,7 +1725,8 @@ msgstr "没有找到任何东西!" #: tpl/content-none.php:21 #, php-format -msgid "Ready to post your first article? Click here to start." +msgid "" +"Ready to post your first article? Click here to start." msgstr "准备好发布你的第一篇文章了么? 点击这里开始." #: tpl/content-none.php:25 @@ -1623,12 +1747,13 @@ msgstr "知识共享署名-非商业性使用-相同方式共享 4.0 国际许 #: user/page-login.php:18 msgid "Remember Me" -msgstr "" +msgstr "记住我" -#: user/page-register.php:14 user/page-register.php:16 user/page-register.php:19 -#: user/page-register.php:24 user/page-register.php:26 user/page-register.php:29 -#: user/page-register.php:34 user/page-register.php:36 user/page-register.php:41 -#: user/page-register.php:47 +#: user/page-register.php:14 user/page-register.php:16 +#: user/page-register.php:19 user/page-register.php:24 +#: user/page-register.php:26 user/page-register.php:29 +#: user/page-register.php:34 user/page-register.php:36 +#: user/page-register.php:41 user/page-register.php:47 msgid "Error" msgstr "错误" diff --git a/options.php b/options.php index e8f7f30..4cacb2b 100644 --- a/options.php +++ b/options.php @@ -1004,6 +1004,59 @@ function optionsframework_options() { 'type_3' => __('23 333 Views (french)', 'sakura'),/*23 333 次访问(法式)*/ 'type_4' => __('23k Views (chinese)', 'sakura'),/*23k 次访问(中式)*/ )); + + $options[] = array( + 'name' => __('Comment image upload API', 'sakura'),/*评论图片上传接口*/ + 'id' => 'img_upload_api', + 'std' => "imgur", + 'type' => "radio", + 'options' => array( + 'imgur' => __('Imgur (https://imgur.com)', 'sakura'), + 'smms' => __('SM.MS (https://sm.ms)', 'sakura'), + 'chevereto' => __('Chevereto (https://chevereto.com)', 'sakura') + )); + + $options[] = array( + 'name' => __('Imgur Client ID', 'sakura'), + 'desc' => __('Register your application here, note we only need the Client ID here.', 'sakura'), + 'id' => 'imgur_client_id', + 'std' => '', + 'type' => 'text'); + + $options[] = array( + 'name' => __('SM.MS Secret Token', 'sakura'), + 'desc' => __('Register your application here.', 'sakura'), + 'id' => 'smms_client_id', + 'std' => '', + 'type' => 'text'); + + $options[] = array( + 'name' => __('Chevereto API v1 key', 'sakura'), + 'desc' => __('Get your API key here '.akina_option('cheverto_url').'/dashboard/settings/api', 'sakura'), + 'id' => 'chevereto_api_key', + 'std' => '', + 'type' => 'text'); + + $options[] = array( + 'name' => __('Chevereto URL', 'sakura'), + 'desc' => __('Your Chevereto homepage url, no slash in the end, eg. https://your.cherverto.com', 'sakura'), + 'id' => 'cheverto_url', + 'std' => 'https://your.cherverto.com', + 'type' => 'text'); + + $options[] = array( + 'name' => __('Comment images proxy', 'sakura'), + 'desc' => __('A front-ed proxy for the uploaded images. Leave it blank if you do not need.', 'sakura'), + 'id' => 'cmt_image_proxy', + 'std' => 'https://images.weserv.nl/?url=', + 'type' => 'text'); + + $options[] = array( + 'name' => __('Imgur upload proxy', 'sakura'), + 'desc' => __('A back-ed proxy to upload images. You may set a self hosted proxy with Nginx, following my turtal. This feature is mainly for Chinese who cannot access to Imgur due to the GFW. The default and official setting is 【https://api.imgur.com/3/image/】', 'sakura'), + 'id' => 'imgur_upload_image_proxy', + 'std' => 'https://api.imgur.com/3/image/', + 'type' => 'text'); $options[] = array( 'name' => __('Enable live search', 'sakura'),/*启用实时搜索*/ diff --git a/style.css b/style.css index a9ee592..680b6e7 100644 --- a/style.css +++ b/style.css @@ -5,7 +5,7 @@ Theme URI: https://2heng.xin/theme-sakura/ Author: Mashiro, Louie, Fuzzz Author URI: http://2heng.xin Description: A branch of theme Akina -Version: 3.2.8 +Version: 3.3.0 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: sakura diff --git a/user/page-timeline.php b/user/page-timeline.php index 53243f3..ffd4139 100644 --- a/user/page-timeline.php +++ b/user/page-timeline.php @@ -10,7 +10,7 @@ get_header(); #ini_set('display_errors', '1'); ?>
- +
@@ -28,4 +28,4 @@ get_header();
-