Summary: | Problem with opening plugin.xml editor | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Technology] Babel | Reporter: | Piotr Kontek <pkontek> | ||||||||
Component: | Server | Assignee: | Babel server inbox <babel.server-inbox> | ||||||||
Status: | RESOLVED FIXED | QA Contact: | |||||||||
Severity: | major | ||||||||||
Priority: | P1 | CC: | daniel.stein, denis.roy, emilhugo, kitlo, mori-m, remy.suen | ||||||||
Version: | unspecified | ||||||||||
Target Milestone: | --- | ||||||||||
Hardware: | PC | ||||||||||
OS: | Windows XP | ||||||||||
Whiteboard: | |||||||||||
Attachments: |
|
Description
Piotr Kontek
2008-03-13 16:25:21 EDT
Denis, this is caused by the incomplete import of strings with continuation characters. PDE has many strings like this: DependencyAnalysisSection_plugin_editable = <form>\ <p><img href="hierarchy"/> <a href="hierarchy">Show the plug-in dependency hierarchy</a></p>\ <p><img href="dependencies"/> <a href="references">Show dependent plug-ins and fragments</a></p>\ <p><img href="loops"/> <a href="loops">Look for cycles in the dependency graph</a></p>\ <p><img href="search"/> <a href="unused">Find unused dependencies</a></p>\ </form> in: eclipse\plugins\org.eclipse.pde.ui\org\eclipse\pde\internal\ui\pderesources.properties If we don't import lines after the first continuation character, we will run into an IllegalArgumentException at runtime when the form widget tries to parse the string. I think it's general problem with '\' character. For instance \n isn't interpeted as a new line character. Can you repair it? It makes this translation unuseable :( (In reply to comment #1) > Denis, this is caused by the incomplete import of strings with continuation > characters. As I can remember, this (was) a problem with the import, but I'm quite sure it was fixed. Do you want me to re-import the 3.2 strings again? Created attachment 94844 [details]
Screenshot
I re-ran the import for the Eclipse 3.2 on my workstation, and indeed, it imports files with \ correctly. I thought I had re-run the import after fixing that bug, but I may be wrong.
Piotr, if I re-import the Polish translations and re-build an update site, are you willing to test it for us?
(In reply to comment #4) > Piotr, if I re-import the Polish translations and re-build an update site, are > you willing to test it for us? Of course I can test it. Tell me when I can do this. I've reimported the 3.2 Polish translations *only* and have rebuilt the staging site. Please try it here: http://build.eclipse.org/technology/babel/test-updates/ As a bonus, as new projects have signed up for Babel, about 7000 new Polish strings were imported from the 3.2 set (CDT, webtools, etc). If this works, I'll re-import the 3.2 set over every language except Janapese. (In reply to comment #6) > I've reimported the 3.2 Polish translations *only* and have rebuilt the staging > site. Please try it here: > > http://build.eclipse.org/technology/babel/test-updates/ > > As a bonus, as new projects have signed up for Babel, about 7000 new Polish > strings were imported from the 3.2 set (CDT, webtools, etc). > > If this works, I'll re-import the 3.2 set over every language except Janapese. > It works well for me. Thanks! (In reply to comment #7) > It works well for me. Thanks! Thanks, Piotr. I'm reimporting the 3.2 translations over every language except Japanese (the Japan WG provided a translation set already). This is beneficial in that not only are several strings being fixed, but several new translations are being added as new projects have come on board. Released > R_0_200804081317 Hello again! Unfortunately I still have my problem with '\' character. I translated one string in org.eclipse.pde.ui at http://babel.eclipse.org/babel/translate.php. English string is: <form>\<br /> <li style='text' value='1.' bindent='5'><a href='action.synchronize'>Synchronize</a> this configuration with the product''s defining plug-in.</li>\<br /> <li style='text' value='2.' bindent='5'>Test the product by launching a runtime instance of it:</li>{0}</form> My polish translation is: <form>\<br /> <li style='text' value='1.' bindent='5'><a href='action.synchronize'>Synchronizuj</a> tę konfigurację z wtyczką definiującą produkt.</li>\<br /> <li style='text' value='2.' bindent='5'>Przetestuj produkt przez uruchomienie jego instancji wykonawczej:</li>{0}</form> It looks very similar but causes problem with opening .product file in product configuration editor. And another problem is with '\n' character. It apears when I'm trying to save my perspective. Dialog contains "\n" string and it doesn't cause line break (see attachement). Could you repair it? Piotr Created attachment 96070 [details]
\n problem
(In reply to comment #10) > It looks very similar but causes problem with opening .product file in product > configuration editor. What problem does it cause? > And another problem is with '\n' character. It apears when I'm trying to save > my perspective. Dialog contains "\n" string and it doesn't cause line break > (see attachement). > > Could you repair it? I'm sure I could if I knew how. I don't know how Eclipse interprets \n, so I don't know what needs to be done to make Eclipse interpret \n as a line break. Does it need \\n? \\\\n? (In reply to comment #12) > (In reply to comment #10) > > It looks very similar but causes problem with opening .product file in product > > configuration editor. > What problem does it cause? I'm sorry I've forgotten attach it. This is an error: java.lang.IllegalArgumentException: Argument not valid at org.eclipse.swt.SWT.error(SWT.java:3547) at org.eclipse.swt.SWT.error(SWT.java:3481) at org.eclipse.ui.internal.forms.widgets.FormTextModel.parseInputStream(FormTextModel.java:114) at org.eclipse.ui.internal.forms.widgets.FormTextModel.parseTaggedText(FormTextModel.java:93) at org.eclipse.ui.forms.widgets.FormText.setText(FormText.java:668) at org.eclipse.pde.internal.ui.editor.LaunchShortcutOverviewPage.createClient(LaunchShortcutOverviewPage.java:56) at org.eclipse.pde.internal.ui.editor.product.OverviewPage.createTestingSection(OverviewPage.java:85) at org.eclipse.pde.internal.ui.editor.product.OverviewPage.fillBody(OverviewPage.java:78) at org.eclipse.pde.internal.ui.editor.product.OverviewPage.createFormContent(OverviewPage.java:66) at org.eclipse.ui.forms.editor.FormPage$1.run(FormPage.java:151) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.ui.forms.editor.FormPage.createPartControl(FormPage.java:149) at org.eclipse.pde.internal.ui.editor.PDEFormPage.createPartControl(PDEFormPage.java:257) at org.eclipse.ui.forms.editor.FormEditor.pageChange(FormEditor.java:488) at org.eclipse.pde.internal.ui.editor.PDEFormEditor.pageChange(PDEFormEditor.java:290) at org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:623) at org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:529) at org.eclipse.pde.internal.ui.editor.PDEFormEditor.setActivePage(PDEFormEditor.java:788) at org.eclipse.pde.internal.ui.editor.PDEFormEditor.createPages(PDEFormEditor.java:281) at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:283) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:661) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:426) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:592) at org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(EditorAreaHelper.java:263) at org.eclipse.ui.internal.EditorManager.setVisibleEditor(EditorManager.java:1405) at org.eclipse.ui.internal.EditorManager$5.runWithException(EditorManager.java:939) at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:129) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296) at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:801) at org.eclipse.ui.internal.Workbench$25.runWithException(Workbench.java:1342) at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:129) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2309) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447) at org.eclipse.equinox.launcher.Main.run(Main.java:1173) > > And another problem is with '\n' character. It apears when I'm trying to save > > my perspective. Dialog contains "\n" string and it doesn't cause line break > > (see attachement). > > > > Could you repair it? > > I'm sure I could if I knew how. I don't know how Eclipse interprets \n, so I > don't know what needs to be done to make Eclipse interpret \n as a line break. > Does it need \\n? \\\\n? IMHO it has to be \n. I don't know why it doesn't work. There's \n in english strings. I'll try to do some research tomorrow. Ok I found the reason of my problems. org.eclipse.pde.ui.nl_pl_0.2.0.v20080413043401.jar contains: Product_overview_testing=<form>\\<br \/> <li style='text' value='1.' bindent='5'><a href='action.synchronize'>Synchronizuj<\/a> t\u0119 konfiguracj\u0119 z wtyczk\u0105 definiuj\u0105c\u0105 produkt.<\/li>\\<br \/> <li style='text' value='2.' bindent='5'>Przetestuj produkt przez uruchomienie jego instancji wykonawczej:<\/li>{0}<\/form> org.eclipse.pde.ui_3.3.1.v20070912-0800.jar contains: Product_overview_testing=<form>\ <li style="text" value="1." bindent="5"><a href="action.synchronize">Synchronize</a> this configuration with the product''s defining plug-in.</li>\ <li style="text" value="2." bindent="5">Test the product by launching a runtime instance of it:</li>{0}</form> When I've corected pl_pl jar like this: Product_overview_testing=<form>\ <li style="text" value="1." bindent="5"><a href="action.synchronize">Synchronizuj</a> t\u0119 konfiguracj\u0119 z wtyczk\u0105 definiuj\u0105c\u0105 produkt.</li>\ <li style="text" value="2." bindent="5">Przetestuj produkt przez uruchomienie jego instancji wykonawczej:</li>{0}</form> And this editor works well. The problem is with web resource editor. It shows: <form>\<br /> <li style='text' value='1.' bindent='5'><a href='action.synchronize'>Synchronize</a> this configuration with the product''s defining plug-in.</li>\<br /> <li style='text' value='2.' bindent='5'>Test the product by launching a runtime instance of it:</li>{0}</form> instead of <form>\ <li style="text" value="1." bindent="5"><a href="action.synchronize">Synchronize</a> this configuration with the product''s defining plug-in.</li>\ <li style="text" value="2." bindent="5">Test the product by launching a runtime instance of it:</li>{0}</form> New line character changes into <br />, " into '. And in exported jar every \ is changes into \\ and / into \/. The same problem is with \n character. pl_pl jar contains \\n not \n. It makes this translations unuseable. I hope it helps you. Regards, Piotr Hi again! I hope that my information was helpful to you. Is it possible to repair this error in a close future? If you need more information from me - just ask ;) Regards, Piotr *** Bug 226632 has been marked as a duplicate of this bug. *** Hi everyone Is there any progress regarding the new line issue? Looking into this. Good news .. the problem seems to be with the pack generator, not with our data. Good to hear. Thank you. Will there be new language packs soon? You make my day. Looks like the fix for bug 221370 is what broke this. I was using json_encode to encode the utf-8 strings to escaped unicode, but json was encoding everything else (quotes, slashes, backslashes, etc) to make it Javascript compatible. Bad. This is also the likely case of bug 227363, bug 226271 and bug 227366. I re-ran the nlpack generator and checked the string Piotr specified in comment 14. It was correctly generated like this: Product_overview_testing=<form>\ <li style="text" value="1." bindent="5"><a href="action.synchronize">Synchronizuj</a> t\u0119 konfiguracj\u0119 z wtyczk\u0105 definiuj\u0105c\u0105 produkt.</li>\ <li style="text" value="2." bindent="5">Przetestuj produkt przez uruchomienie jego instancji wykonawczej:</li>{0}</form> (note the line breaks are OK, the quotes are not escaped, slashes and backslashes are not doubled, etc.) I'll push this to staging and spin a build on the staging area. Stay tuned. I ran a build from staging. Note the actual strings are about 1 month behind the live site. Please test the language packs from these two update sites: For Eclipse 3.3.x : http://build.eclipse.org/technology/babel/test-updates/europa/ For Eclipse 3.4 : http://build.eclipse.org/technology/babel/test-updates/ganymede/ Motoki-san, I've added you to this bug so you can test the Japanese language packs, as this bug may have fixed many issues with them as well. I've loaded up the French language pack, and it looks good. Hello, Today, I checked Japanese pack on Ganymede M7. It looks good. I can not find any "Argument not valid" problems as of now. Hi, I've tested the german language pack. It looks very good. No \n issue found so far. The PDEEditor (plugin.xml) now shows all Pages correct. Huge progress, thanks! But, i've found an new issue (see my screenshot that i've attached.) The OpenType Dialog and the ContentProposal(CTRL-Enter) showing a curios String instead of the package path. Sorry for my bad english. You see how important babel is... :-) Created attachment 103253 [details]
OpenTypeDialogError
The error in the OpenTypeDialog
We may have to twist the import code a little more. The problem seen by Daniel was related to the following strings: eclipse/plugins/org.eclipse.jdt.ui/org/eclipse/jdt/internal/ui/JavaUIMessages.properties JavaElementLabels_concat_string= \ -\ eclipse/plugins/org.eclipse.jdt.ui/org/eclipse/jdt/internal/ui/JavaUIMessages.properties JavaElementLabels_comma_string= ,\ eclipse/plugins/org.eclipse.jdt.ui/org/eclipse/jdt/internal/ui/JavaUIMessages.properties JavaElementLabels_declseparator_string= \ :\ eclipse/plugins/org.eclipse.jdt.ui/org/eclipse/jdt/internal/ui/JavaUIMessages.properties JavaElementLabels_category_separator_string= \ Please note that the back slash at the end of the string is NOT a line continuation character. There is another space character after the back slash. Developer was trying to escape the space character to make sure a space character is added after the symbol (- , :). Denis, can you look at this? You are the RegEx king. You may be able to fix this. Daniel, Kit, can you open separate bugs for those? I want to avoid the open-ended never-closing bug, as this one is now properly fixed. *** Bug 235022 has been marked as a duplicate of this bug. *** Denis, translation looks better, but problem with translation editor that I described is still present. I'll open new bug for it. You can close this bug I think. Best regards, Piotr |