Skip to content

Commit 4c8c977

Browse files
fix: Fix the formatting issue of the translated content
1 parent d3323b7 commit 4c8c977

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

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/zh_CN/LC_MESSAGES/django.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ msgstr "字段仅支持自定义|引用"
661661

662662
#: apps/application/flow/step_node/function_node/i_function_node.py:40
663663
msgid "{field}, this field is required."
664-
msgstr "{field_label} 字段是必填项"
664+
msgstr "{field} 字段是必填项"
665665

666666
#: apps/application/flow/step_node/function_node/i_function_node.py:46
667667
msgid "function"

apps/locales/zh_Hant/LC_MESSAGES/django.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ msgstr "欄位僅支持自定義|引用"
661661

662662
#: apps/application/flow/step_node/function_node/i_function_node.py:40
663663
msgid "{field}, this field is required."
664-
msgstr "{field_label} 欄位是必填項"
664+
msgstr "{field} 欄位是必填項"
665665

666666
#: apps/application/flow/step_node/function_node/i_function_node.py:46
667667
msgid "function"

0 commit comments

Comments
 (0)