Error message in sign in when language has custom locale code
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
A SYLEAM Component - OpenObject Library |
New
|
Undecided
|
Unassigned |
Bug Description
We have created a language file which provides dual language interface. For this language file, which is combination of Chinese and English, we gave a locale code ZH_EN which doesn't exists. OpenERP doesn't complain for this custom locale code when file is imported and everything works fine until you log out and then log in.
After log in following error message is give: Client Error Syntax Error http://[ip removed]
Reason for this error is obvious when you look at the file ZH-EN.js because it's html file not js file but as it's extension is js it's tried to be handled as js file which gives this syntax error. There is no file ZH-EN.js in folder /web/static/
{"jsonrpc": "2.0", "error": {"message": "OpenERP Server Error", "code": 200, "data": {"debug": "Traceback (most recent call last):\n File \"/opt/
which is obviously saying that there happened an error during downloading of this translation thing which is maybe because locale code ZH-EN doesn't exist.
Based on googling in openERP manual it is said that non-existing locales are not supported (or actually that locales have to be in standardized format which is same as custom locale codes were not supported).
In my opinion if custom locale codes are not supported OpenERP shouldn't accept them at all (which is not a good solution because based on help.openerp.
I tried to test this in runbot to see if newer versions still give the error but if I try to import language file runbot gives me Xmlhttprequest error so it is maybe not allowed in runbot.
Versions
web:
revno: 3741 [merge]
branch nick: saas-1
timestamp: Wed 2013-07-31 09:29:14 +0200
server:
revno: 4896 [merge]
branch nick: saas-1
timestamp: Thu 2013-08-01 15:07:23 +0200
addons:
revno: 8758 [merge]
committer: Denis Ledoux <email address hidden>
branch nick: saas-1
timestamp: Thu 2013-08-01 17:53:34 +0200