Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018274Openbravo ERPE. Translationpublic2011-08-12 15:152011-08-17 18:11
neil_smith 
iperdomo 
normalmajoralways
closedfixed 
5
3.0MP0 
3.0MP3 
Core
No
0018274: Translation problem - JSCompressor error
I'm having a weird error on my OB 3.0.12774.

I've been working with the english version, and all works fine.
I then tried to install our french translation (via XML files that I took from our 2.5 version), but my purchase order window doesn't work any more...
It works in English, but if I change the language to french, doesn't work.
The error I get is :

ERROR org.openbravo.client.kernel.JSCompressor - Unterminated string literal at line 47 and column 0
net.matthaynes.jsmin.JSMin$UnterminatedStringLiteralException: Unterminated string literal at line 47 and column 0
at net.matthaynes.jsmin.JSMin.action(Unknown Source)
at net.matthaynes.jsmin.JSMin.jsmin(Unknown Source)
at org.openbravo.client.kernel.JSCompressor.compress (JSCompressor.java:57)
...

I tried debuggins JSCompressor and outputting all that it passes to JSMin and I found that the error occured while processing the tab named "Commande d'Achat", and the ' in the name made the whole thing fail... If the ' is in the window name, in the field name, ... it works, but not in the tab name.
Translate any tab name to something with an ' in it.
Escape all special characters
No tags attached.
related to defect 0018729 closed alostale Translation problem - JSCompressor error 
Issue History
2011-08-12 15:15neil_smithNew Issue
2011-08-12 15:15neil_smithAssigned To => alostale
2011-08-12 15:15neil_smithModules => Core
2011-08-12 15:35iperdomoAssigned Toalostale => iperdomo
2011-08-12 15:35iperdomoStatusnew => scheduled
2011-08-12 15:35iperdomofix_in_branch => pi
2011-08-12 15:36iperdomoTarget Version => 3.0MP3
2011-08-12 15:36iperdomofix_in_branchpi =>
2011-08-12 15:36iperdomoNote Added: 0040169
2011-08-15 10:01neil_smithNote Added: 0040171
2011-08-16 19:28hgbotCheckin
2011-08-16 19:28hgbotNote Added: 0040237
2011-08-16 19:28hgbotStatusscheduled => resolved
2011-08-16 19:28hgbotResolutionopen => fixed
2011-08-16 19:28hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f574dedd5134ba8eb0654a208d558f660ec72a77 [^]
2011-08-17 12:15adrianromeroNote Added: 0040252
2011-08-17 12:15adrianromeroStatusresolved => closed
2011-08-17 18:11hudsonbotCheckin
2011-08-17 18:11hudsonbotNote Added: 0040282
2012-06-15 16:33alostaleRelationship addedrelated to 0018729

Notes
(0040169)
iperdomo   
2011-08-12 15:36   
@neil_smith:
Can you please attach the XML files you used for reproducing the issue?

Thanks,

Iván
(0040171)
neil_smith   
2011-08-15 10:01   
@Iván:
Sorry, I corrected all my XML files so there aren't any ' in them any more...
But you can simply enter the translation of a tab name and put a ' in it and you will get the bug.

Have a nice day
Neil.
(0040237)
hgbot   
2011-08-16 19:28   
Repository: erp/devel/pi
Changeset: f574dedd5134ba8eb0654a208d558f660ec72a77
Author: Iván Perdomo <ivan.perdomo <at> openbravo.com>
Date: Tue Aug 16 19:28:30 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f574dedd5134ba8eb0654a208d558f660ec72a77 [^]

Fixes issue 18274: The tab name was not properly escaped
- If a tab name contains a quote (') the generated code is broken

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-tab.js.ftl
---
(0040252)
adrianromero   
2011-08-17 12:15   
Verified
(0040282)
hudsonbot   
2011-08-17 18:11   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5922b23c1f55 [^]

Maturity status: Test