我有这条python线
raise ValueError(_(u'Your password must be {} of characters or longer.'.format(MIN_PASSWORD_LENGTH)))
我将其添加到PO文件中:
msgid "Your password must be {} of characters or longer."
msgstr "Votre mot de passe doit être {} de caractères ou plus."
我编译了它,但它没有翻译。
除此网站外,所有其他翻译都可以在该网站上使用。
我在这里想念什么?
在.po
文件上,您需要保留%s
格式。
像这样:
msgid "Your password must be %s characters or longer."
msgstr "Votre mot de passe doit être %s caractères ou plus."
或使用python-brace-format
#: foo/bar.py:32
#, python-brace-format
msgid "Your password must be {n} characters or longer."
msgstr "Votre mot de passe doit être {n} caractères ou plus."
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句