Commit e70f4bde authored by Vanessa's avatar Vanessa

多语言

parent cf54a811
......@@ -15,8 +15,16 @@
#
#
# Description: Language configurations(en_US) of plugin symphony-news-getter.
# Version: 1.0.0.1, Aug 9, 2011
# Author: Liang Ding
# Description: Language configurations(zh_CN) of plugin b3log broadcast.
# Version: 1.0.0.1, Apr 24, 2013
# 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 @@
#
#
# Description: Language configurations(zh_CN) of plugin symphony-news-getter.
# Version: 1.0.0.2, Aug 10, 2011
# Author: Liang Ding
# Description: Language configurations(zh_CN) of plugin b3log broadcast.
# Version: 1.0.0.1, Apr 24, 2013
# 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 @@
<div class="module-header">
<h2 class="left">
<a target="_blank" href="http://symphony.b3log.org/tags/B3log%20Broadcast">
用户广播
${userBroadcastLabel}
</a>
</h2>
<button class="none right msg"></button>
......@@ -18,21 +18,20 @@
</div>
</div>
<div id="b3logBroadcastDialog" class="form">
<label>标题:</label>
<span class="none msg">不本能为空</span>
<label>${titleLabel1}</label>
<span class="none msg">${noEmptyLabel}</span>
<input type="text" id="b3logBroadcastTitle">
<label>链接:</label>
<label>${linkLabel1}</label>
<input type="text" id="b3logBroadcastLink">
<label>内容:</label>
<span class="none msg">不本能为空</span>
<label>${contentLabel1}</label>
<span class="none msg">${noEmptyLabel}</span>
<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>
<script type="text/javascript">
plugins.b3logBroadcast = {
init: function() {
$("#loadMsg").text("${loadingLabel}");
// dialog
......@@ -58,8 +57,6 @@
}
};
console.log(data);
if (data.broadcast.title === "") {
$("#b3logBroadcastTitle").prev().show();
}
......@@ -99,12 +96,12 @@
url: "http://symphony.b3log.org/apis/broadcasts",
dataType: "jsonp",
jsonp: "callback",
before: function () {
beforeSend: function () {
$("#b3logBroadcastList").css("background",
"url(${staticServePath}/images/loader.gif) no-repeat scroll center center transparent");
},
error: function() {
$("#b3logBroadcastList").html("Loading B3log Announcement failed :-(").css("background", "none");
$("#b3logBroadcastList").html("Loading Symphony broadcasts failed :-(").css("background", "none");
},
success: function(result) {
if (result.sc) {
......@@ -139,8 +136,8 @@
type: "GET",
url: latkeConfig.servePath + "/console/plugins/b3log-broadcast/chance",
success: function(result) {
if (!result.sc) {
$("#b3logBroadcast .module-header > button").text("您有" + result.broadcastChanceExpirationTime + "秒机会进行广播").show();
if (result.sc) {
$("#b3logBroadcast .module-header > button").text(result.broadcastChanceExpirationTime + "${chanceBroadcastLabel}").show();
} else {
$("#b3logBroadcast .module-header > button").hide();
}
......
......@@ -9,6 +9,10 @@
width: 98%;
}
#b3logBroadcast .module-header > button {
height: 22px;
}
#b3logBroadcastDialog label {
line-height: 30px;
}
......@@ -17,3 +21,14 @@
#b3logBroadcastDialog .msg {
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