Forráskód Böngészése

이메일 관련 번역 수정, 추가

Surplus_Up (2DU) 7 éve
szülő
commit
bbd546ddf9
5 módosított fájl, 36 hozzáadás és 19 törlés
  1. 5 1
      language/en-US.json
  2. 5 1
      language/ko-KR.json
  3. 14 12
      route/check_key.py
  4. 6 1
      route/need_email.py
  5. 6 4
      route/tool/func.py

+ 5 - 1
language/en-US.json

@@ -152,6 +152,8 @@
         "50_edit_acl" : "Only members with 50 or more all document edits",
         "all_acl" : "All Users",
         "encryption_method" : "Encryption method",
+        "check_key" : "Check Authentication Key",
+        "reset_user_ok" : "Check Success",
         "_comment_2.1_" : "Filter",
             "_comment_2.1.1_" : "List",
                 "interwiki_list" : "Interwiki(s) list",
@@ -232,6 +234,7 @@
         "http_warring" : "Warning : If you are not on HTTPS connection, Your information can be leaked. We won't response to that.",
         "user_head_warring" : "User[s] <head> will deleted if you close the browser or sign-in",
         "no_login_warring" : "Non-login status. IP is logged when working with non-login.",
+        "user_reset_sign" : "Your account information has changed like this.",
         "_comment_3.1_" : "Error",
             "update_error" : "Auto update is not support.",
             "inter_error" : "Internal error.",
@@ -254,5 +257,6 @@
             "password_diffrent_error" : "Reconfirm password and input password are different.",
             "edit_filter_error" : "Censored by edit filter.",
             "file_name_error" : "Only alphabet, hangul, space, underscore, and minus signs are allowed for file names.",
-            "topic_long_error" : "The discussion name must not exceed 256 characters."
+            "topic_long_error" : "The discussion name must not exceed 256 characters.",
+            "email_error" : "No one has this email."
 }

+ 5 - 1
language/ko-KR.json

@@ -152,6 +152,8 @@
         "50_edit_acl" : "기여 횟수 총합 50회 이상 가입자만",
         "all_acl" : "모든 사용자",
         "encryption_method" : "암호화 방식",
+        "check_key" : "인증키 검사",
+        "reset_user_ok" : "검사 성공",
         "_comment_2.1_" : "필터",
             "_comment_2.1.1_" : "목록",
                 "interwiki_list" : "인터위키 목록",
@@ -232,6 +234,7 @@
         "http_warring" : "경고: HTTPS 연결을 사용하지 않는다면 개인정보가 유출될 수 있습니다. 이 사항에 의해 입는 피해는 사용자에게 책임이 있음을 알려드립니다.",
         "user_head_warring" : "비로그인시 브라우저를 닫거나 로그인시 사용자의 <head>는 삭제됩니다.",
         "no_login_warring" : "비로그인 상태입니다. 편집시 지금 접속한 IP 명의로 기록됩니다.",
+        "user_reset_sign" : "사용자의 계정 정보가 다음과 같이 변경 되었습니다.",
         "_comment_3.1_" : "오류",
             "update_error" : "자동 업데이트가 지원되지 않습니다.",
             "inter_error" : "내부 오류.",
@@ -254,5 +257,6 @@
             "password_diffrent_error" : "입력한 비밀번호와 비밀번호 확인이 서로 다릅니다.",
             "edit_filter_error" : "편집 필터에 의해 금지된 단어가 사용되었습니다.",
             "file_name_error" : "파일 이름에는 알파벳, 한글, 공백, 밑줄 과 빼기 기호만 사용할 수 있습니다.",
-            "topic_long_error" : "토론 이름이 256자를 넘지 않아야 합니다."
+            "topic_long_error" : "토론 이름이 256자를 넘지 않아야 합니다.",
+            "email_error" : "이런 이메일을 가진 사용자가 없습니다."
 }

+ 14 - 12
route/check_key.py

@@ -59,25 +59,27 @@ def check_key_2(conn, tool):
                 flask.session.pop('c_key', None)
 
                 return easy_minify(flask.render_template(skin_check(),    
-                    imp = ['check', wiki_set(), custom(), other2([0, 0])],
+                    imp = [load_lang('reset_user_ok'), wiki_set(), custom(), other2([0, 0])],
                     data =  '''
-                            ''' + load_lang('id') + ' : ' + d_id + '''
-                            <br>
-                            ''' + load_lang('password') + ' : ' + pw + '''
-                            ''',
+                        ''' + load_lang('id') + '''
+                        <hr class=\"main_hr\">
+                        ''' + load_lang('id') + ' : ' + d_id + '''
+                        <br>
+                        ''' + load_lang('password') + ' : ' + pw + '''
+                    ''',
                     menu = [['user', load_lang('return')]]
                 ))
             else:
                 return redirect('/pass_find')
     else:
         return easy_minify(flask.render_template(skin_check(),    
-            imp = ['Check', wiki_set(), custom(), other2([0, 0])],
+            imp = [load_lang('key_check'), wiki_set(), custom(), other2([0, 0])],
             data =  '''
-                    <form method="post">
-                        <input placeholder="''' + load_lang('key') + '''" name="key" type="text">
-                        <hr class=\"main_hr\">
-                        <button type="submit">''' + load_lang('save') + '''</button>
-                    </form>
-                    ''',
+                <form method="post">
+                    <input placeholder="''' + load_lang('key') + '''" name="key" type="text">
+                    <hr class=\"main_hr\">
+                    <button type="submit">''' + load_lang('save') + '''</button>
+                </form>
+            ''',
             menu = [['user', load_lang('return')]]
         ))

+ 6 - 1
route/need_email.py

@@ -28,7 +28,10 @@ def need_email_2(conn, tool):
 
             return redirect('/register')
         else:
-            curs.execute("select id from user where id = ? and email = ?", [flask.request.form.get('id', ''), flask.request.form.get('email', '')])
+            curs.execute("select id from user_set where id = ? and name = 'email' and data = ?", [
+                flask.request.form.get('id', ''),
+                flask.request.form.get('email', '')
+            ])
             if curs.fetchall():
                 flask.session['c_key'] = ''.join(random.choice("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") for i in range(16))
                 flask.session['c_id'] = flask.request.form.get('id', '')
@@ -36,6 +39,8 @@ def need_email_2(conn, tool):
                 send_email(flask.request.form.get('email', ''), wiki_set()[0] + '\'s key', 'Key : ' + flask.session['c_key'])
 
                 return redirect('/check_pass_key')
+            else:
+                return re_error('/error/12')
     else:
         if tool == 'need_email':
             return easy_minify(flask.render_template(skin_check(),    

+ 6 - 4
route/tool/func.py

@@ -1037,8 +1037,8 @@ def re_error(data):
                     end += '<li>' + load_lang('why') + ' : ' + end_data[0][1] + '</li>'
 
         return easy_minify(flask.render_template(skin_check(), 
-            imp = ['error', wiki_set(1), custom(), other2([0, 0])],
-            data = '<h2>error</h2><ul>' + end + '</ul>',
+            imp = [load_lang('error'), wiki_set(1), custom(), other2([0, 0])],
+            data = '<h2>' + load_lang('error') + '</h2><ul>' + end + '</ul>',
             menu = 0
         ))
     else:
@@ -1065,6 +1065,8 @@ def re_error(data):
                 data = load_lang('password_error')
             elif num == 11:
                 data = load_lang('topic_long_error')
+            elif num == 12:
+                data = load_lang('email_error')
             elif num == 13:
                 data = load_lang('recaptcha_error')
             elif num == 14:
@@ -1087,8 +1089,8 @@ def re_error(data):
                 data = '???'
 
             return easy_minify(flask.render_template(skin_check(), 
-                imp = ['error', wiki_set(1), custom(), other2([0, 0])],
-                data = '<h2>error</h2><ul><li>' + data + '</li></ul>',
+                imp = [load_lang('error'), wiki_set(1), custom(), other2([0, 0])],
+                data = '<h2>' + load_lang('error') + '</h2><ul><li>' + data + '</li></ul>',
                 menu = 0
             ))
         else: