Skip to content

Commit 960a970

Browse files
committed
Merge branch 'main' into feature/i18n
2 parents a35f519 + be05b3b commit 960a970

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ def daily_report():
4141
start_time = datetime.now().replace(hour=0, minute=0, second=0, microsecond=0).timestamp()
4242
end_time = datetime.now().replace(hour=23, minute=59, second=59, microsecond=0).timestamp()
4343

44+
# import translator once more due to separate cronjob process
45+
from biz.utils.i18n import get_translator
46+
_ = get_translator()
47+
4448
try:
4549
if PUSH_REVIEW_ENABLED:
4650
df = ReviewService().get_push_review_logs(updated_at_gte=start_time, updated_at_lte=end_time)

locales/en_US/LC_MESSAGES/messages.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ msgstr "Received AI return result: {review_result}"
427427

428428
#: biz/utils/code_reviewer.py:99
429429
msgid "总分[::]\\s*\\**(\\d+)分?"
430-
msgstr "Total [sS]core[::]\\s*\\**(\\d+)? points"
430+
msgstr "Total [sS]core[::]\\s*\\**(\\d+) points"
431431

432432
#: biz/utils/im/dingtalk.py:30
433433
msgid "未提供项目名称,且未设置默认的钉钉 Webhook URL。"

locales/en_US/prompt_templates.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ code_review_prompt:
1313
Please output the code review report in Markdown format, including the following:
1414
1. Issue Description & Optimization Suggestions (if any): List issues found in the code, briefly explain their impact, and provide optimization recommendations.
1515
2. Scoring Breakdown: Provide specific scores for each evaluation criterion.
16-
3. Total score: Format as "Total score: XX points" (example: Total score: 80 points), and ensure it can be parsed by the regular expression r"总分[::]\s*(\d+)分?".
16+
3. Total score: Format as "Total score: XX points" (example: Total score: 80 points), and ensure it can be parsed by the regular expression r"Total score[::]\s*(\d+) points".
1717
user_prompt: |-
1818
Below is the code submitted by an employee to the GitLab repository. Please conduct a strict review of any critical issues and evaluate the code quality with a brief assessment and scoring.
1919
Code changes:

0 commit comments

Comments
 (0)