Skip to content

Commit 255b4fd

Browse files
committed
feat: i18n
1 parent 90f4d59 commit 255b4fd

File tree

9 files changed

+1936
-1924
lines changed

9 files changed

+1936
-1924
lines changed

apps/application/flow/step_node/application_node/i_application_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def _run(self):
6363
app_audio_list[1:])
6464
for audio in app_audio_list:
6565
if 'file_id' not in audio:
66-
raise ValueError(_("Parameter value error: The uploaded image lacks file_id, and the audio upload fails."))
66+
raise ValueError(_("Parameter value error: The uploaded audio lacks file_id, and the audio upload fails."))
6767
return self.execute(**self.node_params_serializer.data, **self.flow_params_serializer.data,
6868
app_document_list=app_document_list, app_image_list=app_image_list,
6969
app_audio_list=app_audio_list,

apps/application/flow/step_node/function_node/i_function_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class InputField(serializers.Serializer):
2525
is_required = serializers.BooleanField(required=True, error_messages=ErrMessage.boolean(_("Is this field required")))
2626
type = serializers.CharField(required=True, error_messages=ErrMessage.char(_("type")), validators=[
2727
validators.RegexValidator(regex=re.compile("^string|int|dict|array|float$"),
28-
message=_("字段只支持string|int|dict|array|float"), code=500)
28+
message=_("The field only supports string|int|dict|array|float"), code=500)
2929
])
3030
source = serializers.CharField(required=True, error_messages=ErrMessage.char(_("source")), validators=[
3131
validators.RegexValidator(regex=re.compile("^custom|reference$"),

apps/application/flow/step_node/search_dataset_node/i_search_dataset_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class DatasetSettingSerializer(serializers.Serializer):
2424
error_messages=ErrMessage.integer(_("Reference segment number")))
2525
# 相似度 0-1之间
2626
similarity = serializers.FloatField(required=True, max_value=2, min_value=0,
27-
error_messages=ErrMessage.float(_("引用分段数")))
27+
error_messages=ErrMessage.float(_('similarity')))
2828
search_mode = serializers.CharField(required=True, validators=[
2929
validators.RegexValidator(regex=re.compile("^embedding|keywords|blend$"),
3030
message=_("The type only supports register|reset_password"), code=500)

apps/locales/en_US/LC_MESSAGES/django.po

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ msgstr ""
404404

405405
#: .\apps\application\flow\step_node\application_node\i_application_node.py:66
406406
msgid ""
407-
"Parameter value error: The uploaded image lacks file_id, and the audio "
407+
"Parameter value error: The uploaded audio lacks file_id, and the audio "
408408
"upload fails."
409409
msgstr ""
410410

@@ -502,7 +502,7 @@ msgid "type"
502502
msgstr ""
503503

504504
#: .\apps\application\flow\step_node\function_node\i_function_node.py:28
505-
msgid "字段只支持string|int|dict|array|float"
505+
msgid "The field only supports string|int|dict|array|float"
506506
msgstr ""
507507

508508
#: .\apps\application\flow\step_node\function_node\i_function_node.py:30
@@ -545,10 +545,6 @@ msgstr ""
545545
msgid "Maximum number of words in a quoted segment"
546546
msgstr ""
547547

548-
#: .\apps\application\flow\step_node\search_dataset_node\i_search_dataset_node.py:27
549-
msgid "引用分段数"
550-
msgstr ""
551-
552548
#: .\apps\application\flow\step_node\speech_to_text_step_node\i_speech_to_text_node.py:17
553549
msgid "The audio file cannot be empty"
554550
msgstr ""

0 commit comments

Comments
 (0)