diff --git a/backend/app/controllers/__init__.py b/backend/app/controllers/__init__.py index 2d50005e..4fe223c5 100644 --- a/backend/app/controllers/__init__.py +++ b/backend/app/controllers/__init__.py @@ -8,6 +8,7 @@ from .step_api import bp as step_api_bp from .step_requirement import bp as step_requirement_bp from .setting import bp as setting_bp +from .tenant_pro import bp as tenant_bp def register_controllers(app): app.register_blueprint(user_bp) @@ -19,4 +20,5 @@ def register_controllers(app): app.register_blueprint(step_subtask_bp) app.register_blueprint(step_code_bp) app.register_blueprint(step_devops_bp) - app.register_blueprint(setting_bp) \ No newline at end of file + app.register_blueprint(setting_bp) + app.register_blueprint(tenant_bp) \ No newline at end of file diff --git a/backend/app/controllers/requirement.py b/backend/app/controllers/requirement.py index 4d79dc53..8305799c 100644 --- a/backend/app/controllers/requirement.py +++ b/backend/app/controllers/requirement.py @@ -4,6 +4,7 @@ from app.pkgs.tools.i18b import getI18n from app.models.requirement import Requirement from app.models.requirement_memory_pro import RequirementMemory +from app.models.tenant_pro import Tenant from config import REQUIREMENT_STATUS_NotStarted, GRADE bp = Blueprint('requirement', __name__, url_prefix='/requirement') @@ -17,11 +18,12 @@ def clear_up(): print("clear_up failed:"+str(e)) session[session["username"]] = getEmptyTaskInfo() - # todo 1 - session['tenant_id'] = 0 - session.update() + tenant_name = "DevOpsGPT" + if GRADE != "base": + tenant = Tenant.get_tenant_baseinfo_by_id(session["tenant_id"]) + tenant_name = tenant["name"] - return {"username": session["username"], "info": session[session["username"]]} + return {"username": session["username"], "tenant_name": tenant_name, "tenant_id": session["tenant_id"], "info": session[session["username"]]} @bp.route('/setup_app', methods=['POST']) @@ -35,7 +37,10 @@ def setup_app(): username = session['username'] tenantID = session['tenant_id'] - requirement = Requirement.create_requirement(tenantID, "", "New", appID, 1, sourceBranch, featureBranch, REQUIREMENT_STATUS_NotStarted, 0, 0) + if GRADE != "base" and not Tenant.check_quota(tenantID): + raise Exception(_("You have exceeded your quota limit, please check your business bill.")) + + requirement = Requirement.create_requirement(tenantID, "New requirement", "New", appID, 1, sourceBranch, featureBranch, REQUIREMENT_STATUS_NotStarted, 0, 0) session[username]['memory']['task_info'] = { "app_id": appID, diff --git a/backend/app/controllers/step_api.py b/backend/app/controllers/step_api.py index fea8c493..b7ec3285 100644 --- a/backend/app/controllers/step_api.py +++ b/backend/app/controllers/step_api.py @@ -15,11 +15,14 @@ def gen_interface_doc(): userPrompt = request.json.get('user_prompt') username = session["username"] requirementID = request.json.get('task_id') + tenant_id = session['tenant_id'] # todo Use llm to determine which interface documents to adjust req = Requirement.get_requirement_by_id(requirementID) apiDoc, success = getServiceSwagger(req["app_id"], 0) + Requirement.update_requirement(requirement_id=requirementID, original_requirement=userPrompt) + msg, success = clarifyAPI(requirementID, userPrompt, apiDoc) session[username]['memory']['originalPrompt'] = userPrompt diff --git a/backend/app/controllers/step_requirement.py b/backend/app/controllers/step_requirement.py index 68cbb043..81b0feb2 100644 --- a/backend/app/controllers/step_requirement.py +++ b/backend/app/controllers/step_requirement.py @@ -5,6 +5,9 @@ from app.pkgs.prompt.prompt import clarifyRequirement from app.pkgs.knowledge.app_info import getAppArchitecture from app.models.requirement import Requirement +from app.models.tenant_pro import Tenant +from app.models.tenant_bill_pro import TenantBill +from config import GRADE from config import REQUIREMENT_STATUS_InProgress bp = Blueprint('step_requirement', __name__, url_prefix='/step_requirement') @@ -17,14 +20,20 @@ def clarify(): globalContext = request.json.get('global_context') userName = session["username"] requirementID = request.json.get('task_id') + tenantID = session['tenant_id'] req = Requirement.get_requirement_by_id(requirementID) - if not req["app_id"] or req["app_id"] < 1 : + if not req or req["app_id"] < 1 : raise Exception(_("Please select the application you want to develop.")) if len(globalContext) < 4 : - Requirement.update_requirement(requirement_id=requirementID, original_requirement=userPrompt, status=REQUIREMENT_STATUS_InProgress) + Requirement.update_requirement(requirement_id=requirementID, requirement_name=userPrompt, status=REQUIREMENT_STATUS_InProgress) + + if GRADE != "base" and not Tenant.check_quota(tenantID): + raise Exception(_("You have exceeded your quota limit, please check your business bill.")) + if GRADE != "base": + TenantBill.record_requirement(tenantID, userName, requirementID, userPrompt) appArchitecture, _ = getAppArchitecture(req["app_id"]) msg, success = clarifyRequirement(requirementID, userPrompt, globalContext, appArchitecture) diff --git a/backend/app/controllers/tenant_pro.py b/backend/app/controllers/tenant_pro.py new file mode 100644 index 00000000..4e2a0364 --- /dev/null +++ b/backend/app/controllers/tenant_pro.py @@ -0,0 +1,20 @@ +from flask import Blueprint +from app.controllers.common import json_response +from app.pkgs.tools.i18b import getI18n + +bp = Blueprint('tenant', __name__, url_prefix='/tenant') + +def test(): + pass + +@bp.route('/get_all', methods=['GET']) +@json_response +def get_all(): + _ = getI18n("controllers") + raise Exception(_("The current version does not support this feature.")) + +@bp.route('/create', methods=['POST']) +@json_response +def create(): + _ = getI18n("controllers") + raise Exception(_("The current version does not support this feature.")) \ No newline at end of file diff --git a/backend/app/controllers/user.py b/backend/app/controllers/user.py index a4289bc1..d2448356 100644 --- a/backend/app/controllers/user.py +++ b/backend/app/controllers/user.py @@ -4,6 +4,7 @@ from app.pkgs.tools.i18b import getFrontendText from app.models.user import User from app.models.user_pro import UserPro +from app.models.tenant_user_pro import TenantUser from config import GRADE from config import LANGUAGE @@ -25,10 +26,16 @@ def register(): if GRADE == "base": raise Exception("The current version does not support this feature") else: - # todo 0 current_tenant = 0 + tus = TenantUser.get_tenant_user_by_invite_email(email) + for tu in tus: + current_tenant = tu["tenant_id"] + user = UserPro.create_user(username, password, phone_number, email, zone_language, current_tenant) + for tu in tus: + TenantUser.active_tenant_user(tu["tenant_user_id"], user.user_id) + return user.username @bp.route('/login', methods=['POST']) @@ -50,7 +57,6 @@ def login(): session['tenant_id'] = userinfo["current_tenant"] if ok: - session['logged_in'] = True session['username'] = username return {'message': _('Login successful.')} else: diff --git a/backend/app/models/requirement.py b/backend/app/models/requirement.py index b469c3af..c5011a9e 100644 --- a/backend/app/models/requirement.py +++ b/backend/app/models/requirement.py @@ -61,22 +61,24 @@ def get_all_requirements(tenantID=None): @staticmethod def get_requirement_by_id(requirement_id): req = Requirement.query.get(requirement_id) - req_dict = { - 'requirement_id': req.requirement_id, - 'requirement_name': req.requirement_name, - 'original_requirement': req.original_requirement, - 'app_id': req.app_id, - 'user_id': req.user_id, - 'default_source_branch': req.default_source_branch, - 'default_target_branch': req.default_target_branch, - 'status': req.status, - 'satisfaction_rating': req.satisfaction_rating, - 'completion_rating': req.completion_rating, - 'created_at': req.created_at, - 'updated_at': req.updated_at, - 'app': Application.get_application_by_id(req.app_id) - } - return req_dict + if req: + req_dict = { + 'requirement_id': req.requirement_id, + 'requirement_name': req.requirement_name, + 'original_requirement': req.original_requirement, + 'app_id': req.app_id, + 'user_id': req.user_id, + 'default_source_branch': req.default_source_branch, + 'default_target_branch': req.default_target_branch, + 'status': req.status, + 'satisfaction_rating': req.satisfaction_rating, + 'completion_rating': req.completion_rating, + 'created_at': req.created_at, + 'updated_at': req.updated_at, + 'app': Application.get_application_by_id(req.app_id) + } + return req_dict + return None @staticmethod def update_requirement(requirement_id, requirement_name=None, original_requirement=None, app_id=None, user_id=None, status=None, satisfaction_rating=None, completion_rating=None): diff --git a/backend/app/models/tenant_bill_pro.py b/backend/app/models/tenant_bill_pro.py new file mode 100644 index 00000000..dc4fb594 --- /dev/null +++ b/backend/app/models/tenant_bill_pro.py @@ -0,0 +1,3 @@ +class TenantBill(): + def test(): + pass \ No newline at end of file diff --git a/backend/app/models/tenant_pro.py b/backend/app/models/tenant_pro.py new file mode 100644 index 00000000..5aa1d121 --- /dev/null +++ b/backend/app/models/tenant_pro.py @@ -0,0 +1,3 @@ +class Tenant(): + def test(): + pass \ No newline at end of file diff --git a/backend/app/models/tenant_user_pro.py b/backend/app/models/tenant_user_pro.py new file mode 100644 index 00000000..78d0c7fe --- /dev/null +++ b/backend/app/models/tenant_user_pro.py @@ -0,0 +1,3 @@ +class TenantUser(): + def test(): + pass \ No newline at end of file diff --git a/backend/app/pkgs/tools/i18b.py b/backend/app/pkgs/tools/i18b.py index 900f0db8..c1fbf2d4 100644 --- a/backend/app/pkgs/tools/i18b.py +++ b/backend/app/pkgs/tools/i18b.py @@ -94,6 +94,7 @@ def getFrontendText(): "app_list": _("APP List"), "setting": _("Setting"), "create_new": _("Create new"), + "back_to_list": _("Back to list page"), "app_name": _("APP name"), "app_intro": _("APP introduction"), "app_base_branch": _("Base branch"), @@ -122,5 +123,31 @@ def getFrontendText(): "password": _("Password"), "register": _("Register"), "email": _("Email"), - "phone": _("Phone"), + "tenant_name": _("Company Name"), + "tenant_status": _("Company Status"), + "tenant_description": _("Company Description"), + "tenant_billing_type": _("Billing type"), + "tenant_billing_quota": _("Billing quota"), + "tenant_created_at": _("Created"), + "tenant_billing_end": _("Plus expiry"), + "employee_count": _("Employee count"), + "industry_type": _("Industry type"), + "change_tenant": _("Switch Tenant"), + "tenant_member_count": _("Member Count"), + "create_tenant_notice": _("Please ensure that the information is accurate and we will review it within 24 hours to activate your account."), + "create_user_notice": _("In order to protect your rights, please ensure that the information is accurate."), + "enter": _("Enter"), + "show_tenant": _("Details"), + "members": _("Members"), + "country": _("Country"), + "role": _("Role"), + "phone": _("Phone Number"), + "add_member": _("Add member"), + "invite": _("Invite"), + "billing": _("Billing"), + "bill_type": _("Bill type"), + "bill_user": _("Operating user"), + "bill_date": _("Billing date"), + "remarks": _("Remarks"), + "operate": _("Operate"), } \ No newline at end of file diff --git a/backend/app/pkgs/tools/utils_tool.py b/backend/app/pkgs/tools/utils_tool.py index 6e6679d5..1fd19fd7 100644 --- a/backend/app/pkgs/tools/utils_tool.py +++ b/backend/app/pkgs/tools/utils_tool.py @@ -1,7 +1,13 @@ import json import re +import smtplib +from email.mime.text import MIMEText +from email.mime.multipart import MIMEMultipart +from email.mime.application import MIMEApplication +import ssl from app.pkgs.tools.llm import chatCompletion +from config import EMAIL_PASSWORD, EMAIL_PORT, EMAIL_SENDER, EMAIL_SERVER, EMAIL_SSL def detect_programming_language(file_path): @@ -97,3 +103,97 @@ def get_code_from_str(input_string): output_string = match return output_string + +def send_email(receiver_email, subject, html_content): + # 邮件服务器的信息 + smtp_server = EMAIL_SERVER + smtp_port = EMAIL_PORT + + # 发件人和收件人信息 + sender_email = EMAIL_SENDER + password = EMAIL_PASSWORD + + msg = MIMEMultipart() + msg['From'] = sender_email + msg['To'] = receiver_email + msg['Subject'] = subject + + html = """ + + + + + + +
+
+

"""+subject+"""

+
+
+ """+html_content+""" +
+ +
+ + + +""" + + html_part = MIMEText(html, 'html') + msg.attach(html_part) + + # 建立与邮件服务器的连接并发送邮件 + try: + if EMAIL_SSL: + context = ssl.create_default_context() + server = smtplib.SMTP_SSL(smtp_server, smtp_port, context=context) + else: + server = smtplib.SMTP(smtp_server, smtp_port) + server.login(sender_email, password) + server.sendmail(sender_email, receiver_email, msg.as_string()) + server.quit() + print("邮件发送成功") + return True + except Exception as e: + print(f"邮件发送失败: {e}") + return False diff --git a/backend/config.py b/backend/config.py index 6940cb53..c3371e9e 100644 --- a/backend/config.py +++ b/backend/config.py @@ -76,6 +76,11 @@ def read_config(key): CD_TOOLS = read_config("CD_TOOLS") CD_ACCESS_KEY = read_config("CD_ACCESS_KEY") CD_SECRET_KEY = read_config("CD_SECRET_KEY") + EMAIL_SERVER = read_config("EMAIL_SERVER") + EMAIL_PORT = read_config("EMAIL_PORT") + EMAIL_SSL = read_config("EMAIL_SSL") + EMAIL_SENDER = read_config("EMAIL_SENDER") + EMAIL_PASSWORD = read_config("EMAIL_PASSWORD") except Exception as e: print(f"\033[91mError: Failed to read the configuration, please copy a new env.yaml from env.yaml.tpl and reconfigure it according to the documentation. Error in env.yaml: {str(e)}. 读取配置错误,请重新从 env.yaml.tpl 复制一个 env.yaml 进行配置后重启程序。 \033[0m") input("Press Enter to exit...") diff --git a/backend/run.py b/backend/run.py index 88f6a034..d53aff4d 100644 --- a/backend/run.py +++ b/backend/run.py @@ -1,10 +1,13 @@ from app.extensions import db import datetime from app.controllers import register_controllers -from flask import Flask, request, session +from flask import Flask, request, session, abort from flask_cors import CORS from app.models.task import getEmptyTaskInfo -from config import APP_SECRET_KEY, BACKEND_DEBUG, BACKEND_HOST, BACKEND_PORT, AICODER_ALLOWED_ORIGIN, AUTO_LOGIN +from app.models.tenant_pro import Tenant +from app.models.tenant_user_pro import TenantUser +from app.models.user_pro import UserPro +from config import APP_SECRET_KEY, BACKEND_DEBUG, BACKEND_HOST, BACKEND_PORT, AICODER_ALLOWED_ORIGIN, AUTO_LOGIN, GRADE app = Flask(__name__) CORS(app) @@ -15,25 +18,52 @@ def require_login(): if AUTO_LOGIN: if "username" not in session: - session['logged_in'] = True session['username'] = "demo_user" - # todo 1 session['tenant_id'] = 0 session[session["username"]] = getEmptyTaskInfo() + path = request.path - if request.path == '/user/language' or request.path == '/user/login' or request.path == '/user/logout' or request.path == '/user/change_language' or request.path == '/user/register': - no = 1 - elif 'logged_in' not in session: + if path == '/user/language' or path == '/user/login' or path == '/user/logout' or path == '/user/change_language' or path == '/user/register': + pass + elif 'username' not in session: return {'success': False, 'error': 'Access denied', 'code': 401} else: user = session["username"] current_time = datetime.datetime.now() - path = request.path args = request.get_data(as_text=True) print(f"req_time: {current_time}") print(f"req_user: {user}") print(f"req_path: {path}") print(f"req_args: {args}") + if GRADE != "base": + current_path = request.args.get('url_path') + if (current_path == "/tenant.html" or current_path == "/tenant_new.html") and path=="/requirement/clear_up": + pass + elif path =="/tenant/create" or path=="/tenant/get_all" or path=="/tenant/use_tenant": + pass + else: + success, msg, code = check_tenant_membership_and_permissions() + if not success: + return {'success': False, 'error': msg, 'code': code} + +def check_tenant_membership_and_permissions(): + username = session["username"] + user = UserPro.get_user_by_name(username) + tenant_id = session['tenant_id'] + success, msg = Tenant.check_tenant(tenant_id) + print("check_tenant_membership_and_permissions:") + print(tenant_id) + print(msg) + print(success) + if not success: + return success, msg, 404 + + success, msg = TenantUser.check_role(user["user_id"], tenant_id, request.path) + if not success: + return success, msg, 403 + + return success, msg, 200 + @app.after_request def after_request(response): @@ -47,7 +77,6 @@ def after_request(response): register_controllers(app) -print(app.config.get("SQLALCHEMY_DATABASE_URI")) db.init_app(app) if __name__ == '__main__': diff --git a/db/database.db b/db/database.db index 2dfc222e..b55fc119 100644 Binary files a/db/database.db and b/db/database.db differ diff --git a/env.yaml.tpl b/env.yaml.tpl index ec6389fb..0a16e65e 100644 --- a/env.yaml.tpl +++ b/env.yaml.tpl @@ -55,6 +55,12 @@ GIT_TOKEN: "xxxx" # Get from here https://github.com/settings/tokens、https:/ GIT_USERNAME: "xxxx" GIT_EMAIL: "xxxx@x.x" +EMAIL_SERVER: "" +EMAIL_PORT: "" +EMAIL_SSL: true +EMAIL_SENDER: "" +EMAIL_PASSWORD: "" + AUTO_LOGIN: true USERS: | { diff --git a/frontend/app.html b/frontend/app.html index 7bd35eef..a6d52cb9 100644 --- a/frontend/app.html +++ b/frontend/app.html @@ -34,6 +34,7 @@ diff --git a/frontend/index.html b/frontend/index.html index 80902bda..e7f004f3 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -33,6 +33,7 @@ diff --git a/frontend/requirement.html b/frontend/requirement.html index c737a0f9..fee8c0c4 100644 --- a/frontend/requirement.html +++ b/frontend/requirement.html @@ -34,6 +34,7 @@ diff --git a/frontend/setting.html b/frontend/setting.html index ffec3f3e..8e6a66f3 100644 --- a/frontend/setting.html +++ b/frontend/setting.html @@ -34,6 +34,7 @@ @@ -126,27 +127,6 @@

CD

- - - -
@
diff --git a/frontend/static/css/themes/default/assets/images/flags.png b/frontend/static/css/themes/default/assets/images/flags.png new file mode 100644 index 00000000..cdd33c3b Binary files /dev/null and b/frontend/static/css/themes/default/assets/images/flags.png differ diff --git a/frontend/static/js/coder.js b/frontend/static/js/coder.js index 9002231f..af192ffb 100644 --- a/frontend/static/js/coder.js +++ b/frontend/static/js/coder.js @@ -41,7 +41,7 @@ function sendAjaxRequest(url, method, requestData, successCallback, errorCallbac } else { console.log(data.error) try { - errorCallback(data.error); + errorCallback(data.error, data); } catch (error) { myAlert("ERROR", error); console.error(error); @@ -452,23 +452,35 @@ function language() { sendAjaxRequest('/user/language', 'GET', "", successCallback, errorCallback, true, false) } +function openUrl(newurl){ + window.location.href = "tenant.html"; +} + function logincheck() { - info = { 'requirement_id': getTaskID() } + const url = window.location; + const path = url.pathname; + + info = { 'requirement_id': getTaskID(), "url_path": path } successCallback = function(data) { var username = data.data.username + var tenant = data.data.tenant_name $("#current-username").html(username) + $("#current-tenant").html(tenant) $("#watermark-username").html(username) } - errorCallback = function(data) { - username = "Guest" - $("#current-username").html(username) - $("#watermark-username").html(username) - const url = window.location; - const path = url.pathname; - if (path != "/user_login.html" && path != "/user_register.html") { - window.location.href = "user_login.html"; + errorCallback = function(msg, data) { + console.log("111111", data) + if (data.code == 401) { + username = "Guest" + $("#current-username").html(username) + $("#watermark-username").html(username) + if (path != "/user_login.html" && path != "/user_register.html") { + window.location.href = "user_login.html"; + } + } else if (data.code == 404) { + myAlert(globalFrontendText["notice"], msg) } } @@ -480,7 +492,7 @@ function logout() { window.location.href = "user_login.html"; } - sendAjaxRequest('/user/logout', "POST", "", successCallback, alertErrorCallback, true, true) + sendAjaxRequest('/user/logout', "POST", "", successCallback, alertErrorCallback, false, true) } function changeLanguage() { @@ -1488,8 +1500,11 @@ function compareCode(uuid) { }; -function hideMiddleCharacters(inputString) { - const middleIndex = Math.floor(inputString.length / 4); +function hideMiddleCharacters(inputString, mid) { + if (inputString == null) { + return "****" + } + const middleIndex = Math.floor(inputString.length / mid); const firstHalf = inputString.slice(0, middleIndex); const hiddenMiddle = '*'.repeat(middleIndex); diff --git a/frontend/static/js/requirement.js b/frontend/static/js/requirement.js index 3967a18a..2c3dbbf8 100644 --- a/frontend/static/js/requirement.js +++ b/frontend/static/js/requirement.js @@ -18,7 +18,7 @@ function getRequirementList() { requirements.forEach(function (requirement, element_index, element_array) { str += ` `+requirement["requirement_id"]+` - `+requirement["original_requirement"]+` + `+requirement["requirement_name"]+` `+requirement["status"]+` `+requirement["user_id"]+` `+requirement["completion_rating"]+` diff --git a/frontend/static/js/setting.js b/frontend/static/js/setting.js index cd47f4df..a34a5ae7 100644 --- a/frontend/static/js/setting.js +++ b/frontend/static/js/setting.js @@ -23,7 +23,7 @@ function getGitConfigList() { str += ` `+config["git_provider"]+` `+config["git_url"]+` - `+hideMiddleCharacters(config["git_token"])+` + `+hideMiddleCharacters(config["git_token"], 4)+` `+config["git_username"]+` `+config["git_email"]+` ` @@ -46,7 +46,7 @@ function getCIConfigList() { str += ` `+config["ci_provider"]+` `+config["ci_api_url"]+` - `+hideMiddleCharacters(config["ci_token"])+` + `+hideMiddleCharacters(config["ci_token"], 4)+` ` }); $("#ci_config_list").html(str) @@ -66,8 +66,8 @@ function getCDConfigList() { configs.forEach(function (config, element_index, element_array) { str += ` `+config["cd_provider"]+` - `+hideMiddleCharacters(config["ACCESS_KEY"])+` - `+hideMiddleCharacters(config["SECRET_KEY"])+` + `+hideMiddleCharacters(config["ACCESS_KEY"], 4)+` + `+hideMiddleCharacters(config["SECRET_KEY"], 4)+` ` }); $("#cd_config_list").html(str) @@ -90,7 +90,7 @@ function getLLMConfigList() { `+config["llm_api_url"]+` `+config["llm_api_version"]+` `+config["llm_api_proxy"]+` - `+hideMiddleCharacters(config["llm_key"])+` + `+hideMiddleCharacters(config["llm_key"], 4)+` ` }); $("#llm_config_list").html(str) diff --git a/frontend/static/js/tenant.js b/frontend/static/js/tenant.js new file mode 100644 index 00000000..80ab2939 --- /dev/null +++ b/frontend/static/js/tenant.js @@ -0,0 +1,185 @@ +$(document).ready(function () { + // show dropdown on hover + $('.ui.dropdown').dropdown({ + on: 'hover' + }); + + + + const url = window.location; + const path = url.pathname; + if (path == "/tenant_detail.html") { + var tenant_id = getTenantID(); + getTenant(tenant_id) + getTenantMembers(tenant_id) + getBillings(tenant_id) + } + + if (path == "/tenant.html") { + getTenantList() + } +}); + +function tenantSubmit() { + var requestData = JSON.stringify({ + 'name': $("#tenant_name").val(), + 'description': $("#tenant_description").val(), + 'country': $("#tenant_country").val(), + 'industry_type': $("#tenant_industry_type").val(), + 'employee_count': $("#tenant_employee_count").val(), + }) + + successCallback = function(data) { + window.location.href = "tenant.html"; + } + + errorCallback = function(error) { + $("#login-message").html(error) + $("#login-message").fadeOut().fadeIn() + } + + sendAjaxRequest('/tenant/create', "POST", requestData, successCallback, errorCallback, true, false) +} + +function getTenantList() { + requestData = '' + + successCallback = function(data) { + tenants = data.data + + var str = "" + + tenants.forEach(function (tenant, element_index, element_array) { + str += ` + `+tenant["name"]+`
+ `+tenant["status"]+` + `+tenant["member_count"]+` (`+tenant["current_user_role"]+`) + `+tenant["description"]+` + `+tenant["billing_type"]+` + `+tenant["billing_quota"]+` + `+tenant["created_at"]+` + `+tenant["billing_end"]+` + `+globalFrontendText["enter"]+` | `+globalFrontendText["show_tenant"]+` + ` + $("#tenant_list").html(str) + }); + } + + sendAjaxRequest('/tenant/get_all', 'GET', requestData, successCallback, alertErrorCallback, true, false) +} + +function useTenant(tenant_id) { + var requestData = JSON.stringify({ 'tenant_id': tenant_id }) + + successCallback = function(data) { + window.location.href = "index.html"; + } + + sendAjaxRequest('/tenant/use_tenant', 'POST', requestData, successCallback, alertErrorCallback, true, false) +} + +function showTenant(tenant_id) { + window.location.href = "tenant_detail.html?tenant_id="+tenant_id; +} + +function getTenant(tenant_id) { + var requestData = { 'tenant_id': tenant_id } + + successCallback = function(data) { + tenants = data.data + + $("#tenant_country").val(tenants.country) + $("#tenant_name").val(tenants.name) + $("#tenant_description").val(tenants.description) + $("#tenant_employee_count").val(tenants.employee_count) + $("#tenant_industry_type").val(tenants.industry_type) + $("#tenant_status").val(tenants.status) + $("#tenant_created_at").val(tenants.created_at) + $("#tenant_billing_end").val(tenants.billing_end) + $("#members_count").text(tenants.member_count) + + $("#billing_info").text(tenants.billing_quota+"/"+tenants.billing_type) + } + + sendAjaxRequest('/tenant/get_one', 'GET', requestData, successCallback, alertErrorCallback, true, false) +} + +function getTenantMembers(tenant_id) { + var requestData = { 'tenant_id': tenant_id } + + successCallback = function(data) { + users = data.data + + var str = "" + + users.forEach(function (user, element_index, element_array) { + str += ` + `+user["username"]+`
+ `+user["current_user_role"]+` + `+user["status"]+` + `+hideMiddleCharacters(user["email"], 2)+` + `+hideMiddleCharacters(user["phone_number"], 1.5)+` + ` + $("#user_list").html(str) + }); + } + + sendAjaxRequest('/tenant/get_members', 'GET', requestData, successCallback, alertErrorCallback, true, false) +} + +function addMember() { + $('#add_member').modal('show'); +} + +function invite() { + $("#invite_btn").addClass("disabled") + $("#invite_btn").addClass("loading") + + var requestData = JSON.stringify({ + 'email': $("#invite_email").val(), + 'role': $("#invite_role").val(), + 'tenant_id': getTenantID(), + }) + + successCallback = function(data) { + location.reload() + } + + errorCallback = function(error) { + $("#invite-message").html(error) + $("#invite-message").fadeOut().fadeIn() + $("#invite_btn").removeClass("disabled") + $("#invite_btn").removeClass("loading") + } + + sendAjaxRequest('/tenant/invite', "POST", requestData, successCallback, errorCallback, true, false) +} + +function getTenantID() { + var queryString = window.location.search; + var params = new URLSearchParams(queryString); + var tenant_id = params.get('tenant_id'); + return tenant_id +} + +function getBillings(tenant_id) { + var requestData = { 'tenant_id': tenant_id } + + successCallback = function(data) { + users = data.data + + var str = "" + + users.forEach(function (user, element_index, element_array) { + str += ` + `+user["bill_type"]+`
+ `+user["bill_user"]+` + `+user["created_at"]+` + `+user["remarks"]+` + ` + $("#bill_list").html(str) + }); + } + + sendAjaxRequest('/tenant/get_billings', 'GET', requestData, successCallback, alertErrorCallback, true, false) +} \ No newline at end of file diff --git a/frontend/tenant.html b/frontend/tenant.html new file mode 100644 index 00000000..09e48c5e --- /dev/null +++ b/frontend/tenant.html @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+
+ + + + + + + + + + + + + + + + + +
+
+ + + +
+ @
+ + + diff --git a/frontend/tenant_detail.html b/frontend/tenant_detail.html new file mode 100644 index 00000000..dea30741 --- /dev/null +++ b/frontend/tenant_detail.html @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + +
+
+ +
+
+ +
+ + + + + + + + + + + + + + +
+
+ +
+
+
+
+ + + + + + +
+ @
+ + + diff --git a/frontend/tenant_new.html b/frontend/tenant_new.html new file mode 100644 index 00000000..c7e9b816 --- /dev/null +++ b/frontend/tenant_new.html @@ -0,0 +1,371 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+
+
+
+ + +
+ +
+ + +
+
+ + +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ +
+
+
+ + + + +
+ @
+ + + diff --git a/frontend/user_register.html b/frontend/user_register.html index b4fbec17..8b9f58ea 100644 --- a/frontend/user_register.html +++ b/frontend/user_register.html @@ -63,6 +63,7 @@
+
diff --git a/i18n/controllers.pot b/i18n/controllers.pot index cd6d990c..8670f4c9 100644 --- a/i18n/controllers.pot +++ b/i18n/controllers.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-29 17:32+0800\n" +"POT-Creation-Date: 2023-08-31 20:02+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -29,7 +29,12 @@ msgstr "" msgid "Failed to analysis applications." msgstr "" -#: backend/app/controllers/requirement.py:51 +#: backend/app/controllers/requirement.py:41 +#: backend/app/controllers/step_requirement.py:33 +msgid "You have exceeded your quota limit, please check your business bill." +msgstr "" + +#: backend/app/controllers/requirement.py:56 msgid "Failed to set up app." msgstr "" @@ -38,7 +43,7 @@ msgstr "" msgid "Failed to get git config list." msgstr "" -#: backend/app/controllers/step_api.py:31 +#: backend/app/controllers/step_api.py:34 msgid "Failed to clarify API." msgstr "" @@ -78,11 +83,11 @@ msgstr "" msgid "Static code scan failed for unknown reasons." msgstr "" -#: backend/app/controllers/step_requirement.py:24 +#: backend/app/controllers/step_requirement.py:27 msgid "Please select the application you want to develop." msgstr "" -#: backend/app/controllers/step_requirement.py:35 +#: backend/app/controllers/step_requirement.py:42 msgid "Failed to clarify requirement." msgstr "" @@ -90,19 +95,24 @@ msgstr "" msgid "Failed to split task." msgstr "" -#: backend/app/controllers/user.py:47 +#: backend/app/controllers/tenant_pro.py:14 +#: backend/app/controllers/tenant_pro.py:20 +msgid "The current version does not support this feature." +msgstr "" + +#: backend/app/controllers/user.py:61 msgid "Login successful." msgstr "" -#: backend/app/controllers/user.py:49 +#: backend/app/controllers/user.py:63 msgid "Invalid username or password" msgstr "" -#: backend/app/controllers/user.py:57 +#: backend/app/controllers/user.py:76 msgid "Logout successful." msgstr "" -#: backend/app/controllers/user.py:73 +#: backend/app/controllers/user.py:97 msgid "success." msgstr "" diff --git a/i18n/en_controllers.po b/i18n/en_controllers.po index 730a6f9e..9475b6b3 100644 --- a/i18n/en_controllers.po +++ b/i18n/en_controllers.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-29 17:32+0800\n" +"POT-Creation-Date: 2023-08-31 20:02+0800\n" "PO-Revision-Date: 2023-07-17 15:03+0800\n" "Last-Translator: booboo \n" "Language-Team: Language i18n/en\n" @@ -28,7 +28,12 @@ msgstr "" msgid "Failed to analysis applications." msgstr "" -#: backend/app/controllers/requirement.py:51 +#: backend/app/controllers/requirement.py:41 +#: backend/app/controllers/step_requirement.py:33 +msgid "You have exceeded your quota limit, please check your business bill." +msgstr "" + +#: backend/app/controllers/requirement.py:56 msgid "Failed to set up app." msgstr "" @@ -37,7 +42,7 @@ msgstr "" msgid "Failed to get git config list." msgstr "" -#: backend/app/controllers/step_api.py:31 +#: backend/app/controllers/step_api.py:34 msgid "Failed to clarify API." msgstr "" @@ -77,11 +82,11 @@ msgstr "" msgid "Static code scan failed for unknown reasons." msgstr "" -#: backend/app/controllers/step_requirement.py:24 +#: backend/app/controllers/step_requirement.py:27 msgid "Please select the application you want to develop." msgstr "" -#: backend/app/controllers/step_requirement.py:35 +#: backend/app/controllers/step_requirement.py:42 msgid "Failed to clarify requirement." msgstr "" @@ -89,19 +94,24 @@ msgstr "" msgid "Failed to split task." msgstr "" -#: backend/app/controllers/user.py:47 +#: backend/app/controllers/tenant_pro.py:14 +#: backend/app/controllers/tenant_pro.py:20 +msgid "The current version does not support this feature." +msgstr "" + +#: backend/app/controllers/user.py:61 msgid "Login successful." msgstr "" -#: backend/app/controllers/user.py:49 +#: backend/app/controllers/user.py:63 msgid "Invalid username or password" msgstr "" -#: backend/app/controllers/user.py:57 +#: backend/app/controllers/user.py:76 msgid "Logout successful." msgstr "" -#: backend/app/controllers/user.py:73 +#: backend/app/controllers/user.py:97 msgid "success." msgstr "" diff --git a/i18n/en_controllers.po~ b/i18n/en_controllers.po~ index 2ba53cc8..730a6f9e 100644 --- a/i18n/en_controllers.po~ +++ b/i18n/en_controllers.po~ @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-08 16:16+0800\n" +"POT-Creation-Date: 2023-08-29 17:32+0800\n" "PO-Revision-Date: 2023-07-17 15:03+0800\n" "Last-Translator: booboo \n" "Language-Team: Language i18n/en\n" @@ -16,59 +16,72 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: backend/app/controllers/app.py:32 +#: backend/app/controllers/app.py:36 msgid "Failed to add an application." msgstr "" -#: backend/app/controllers/app.py:49 +#: backend/app/controllers/app.py:51 msgid "Failed to get applications." msgstr "" -#: backend/app/controllers/step_api.py:29 +#: backend/app/controllers/app.py:61 +msgid "Failed to analysis applications." +msgstr "" + +#: backend/app/controllers/requirement.py:51 +msgid "Failed to set up app." +msgstr "" + +#: backend/app/controllers/setting.py:17 backend/app/controllers/setting.py:29 +#: backend/app/controllers/setting.py:41 backend/app/controllers/setting.py:53 +msgid "Failed to get git config list." +msgstr "" + +#: backend/app/controllers/step_api.py:31 msgid "Failed to clarify API." msgstr "" -#: backend/app/controllers/step_code.py:21 +#: backend/app/controllers/step_code.py:22 msgid "Failed to edit file with new task." msgstr "" -#: backend/app/controllers/step_code.py:34 +#: backend/app/controllers/step_code.py:37 msgid "Failed to check file." msgstr "" -#: backend/app/controllers/step_code.py:50 +#: backend/app/controllers/step_code.py:55 msgid "Failed to merge old and new code." msgstr "" -#: backend/app/controllers/step_code.py:68 +#: backend/app/controllers/step_code.py:75 msgid "Failed to reference repair no reference file found." msgstr "" -#: backend/app/controllers/step_code.py:72 +#: backend/app/controllers/step_code.py:79 msgid "Reference repair failed for unknown reasons." msgstr "" -#: backend/app/controllers/step_devops.py:50 +#: backend/app/controllers/step_devops.py:69 msgid "Compile check pass." msgstr "" -#: backend/app/controllers/step_devops.py:57 +#: backend/app/controllers/step_devops.py:76 msgid "Compile check failed for unknown reasons." msgstr "" -#: backend/app/controllers/step_devops.py:72 +#: backend/app/controllers/step_devops.py:93 msgid "Static code scan passed." msgstr "" -#: backend/app/controllers/step_devops.py:79 +#: backend/app/controllers/step_devops.py:100 msgid "Static code scan failed for unknown reasons." msgstr "" -#: backend/app/controllers/step_requirement.py:20 +#: backend/app/controllers/step_requirement.py:24 msgid "Please select the application you want to develop." msgstr "" -#: backend/app/controllers/step_requirement.py:28 +#: backend/app/controllers/step_requirement.py:35 msgid "Failed to clarify requirement." msgstr "" @@ -76,19 +89,19 @@ msgstr "" msgid "Failed to split task." msgstr "" -#: backend/app/controllers/task.py:39 -msgid "Failed to set up app." +#: backend/app/controllers/user.py:47 +msgid "Login successful." msgstr "" -#: backend/app/controllers/user.py:28 -msgid "Login successful." +#: backend/app/controllers/user.py:49 +msgid "Invalid username or password" msgstr "" -#: backend/app/controllers/user.py:38 +#: backend/app/controllers/user.py:57 msgid "Logout successful." msgstr "" -#: backend/app/controllers/user.py:54 +#: backend/app/controllers/user.py:73 msgid "success." msgstr "" @@ -104,10 +117,11 @@ msgstr "" msgid "Failed to create workspace." msgstr "" -#: backend/app/controllers/workspace.py:72 -msgid "Push code successfully." +#: backend/app/controllers/workspace.py:73 +#: backend/app/controllers/workspace.py:80 +msgid "Failed to push code." msgstr "" -#: backend/app/controllers/workspace.py:74 -msgid "Failed to push code." +#: backend/app/controllers/workspace.py:78 +msgid "Push code successfully." msgstr "" diff --git a/i18n/en_frontend.po b/i18n/en_frontend.po index a0e7f4b3..67a21a06 100644 --- a/i18n/en_frontend.po +++ b/i18n/en_frontend.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-29 17:28+0800\n" +"POT-Creation-Date: 2023-08-31 20:21+0800\n" "PO-Revision-Date: 2023-07-17 18:37+0800\n" "Last-Translator: booboo \n" "Language-Team: Language i18n/en\n" @@ -286,119 +286,231 @@ msgid "Create new" msgstr "" #: backend/app/pkgs/tools/i18b.py:97 -msgid "APP name" +msgid "Back to list page" msgstr "" #: backend/app/pkgs/tools/i18b.py:98 -msgid "APP introduction" +msgid "APP name" msgstr "" #: backend/app/pkgs/tools/i18b.py:99 -msgid "Base branch" +msgid "APP introduction" msgstr "" #: backend/app/pkgs/tools/i18b.py:100 -msgid "Feature branch" +msgid "Base branch" msgstr "" #: backend/app/pkgs/tools/i18b.py:101 -msgid "Service name" +msgid "Feature branch" msgstr "" #: backend/app/pkgs/tools/i18b.py:102 -msgid "Service role" +msgid "Service name" msgstr "" #: backend/app/pkgs/tools/i18b.py:103 -msgid "Language" +msgid "Service role" msgstr "" #: backend/app/pkgs/tools/i18b.py:104 -msgid "Framework" +msgid "Language" msgstr "" #: backend/app/pkgs/tools/i18b.py:105 -msgid "Dependency library" +msgid "Framework" msgstr "" #: backend/app/pkgs/tools/i18b.py:106 -msgid "APP sub service" +msgid "Dependency library" msgstr "" #: backend/app/pkgs/tools/i18b.py:107 -msgid "Git path" +msgid "APP sub service" msgstr "" #: backend/app/pkgs/tools/i18b.py:108 -msgid "AI code analysis" +msgid "Git path" msgstr "" #: backend/app/pkgs/tools/i18b.py:109 -msgid "API type" +msgid "AI code analysis" msgstr "" #: backend/app/pkgs/tools/i18b.py:110 -msgid "API path" +msgid "API type" msgstr "" #: backend/app/pkgs/tools/i18b.py:111 -msgid "Service database" +msgid "API path" msgstr "" #: backend/app/pkgs/tools/i18b.py:112 -msgid "Service code struct" +msgid "Service database" msgstr "" #: backend/app/pkgs/tools/i18b.py:113 -msgid "Requirement ID" +msgid "Service code struct" msgstr "" #: backend/app/pkgs/tools/i18b.py:114 -msgid "Requirement name" +msgid "Requirement ID" msgstr "" #: backend/app/pkgs/tools/i18b.py:115 -msgid "Requirement status" +msgid "Requirement name" msgstr "" #: backend/app/pkgs/tools/i18b.py:116 -msgid "Requirement owner" +msgid "Requirement status" msgstr "" #: backend/app/pkgs/tools/i18b.py:117 -msgid "Requirement completion rating" +msgid "Requirement owner" msgstr "" #: backend/app/pkgs/tools/i18b.py:118 -msgid "Requirement satisfaction_rating" +msgid "Requirement completion rating" msgstr "" #: backend/app/pkgs/tools/i18b.py:119 +msgid "Requirement satisfaction_rating" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:120 msgid "" "Historical requirement recovery is not supported at this time, please visit " "workspace to obtain the code results" msgstr "" -#: backend/app/pkgs/tools/i18b.py:120 +#: backend/app/pkgs/tools/i18b.py:121 msgid "Notice" msgstr "" -#: backend/app/pkgs/tools/i18b.py:121 +#: backend/app/pkgs/tools/i18b.py:122 msgid "Username" msgstr "" -#: backend/app/pkgs/tools/i18b.py:122 +#: backend/app/pkgs/tools/i18b.py:123 msgid "Password" msgstr "" -#: backend/app/pkgs/tools/i18b.py:123 +#: backend/app/pkgs/tools/i18b.py:124 msgid "Register" msgstr "" -#: backend/app/pkgs/tools/i18b.py:124 +#: backend/app/pkgs/tools/i18b.py:125 msgid "Email" msgstr "" -#: backend/app/pkgs/tools/i18b.py:125 -msgid "Phone" +#: backend/app/pkgs/tools/i18b.py:126 +msgid "Company Name" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:127 +msgid "Company Status" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:128 +msgid "Company Description" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:129 +msgid "Billing type" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:130 +msgid "Billing quota" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:131 +msgid "Created" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:132 +msgid "Plus expiry" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:133 +msgid "Employee count" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:134 +msgid "Industry type" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:135 +msgid "Switch Tenant" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:136 +msgid "Member Count" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:137 +msgid "" +"Please ensure that the information is accurate and we will review it within " +"24 hours to activate your account." +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:138 +msgid "" +"In order to protect your rights, please ensure that the information is " +"accurate." +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:139 +msgid "Enter" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:140 +msgid "Details" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:141 +msgid "Members" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:142 +msgid "Country" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:143 +msgid "Role" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:144 +msgid "Phone Number" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:145 +msgid "Add member" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:146 +msgid "Invite" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:147 +msgid "Billing" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:148 +msgid "Bill type" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:149 +msgid "Operating user" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:150 +msgid "Billing date" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:151 +msgid "Remarks" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:152 +msgid "Operate" msgstr "" diff --git a/i18n/en_frontend.po~ b/i18n/en_frontend.po~ index 32912d4c..0074fa69 100644 --- a/i18n/en_frontend.po~ +++ b/i18n/en_frontend.po~ @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-26 22:27+0800\n" +"POT-Creation-Date: 2023-08-31 20:11+0800\n" "PO-Revision-Date: 2023-07-17 18:37+0800\n" "Last-Translator: booboo \n" "Language-Team: Language i18n/en\n" @@ -286,99 +286,227 @@ msgid "Create new" msgstr "" #: backend/app/pkgs/tools/i18b.py:97 -msgid "APP name" +msgid "Back to list page" msgstr "" #: backend/app/pkgs/tools/i18b.py:98 -msgid "APP introduction" +msgid "APP name" msgstr "" #: backend/app/pkgs/tools/i18b.py:99 -msgid "Base branch" +msgid "APP introduction" msgstr "" #: backend/app/pkgs/tools/i18b.py:100 -msgid "Feature branch" +msgid "Base branch" msgstr "" #: backend/app/pkgs/tools/i18b.py:101 -msgid "Service name" +msgid "Feature branch" msgstr "" #: backend/app/pkgs/tools/i18b.py:102 -msgid "Service role" +msgid "Service name" msgstr "" #: backend/app/pkgs/tools/i18b.py:103 -msgid "Language" +msgid "Service role" msgstr "" #: backend/app/pkgs/tools/i18b.py:104 -msgid "Framework" +msgid "Language" msgstr "" #: backend/app/pkgs/tools/i18b.py:105 -msgid "Dependency library" +msgid "Framework" msgstr "" #: backend/app/pkgs/tools/i18b.py:106 -msgid "APP sub service" +msgid "Dependency library" msgstr "" #: backend/app/pkgs/tools/i18b.py:107 -msgid "Git path" +msgid "APP sub service" msgstr "" #: backend/app/pkgs/tools/i18b.py:108 -msgid "AI code analysis" +msgid "Git path" msgstr "" #: backend/app/pkgs/tools/i18b.py:109 -msgid "API type" +msgid "AI code analysis" msgstr "" #: backend/app/pkgs/tools/i18b.py:110 -msgid "API path" +msgid "API type" msgstr "" #: backend/app/pkgs/tools/i18b.py:111 -msgid "Service database" +msgid "API path" msgstr "" #: backend/app/pkgs/tools/i18b.py:112 -msgid "Service code struct" +msgid "Service database" msgstr "" #: backend/app/pkgs/tools/i18b.py:113 -msgid "Requirement ID" +msgid "Service code struct" msgstr "" #: backend/app/pkgs/tools/i18b.py:114 -msgid "Requirement name" +msgid "Requirement ID" msgstr "" #: backend/app/pkgs/tools/i18b.py:115 -msgid "Requirement status" +msgid "Requirement name" msgstr "" #: backend/app/pkgs/tools/i18b.py:116 -msgid "Requirement owner" +msgid "Requirement status" msgstr "" #: backend/app/pkgs/tools/i18b.py:117 -msgid "Requirement completion rating" +msgid "Requirement owner" msgstr "" #: backend/app/pkgs/tools/i18b.py:118 -msgid "Requirement satisfaction_rating" +msgid "Requirement completion rating" msgstr "" #: backend/app/pkgs/tools/i18b.py:119 +msgid "Requirement satisfaction_rating" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:120 msgid "" "Historical requirement recovery is not supported at this time, please visit " "workspace to obtain the code results" msgstr "" -#: backend/app/pkgs/tools/i18b.py:120 +#: backend/app/pkgs/tools/i18b.py:121 msgid "Notice" msgstr "" + +#: backend/app/pkgs/tools/i18b.py:122 +msgid "Username" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:123 +msgid "Password" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:124 +msgid "Register" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:125 +msgid "Email" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:126 +msgid "Company Name" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:127 +msgid "Company Status" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:128 +msgid "Company Description" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:129 +msgid "Billing type" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:130 +msgid "Billing quota" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:131 +msgid "Created" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:132 +msgid "Plus expiry" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:133 +msgid "Employee count" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:134 +msgid "Industry type" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:135 +msgid "Switch Tenant" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:136 +msgid "Member Count" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:137 +msgid "" +"Please ensure that the information is accurate and we will review it within " +"24 hours to activate your account." +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:138 +msgid "" +"In order to protect your rights, please ensure that the information is " +"accurate." +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:139 +msgid "Operate" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:140 +msgid "Details" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:141 +msgid "Members" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:142 +msgid "Country" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:143 +msgid "Role" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:144 +msgid "Phone Number" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:145 +msgid "Add member" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:146 +msgid "Invite" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:147 +msgid "Billing" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:148 +msgid "Bill type" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:149 +msgid "Operating user" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:150 +msgid "Billing date" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:151 +msgid "Remarks" +msgstr "" diff --git a/i18n/frontend.pot b/i18n/frontend.pot index 8fcf86b3..a6b96463 100644 --- a/i18n/frontend.pot +++ b/i18n/frontend.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-29 17:28+0800\n" +"POT-Creation-Date: 2023-08-31 20:21+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -287,119 +287,231 @@ msgid "Create new" msgstr "" #: backend/app/pkgs/tools/i18b.py:97 -msgid "APP name" +msgid "Back to list page" msgstr "" #: backend/app/pkgs/tools/i18b.py:98 -msgid "APP introduction" +msgid "APP name" msgstr "" #: backend/app/pkgs/tools/i18b.py:99 -msgid "Base branch" +msgid "APP introduction" msgstr "" #: backend/app/pkgs/tools/i18b.py:100 -msgid "Feature branch" +msgid "Base branch" msgstr "" #: backend/app/pkgs/tools/i18b.py:101 -msgid "Service name" +msgid "Feature branch" msgstr "" #: backend/app/pkgs/tools/i18b.py:102 -msgid "Service role" +msgid "Service name" msgstr "" #: backend/app/pkgs/tools/i18b.py:103 -msgid "Language" +msgid "Service role" msgstr "" #: backend/app/pkgs/tools/i18b.py:104 -msgid "Framework" +msgid "Language" msgstr "" #: backend/app/pkgs/tools/i18b.py:105 -msgid "Dependency library" +msgid "Framework" msgstr "" #: backend/app/pkgs/tools/i18b.py:106 -msgid "APP sub service" +msgid "Dependency library" msgstr "" #: backend/app/pkgs/tools/i18b.py:107 -msgid "Git path" +msgid "APP sub service" msgstr "" #: backend/app/pkgs/tools/i18b.py:108 -msgid "AI code analysis" +msgid "Git path" msgstr "" #: backend/app/pkgs/tools/i18b.py:109 -msgid "API type" +msgid "AI code analysis" msgstr "" #: backend/app/pkgs/tools/i18b.py:110 -msgid "API path" +msgid "API type" msgstr "" #: backend/app/pkgs/tools/i18b.py:111 -msgid "Service database" +msgid "API path" msgstr "" #: backend/app/pkgs/tools/i18b.py:112 -msgid "Service code struct" +msgid "Service database" msgstr "" #: backend/app/pkgs/tools/i18b.py:113 -msgid "Requirement ID" +msgid "Service code struct" msgstr "" #: backend/app/pkgs/tools/i18b.py:114 -msgid "Requirement name" +msgid "Requirement ID" msgstr "" #: backend/app/pkgs/tools/i18b.py:115 -msgid "Requirement status" +msgid "Requirement name" msgstr "" #: backend/app/pkgs/tools/i18b.py:116 -msgid "Requirement owner" +msgid "Requirement status" msgstr "" #: backend/app/pkgs/tools/i18b.py:117 -msgid "Requirement completion rating" +msgid "Requirement owner" msgstr "" #: backend/app/pkgs/tools/i18b.py:118 -msgid "Requirement satisfaction_rating" +msgid "Requirement completion rating" msgstr "" #: backend/app/pkgs/tools/i18b.py:119 +msgid "Requirement satisfaction_rating" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:120 msgid "" "Historical requirement recovery is not supported at this time, please visit " "workspace to obtain the code results" msgstr "" -#: backend/app/pkgs/tools/i18b.py:120 +#: backend/app/pkgs/tools/i18b.py:121 msgid "Notice" msgstr "" -#: backend/app/pkgs/tools/i18b.py:121 +#: backend/app/pkgs/tools/i18b.py:122 msgid "Username" msgstr "" -#: backend/app/pkgs/tools/i18b.py:122 +#: backend/app/pkgs/tools/i18b.py:123 msgid "Password" msgstr "" -#: backend/app/pkgs/tools/i18b.py:123 +#: backend/app/pkgs/tools/i18b.py:124 msgid "Register" msgstr "" -#: backend/app/pkgs/tools/i18b.py:124 +#: backend/app/pkgs/tools/i18b.py:125 msgid "Email" msgstr "" -#: backend/app/pkgs/tools/i18b.py:125 -msgid "Phone" +#: backend/app/pkgs/tools/i18b.py:126 +msgid "Company Name" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:127 +msgid "Company Status" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:128 +msgid "Company Description" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:129 +msgid "Billing type" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:130 +msgid "Billing quota" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:131 +msgid "Created" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:132 +msgid "Plus expiry" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:133 +msgid "Employee count" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:134 +msgid "Industry type" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:135 +msgid "Switch Tenant" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:136 +msgid "Member Count" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:137 +msgid "" +"Please ensure that the information is accurate and we will review it within " +"24 hours to activate your account." +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:138 +msgid "" +"In order to protect your rights, please ensure that the information is " +"accurate." +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:139 +msgid "Enter" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:140 +msgid "Details" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:141 +msgid "Members" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:142 +msgid "Country" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:143 +msgid "Role" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:144 +msgid "Phone Number" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:145 +msgid "Add member" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:146 +msgid "Invite" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:147 +msgid "Billing" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:148 +msgid "Bill type" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:149 +msgid "Operating user" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:150 +msgid "Billing date" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:151 +msgid "Remarks" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:152 +msgid "Operate" msgstr "" diff --git a/i18n/zh/LC_MESSAGES/controllers.mo b/i18n/zh/LC_MESSAGES/controllers.mo index df876beb..80a76395 100644 Binary files a/i18n/zh/LC_MESSAGES/controllers.mo and b/i18n/zh/LC_MESSAGES/controllers.mo differ diff --git a/i18n/zh/LC_MESSAGES/frontend.mo b/i18n/zh/LC_MESSAGES/frontend.mo index d847b577..8955e417 100644 Binary files a/i18n/zh/LC_MESSAGES/frontend.mo and b/i18n/zh/LC_MESSAGES/frontend.mo differ diff --git a/i18n/zh_controllers.po b/i18n/zh_controllers.po index b31edef2..781ace2c 100644 --- a/i18n/zh_controllers.po +++ b/i18n/zh_controllers.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-29 17:32+0800\n" +"POT-Creation-Date: 2023-08-31 20:02+0800\n" "PO-Revision-Date: 2023-07-17 14:55+0800\n" "Last-Translator: booboo \n" "Language-Team: Language i18n/zh\n" @@ -28,7 +28,12 @@ msgstr "获取应用失败。" msgid "Failed to analysis applications." msgstr "分析应用失败。" -#: backend/app/controllers/requirement.py:51 +#: backend/app/controllers/requirement.py:41 +#: backend/app/controllers/step_requirement.py:33 +msgid "You have exceeded your quota limit, please check your business bill." +msgstr "已超出账单周期内的使用限额,请企业管理员查看账单情况。" + +#: backend/app/controllers/requirement.py:56 msgid "Failed to set up app." msgstr "初始化应用失败。" @@ -37,7 +42,7 @@ msgstr "初始化应用失败。" msgid "Failed to get git config list." msgstr "获取Git配置失败。" -#: backend/app/controllers/step_api.py:31 +#: backend/app/controllers/step_api.py:34 msgid "Failed to clarify API." msgstr "接口澄清失败。" @@ -77,11 +82,11 @@ msgstr "静态扫描通过。" msgid "Static code scan failed for unknown reasons." msgstr "静态扫描失败,原因未知。" -#: backend/app/controllers/step_requirement.py:24 +#: backend/app/controllers/step_requirement.py:27 msgid "Please select the application you want to develop." msgstr "请先选择要开发的应用。" -#: backend/app/controllers/step_requirement.py:35 +#: backend/app/controllers/step_requirement.py:42 msgid "Failed to clarify requirement." msgstr "需求澄清失败。" @@ -89,19 +94,24 @@ msgstr "需求澄清失败。" msgid "Failed to split task." msgstr "任务分解失败。" -#: backend/app/controllers/user.py:47 +#: backend/app/controllers/tenant_pro.py:14 +#: backend/app/controllers/tenant_pro.py:20 +msgid "The current version does not support this feature." +msgstr "当前版本不支持此功能。" + +#: backend/app/controllers/user.py:61 msgid "Login successful." msgstr "登录成功。" -#: backend/app/controllers/user.py:49 +#: backend/app/controllers/user.py:63 msgid "Invalid username or password" msgstr "用户名或者密码错误" -#: backend/app/controllers/user.py:57 +#: backend/app/controllers/user.py:76 msgid "Logout successful." msgstr "登出成功。" -#: backend/app/controllers/user.py:73 +#: backend/app/controllers/user.py:97 msgid "success." msgstr "登录成功。" diff --git a/i18n/zh_controllers.po~ b/i18n/zh_controllers.po~ index ae9f0b38..b31edef2 100644 --- a/i18n/zh_controllers.po~ +++ b/i18n/zh_controllers.po~ @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-08 16:16+0800\n" +"POT-Creation-Date: 2023-08-29 17:32+0800\n" "PO-Revision-Date: 2023-07-17 14:55+0800\n" "Last-Translator: booboo \n" "Language-Team: Language i18n/zh\n" @@ -16,59 +16,72 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: backend/app/controllers/app.py:32 +#: backend/app/controllers/app.py:36 msgid "Failed to add an application." msgstr "添加应用失败。" -#: backend/app/controllers/app.py:49 +#: backend/app/controllers/app.py:51 msgid "Failed to get applications." msgstr "获取应用失败。" -#: backend/app/controllers/step_api.py:29 +#: backend/app/controllers/app.py:61 +msgid "Failed to analysis applications." +msgstr "分析应用失败。" + +#: backend/app/controllers/requirement.py:51 +msgid "Failed to set up app." +msgstr "初始化应用失败。" + +#: backend/app/controllers/setting.py:17 backend/app/controllers/setting.py:29 +#: backend/app/controllers/setting.py:41 backend/app/controllers/setting.py:53 +msgid "Failed to get git config list." +msgstr "获取Git配置失败。" + +#: backend/app/controllers/step_api.py:31 msgid "Failed to clarify API." msgstr "接口澄清失败。" -#: backend/app/controllers/step_code.py:21 +#: backend/app/controllers/step_code.py:22 msgid "Failed to edit file with new task." msgstr "修改代码失败。" -#: backend/app/controllers/step_code.py:34 +#: backend/app/controllers/step_code.py:37 msgid "Failed to check file." msgstr "代码检查失败。" -#: backend/app/controllers/step_code.py:50 +#: backend/app/controllers/step_code.py:55 msgid "Failed to merge old and new code." msgstr "新旧代码整合失败。" -#: backend/app/controllers/step_code.py:68 +#: backend/app/controllers/step_code.py:75 msgid "Failed to reference repair no reference file found." msgstr "根据参考文件调整代码失败,参考文件不存在。" -#: backend/app/controllers/step_code.py:72 +#: backend/app/controllers/step_code.py:79 msgid "Reference repair failed for unknown reasons." msgstr "根据参考文件调整代码失败,原因未知。" -#: backend/app/controllers/step_devops.py:50 +#: backend/app/controllers/step_devops.py:69 msgid "Compile check pass." msgstr "编译检查通过。" -#: backend/app/controllers/step_devops.py:57 +#: backend/app/controllers/step_devops.py:76 msgid "Compile check failed for unknown reasons." msgstr "编译检查失败,原因未知。" -#: backend/app/controllers/step_devops.py:72 +#: backend/app/controllers/step_devops.py:93 msgid "Static code scan passed." msgstr "静态扫描通过。" -#: backend/app/controllers/step_devops.py:79 +#: backend/app/controllers/step_devops.py:100 msgid "Static code scan failed for unknown reasons." msgstr "静态扫描失败,原因未知。" -#: backend/app/controllers/step_requirement.py:20 +#: backend/app/controllers/step_requirement.py:24 msgid "Please select the application you want to develop." msgstr "请先选择要开发的应用。" -#: backend/app/controllers/step_requirement.py:28 +#: backend/app/controllers/step_requirement.py:35 msgid "Failed to clarify requirement." msgstr "需求澄清失败。" @@ -76,20 +89,19 @@ msgstr "需求澄清失败。" msgid "Failed to split task." msgstr "任务分解失败。" -#: backend/app/controllers/task.py:39 -msgid "Failed to set up app." -msgstr "初始化应用失败。" - -#: backend/app/controllers/user.py:28 +#: backend/app/controllers/user.py:47 msgid "Login successful." msgstr "登录成功。" -#: backend/app/controllers/user.py:38 +#: backend/app/controllers/user.py:49 +msgid "Invalid username or password" +msgstr "用户名或者密码错误" + +#: backend/app/controllers/user.py:57 msgid "Logout successful." msgstr "登出成功。" -#: backend/app/controllers/user.py:54 -#, fuzzy +#: backend/app/controllers/user.py:73 msgid "success." msgstr "登录成功。" @@ -105,12 +117,11 @@ msgstr "创建 workspace 成功。" msgid "Failed to create workspace." msgstr "创建 workspace 失败。" -#: backend/app/controllers/workspace.py:72 -#, fuzzy -msgid "Push code successfully." -msgstr "保存推送成功。" - -#: backend/app/controllers/workspace.py:74 -#, fuzzy +#: backend/app/controllers/workspace.py:73 +#: backend/app/controllers/workspace.py:80 msgid "Failed to push code." msgstr "代码推送失败。" + +#: backend/app/controllers/workspace.py:78 +msgid "Push code successfully." +msgstr "推送代码成功。" diff --git a/i18n/zh_frontend.po b/i18n/zh_frontend.po index b0d4bdac..d4b6c5ac 100644 --- a/i18n/zh_frontend.po +++ b/i18n/zh_frontend.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-29 17:28+0800\n" +"POT-Creation-Date: 2023-08-31 20:21+0800\n" "PO-Revision-Date: 2023-07-17 18:36+0800\n" "Last-Translator: booboo \n" "Language-Team: Language i18n/zh\n" @@ -287,119 +287,234 @@ msgid "Create new" msgstr "新建" #: backend/app/pkgs/tools/i18b.py:97 +msgid "Back to list page" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:98 msgid "APP name" msgstr "应用名称" -#: backend/app/pkgs/tools/i18b.py:98 +#: backend/app/pkgs/tools/i18b.py:99 msgid "APP introduction" msgstr "应用介绍" -#: backend/app/pkgs/tools/i18b.py:99 +#: backend/app/pkgs/tools/i18b.py:100 msgid "Base branch" msgstr "默认源分支" -#: backend/app/pkgs/tools/i18b.py:100 +#: backend/app/pkgs/tools/i18b.py:101 msgid "Feature branch" msgstr "新需求默认分支" -#: backend/app/pkgs/tools/i18b.py:101 +#: backend/app/pkgs/tools/i18b.py:102 msgid "Service name" msgstr "服务名称" -#: backend/app/pkgs/tools/i18b.py:102 +#: backend/app/pkgs/tools/i18b.py:103 msgid "Service role" msgstr "服务用途" -#: backend/app/pkgs/tools/i18b.py:103 +#: backend/app/pkgs/tools/i18b.py:104 msgid "Language" msgstr "语言" -#: backend/app/pkgs/tools/i18b.py:104 +#: backend/app/pkgs/tools/i18b.py:105 msgid "Framework" msgstr "框架" -#: backend/app/pkgs/tools/i18b.py:105 +#: backend/app/pkgs/tools/i18b.py:106 msgid "Dependency library" msgstr "依赖库" -#: backend/app/pkgs/tools/i18b.py:106 +#: backend/app/pkgs/tools/i18b.py:107 msgid "APP sub service" msgstr "应用包含服务" -#: backend/app/pkgs/tools/i18b.py:107 +#: backend/app/pkgs/tools/i18b.py:108 msgid "Git path" msgstr "代码路径" -#: backend/app/pkgs/tools/i18b.py:108 +#: backend/app/pkgs/tools/i18b.py:109 msgid "AI code analysis" msgstr "AI 代码分析" -#: backend/app/pkgs/tools/i18b.py:109 +#: backend/app/pkgs/tools/i18b.py:110 msgid "API type" msgstr "API 类型" -#: backend/app/pkgs/tools/i18b.py:110 +#: backend/app/pkgs/tools/i18b.py:111 msgid "API path" msgstr "API 路径" -#: backend/app/pkgs/tools/i18b.py:111 +#: backend/app/pkgs/tools/i18b.py:112 msgid "Service database" msgstr "数据库" -#: backend/app/pkgs/tools/i18b.py:112 +#: backend/app/pkgs/tools/i18b.py:113 msgid "Service code struct" msgstr "代码结构" -#: backend/app/pkgs/tools/i18b.py:113 +#: backend/app/pkgs/tools/i18b.py:114 msgid "Requirement ID" msgstr "需求ID" -#: backend/app/pkgs/tools/i18b.py:114 +#: backend/app/pkgs/tools/i18b.py:115 msgid "Requirement name" msgstr "需求名称" -#: backend/app/pkgs/tools/i18b.py:115 +#: backend/app/pkgs/tools/i18b.py:116 msgid "Requirement status" msgstr "状态" -#: backend/app/pkgs/tools/i18b.py:116 +#: backend/app/pkgs/tools/i18b.py:117 msgid "Requirement owner" msgstr "创建者" -#: backend/app/pkgs/tools/i18b.py:117 +#: backend/app/pkgs/tools/i18b.py:118 msgid "Requirement completion rating" msgstr "完成度评分" -#: backend/app/pkgs/tools/i18b.py:118 +#: backend/app/pkgs/tools/i18b.py:119 msgid "Requirement satisfaction_rating" msgstr "满意度评分" -#: backend/app/pkgs/tools/i18b.py:119 +#: backend/app/pkgs/tools/i18b.py:120 msgid "" "Historical requirement recovery is not supported at this time, please visit " "workspace to obtain the code results" msgstr "当前版本暂不支持历史需求恢复,您可以访问 workspace 获取之前的代码结果" -#: backend/app/pkgs/tools/i18b.py:120 +#: backend/app/pkgs/tools/i18b.py:121 msgid "Notice" msgstr "注意" -#: backend/app/pkgs/tools/i18b.py:121 +#: backend/app/pkgs/tools/i18b.py:122 msgid "Username" msgstr "用户名" -#: backend/app/pkgs/tools/i18b.py:122 +#: backend/app/pkgs/tools/i18b.py:123 msgid "Password" msgstr "密码" -#: backend/app/pkgs/tools/i18b.py:123 +#: backend/app/pkgs/tools/i18b.py:124 msgid "Register" msgstr "注册" -#: backend/app/pkgs/tools/i18b.py:124 +#: backend/app/pkgs/tools/i18b.py:125 msgid "Email" msgstr "邮箱" -#: backend/app/pkgs/tools/i18b.py:125 -msgid "Phone" +#: backend/app/pkgs/tools/i18b.py:126 +msgid "Company Name" +msgstr "企业名称" + +#: backend/app/pkgs/tools/i18b.py:127 +msgid "Company Status" +msgstr "状态" + +#: backend/app/pkgs/tools/i18b.py:128 +msgid "Company Description" +msgstr "企业简介" + +#: backend/app/pkgs/tools/i18b.py:129 +msgid "Billing type" +msgstr "账单类型" + +#: backend/app/pkgs/tools/i18b.py:130 +msgid "Billing quota" +msgstr "账单周期内限额" + +#: backend/app/pkgs/tools/i18b.py:131 +msgid "Created" +msgstr "创建时间" + +#: backend/app/pkgs/tools/i18b.py:132 +msgid "Plus expiry" +msgstr "Plus 过期时间" + +#: backend/app/pkgs/tools/i18b.py:133 +msgid "Employee count" +msgstr "企业规模" + +#: backend/app/pkgs/tools/i18b.py:134 +msgid "Industry type" +msgstr "所属行业" + +#: backend/app/pkgs/tools/i18b.py:135 +msgid "Switch Tenant" +msgstr "切换企业" + +#: backend/app/pkgs/tools/i18b.py:136 +msgid "Member Count" +msgstr "成员数量" + +#: backend/app/pkgs/tools/i18b.py:137 +msgid "" +"Please ensure that the information is accurate and we will review it within " +"24 hours to activate your account." +msgstr "请务必确保信息正确,我们会在 24 小时内为您审核。" + +#: backend/app/pkgs/tools/i18b.py:138 +msgid "" +"In order to protect your rights, please ensure that the information is " +"accurate." +msgstr "为了保障您的权益,请务必确保信息正确。" + +#: backend/app/pkgs/tools/i18b.py:139 +msgid "Enter" +msgstr "进入" + +#: backend/app/pkgs/tools/i18b.py:140 +msgid "Details" +msgstr "详情" + +#: backend/app/pkgs/tools/i18b.py:141 +msgid "Members" +msgstr "成员" + +#: backend/app/pkgs/tools/i18b.py:142 +msgid "Country" +msgstr "国家" + +#: backend/app/pkgs/tools/i18b.py:143 +msgid "Role" +msgstr "角色" + +#: backend/app/pkgs/tools/i18b.py:144 +msgid "Phone Number" msgstr "手机号" + +#: backend/app/pkgs/tools/i18b.py:145 +msgid "Add member" +msgstr "添加成员" + +#: backend/app/pkgs/tools/i18b.py:146 +msgid "Invite" +msgstr "邀请" + +#: backend/app/pkgs/tools/i18b.py:147 +msgid "Billing" +msgstr "账单" + +#: backend/app/pkgs/tools/i18b.py:148 +msgid "Bill type" +msgstr "账单类型" + +#: backend/app/pkgs/tools/i18b.py:149 +msgid "Operating user" +msgstr "操作用户" + +#: backend/app/pkgs/tools/i18b.py:150 +msgid "Billing date" +msgstr "账单时间" + +#: backend/app/pkgs/tools/i18b.py:151 +msgid "Remarks" +msgstr "备注" + +#: backend/app/pkgs/tools/i18b.py:152 +msgid "Operate" +msgstr "操作" + +#~ msgid "Phone" +#~ msgstr "手机号" diff --git a/i18n/zh_frontend.po~ b/i18n/zh_frontend.po~ index e2382193..68edb7fa 100644 --- a/i18n/zh_frontend.po~ +++ b/i18n/zh_frontend.po~ @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-08-26 22:27+0800\n" +"POT-Creation-Date: 2023-08-31 20:11+0800\n" "PO-Revision-Date: 2023-07-17 18:36+0800\n" "Last-Translator: booboo \n" "Language-Team: Language i18n/zh\n" @@ -287,99 +287,230 @@ msgid "Create new" msgstr "新建" #: backend/app/pkgs/tools/i18b.py:97 +msgid "Back to list page" +msgstr "" + +#: backend/app/pkgs/tools/i18b.py:98 msgid "APP name" msgstr "应用名称" -#: backend/app/pkgs/tools/i18b.py:98 +#: backend/app/pkgs/tools/i18b.py:99 msgid "APP introduction" msgstr "应用介绍" -#: backend/app/pkgs/tools/i18b.py:99 +#: backend/app/pkgs/tools/i18b.py:100 msgid "Base branch" msgstr "默认源分支" -#: backend/app/pkgs/tools/i18b.py:100 +#: backend/app/pkgs/tools/i18b.py:101 msgid "Feature branch" msgstr "新需求默认分支" -#: backend/app/pkgs/tools/i18b.py:101 +#: backend/app/pkgs/tools/i18b.py:102 msgid "Service name" msgstr "服务名称" -#: backend/app/pkgs/tools/i18b.py:102 +#: backend/app/pkgs/tools/i18b.py:103 msgid "Service role" msgstr "服务用途" -#: backend/app/pkgs/tools/i18b.py:103 +#: backend/app/pkgs/tools/i18b.py:104 msgid "Language" msgstr "语言" -#: backend/app/pkgs/tools/i18b.py:104 +#: backend/app/pkgs/tools/i18b.py:105 msgid "Framework" msgstr "框架" -#: backend/app/pkgs/tools/i18b.py:105 +#: backend/app/pkgs/tools/i18b.py:106 msgid "Dependency library" msgstr "依赖库" -#: backend/app/pkgs/tools/i18b.py:106 +#: backend/app/pkgs/tools/i18b.py:107 msgid "APP sub service" msgstr "应用包含服务" -#: backend/app/pkgs/tools/i18b.py:107 +#: backend/app/pkgs/tools/i18b.py:108 msgid "Git path" msgstr "代码路径" -#: backend/app/pkgs/tools/i18b.py:108 +#: backend/app/pkgs/tools/i18b.py:109 msgid "AI code analysis" msgstr "AI 代码分析" -#: backend/app/pkgs/tools/i18b.py:109 +#: backend/app/pkgs/tools/i18b.py:110 msgid "API type" msgstr "API 类型" -#: backend/app/pkgs/tools/i18b.py:110 +#: backend/app/pkgs/tools/i18b.py:111 msgid "API path" msgstr "API 路径" -#: backend/app/pkgs/tools/i18b.py:111 +#: backend/app/pkgs/tools/i18b.py:112 msgid "Service database" msgstr "数据库" -#: backend/app/pkgs/tools/i18b.py:112 +#: backend/app/pkgs/tools/i18b.py:113 msgid "Service code struct" msgstr "代码结构" -#: backend/app/pkgs/tools/i18b.py:113 +#: backend/app/pkgs/tools/i18b.py:114 msgid "Requirement ID" msgstr "需求ID" -#: backend/app/pkgs/tools/i18b.py:114 +#: backend/app/pkgs/tools/i18b.py:115 msgid "Requirement name" msgstr "需求名称" -#: backend/app/pkgs/tools/i18b.py:115 +#: backend/app/pkgs/tools/i18b.py:116 msgid "Requirement status" msgstr "状态" -#: backend/app/pkgs/tools/i18b.py:116 +#: backend/app/pkgs/tools/i18b.py:117 msgid "Requirement owner" msgstr "创建者" -#: backend/app/pkgs/tools/i18b.py:117 +#: backend/app/pkgs/tools/i18b.py:118 msgid "Requirement completion rating" msgstr "完成度评分" -#: backend/app/pkgs/tools/i18b.py:118 +#: backend/app/pkgs/tools/i18b.py:119 msgid "Requirement satisfaction_rating" msgstr "满意度评分" -#: backend/app/pkgs/tools/i18b.py:119 +#: backend/app/pkgs/tools/i18b.py:120 msgid "" "Historical requirement recovery is not supported at this time, please visit " "workspace to obtain the code results" msgstr "当前版本暂不支持历史需求恢复,您可以访问 workspace 获取之前的代码结果" -#: backend/app/pkgs/tools/i18b.py:120 +#: backend/app/pkgs/tools/i18b.py:121 msgid "Notice" msgstr "注意" + +#: backend/app/pkgs/tools/i18b.py:122 +msgid "Username" +msgstr "用户名" + +#: backend/app/pkgs/tools/i18b.py:123 +msgid "Password" +msgstr "密码" + +#: backend/app/pkgs/tools/i18b.py:124 +msgid "Register" +msgstr "注册" + +#: backend/app/pkgs/tools/i18b.py:125 +msgid "Email" +msgstr "邮箱" + +#: backend/app/pkgs/tools/i18b.py:126 +msgid "Company Name" +msgstr "企业名称" + +#: backend/app/pkgs/tools/i18b.py:127 +msgid "Company Status" +msgstr "状态" + +#: backend/app/pkgs/tools/i18b.py:128 +msgid "Company Description" +msgstr "企业简介" + +#: backend/app/pkgs/tools/i18b.py:129 +msgid "Billing type" +msgstr "账单类型" + +#: backend/app/pkgs/tools/i18b.py:130 +msgid "Billing quota" +msgstr "账单周期内限额" + +#: backend/app/pkgs/tools/i18b.py:131 +msgid "Created" +msgstr "创建时间" + +#: backend/app/pkgs/tools/i18b.py:132 +msgid "Plus expiry" +msgstr "Plus 过期时间" + +#: backend/app/pkgs/tools/i18b.py:133 +msgid "Employee count" +msgstr "企业规模" + +#: backend/app/pkgs/tools/i18b.py:134 +msgid "Industry type" +msgstr "所属行业" + +#: backend/app/pkgs/tools/i18b.py:135 +msgid "Switch Tenant" +msgstr "切换企业" + +#: backend/app/pkgs/tools/i18b.py:136 +msgid "Member Count" +msgstr "成员数量" + +#: backend/app/pkgs/tools/i18b.py:137 +msgid "" +"Please ensure that the information is accurate and we will review it within " +"24 hours to activate your account." +msgstr "请务必确保信息正确,我们会在 24 小时内为您审核。" + +#: backend/app/pkgs/tools/i18b.py:138 +msgid "" +"In order to protect your rights, please ensure that the information is " +"accurate." +msgstr "为了保障您的权益,请务必确保信息正确。" + +#: backend/app/pkgs/tools/i18b.py:139 +msgid "Operate" +msgstr "操作" + +#: backend/app/pkgs/tools/i18b.py:140 +msgid "Details" +msgstr "详情" + +#: backend/app/pkgs/tools/i18b.py:141 +msgid "Members" +msgstr "成员" + +#: backend/app/pkgs/tools/i18b.py:142 +msgid "Country" +msgstr "国家" + +#: backend/app/pkgs/tools/i18b.py:143 +msgid "Role" +msgstr "角色" + +#: backend/app/pkgs/tools/i18b.py:144 +msgid "Phone Number" +msgstr "手机号" + +#: backend/app/pkgs/tools/i18b.py:145 +msgid "Add member" +msgstr "添加成员" + +#: backend/app/pkgs/tools/i18b.py:146 +msgid "Invite" +msgstr "邀请" + +#: backend/app/pkgs/tools/i18b.py:147 +msgid "Billing" +msgstr "账单" + +#: backend/app/pkgs/tools/i18b.py:148 +msgid "Bill type" +msgstr "账单类型" + +#: backend/app/pkgs/tools/i18b.py:149 +msgid "Operating user" +msgstr "操作用户" + +#: backend/app/pkgs/tools/i18b.py:150 +msgid "Billing date" +msgstr "账单时间" + +#: backend/app/pkgs/tools/i18b.py:151 +msgid "Remarks" +msgstr "备注" + +#~ msgid "Phone" +#~ msgstr "手机号"