Преглед на файлове

애드센스 설정 예외 처리

hoparkgo9ma преди 7 години
родител
ревизия
0e49d4e130
променени са 3 файла, в които са добавени 14 реда и са изтрити 3 реда
  1. 10 1
      app.py
  2. 2 1
      language/en-US.json
  3. 2 1
      language/ko-KR.json

+ 10 - 1
app.py

@@ -1342,7 +1342,16 @@ def adsense_settings():
             adsense_enabled = flask.request.form.get('adsense_enabled')
             adsense_code = flask.request.form['adsense_code']
         except:
-            return 'error'
+            return easy_minify(flask.render_template(skin_check(),
+                imp = [load_lang('inter_error'), wiki_set(), custom(), other2([0, 0])],
+                data =  '''
+                        <p>''' + load_lang('inter_error_detail') + '''</p>
+                        <hr>
+                        <code>ie_wrong_callback</code>
+                        <p>''' + load_lang('ie_no_data_required') + '''</p>
+                        ''',
+                menu = [['other', load_lang('other')]]
+            ))
         
         if adsense_enabled == 'on':
             curs.execute('update other set data = "True" where name = "adsense"')

+ 2 - 1
language/en-US.json

@@ -106,8 +106,9 @@
     "confirm" : "confirm",
     "connection" : "Connection",
     "inter_error" : "Inter Error!",
-    "inter_error_detail" : "An internal error occurred during the verification process. Please check the details below.",
+    "inter_error_detail" : "An internal error occurred while processing the requested operation. Please check the details below.",
     "ie_wrong_callback" : "The SNS service provider has sent an invalid value to the callback route. <a href=\"/login\">Try login again.</a>",
+    "ie_no_data_required" : "The operation can not continue because all necessary data is not collected. <a href=\"/login\">Try login again.</a>",
     "oauth_conn_done" : " connected",
     "oauth_conn_not" : " not found",
     "oauth_conn_new" : "Connect..",

+ 2 - 1
language/ko-KR.json

@@ -98,8 +98,9 @@
     "confirm" : "확인",
     "connection" : "연결",
     "inter_error" : "내부 오류!",
-    "inter_error_detail" : "인증 절차를 진행하는 도중 내부 오류가 발생했습니다. 아래에서 자세한 사항을 확인하세요.",
+    "inter_error_detail" : "요청한 작업을 진행하는 도중 내부 오류가 발생했습니다. 아래에서 자세한 사항을 확인하세요.",
     "ie_wrong_callback" : "SNS 서비스 제공자가 callback 라우트에 잘못된 값을 전송했습니다. <a href=\"/login\">다시 시도하세요.</a>",
+    "ie_no_data_required" : "필요한 데이터가 모두 수집되지 않아 작업을 계속할 수 없습니다. <a href=\"/login\">다시 시도하세요.</a>",
     "oauth_conn_done" : "됨",
     "oauth_conn_not" : "없음",
     "oauth_conn_new" : "연결하기",