Commit e70f4bde authored by Vanessa's avatar Vanessa

多语言

parent cf54a811
...@@ -15,8 +15,16 @@ ...@@ -15,8 +15,16 @@
# #
# #
# Description: Language configurations(en_US) of plugin symphony-news-getter. # Description: Language configurations(zh_CN) of plugin b3log broadcast.
# Version: 1.0.0.1, Aug 9, 2011 # Version: 1.0.0.1, Apr 24, 2013
# Author: Liang Ding
# Author: Liyuan Li # Author: Liyuan Li
# #
userBroadcastLabel=User Broadcast
titleLabel1=Title:
linkLabel1=Link:
contentLabel1=Content:
noEmptyLabel=No Empty
submitLabel=Submit
submitErrorLabel=Error
chanceBroadcastLabel=Second Chance
...@@ -15,9 +15,16 @@ ...@@ -15,9 +15,16 @@
# #
# #
# Description: Language configurations(zh_CN) of plugin symphony-news-getter. # Description: Language configurations(zh_CN) of plugin b3log broadcast.
# Version: 1.0.0.2, Aug 10, 2011 # Version: 1.0.0.1, Apr 24, 2013
# Author: Liang Ding
# Author: Liyuan Li # Author: Liyuan Li
# #
userBroadcastLabel=\u7528\u6237\u5e7f\u64ad
titleLabel1=\u6807\u9898\uff1a
linkLabel1=\u94fe\u63a5\uff1a
contentLabel1=\u5185\u5bb9\uff1a
noEmptyLabel=\u4e0d\u80fd\u4e3a\u7a7a
submitLabel=\u63d0\u4ea4
submitErrorLabel=\u63d0\u4ea4\u5f02\u5e38
chanceBroadcastLabel=\u79d2\u673a\u4f1a\u8fdb\u884c\u5e7f\u64ad
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="module-header"> <div class="module-header">
<h2 class="left"> <h2 class="left">
<a target="_blank" href="http://symphony.b3log.org/tags/B3log%20Broadcast"> <a target="_blank" href="http://symphony.b3log.org/tags/B3log%20Broadcast">
用户广播 ${userBroadcastLabel}
</a> </a>
</h2> </h2>
<button class="none right msg"></button> <button class="none right msg"></button>
...@@ -18,21 +18,20 @@ ...@@ -18,21 +18,20 @@
</div> </div>
</div> </div>
<div id="b3logBroadcastDialog" class="form"> <div id="b3logBroadcastDialog" class="form">
<label>标题:</label> <label>${titleLabel1}</label>
<span class="none msg">不本能为空</span> <span class="none msg">${noEmptyLabel}</span>
<input type="text" id="b3logBroadcastTitle"> <input type="text" id="b3logBroadcastTitle">
<label>链接:</label> <label>${linkLabel1}</label>
<input type="text" id="b3logBroadcastLink"> <input type="text" id="b3logBroadcastLink">
<label>内容:</label> <label>${contentLabel1}</label>
<span class="none msg">不本能为空</span> <span class="none msg">${noEmptyLabel}</span>
<textarea id="b3logBroadcastContent"></textarea> <textarea id="b3logBroadcastContent"></textarea>
<button class="marginTop12">提交</button><span class="none msg">提交异常</span> <button class="marginTop12">${submitLabel}</button><span class="none msg">${submitErrorLabel}</span>
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
plugins.b3logBroadcast = { plugins.b3logBroadcast = {
init: function() { init: function() {
$("#loadMsg").text("${loadingLabel}"); $("#loadMsg").text("${loadingLabel}");
// dialog // dialog
...@@ -58,8 +57,6 @@ ...@@ -58,8 +57,6 @@
} }
}; };
console.log(data);
if (data.broadcast.title === "") { if (data.broadcast.title === "") {
$("#b3logBroadcastTitle").prev().show(); $("#b3logBroadcastTitle").prev().show();
} }
...@@ -99,12 +96,12 @@ ...@@ -99,12 +96,12 @@
url: "http://symphony.b3log.org/apis/broadcasts", url: "http://symphony.b3log.org/apis/broadcasts",
dataType: "jsonp", dataType: "jsonp",
jsonp: "callback", jsonp: "callback",
before: function () { beforeSend: function () {
$("#b3logBroadcastList").css("background", $("#b3logBroadcastList").css("background",
"url(${staticServePath}/images/loader.gif) no-repeat scroll center center transparent"); "url(${staticServePath}/images/loader.gif) no-repeat scroll center center transparent");
}, },
error: function() { error: function() {
$("#b3logBroadcastList").html("Loading B3log Announcement failed :-(").css("background", "none"); $("#b3logBroadcastList").html("Loading Symphony broadcasts failed :-(").css("background", "none");
}, },
success: function(result) { success: function(result) {
if (result.sc) { if (result.sc) {
...@@ -139,8 +136,8 @@ ...@@ -139,8 +136,8 @@
type: "GET", type: "GET",
url: latkeConfig.servePath + "/console/plugins/b3log-broadcast/chance", url: latkeConfig.servePath + "/console/plugins/b3log-broadcast/chance",
success: function(result) { success: function(result) {
if (!result.sc) { if (result.sc) {
$("#b3logBroadcast .module-header > button").text("您有" + result.broadcastChanceExpirationTime + "秒机会进行广播").show(); $("#b3logBroadcast .module-header > button").text(result.broadcastChanceExpirationTime + "${chanceBroadcastLabel}").show();
} else { } else {
$("#b3logBroadcast .module-header > button").hide(); $("#b3logBroadcast .module-header > button").hide();
} }
......
...@@ -9,6 +9,10 @@ ...@@ -9,6 +9,10 @@
width: 98%; width: 98%;
} }
#b3logBroadcast .module-header > button {
height: 22px;
}
#b3logBroadcastDialog label { #b3logBroadcastDialog label {
line-height: 30px; line-height: 30px;
} }
...@@ -17,3 +21,14 @@ ...@@ -17,3 +21,14 @@
#b3logBroadcastDialog .msg { #b3logBroadcastDialog .msg {
color: #D54121; color: #D54121;
} }
#b3logBroadcastList ul {
list-style: none;
}
#b3logBroadcastList a {
text-decoration: none;
}
#b3logBroadcastList .date {
color: #686868;
font-size: 12px;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment