fix(api): common_i18n wide (#350)

This commit is contained in:
simontigers 2024-01-03 12:29:49 +08:00 committed by GitHub
parent 5c2cb9073f
commit 2992bc2fae
4 changed files with 10 additions and 2 deletions

View File

@ -101,6 +101,7 @@ class DepartmentTree(object):
employees = self.get_employees_by_d_id(department_id)
top_d['employees'] = employees
top_d['department_name'] = ErrFormat.company_wide
if len(sub_deps) == 0:
top_d[sub_departments_column_name] = []
d_list.append(top_d)
@ -313,6 +314,7 @@ class DepartmentCRUD(object):
tree_list = []
for top_d in top_deps:
top_d['department_name'] = ErrFormat.company_wide
tree = Tree()
identifier_root = top_d['department_id']
tree.create_node(

View File

@ -78,3 +78,5 @@ class ErrFormat(CommonErrFormat):
ldap_test_unknown_error = _l("LDAP test unknown error: {}") # LDAP测试未知错误: {}
common_data_not_support_auth_type = _l("Common data not support auth type: {}") # 通用数据不支持auth类型: {}
ldap_test_username_required = _l("LDAP test username required") # LDAP测试用户名必填
company_wide = _l("Company wide") # 全公司

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2023-12-26 09:41+0800\n"
"POT-Creation-Date: 2024-01-03 11:39+0800\n"
"PO-Revision-Date: 2023-12-25 20:21+0800\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh\n"
@ -688,6 +688,10 @@ msgstr "通用数据不支持auth类型: {}"
msgid "LDAP test username required"
msgstr "LDAP测试用户名必填"
#: api/lib/common_setting/resp_format.py:82
msgid "Company wide"
msgstr "全公司"
#: api/lib/perm/acl/resp_format.py:9
msgid "login successful"
msgstr "登录成功"