- Refactor codebase into src/ (preprocessing, translation, assembly) - Add pipeline/ scripts for individual stages - Externalize configuration to config/config.yaml - Fix Cover Image preservation - Update documentation and manuals
17 lines
580 B
Python
17 lines
580 B
Python
# 测试 Python 的条件判断
|
|
item_status = "translated"
|
|
translation_with_placeholders = "" # 空字符串
|
|
|
|
# 这是 translator.py 中的条件
|
|
if item_status != "translated" or not translation_with_placeholders:
|
|
print("SKIP: 条件成立,跳过此 item")
|
|
else:
|
|
print("PROCESS: 条件不成立,处理此 item")
|
|
|
|
# 现在测试有内容的情况
|
|
translation_with_placeholders = "你好"
|
|
if item_status != "translated" or not translation_with_placeholders:
|
|
print("SKIP: 条件成立,跳过此 item")
|
|
else:
|
|
print("PROCESS: 条件不成立,处理此 item")
|