Browse Source

Merge pull request #40 from ysc3839/footer

Improve Chinese translate & Add footer
ZeroNet 7 years ago
parent
commit
ff8dec4d68
5 changed files with 17 additions and 14 deletions
  1. 2 1
      data-default/data.json
  2. 1 1
      dbschema.json
  3. 1 0
      index.html
  4. 1 0
      js/ZeroBlog.coffee
  5. 12 12
      languages/zh.json

+ 2 - 1
data-default/data.json

@@ -4,6 +4,7 @@
 	"links": "- [Source code](https://github.com/HelloZeroNet)",
 	"next_post_id": 2,
 	"demo": false,
+	"footer": "Powered by [ZeroNet](https://zeronet.io) [open, free, and uncensored]",
 	"modified": 1432515193,
 	"post": [
 		{
@@ -13,4 +14,4 @@
 			"body": "Your zeronet blog has been successfully created!"
 		}
 	]
-}
+}

+ 1 - 1
dbschema.json

@@ -15,7 +15,7 @@
 		},
 		"data.json": {
 			"to_table": [ "post" ],
-			"to_keyvalue": [ "title", "description", "links", "next_post_id", "demo", "modified" ]
+			"to_keyvalue": [ "title", "description", "links", "next_post_id", "demo", "modified", "footer" ]
 		}
 
 	},

+ 1 - 0
index.html

@@ -158,6 +158,7 @@
   <a class="next" href="#"><span>Next page</span> →</a>
  </div>
  <!-- EOF Pager -->
+ <div class="footer" data-object="Site"><h4 data-editable="footer"></h4></div>
 
 </div>
 <!-- EOF right -->

+ 1 - 0
js/ZeroBlog.coffee

@@ -91,6 +91,7 @@ class ZeroBlog extends ZeroFrame
 				if @data.title then $(".left h1 a:not(.editable-edit)").html(@data.title).data("content", @data.title)
 				if @data.description then $(".left h2").html(Text.renderMarked(@data.description)).data("content", @data.description)
 				if @data.links then $(".left .links").html(Text.renderMarked(@data.links)).data("content", @data.links)
+				if @data.footer then $(".footer h4").html(Text.renderMarked(@data.footer)).data("content", @data.footer)
 
 	loadLastcomments: (type="show", cb=false) ->
 		query = "

+ 12 - 12
languages/zh.json

@@ -1,32 +1,32 @@
 {
-	"Add new post": "添加新日志",
-	"Follow in Newsfeed": "点击订阅",
-	"Posts": "日志",
+	"Add new post": "发布新文章",
+	"Follow in Newsfeed": "在新闻源中关注",
+	"Posts": "文章",
 	"Comments": "评论",
-	"Following": "已经订阅",
+	"Following": "已关注",
 
-	"Like this post": "喜欢这篇日志",
-	"Latest comments:": "最新评论",
+	"Like this post": "喜欢这篇文章",
+	"Latest comments:": "最新评论:",
 	"Reply": "回复",
 
-	"Bold": "粗",
+	"Bold": "粗",
 	"Italic": "斜体",
 	"Strikethrough": "删除线",
 	"Code": "代码",
 	"Link": "链接",
 
 	"More comments": "更多评论",
-	"Sign in as...": "获取马甲...",
+	"Sign in as...": "登录为...",
 	"Submit comment": "提交评论",
-	"Please sign in": "先拿马甲再说话",
-	"new comment": "撰写新评论",
+	"Please sign in": "请先登录",
+	"new comment": "发表评论",
 	"used: ": "已使用: ",
 
 	" minutes ago": " 分钟以前",
 	" hours ago": " 小时以前",
 	" days ago": " 天以前",
-	"on ": "on ",
-	"Just now": "就在刚刚",
+	"on ": " ",
+	"Just now": "刚刚",
 
 	"Save": "保存",
 	"Cancel": "取消",