From a9efa57cb8a6349a2f6b8b69a57037979f60d6ed Mon Sep 17 00:00:00 2001 From: imShadow Date: Sat, 6 Dec 2014 00:22:43 +0800 Subject: [PATCH] =?UTF-8?q?0.5.6=20=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=B1=89=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.example.js | 4 +--- .../controllers/settings/code-injection.js | 2 +- core/client/controllers/settings/labs.js | 10 +++++----- core/client/templates/settings.hbs | 6 +++--- .../templates/settings/code-injection.hbs | 16 ++++++++-------- core/client/templates/settings/general.hbs | 9 +++++++++ core/client/templates/settings/labs.hbs | 17 ++++++++++------- core/client/templates/settings/tags.hbs | 6 +++--- 8 files changed, 40 insertions(+), 30 deletions(-) diff --git a/config.example.js b/config.example.js index 691dd6b0398..489a94ed1fc 100644 --- a/config.example.js +++ b/config.example.js @@ -25,9 +25,8 @@ config = { host: '127.0.0.1', // Port to be passed to node's `net.Server#listen()`, for iisnode set this to `process.env.PORT` port: '2368' - } + }, - tagsUI: true, codeInjectionUI: true, }, @@ -69,7 +68,6 @@ config = { contentPath: path.join(__dirname, '/content/') } - tagsUI: true, codeInjectionUI: true, }, diff --git a/core/client/controllers/settings/code-injection.js b/core/client/controllers/settings/code-injection.js index 95af5d53444..b230a257a23 100644 --- a/core/client/controllers/settings/code-injection.js +++ b/core/client/controllers/settings/code-injection.js @@ -5,7 +5,7 @@ var SettingsCodeInjectionController = Ember.ObjectController.extend({ return this.get('model').save().then(function (model) { self.notifications.closePassive(); - self.notifications.showSuccess('Settings successfully saved.'); + self.notifications.showSuccess('配置保存成功。'); return model; }).catch(function (errors) { diff --git a/core/client/controllers/settings/labs.js b/core/client/controllers/settings/labs.js index e586f23358d..0910ca82fb1 100644 --- a/core/client/controllers/settings/labs.js +++ b/core/client/controllers/settings/labs.js @@ -1,5 +1,5 @@ var LabsController = Ember.Controller.extend(Ember.Evented, { - uploadButtonText: 'Import', + uploadButtonText: '导入', importErrors: '', actions: { @@ -7,7 +7,7 @@ var LabsController = Ember.Controller.extend(Ember.Evented, { var self = this, formData = new FormData(); - this.set('uploadButtonText', 'Importing'); + this.set('uploadButtonText', '导入'); this.notifications.closePassive(); formData.append('importfile', file); @@ -20,15 +20,15 @@ var LabsController = Ember.Controller.extend(Ember.Evented, { contentType: false, processData: false }).then(function () { - self.notifications.showSuccess('Import successful.'); + self.notifications.showSuccess('导入成功'); }).catch(function (response) { if (response && response.jqXHR && response.jqXHR.responseJSON && response.jqXHR.responseJSON.errors) { self.set('importErrors', response.jqXHR.responseJSON.errors); } - self.notifications.showError('Import Failed'); + self.notifications.showError('导入失败'); }).finally(function () { - self.set('uploadButtonText', 'Import'); + self.set('uploadButtonText', '导入'); self.trigger('reset'); }); }, diff --git a/core/client/templates/settings.hbs b/core/client/templates/settings.hbs index f2629733128..d95ef2ef444 100644 --- a/core/client/templates/settings.hbs +++ b/core/client/templates/settings.hbs @@ -17,15 +17,15 @@ {{/if}} {{#if showTags}} - {{gh-activating-list-item route="settings.tags" title="Tags" classNames="settings-nav-tags icon-tag"}} + {{gh-activating-list-item route="settings.tags" title="标签管理" classNames="settings-nav-tags icon-tag"}} {{/if}} {{#if showCodeInjection}} - {{gh-activating-list-item route="settings.code-injection" title="Code Injection" classNames="settings-nav-code icon-code"}} + {{gh-activating-list-item route="settings.code-injection" title="自定义代码" classNames="settings-nav-code icon-code"}} {{/if}} {{#if showLabs}} - {{gh-activating-list-item route="settings.labs" title="Labs" classNames="settings-nav-labs icon-atom"}} + {{gh-activating-list-item route="settings.labs" title="实验室" classNames="settings-nav-labs icon-atom"}} {{/if}} {{#if showAbout}} diff --git a/core/client/templates/settings/code-injection.hbs b/core/client/templates/settings/code-injection.hbs index 7794befb67f..6a0fcbf3825 100644 --- a/core/client/templates/settings/code-injection.hbs +++ b/core/client/templates/settings/code-injection.hbs @@ -1,8 +1,8 @@
- {{#link-to "settings" class="btn btn-default btn-back"}}Back{{/link-to}} -

Code Injection

+ {{#link-to "settings" class="btn btn-default btn-back"}}返回{{/link-to}} +

自定义代码

- +
@@ -11,19 +11,19 @@

- Ghost allows you to inject code into the top and bottom of your template files without editing them. This allows for quick modifications to insert useful things like tracking codes and meta data. + 这里可以插入HTML代码到网页的头部或尾部。比如你可以插入搜索引擎优化代码、第三方统计代码等等。

- -

Code here will be injected to the \{{ghost_head}} helper at the top of your page

+ +

这部分代码将插入到 <head> </head> 标签之间

{{textarea id="ghost-head" name="codeInjection[ghost_head]" type="text" value=ghost_head}}
- -

Code here will be injected to the \{{ghost_foot}} helper at the bottom of your page

+ +

这部分代码将插入到页尾

{{textarea id="ghost-foot" name="codeInjection[ghost_foot]" type="text" value=ghost_foot}}
diff --git a/core/client/templates/settings/general.hbs b/core/client/templates/settings/general.hbs index adb0bf73696..07531da4381 100644 --- a/core/client/templates/settings/general.hbs +++ b/core/client/templates/settings/general.hbs @@ -96,6 +96,15 @@ 百度统计

+ + +
+ +

+ 查看站点地图 + 将站点地图提交到搜索引擎,可以获得更好的收录效果。 +

+
\ No newline at end of file diff --git a/core/client/templates/settings/labs.hbs b/core/client/templates/settings/labs.hbs index 1ee042a8b6e..f002f9fdafb 100644 --- a/core/client/templates/settings/labs.hbs +++ b/core/client/templates/settings/labs.hbs @@ -1,7 +1,7 @@
-

Labs

+

实验室

- {{#link-to 'settings' class='btn btn-default btn-back'}}Back{{/link-to}} + {{#link-to 'settings' class='btn btn-default btn-back'}}返回{{/link-to}}
@@ -10,22 +10,24 @@
- - -

Export the blog settings and data.

+ + +

导出博客配置和博文数据。

{{#gh-form id="settings-import" enctype="multipart/form-data"}}
- + {{partial "import-errors"}} {{gh-file-upload id="importfile" uploadButtonText=uploadButtonText}} -

Import from another Ghost installation. If you import a user, this will replace the current user & log you out.

+

导入博客配置和博文数据。注意:如导入数据中包含用户信息,用户信息会被覆盖,你可能将无法登录。

{{/gh-form}} + + diff --git a/core/client/templates/settings/tags.hbs b/core/client/templates/settings/tags.hbs index 118d5dddb10..e1967cd4aab 100644 --- a/core/client/templates/settings/tags.hbs +++ b/core/client/templates/settings/tags.hbs @@ -1,8 +1,8 @@
- Back -

Tags

+ 返回 +

标签管理

- +