콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
4 답글
6501 화면

When running Translations -> Synchronise Terms the application throws the following error (Openerp v7). It seems that when translator is looking up terms in module files, there's something wrong in encoding. I just don't know what I should look from.

The module file seems to be in utf-8, and by quick browsing it does not contain any special characters. Is there something else that should be noted in modules so that the translator is able to process them?

2015-01-27 11:52:29,408 12011 ERROR XXX_DEV openerp.tools.translate: Failed to extract terms from /opt/openerp/server/openerp/addons/xx/xx.py
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/tools/translate.py", line 878, in babel_extract_terms
    keywords=extract_keywords):
  File "/usr/lib/python2.7/dist-packages/babel/messages/extract.py", line 275, in extract
    for lineno, funcname, messages, comments in results:
  File "/usr/lib/python2.7/dist-packages/babel/messages/extract.py", line 369, in extract_python
    value = value.decode(encoding)[1:].strip()
  File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe4 in position 14: invalid continuation byte

아바타
취소

You have an unicode char that cannot be decoded in one of your translations. This is why you get this error. Find the unicode character (0xe4) and replace it

베스트 답변

Hello, did you find the solution? i am having the same problem (and no special caracters in my po files)

아바타
취소
베스트 답변

Hi, if you are looking for an easier way to do translations.  We struggled with the cumbersome process of exporting/importing and so on, so we developed an app that integrates DEEPL translations for all products and website pages.  You may want to check https://www.spinomana.com/deepl-translator which will greatly reduce time and effort for doing translations with the default export/import.  You can even use it with glossary so you can finetune translations per vertical or business (e.g. a bank being a river bank or financial bank having separate translations depending on the vertical).

Kind regards

Seppe

아바타
취소
베스트 답변

Tiež mám rovnakú situáciu, existuje nejaký spôsob?  Minecraft APK

아바타
취소
베스트 답변

Hi

I have the same problem with no special characters in my file. In my case, the solution came from PyCharm.
My .po file was encoded in the ISO-8859-1 format, and this encoding was causing the problem.

I forced the encoding to 'utf-8' for my file, and when I reloaded the module, there was no problem.

Hope this helps.


아바타
취소
관련 게시물 답글 화면 활동
2
7월 24
2203
4
6월 24
25035
3
4월 24
2116
1
2월 24
2489
2
5월 23
4821