{"action":"closed","issue":{"url":"https://api.github.com/repos/odoo/odoo/issues/13695","repository_url":"https://api.github.com/repos/odoo/odoo","labels_url":"https://api.github.com/repos/odoo/odoo/issues/13695/labels{/name}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/13695/comments","events_url":"https://api.github.com/repos/odoo/odoo/issues/13695/events","html_url":"https://github.com/odoo/odoo/issues/13695","id":181426749,"number":13695,"title":"Misformatted description in translated \".po\" files for base modules (All Languages ?)","user":{"login":"Yotouille","id":17159346,"avatar_url":"https://avatars.githubusercontent.com/u/17159346?v=3","gravatar_id":"","url":"https://api.github.com/users/Yotouille","html_url":"https://github.com/Yotouille","followers_url":"https://api.github.com/users/Yotouille/followers","following_url":"https://api.github.com/users/Yotouille/following{/other_user}","gists_url":"https://api.github.com/users/Yotouille/gists{/gist_id}","starred_url":"https://api.github.com/users/Yotouille/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yotouille/subscriptions","organizations_url":"https://api.github.com/users/Yotouille/orgs","repos_url":"https://api.github.com/users/Yotouille/repos","events_url":"https://api.github.com/users/Yotouille/events{/privacy}","received_events_url":"https://api.github.com/users/Yotouille/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"mart-e","id":564822,"avatar_url":"https://avatars.githubusercontent.com/u/564822?v=3","gravatar_id":"","url":"https://api.github.com/users/mart-e","html_url":"https://github.com/mart-e","followers_url":"https://api.github.com/users/mart-e/followers","following_url":"https://api.github.com/users/mart-e/following{/other_user}","gists_url":"https://api.github.com/users/mart-e/gists{/gist_id}","starred_url":"https://api.github.com/users/mart-e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mart-e/subscriptions","organizations_url":"https://api.github.com/users/mart-e/orgs","repos_url":"https://api.github.com/users/mart-e/repos","events_url":"https://api.github.com/users/mart-e/events{/privacy}","received_events_url":"https://api.github.com/users/mart-e/received_events","type":"User","site_admin":false},"assignees":[{"login":"mart-e","id":564822,"avatar_url":"https://avatars.githubusercontent.com/u/564822?v=3","gravatar_id":"","url":"https://api.github.com/users/mart-e","html_url":"https://github.com/mart-e","followers_url":"https://api.github.com/users/mart-e/followers","following_url":"https://api.github.com/users/mart-e/following{/other_user}","gists_url":"https://api.github.com/users/mart-e/gists{/gist_id}","starred_url":"https://api.github.com/users/mart-e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mart-e/subscriptions","organizations_url":"https://api.github.com/users/mart-e/orgs","repos_url":"https://api.github.com/users/mart-e/repos","events_url":"https://api.github.com/users/mart-e/events{/privacy}","received_events_url":"https://api.github.com/users/mart-e/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-10-06T14:14:16Z","updated_at":"2016-10-10T12:06:13Z","closed_at":"2016-10-10T12:06:13Z","body":"**Impacted versions**: (there may be more)\r\n  - 9.0c-20160726 (Community Edition)\r\n  - 9.0e-20160901 (Enterprise Edition)\r\n\r\nAnd maybe all `*.po` files in: `/usr/lib/python2.7/dist-packages/openerp/addons/base/i18n/` directory.\r\n\r\n**Steps to reproduce**:\r\nThis is the best example for it crash instantly (step 2 and 5 optional here), but you can test with random language/module to see noises in server logs.\r\n  1. As an admin, load and use french language\r\n  2. `tail -f` on your server logs\r\n  3. Search for `auth_ldap` or `webkit` in modules\r\n  4. Click on module to generate description\r\n  5. Go back on the logs to see full Traceback\r\n\r\n**Current behavior**:\r\nThe description is not shown and a Traceback appear in webUI, for the translated string is misformatted in `fr.po`. These are the two worst cases I could find, but playing with others languages and generating base modules description randomly, I could see there is almost always a warning in the logs (most are `(WARNING/2) Title underline too short`) and a Traceback following.\r\n\r\n**Expected behavior**:\r\n  - The best thing would be to always have a good formatted description and no noise in server logs\r\n  - Maybe some kind of a test to validate the imported description and load the default one (in english) if the test fail, ex: `(SEVERE/4)`.\r\n\r\n**Log example**:\r\n  - German / `auth_ldap` (Description IS shown on WebUI)\r\n```\r\n2016-10-06 12:56:58,747 1 INFO walou werkzeug: 172.17.0.1 - - [06/Oct/2016 12:56:58] \"POST /web/dataset/call_kw/ir.module.module/fields_view_get HTTP/1.1\" 200 -\r\n<string>:2: (WARNING/2) Title underline too short.\r\n\r\nFügt Unterstützung zur Authentifizierung durch LDAP-Server hinzu.\r\n========================================================\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/logging/__init__.py\", line 859, in emit\r\n    msg = self.format(record)\r\n\r\n  File \"/usr/lib/python2.7/logging/__init__.py\", line 732, in format\r\n    return fmt.format(record)\r\n\r\n  File \"/usr/lib/python2.7/dist-packages/openerp/netsvc.py\", line 102, in format\r\n    return logging.Formatter.format(self, record)\r\n\r\n  File \"/usr/lib/python2.7/logging/__init__.py\", line 474, in format\r\n    s = self._fmt % record.__dict__\r\n\r\nUnicodeDecodeError: 'ascii' codec can't decode byte 0xfc in position 188: ordinal not in range(128)\r\nLogged from file module.py, line 115\r\n2016-10-06 12:56:58,952 1 INFO walou werkzeug: 172.17.0.1 - - [06/Oct/2016 12:56:58] \"POST /web/dataset/call_kw/ir.module.module/read HTTP/1.1\" 200 -\r\n<string>:2: (WARNING/2) Title underline too short.\r\n```\r\n\r\n  - French / `report_webkit`  (Description NOT shown on WebUI > Crash > Traceback)\r\n```\r\n2016-10-06 13:57:33,553 1 INFO walou werkzeug: 172.17.0.1 - - [06/Oct/2016 13:57:33] \"POST /web/dataset/call_kw/ir.module.module/fields_view_get HTTP/1.1\" 200 -\r\n<string>:3: (WARNING/2) Title underline too short.\r\n\r\nModule ajoutant un nouveau moteur de rapport fondé sur la bibliothèque WebKit (wkhtmltopdf) pour prendre en compte les rapports conçus en HTML + CSS.\r\n=====================================================================================================================\r\n<string>:8: (SEVERE/4) Unexpected section title.\r\n\r\nLe module permet :\r\n------------------\r\n2016-10-06 13:57:33,773 1 ERROR walou openerp.http: Exception during JSON request handling.\r\nTraceback (most recent call last):\r\n\r\n.......[\"Traceback TRUNCATED tooooo long ! Only keeping the end.\" yotouille]........\r\n\r\n  File \"/usr/lib/python2.7/dist-packages/docutils/statemachine.py\", line 239, in run\r\n    context, state, transitions)\r\n\r\n  File \"/usr/lib/python2.7/dist-packages/docutils/statemachine.py\", line 460, in check_line\r\n    return method(match, context, next_state)\r\n\r\n  File \"/usr/lib/python2.7/dist-packages/docutils/parsers/rst/states.py\", line 2721, in underline\r\n    source=src, line=srcline)\r\n\r\n  File \"/usr/lib/python2.7/dist-packages/docutils/utils/__init__.py\", line 235, in severe\r\n    return self.system_message(self.SEVERE_LEVEL, *args, **kwargs)\r\n\r\n  File \"/usr/lib/python2.7/dist-packages/docutils/utils/__init__.py\", line 193, in system_message\r\n    raise SystemMessage(msg, level)\r\n\r\nSystemMessage: <string>:8: (SEVERE/4) Unexpected section title.\r\n\r\nLe module permet :\r\n------------------\r\n2016-10-06 13:57:33,792 1 INFO walou werkzeug: 172.17.0.1 - - [06/Oct/2016 13:57:33] \"POST /web/dataset/call_kw/ir.module.module/read HTTP/1.1\" 200 -\r\n```\r\n\r\nComing from there: https://github.com/odoo/odoo/issues/12883"}}
{"actor":{"display_login":"mart-e"}}