Browse Source

기타 패치

Surplus_Up (2DU) 7 years ago
parent
commit
976727b650
4 changed files with 24 additions and 14 deletions
  1. 13 5
      app.py
  2. 9 9
      func.py
  3. 1 0
      language/en-US.json
  4. 1 0
      language/ko-KR.json

+ 13 - 5
app.py

@@ -431,7 +431,7 @@ def setting(num = 0):
         ))
         ))
     elif num == 1:
     elif num == 1:
         i_list = ['name', 'logo', 'frontpage', 'license', 'upload', 'skin', 'edit', 'reg', 'ip_view', 'back_up', 'port', 'key', 'update']
         i_list = ['name', 'logo', 'frontpage', 'license', 'upload', 'skin', 'edit', 'reg', 'ip_view', 'back_up', 'port', 'key', 'update']
-        n_list = ['wiki', '', 'frontPage', 'CC 0', '2', '', 'normal', '', '', '0', '3000', 'test', 'stable']
+        n_list = ['wiki', '', 'FrontPage', 'CC 0', '2', '', 'normal', '', '', '0', '3000', 'test', 'stable']
         
         
         if flask.request.method == 'POST':
         if flask.request.method == 'POST':
             i = 0
             i = 0
@@ -1172,7 +1172,15 @@ def recent_discuss():
         
         
         m_sub = ' (' + load_lang('close') + ')'
         m_sub = ' (' + load_lang('close') + ')'
 
 
-    div += '<hr><table id="main_table_set"><tbody><tr><td id="main_table_width_half">' + load_lang('discussion') + ' ' + load_lang('name') + '</td><td id="main_table_width_half">' + load_lang('time') + '</td></tr>'
+    div +=  '''
+            <hr>
+            <table id="main_table_set">
+                <tbody>
+                    <tr>
+                        <td id="main_table_width_half">''' + load_lang('discussion') + ' ' + load_lang('name') + '''</td>
+                        <td id="main_table_width_half">''' + load_lang('time') + '''</td>
+                    </tr>
+            '''
     
     
     curs.execute("select title, sub, date from rd order by date desc limit 50")
     curs.execute("select title, sub, date from rd order by date desc limit 50")
     for data in curs.fetchall():
     for data in curs.fetchall():
@@ -2531,7 +2539,7 @@ def login():
             imp = [load_lang('login'), wiki_set(), custom(), other2([0, 0])],
             imp = [load_lang('login'), wiki_set(), custom(), other2([0, 0])],
             data =  '''
             data =  '''
                     <form method="post">
                     <form method="post">
-                        <input placeholder="id" name="id" type="text">
+                        <input placeholder="''' + load_lang('id') + '''" name="id" type="text">
                         <hr>
                         <hr>
                         <input placeholder="''' + load_lang('password') + '''" name="pw" type="password">
                         <input placeholder="''' + load_lang('password') + '''" name="pw" type="password">
                         <hr>
                         <hr>
@@ -2613,7 +2621,7 @@ def change_password():
             imp = [load_lang('user') + ' ' + load_lang('setting') + ' ' + load_lang('edit'), wiki_set(), custom(), other2([0, 0])],
             imp = [load_lang('user') + ' ' + load_lang('setting') + ' ' + load_lang('edit'), wiki_set(), custom(), other2([0, 0])],
             data =  '''
             data =  '''
                     <form method="post">
                     <form method="post">
-                        <span>id : ''' + ip + '''</span>
+                        <span>''' + load_lang('id') +  ' : ' + ip + '''</span>
                         <hr>
                         <hr>
                         <input placeholder="''' + load_lang('now') + ' ' + load_lang('password') + '''" name="pw" type="password">
                         <input placeholder="''' + load_lang('now') + ' ' + load_lang('password') + '''" name="pw" type="password">
                         <br>
                         <br>
@@ -2787,7 +2795,7 @@ def register():
             data =  '''
             data =  '''
                     <form method="post">
                     <form method="post">
                         ''' + contract + '''
                         ''' + contract + '''
-                        <input placeholder="id" name="id" type="text">
+                        <input placeholder="''' + load_lang('id') + '''" name="id" type="text">
                         <hr>
                         <hr>
                         <input placeholder="''' + load_lang('password') + '''" name="pw" type="password">
                         <input placeholder="''' + load_lang('password') + '''" name="pw" type="password">
                         <hr>
                         <hr>

+ 9 - 9
func.py

@@ -129,7 +129,7 @@ def load_lang(data, num = 0):
             if data in else_lang:
             if data in else_lang:
                 return else_lang[data]
                 return else_lang[data]
             else:
             else:
-                return data + ' (Missing)'
+                return data + ' (missing)'
     else:
     else:
         curs.execute('select data from user_set where name = "lang" and id = ?', [ip_check()])
         curs.execute('select data from user_set where name = "lang" and id = ?', [ip_check()])
         rep_data = curs.fetchall()
         rep_data = curs.fetchall()
@@ -176,7 +176,7 @@ def edit_help_button():
     </script>
     </script>
     '''
     '''
 
 
-    insert_list = [['[[|]]', 'Link'], ['[()]', 'Macro'], ['{{{#!}}}', 'Middle'], ['||<>||', 'Table']]
+    insert_list = [['[[|]]', 'link'], ['[()]', 'macro'], ['{{{#!}}}', 'middle'], ['||<>||', 'table']]
 
 
     data = ''
     data = ''
     for insert_data in insert_list:
     for insert_data in insert_list:
@@ -231,7 +231,7 @@ def next_fix(link, num, page, end = 50):
     return list_data
     return list_data
 
 
 def other2(data):
 def other2(data):
-    return data + ['Deleted']
+    return data + ['']
 
 
 def wiki_set(num = 1):
 def wiki_set(num = 1):
     if num == 1:
     if num == 1:
@@ -242,7 +242,7 @@ def wiki_set(num = 1):
         if db_data and db_data[0][0] != '':
         if db_data and db_data[0][0] != '':
             data_list += [db_data[0][0]]
             data_list += [db_data[0][0]]
         else:
         else:
-            data_list += ['Wiki']
+            data_list += ['wiki']
 
 
         curs.execute('select data from other where name = "license"')
         curs.execute('select data from other where name = "license"')
         db_data = curs.fetchall()
         db_data = curs.fetchall()
@@ -638,7 +638,7 @@ def re_error(data):
 
 
                         end += '<script>location.reload();</script>'
                         end += '<script>location.reload();</script>'
                     else:
                     else:
-                        end += 'End : ' + end_data[0][0]
+                        end += 'end : ' + end_data[0][0]
                 else:
                 else:
                     end += load_lang('limitless')
                     end += load_lang('limitless')
                 
                 
@@ -648,8 +648,8 @@ def re_error(data):
                     end += '<li>' + load_lang('why') + ' : ' + end_data[0][1] + '</li>'
                     end += '<li>' + load_lang('why') + ' : ' + end_data[0][1] + '</li>'
 
 
         return easy_minify(flask.render_template(skin_check(), 
         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 = ['error', wiki_set(1), custom(), other2([0, 0])],
+            data = '<h2>error</h2><ul>' + end + '</ul>',
             menu = 0
             menu = 0
         ))
         ))
     else:
     else:
@@ -698,8 +698,8 @@ def re_error(data):
                 data = '???'
                 data = '???'
 
 
             return easy_minify(flask.render_template(skin_check(), 
             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 = ['error', wiki_set(1), custom(), other2([0, 0])],
+                data = '<h2>error</h2><ul><li>' + data + '</li></ul>',
                 menu = 0
                 menu = 0
             ))
             ))
         else:
         else:

+ 1 - 0
language/en-US.json

@@ -69,6 +69,7 @@
     "check" : "check",
     "check" : "check",
     "user" : "user",
     "user" : "user",
     "alarm" : "alarm",
     "alarm" : "alarm",
+    "id" : "id",
     "preview" : "preview",
     "preview" : "preview",
     "watchlist" : "watching list",
     "watchlist" : "watching list",
     "my_info" : "user set",
     "my_info" : "user set",

+ 1 - 0
language/ko-KR.json

@@ -74,6 +74,7 @@
     "preview": "미리보기",
     "preview": "미리보기",
     "next": "다음",
     "next": "다음",
     "previous": "이전",
     "previous": "이전",
+    "id" : "계정명",
     "no_login_warring": "비 로그인 상태로 진행 시 IP가 기록될 수 있습니다.",
     "no_login_warring": "비 로그인 상태로 진행 시 IP가 기록될 수 있습니다.",
     "state": "상태",
     "state": "상태",
     "limitless": "무기한",
     "limitless": "무기한",