Skip to content

Commit

Permalink
Improve logging info.
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-plus committed Jan 12, 2024
1 parent fc4c87b commit 7fed944
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openlrc/translate.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2023. Hao Zheng
# Copyright (C) 2024. Hao Zheng
# All rights reserved.

import json
Expand Down Expand Up @@ -82,7 +82,7 @@ def parse_responses(self, response):

# Remove "</summary>\nxxx</scene>" tags (or some wierd tags like </p> ❓) from translation
if any([re.search(r'(<.*?>|</.*?>)', t) for t in translation]):
logger.warning(f'The extracted translation from response contains tags: {content}, removed')
logger.warning(f'The extracted translation from response contains tags: {content}, tags removed')
translation = [
re.sub(r'(</summary>|<summary>|</translation>|<translation>|</p>|</div>).*', '', t, flags=re.DOTALL)
for t in translation]
Expand Down

0 comments on commit 7fed944

Please sign in to comment.