Skip to content

Commit 5876644

Browse files
feat: 自动解析国际化代码,并写入 django.po 文件中。
1 parent d3323b7 commit 5876644

7 files changed

Lines changed: 26035 additions & 21298 deletions

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,4 +190,7 @@ apps/models_provider/impl/tencent_model_provider/model/stt.py
190190
tmp/
191191
config.yml
192192
.SANDBOX_BANNED_HOSTS
193-
copilot-instructions.md
193+
copilot-instructions.md
194+
195+
# Backup Files
196+
*.bak

apps/application/flow/step_node/loop_node/i_loop_node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ def is_valid(self, *, raise_exception=False):
3030
if loop_type == 'ARRAY':
3131
array = self.data.get('array')
3232
if array is None or len(array) == 0:
33-
message = _('{field}, this field is required.', field='array')
33+
message = _('{field}, this field is required.').format(field='array')
3434
raise AppApiException(500, message)
3535
elif loop_type == 'NUMBER':
3636
number = self.data.get('number')
3737
if number is None:
38-
message = _('{field}, this field is required.', field='number')
38+
message = _('{field}, this field is required.').format(field='number')
3939
raise AppApiException(500, message)
4040

4141

apps/common/utils/tool_code.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,8 @@ def _set_resource_limit():
376376
)
377377
return subprocess_result
378378
except subprocess.TimeoutExpired:
379-
raise Exception(_(f"Process execution timed out after {_process_limit_timeout_seconds} seconds."))
379+
raise Exception(_("Process execution timed out after {timeout_seconds} seconds.").format(
380+
timeout_seconds=_process_limit_timeout_seconds))
380381

381382
def validate_mcp_transport(self, code_str):
382383
servers = json.loads(code_str)

apps/locales/en_US/LC_MESSAGES/django.po

Lines changed: 7390 additions & 5956 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)