| Summary: | "Syntax error on token" message unexternalized | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Kit Lo <kitlo> | ||||||||||||
| Component: | JS Tools | Assignee: | Michael Rennie <Michael_Rennie> | ||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||||
| Severity: | normal | ||||||||||||||
| Priority: | P3 | CC: | baochlin, gpclark, keithc, mamacdon, Michael_Rennie | ||||||||||||
| Version: | unspecified | ||||||||||||||
| Target Milestone: | 7.0 | ||||||||||||||
| Hardware: | PC | ||||||||||||||
| OS: | Windows 7 | ||||||||||||||
| Whiteboard: | |||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Kit Lo
Created attachment 246021 [details]
WSW44.js
(In reply to Kit Lo from comment #0) > I found the following message hard-code in > org.eclipse.orion.client.javascript\web\javascript\validator.js: > Line 182 - error.message = msg = "Syntax error on token '"+token.value+"', > delete this token."; Adding extra comments for Kit: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/diff/bundles/org.eclipse.orion.client.javascript/web/javascript/validator.js?id=53a10417a290393c80af80ba7e54ebc843a0f26e + if(error.type) { + switch(error.type) { + case ASTManager.ErrorTypes.Unexpected: + error.message = msg = "Syntax error on token '"+token.value+"', delete this token."; + break; + case ASTManager.ErrorTypes.EndOfInput: + error.message = "Syntax error, incomplete statement."; + break; + } + } Build label: Version 4.4.1 Build ID: 7.0.0.v20140813-1903 Steps to recreate problem: Log in the Orion(https://orionhub.org) Click Editor icon at side bar Create a Folder Import WSW44.js Hover over the error icon at line 30 Problem description: "Syntax error, incomplete statement." is not externalized Expected result: "Syntax error, incomplete statement." should be externalized PII Information: N/A Created attachment 246022 [details]
441831_01
Below is the PII information, and instructions on how to recreate the issue. We see the strings in the PII returns, but not in the builds, perhaps there is some issue with the strings being picked up after the code fix? PII information: WSW44AAP001\eclipse\plugins\org.eclipse.orion.client.ui\web\orion\settings\nls\root\messages.js 'syntaxErrorIncomplete': 'Syntax error, incomplete statement.', //$NON-NLS-0$ //$NON-NLS-1$ Steps to reproduce: 1.Click Editor icon at left side bar 2.Click WSW44.js 3.Hover over the error icon at line 30 Simplified Chinese: 441831_CHS.jpg PSSI build: 441831_PSSI.jpg Created attachment 246511 [details]
Simplified Chinese screenshot
Created attachment 246512 [details]
PSSI screenshot
Hi Kit, As this problem is not fixed yet, please help reopen the bug. thank you. (In reply to Keith Chuang from comment #8) > Hi Kit, > As this problem is not fixed yet, please help reopen the bug. thank you. The JS tools side of the problem is fixed. If the strings are not being picked up properly that means there is a problem with the translation / translation build. validator.js is trying to load the translated strings directly, when it should be leaving this up to the display-time code (syntaxchecker.js). This will cause the English localization to always be shown on parser syntax errors. Reopening.. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=feb53d5 I verified this against the French JS language pack -- the error messages are translated now. (In reply to Mark Macdonald from comment #11) > http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/ > ?id=feb53d5 > > I verified this against the French JS language pack -- the error messages > are translated now. Verified in 7.0.0.v20140904-0231, the string is mocked. Thanks for the fix. Created attachment 246754 [details]
441831_01_fixed_7.0.0.v20140904-0231.png
|