简体   繁体   English

如何正确获取 python 到 output _(“95% 置信区间”)?

[英]How do get python to output _(“95% confidence interval”) correctly?

I have a very frustrating issue.我有一个非常令人沮丧的问题。 I need the string "95% confidence interval" to appear on in a web view.我需要字符串“95% 置信区间”出现在 web 视图中。 And I need to have it translatable (using babel) so I'm using it like this:而且我需要让它可翻译(使用 babel)所以我像这样使用它:

_("95% confidence interval")

When I do this it treats % c as %c and prevents my.po file from compiling.当我这样做时,它将 % c 视为 %c 并阻止 my.po 文件编译。 When I type it as:当我将其键入为:

_("95%% confidence interval")

to escape the precent sign it shows 2 percent signs on my web view.为了逃避百分号,它在我的 web 视图上显示 2% 的符号。 How do I type out this string so that it works?如何输入此字符串以使其正常工作?

Have you tried你有没有尝试过

_("95\% confidence interval")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM