bilingual_book_maker
bilingual_book_maker copied to clipboard
无序列表标签<li>的翻译不完整
目前无序列表的标签好像有两种


谢谢,我们看一下
有时漏掉无序列表没见过,间隔一行的问题我觉得是短翻译占一段难看, 不止列表,在 insert_trans
加入
from bs4 import NavigableString
if len(text.strip()) < 11 or len(p.text.split()) == 1:
p.append(NavigableString(f"({text.strip()})"))
return
用几天了挺好
@hleft <li>
下方没有<p>
的情况就会遗漏,需要手动加那个翻译无标签文本节点的选项。希望能够自动处理。
遇到有序列表
- 也有類似問題,翻譯後有缺漏的html如下
<p class="p5">After just one conversation (with our mom, of all people), we have a higher fidelity vision. We now see that there are at least 2 specific customer segments we might serve, each of which needs a slightly different product. We’ve also identified some major risks to address before we commit too heavily.</p><p class="p5">在与我们的母亲进行了一次对话后,我们对愿景的忠实度有了更高的认识。我们现在认识到至少有两个特定的客户群体可能需要我们提供稍有不同的产品。我们还确定了一些重大风险,在我们投入过多之前需要解决。</p>
<p class="p7"><br class="calibre3"/></p>
<ol class="ol">
<li class="li">We could offer niche recipes (ethnic, diets) which experienced cooks may not already know. Our biggest question is how to reach them when they don’t search for apps. We have a possible lead with newspaper and magazine PR.<span> </span></li>
<li class="li">Alternately, we might make generic recipes for younger cooks who are easier to reach via the App Store and who haven’t memorised all their favourites yet. We haven’t talked to any, so we have loads of questions, but one big one is whether a customer segment who isn’t already in the habit of buying expensive cookbooks will pay a premium for ours.</li>
</ol>
<p class="p7"><br class="calibre3"/></p>