Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 439556

Summary: nonnlsPlugin only does half the job
Product: [ECD] Orion Reporter: Paul Webster <pwebster>
Component: ClientAssignee: Paul Webster <pwebster>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ahunter.eclipse, mamacdon
Version: 6.0   
Target Milestone: 8.0   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Paul Webster CLA 2014-07-14 12:44:51 EDT
I added the nonnlsPlugin.html to my plugins and was able to open it on a directory.  After I selected some of the name:/tooltip: fields in the file, I clicked Apply.

It said the file in question passed.  But it didn't create the matching orion/projects/nls/root/messages.js file.  Couldn't do Step 6 from https://wiki.eclipse.org/Orion/Internationalization#String_Xtrnalizr since the root folder was missing.

PW
Comment 1 Paul Webster CLA 2014-07-15 11:33:41 EDT
Looks like a problem in how the string externalizer builds the messages directory vs http://localhost:8081/stringexternalizer/nonnlsSearchUtil.js writeMessagesFile

What it builds now: http://localhost:8081/file/pwebster-OrionContent/org.eclipse.orion.client/bundles/org.eclipse.orion.client.ui/web/orion/projects/nls//root/messages.js

{"Severity":"Error","Message":"Forbidden: /pwebster-OrionContent/org.eclipse.orion.client/bundles/org.eclipse.orion.client.ui/web/orion/projects/nls//root/messages.js","HttpCode":403,"BundleId":"org.eclipse.orion.server.core","Code":0}

Without the double slash: http://localhost:8081/file/pwebster-OrionContent/org.eclipse.orion.client/bundles/org.eclipse.orion.client.ui/web/orion/projects/nls/root/messages.js we get:
{"Severity":"Error","Message":"File not found: /pwebster-OrionContent/org.eclipse.orion.client/bundles/org.eclipse.orion.client.ui/web/orion/projects/nls/root/messages.js","HttpCode":404,"BundleId":"org.eclipse.orion.server.core","Code":0}

But the writeMessagesFile code expects 404 and does nothing on a 403 (hence no file is written).  Did something change that the double-slash is returning a 403 now?

PW
Comment 2 Paul Webster CLA 2014-07-15 12:59:39 EDT
fix for review: https://git.eclipse.org/r/29922

PW
Comment 3 Anthony Hunter CLA 2014-08-07 15:50:38 EDT
(In reply to Paul Webster from comment #2)
> fix for review: https://git.eclipse.org/r/29922
> 
> PW

I was not 100% of your fix so I added Mark to review your change in gerrit.