Featured post
python - django-admin.py makemessages issues (1) Duplicated message (2) .pot not .po? -
hi i'm working on localization of website frontend, , met 2 issues django-admin.py makemessages -l zh_cn.
1) it's generating .pot files instead of .po files? why that? how change this?
2) when i'm editing translation got kind of error message "duplicate message definition". makes sense because have same string in different html pages, example, "login", it's duplicated. i'm not sure how avoid these duplicated messages? there no other ways remove duplicated ones 1 one manually? (i can't delete strings in poedit)
what i've done renamed .pot file .po, , manually deleted duplicated strings, don't think it's proper way do? plus in future if need make changes, if "django-admin.py makemessages -l zh_cn" again, .pot file show again , i'll have manually change on again, , translation i've done .po file no longer there... how avoid this??
many in advance time , patience!!
all solved. it's because there errors when did "makemessage", e.g.
syntaxerror: translation blocks must not include other block tags: url alerts_main (file: ./templates/default/alerts/base.html)
i've fixed errors 1 one it'll completed generating .po file without duplicated message.
- Get link
- X
- Other Apps
Comments
Post a Comment