Bläddra i källkod

[fix] set default lang for web pages

version-14
Rushabh Mehta 10 år sedan
förälder
incheckning
95164c4c9e
3 ändrade filer med 11 tillägg och 1 borttagningar
  1. +1
    -0
      frappe/commands.py
  2. +9
    -0
      frappe/translations/zh-cn.csv
  3. +1
    -1
      frappe/website/render.py

+ 1
- 0
frappe/commands.py Visa fil

@@ -613,6 +613,7 @@ def console(context):
site = get_single_site(context)
frappe.init(site=site)
frappe.connect()
frappe.local.lang = frappe.db.get_default("lang")
import IPython
IPython.embed()



+ 9
- 0
frappe/translations/zh-cn.csv Visa fil

@@ -1468,3 +1468,12 @@ DocType: System Settings,mm-dd-yyyy,月-日-年
apps/frappe/frappe/desk/doctype/feed/feed.py +91,{0} logged in,{0}已登录
apps/frappe/frappe/templates/emails/new_user.html +4,Your login id is,您的登录ID是
DocType: DocField,Ignore User Permissions,忽略用户权限
apps/frappe/frappe/templates/pages/login.html +29,Email address,登入电子邮件
apps/frappe/frappe/templates/pages/login.html +40,Password,密码
apps/frappe/frappe/templates/pages/login.html +36,Sign in,登入
apps/frappe/frappe/templates/pages/login.html +40,Not a user yet? Sign up,不是用户吗?注册吧
apps/frappe/frappe/templates/pages/login.html +44,Forgot Password?,忘记密码了?
apps/frappe/frappe/templates/pages/login.html +54,Sign up,注册
apps/frappe/frappe/templates/pages/login.html +56,Have an account? Login,已经有账号了?登入吧
apps/frappe/frappe/templates/pages/login.html +67,Send Password,发密码到邮箱
apps/frappe/frappe/templates/pages/login.html +69,Back to Login,返回登入

+ 1
- 1
frappe/website/render.py Visa fil

@@ -18,6 +18,7 @@ class PageNotFoundError(Exception): pass
def render(path, http_status_code=None):
"""render html page"""
path = resolve_path(path.strip("/ "))
frappe.local.lang = frappe.db.get_default("lang")

try:
data = render_page(path)
@@ -216,4 +217,3 @@ def clear_cache(path=None):

for method in frappe.get_hooks("website_clear_cache"):
frappe.get_attr(method)(path)


Laddar…
Avbryt
Spara