Browse Source

Resolve the problem of translation of "Comments" (#69)

* Update all.js

* Update index.html

* Update Comments.coffee
tangdou1 5 years ago
parent
commit
01cc934390
3 changed files with 5 additions and 5 deletions
  1. 2 2
      index.html
  2. 1 1
      js/Comments.coffee
  3. 2 2
      js/all.js

+ 2 - 2
index.html

@@ -114,7 +114,7 @@
 
   <div class="body" data-editable="body" data-editable-mode="meditor"></div>
 
-  <h2 id="Comments">0 Comments:</h2>
+  <h2 id="Comments_id">0 Comments:</h2>
   <!-- New comment -->
   <div class="comment comment-new">
    <div class="info">
@@ -174,4 +174,4 @@
 
 <script type="text/javascript" src="js/all.js?lang={lang}" asyc></script>
 </body>
-</html>
+</html>

+ 1 - 1
js/Comments.coffee

@@ -26,7 +26,7 @@ class Comments extends Class
 			WHERE post_id = #{@post_id} ORDER BY date_added DESC"
 
 		Page.cmd "dbQuery", query, (comments) =>
-			$("#Comments").text(comments.length + if comments.length > 1 then " Comments:" else " Comment:")
+			$("#Comments_id").text(comments.length + if comments.length > 1 then " Comments:" else " Comment:")
 			for comment in comments
 				user_address = comment.directory.replace("users/", "")
 				comment_address = "#{comment.comment_id}_#{user_address}"

+ 2 - 2
js/all.js

@@ -2131,7 +2131,7 @@ var t={keyword:"and elif is global as in if from raise for except finally print
       return Page.cmd("dbQuery", query, (function(_this) {
         return function(comments) {
           var comment, comment_address, elem, i, len, user_address;
-          $("#Comments").text(comments.length + (comments.length > 1 ? " Comments:" : " Comment:"));
+          $("#Comments_id").text(comments.length + (comments.length > 1 ? " Comments:" : " Comment:"));
           for (i = 0, len = comments.length; i < len; i++) {
             comment = comments[i];
             user_address = comment.directory.replace("users/", "");
@@ -3176,4 +3176,4 @@ var t={keyword:"and elif is global as in if from raise for except finally print
 
   window.Page = new ZeroBlog();
 
-}).call(this);
+}).call(this);