Kaynağa Gözat

Merge pull request #872 from gnote8-0/master

주시목록 관련 개선
잉여개발기 (SPDV) 6 yıl önce
ebeveyn
işleme
2aa9f4a1b4

+ 3 - 1
language/en-US.json

@@ -338,6 +338,7 @@
         "sqlite_only" : "SQLite only",
         "approval_question_visible_only_when_approval_on" : "Approval questions are visible only when approval requirement is on",
         "oauth_explain" : "To use the OAuth login feature, you must set the 'publish_url' value to a domain address that includes the HTTPS protocol, and actually support HTTPS connections.",
+        "msg_whatchlist_lmt": "You can add as many as",
         "_comment_3.1_" : "Error",
             "update_error" : "Auto update is not supported.",
             "inter_error" : "Internal error.",
@@ -367,5 +368,6 @@
             "fast_edit_error" : "You can edit another document after this period (Second(s)) : ",
             "too_many_dec_error" : "This feature is not supported because there are too many documents.",
             "application_not_found" : "Application not found",
-            "invalid_password_error" : "The Password or ID is invalid."
+            "invalid_password_error" : "The Password or ID is invalid.",
+            "watchlist_overflow_error": "You cannot add more than ten documents."
 }

+ 3 - 1
language/ko-KR.json

@@ -343,5 +343,7 @@
     "blocked_user" : "차단된 사용자",
     "blocked_admin" : "차단한 관리자",
     "invalid_password_error" : "비밀번호 또는 아이디가 없습니다.",
-    "accept_edit_request": "편집 요청 승인"
+    "accept_edit_request": "편집 요청 승인",
+    "msg_whatchlist_lmt": "다음 개수만큼 추가할 수 있습니다",
+    "watchlist_overflow_error": "추가 한도를 초과했으므로 더 이상 추가할 수 없습니다. 필요없는 항목을 삭재하십시오."
 }

+ 2 - 0
route/tool/func.py

@@ -1169,6 +1169,8 @@ def re_error(data):
                 data = load_lang('application_not_found')
             elif num == 27:
                 data = load_lang("invalid_password_error")
+            elif num == 28:
+                data = load_lang('watchlist_overflow_error')
             else:
                 data = '???'
 

+ 2 - 2
route/watch_list.py

@@ -3,7 +3,7 @@ from .tool.func import *
 def watch_list_2(conn):
     curs = conn.cursor()
 
-    div = 'Limit : 10<hr class=\"main_hr\">'
+    div = load_lang("msg_whatchlist_lmt") + ': 10 <hr class=\"main_hr\">'
     ip = ip_check()
 
     if ip_or_user(ip) != 0:
@@ -26,4 +26,4 @@ def watch_list_2(conn):
         imp = [load_lang('watchlist'), wiki_set(), custom(), other2([0, 0])],
         data = div,
         menu = [['manager', load_lang('return')]]
-    ))
+    ))

+ 2 - 2
route/watch_list_name.py

@@ -10,7 +10,7 @@ def watch_list_name_2(conn, name):
     curs.execute(db_change("select count(title) from scan where user = ?"), [ip])
     count = curs.fetchall()
     if count and count[0][0] > 9:
-        return redirect('/watch_list')
+        return re_error('/error/28')
 
     curs.execute(db_change("select title from scan where user = ? and title = ?"), [ip, name])
     if curs.fetchall():
@@ -20,4 +20,4 @@ def watch_list_name_2(conn, name):
 
     conn.commit()
 
-    return redirect('/watch_list')
+    return redirect('/watch_list')