translate

pull/148/head
spirit 2019-12-04 15:17:05 +08:00
parent 0a17ab966d
commit 6bab1a43d0
9 changed files with 69 additions and 69 deletions

View File

@ -340,7 +340,7 @@ function cover_gallery() {
global $wpdb;
$img_array = json_decode($wpdb->get_var("SELECT `mate_value` FROM `wp_sakura` WHERE `mate_key`='manifest_json'"), true);
$img = array_rand($img_array);
$img_domain = akina_option('jsdelivr_cdn') ? akina_option('jsdelivr_cdn') : get_template_directory_uri();
$img_domain = akina_option('cover_cdn') ? akina_option('cover_cdn') : get_template_directory_uri();
if(strpos($_SERVER['HTTP_ACCEPT'], 'image/webp')) {
$imgurl = $img_domain . "/manifest/" . $img_array[$img]["webp"][0];
} else {
@ -361,7 +361,7 @@ function feature_gallery() {
global $wpdb;
$img_array = json_decode($wpdb->get_var("SELECT `mate_value` FROM `wp_sakura` WHERE `mate_key`='manifest_json'"), true);
$img = array_rand($img_array);
$img_domain = akina_option('jsdelivr_cdn') ? akina_option('jsdelivr_cdn') : get_template_directory_uri();
$img_domain = akina_option('cover_cdn') ? akina_option('cover_cdn') : get_template_directory_uri();
if(strpos($_SERVER['HTTP_ACCEPT'], 'image/webp')) {
$imgurl = $img_domain . "/manifest/" . $img_array[$img]["webp"][1];
} else {

View File

@ -25,8 +25,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
/* If the user can't edit theme options, no use running this plugin */
define( 'SAKURA_OPTIONS', __('Sakura Options', 'sakura') );
add_action( 'init', 'optionsframework_rolescheck' );
function optionsframework_rolescheck () {
@ -181,8 +179,8 @@ function optionsframework_setdefaults() {
function optionsframework_menu_settings() {
$menu = array(
'page_title' => __( SAKURA_OPTIONS, 'optionsframework'),
'menu_title' => __( SAKURA_OPTIONS, 'optionsframework'),
'page_title' => __('Sakura Options', 'sakura'),
'menu_title' => __('Sakura Options', 'sakura'),
'capability' => 'edit_theme_options',
'menu_slug' => 'options-framework',
'callback' => 'optionsframework_page'
@ -411,7 +409,7 @@ function optionsframework_adminbar() {
$wp_admin_bar->add_menu( array(
'parent' => 'appearance',
'id' => 'of_theme_options',
'title' => __( SAKURA_OPTIONS, 'options_framework_theme' ),
'title' => __('Sakura Options', 'sakura'),
'href' => admin_url( 'themes.php?page=options-framework' )
));
}

View File

@ -13,7 +13,7 @@ mashiro_option.site_name = "<?php echo akina_option('site_name', ''); ?>";
mashiro_option.author_name = "<?php echo akina_option('author_name', ''); ?>";
mashiro_option.template_url = "<?php echo get_template_directory_uri(); ?>";
mashiro_option.site_url = "<?php echo site_url(); ?>";
mashiro_option.qq_api_url = "<?php echo site_url(); ?>/wp-json/sakura/v1/qqinfo/json";
mashiro_option.qq_api_url = "<?php echo rest_url('sakura/v1/qqinfo/json'); ?>"";
// mashiro_option.qq_avatar_api_url = "https://api.2heng.xin/qqinfo/";
mashiro_option.live_search = <?php if ( akina_option('live_search') ){ echo 'true'; } else { echo 'false'; } ?>;

Binary file not shown.

View File

@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Sakura\n"
"POT-Creation-Date: 2019-11-28 23:19+0800\n"
"PO-Revision-Date: 2019-11-28 23:19+0800\n"
"POT-Creation-Date: 2019-12-04 15:07+0800\n"
"PO-Revision-Date: 2019-12-04 15:15+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: en_US\n"
@ -214,7 +214,7 @@ msgstr ""
msgid "page %s "
msgstr ""
#: inc/api.php:256 inc/theme_plus.php:727
#: inc/api.php:313 inc/theme_plus.php:727
msgid "The comment is private"
msgstr ""
@ -239,39 +239,40 @@ msgstr ""
msgid "no image"
msgstr ""
#: inc/options-framework.php:28
#: inc/options-framework.php:182 inc/options-framework.php:183
#: inc/options-framework.php:412
msgid "Sakura Options"
msgstr ""
#: inc/options-framework.php:230
#: inc/options-framework.php:228
msgid "Clear"
msgstr ""
#: inc/options-framework.php:231
#: inc/options-framework.php:229
msgid "Default"
msgstr ""
#: inc/options-framework.php:232
#: inc/options-framework.php:230
msgid "Select Color"
msgstr ""
#: inc/options-framework.php:278
#: inc/options-framework.php:275
msgid "Save"
msgstr ""
#: inc/options-framework.php:279
#: inc/options-framework.php:276
msgid "Restore default"
msgstr ""
#: inc/options-framework.php:279
#: inc/options-framework.php:276
msgid "All setting will be lost, sure?"
msgstr ""
#: inc/options-framework.php:311
#: inc/options-framework.php:308
msgid "Default options restored."
msgstr ""
#: inc/options-framework.php:365
#: inc/options-framework.php:362
msgid "Options saved."
msgstr ""
@ -460,7 +461,7 @@ msgstr ""
#: options.php:112
msgid "Basic settings"
msgstr ""
msgstr "Basic"
#: options.php:116
msgid "Site title"
@ -780,7 +781,7 @@ msgstr ""
#: options.php:352
msgid "First screen"
msgstr ""
msgstr "Above The Fold"
#: options.php:356
msgid "Main switch"
@ -961,7 +962,7 @@ msgstr ""
#: options.php:539
msgid "Post page"
msgstr ""
msgstr "Post"
#: options.php:543
msgid "Post style"
@ -1009,7 +1010,7 @@ msgstr ""
#: options.php:607
msgid "Social network"
msgstr ""
msgstr "Social"
#: options.php:611
msgid "Wechat"
@ -1156,16 +1157,16 @@ msgid "The domain.com part of name@domain.com"
msgstr ""
#: options.php:737
msgid "Background configuration"
msgstr ""
msgid "Dashboard configuration"
msgstr "Dashboard"
#: options.php:742
msgid "Background panel custom color scheme"
msgid "Dashboard panel custom color scheme"
msgstr ""
#: options.php:743
msgid ""
"You can design the background panel (/wp-admin/) style yourself below, but "
"You can design the dashboard panel (/wp-admin/) style yourself below, but "
"before you start, please go to <a href=\"/wp-admin/profile.php\">here</a> to "
"change the color scheme to custom.(Custom).<br><b>Tip: </b>How to match "
"colors? Maybe <a href=\"https://mashiro.top/color-thief/\">this</a> can help "
@ -1302,7 +1303,7 @@ msgid ""
msgstr ""
#: options.php:879
msgid "Jsdelivr CDN"
msgid "Cover CDN"
msgstr ""
#: options.php:880

View File

@ -3,7 +3,7 @@ msgid ""
msgstr ""
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
"Project-Id-Version: Sakura\n"
"POT-Creation-Date: 2019-11-28 23:19+0800\n"
"POT-Creation-Date: 2019-12-04 15:07+0800\n"
"PO-Revision-Date: 2019-11-01 14:27+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
@ -213,7 +213,7 @@ msgstr ""
msgid "page %s "
msgstr ""
#: inc/api.php:256 inc/theme_plus.php:727
#: inc/api.php:313 inc/theme_plus.php:727
msgid "The comment is private"
msgstr ""
@ -237,39 +237,39 @@ msgstr ""
msgid "no image"
msgstr ""
#: inc/options-framework.php:28
#: inc/options-framework.php:182 inc/options-framework.php:183 inc/options-framework.php:412
msgid "Sakura Options"
msgstr ""
#: inc/options-framework.php:230
#: inc/options-framework.php:228
msgid "Clear"
msgstr ""
#: inc/options-framework.php:231
#: inc/options-framework.php:229
msgid "Default"
msgstr ""
#: inc/options-framework.php:232
#: inc/options-framework.php:230
msgid "Select Color"
msgstr ""
#: inc/options-framework.php:278
#: inc/options-framework.php:275
msgid "Save"
msgstr ""
#: inc/options-framework.php:279
#: inc/options-framework.php:276
msgid "Restore default"
msgstr ""
#: inc/options-framework.php:279
#: inc/options-framework.php:276
msgid "All setting will be lost, sure?"
msgstr ""
#: inc/options-framework.php:311
#: inc/options-framework.php:308
msgid "Default options restored."
msgstr ""
#: inc/options-framework.php:365
#: inc/options-framework.php:362
msgid "Options saved."
msgstr ""
@ -1145,16 +1145,16 @@ msgid "The domain.com part of name@domain.com"
msgstr ""
#: options.php:737
msgid "Background configuration"
msgid "Dashboard configuration"
msgstr ""
#: options.php:742
msgid "Background panel custom color scheme"
msgid "Dashboard panel custom color scheme"
msgstr ""
#: options.php:743
msgid ""
"You can design the background panel (/wp-admin/) style yourself below, but before you start, "
"You can design the dashboard panel (/wp-admin/) style yourself below, but before you start, "
"please go to <a href=\"/wp-admin/profile.php\">here</a> to change the color scheme to custom."
"(Custom).<br><b>Tip: </b>How to match colors? Maybe <a href=\"https://mashiro.top/color-thief/"
"\">this</a> can help you."
@ -1287,7 +1287,7 @@ msgid ""
msgstr ""
#: options.php:879
msgid "Jsdelivr CDN"
msgid "Cover CDN"
msgstr ""
#: options.php:880

Binary file not shown.

View File

@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Sakura\n"
"POT-Creation-Date: 2019-11-28 23:19+0800\n"
"PO-Revision-Date: 2019-11-28 23:19+0800\n"
"POT-Creation-Date: 2019-12-04 15:07+0800\n"
"PO-Revision-Date: 2019-12-04 15:07+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: zh_CN\n"
@ -216,7 +216,7 @@ msgstr "侧栏"
msgid "page %s "
msgstr "第 %s 页 "
#: inc/api.php:256 inc/theme_plus.php:727
#: inc/api.php:313 inc/theme_plus.php:727
msgid "The comment is private"
msgstr "该评论为私密评论"
@ -241,39 +241,40 @@ msgstr "图像"
msgid "no image"
msgstr "暂无"
#: inc/options-framework.php:28
#: inc/options-framework.php:182 inc/options-framework.php:183
#: inc/options-framework.php:412
msgid "Sakura Options"
msgstr "Sakura主题设置"
#: inc/options-framework.php:230
#: inc/options-framework.php:228
msgid "Clear"
msgstr "清除"
#: inc/options-framework.php:231
#: inc/options-framework.php:229
msgid "Default"
msgstr "默认"
#: inc/options-framework.php:232
#: inc/options-framework.php:230
msgid "Select Color"
msgstr "选择颜色"
#: inc/options-framework.php:278
#: inc/options-framework.php:275
msgid "Save"
msgstr "保存"
#: inc/options-framework.php:279
#: inc/options-framework.php:276
msgid "Restore default"
msgstr "重置为默认"
#: inc/options-framework.php:279
#: inc/options-framework.php:276
msgid "All setting will be lost, sure?"
msgstr "将会重置所有设置,继续吗?"
#: inc/options-framework.php:311
#: inc/options-framework.php:308
msgid "Default options restored."
msgstr "主题设置已重置。"
#: inc/options-framework.php:365
#: inc/options-framework.php:362
msgid "Options saved."
msgstr "设置已保存。"
@ -1167,16 +1168,16 @@ msgid "The domain.com part of name@domain.com"
msgstr "name@domain.com 的 domain.com部分"
#: options.php:737
msgid "Background configuration"
msgid "Dashboard configuration"
msgstr "后台配置"
#: options.php:742
msgid "Background panel custom color scheme"
msgid "Dashboard panel custom color scheme"
msgstr "后台面板自定义配色方案"
#: options.php:743
msgid ""
"You can design the background panel (/wp-admin/) style yourself below, but "
"You can design the dashboard panel (/wp-admin/) style yourself below, but "
"before you start, please go to <a href=\"/wp-admin/profile.php\">here</a> to "
"change the color scheme to custom.(Custom).<br><b>Tip: </b>How to match "
"colors? Maybe <a href=\"https://mashiro.top/color-thief/\">this</a> can help "
@ -1323,8 +1324,8 @@ msgstr ""
"名/2018/05/xx.png 加载"
#: options.php:879
msgid "Jsdelivr CDN"
msgstr "随机图片"
msgid "Cover CDN"
msgstr "封面图图片库"
#: options.php:880
msgid ""
@ -1814,6 +1815,9 @@ msgstr "注 册"
msgid "Registration is not open yet."
msgstr "暂未开放注册。"
#~ msgid "Jsdelivr CDN"
#~ msgstr "随机图片"
#~ msgid "Default article feature image"
#~ msgstr "默认文章特色图"
@ -1825,9 +1829,6 @@ msgstr "暂未开放注册。"
#~ "在未设置文章特色图的情况下展示的默认图像此处留空则使用内置API将需要随"
#~ "机展示的图片url写入 /feature/img.txt 文件)"
#~ msgid "Cover image"
#~ msgstr "封面图"
#~ msgid ""
#~ "Leave blank here to use the built-in API (please read <a href=\"https://"
#~ "github.com/mashirozx/Sakura/blob/dev/manifest/README.md\"> README </a> "

View File

@ -734,13 +734,13 @@ function optionsframework_options() {
//后台配置
$options[] = array(
'name' => __('Background configuration', 'sakura'),/*后台配置*/
'name' => __('Dashboard configuration', 'sakura'),/*后台配置*/
'type' => 'heading' );
//后台面板自定义配色方案
$options[] = array(
'name' => __('Background panel custom color scheme', 'sakura'),/*后台面板自定义配色方案*/
'desc' => __('You can design the background panel (/wp-admin/) style yourself below, but before you start, please go to <a href="/wp-admin/profile.php">here</a> to change the color scheme to custom.(Custom).<br><b>Tip: </b>How to match colors? Maybe <a href="https://mashiro.top/color-thief/">this</a> can help you.', 'sakura'),/*你可以在下面自行设计后台面板(/wp-admin/)样式,不过在开始之前请到<a href="/wp-admin/profile.php">这里</a>将配色方案改为自定义Custom。<br><b>Tip: </b>如何搭配颜色?或许<a href="https://mashiro.top/color-thief/">这个</a>可以帮到你。*/
'name' => __('Dashboard panel custom color scheme', 'sakura'),/*后台面板自定义配色方案*/
'desc' => __('You can design the dashboard panel (/wp-admin/) style yourself below, but before you start, please go to <a href="/wp-admin/profile.php">here</a> to change the color scheme to custom.(Custom).<br><b>Tip: </b>How to match colors? Maybe <a href="https://mashiro.top/color-thief/">this</a> can help you.', 'sakura'),/*你可以在下面自行设计后台面板(/wp-admin/)样式,不过在开始之前请到<a href="/wp-admin/profile.php">这里</a>将配色方案改为自定义Custom。<br><b>Tip: </b>如何搭配颜色?或许<a href="https://mashiro.top/color-thief/">这个</a>可以帮到你。*/
'id' => 'scheme_tip',
'std' => '',
'type' => 'typography ');
@ -876,9 +876,9 @@ function optionsframework_options() {
'type' => 'text');
$options[] = array(
'name' => __('Jsdelivr CDN', 'sakura'),/*图片库*/
'name' => __('Cover CDN', 'sakura'),/*封面图片库*/
'desc' => __('Fill in the cdn path for random picture display, without adding a slash at the end, for example: https://cdn.jsdelivr.net/gh/mashirozx/sakura@3.3.3, please refer to <a href = "https: //github.com/mashirozx/Sakura/wiki/options">Wiki </a>', 'sakura'),/*填写 cdn 路径用于随机图片展示最后不用加斜杠https://cdn.jsdelivr.net/gh/mashirozx/sakura@3.3.3 ,更多信息请参考<a href="https://github.com/mashirozx/Sakura/wiki/options">Wiki</a>*/
'id' => 'jsdelivr_cdn',
'id' => 'cover_cdn',
'std' => 'https://cdn.jsdelivr.net/gh/mashirozx/sakura@3.3.3',
'type' => 'text');