Skip to content

Commit 4ebefd5

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

6 files changed

Lines changed: 10 additions & 7 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ 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 {} seconds.").format(_process_limit_timeout_seconds))
380380

381381
def validate_mcp_transport(self, code_str):
382382
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: 4 additions & 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"
@@ -8629,6 +8629,9 @@ msgstr "API KEY"
86298629
msgid "Download"
86308630
msgstr "下載"
86318631

8632+
msgid "User"
8633+
msgstr "用戶"
8634+
86328635
msgid "Delete personal system API_KEY"
86338636
msgstr "删除個人系統API KEY"
86348637

apps/models_provider/impl/aliyun_bai_lian_model_provider/model/tts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def text_to_speech(self, text):
8484
if audio_hex:
8585
audio = bytes.fromhex(audio_hex)
8686
else:
87-
raise Exception('Failed to get audio data from response' + str(response.text))
87+
raise Exception('Failed to get audio data from response: ' + str(response.text))
8888
else:
8989
from dashscope.audio.tts_v2 import SpeechSynthesizer
9090
synthesizer = SpeechSynthesizer(model=self.model, **self.params)

apps/oss/serializers/file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def get_url_content(url, application_id: str):
244244

245245
final_host = urlparse(response.url).hostname
246246
if is_private_ip(final_host):
247-
raise ValueError("Blocked unsafe redirect to internal host")
247+
raise ValueError(_("Blocked unsafe redirect to internal host"))
248248
# 判断文件大小
249249
if int(response.headers.get('Content-Length', 0)) > file_limit:
250250
raise AppApiException(500, _('File size exceeds limit'))

0 commit comments

Comments
 (0)