Unable to create OmegaT project with post-processing hook

27 views
Skip to first unread message

Manuel Souto Pico

unread,
Apr 3, 2020, 4:47:15 AM4/3/20
to okapi-users
Dear all,

I hope you are well.

I have downloaded vesion 39 of the okapi tools, and I'm trying to use Rainbow to create a translation kit as an OmegaT project. All options of "OmegaT project" are checked, including 

However, after I translate the project in OmegaT and press Ctrl+D to generate the target files, I get the target XLIFF in the /target folder, but there's no /done folder containing the very final version.

Is there something I might be missing?

Thanks in advance.
Cheers, Manuel

στέργιος προσινικλής

unread,
Apr 24, 2020, 11:22:43 AM4/24/20
to Manuel Souto Pico, okapi-users
Same issue with the current 1.39 version of okapi tools ,rainbow.
Using the 0.38 version everything works fine.
With the 1.39 OmegaT plugin if it's somehow relevant...

--
You received this message because you are subscribed to the Google Groups "okapi-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to okapi-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/okapi-users/CABm46baUDy%2BYW6xxbEUCYxj-DCx%2BWg4HeKDoBf9qE%3DOWzxib6g%40mail.gmail.com.


--

Yves Savourel

unread,
Apr 24, 2020, 11:59:37 AM4/24/20
to okapi-users

What type of format the original documents were in?

Is there an example file available maybe?

It would make reproducing the issue easier.

Thanks,

-yves

στέργιος προσινικλής

unread,
Apr 24, 2020, 12:04:11 PM4/24/20
to Yves Savourel, okapi-users
It was an mxliff file from memsource. Had this kind of problem with various memsource projects.
I attach the specific file. If it doesn't get through let me know and i'll send it your private email

Shooter-Bottle Mount Vaccinator _ 04.15.20-en_us-el_gr-T.mxliff

Yves Savourel

unread,
Apr 24, 2020, 10:18:03 PM4/24/20
to okapi-users

I could not reproduce an error.

I created the OmegaT project with the 1.39 Rainbow, opened it with OmegaT with the corresponding okapi filter plugin. Did some translation, saved it and rebuilt the target with Ctrl+D and the .mqxliff looked fine and there were no error or warning reported.

I’m probably missing some step or maybe it’s an issue when merging back some un-expected translation…

Sorry I could not reproduce it.

-ys

στέργιος προσινικλής

unread,
Apr 25, 2020, 5:38:55 AM4/25/20
to Yves Savourel, okapi-users
It's a mystery indeed! I attach a test folder with two omega projects (0.38-1.39) created with the same rainbow settings using the two rainbow versions, and crtrl-D ed in OmegaT with the 1.39 plugin.
Manifest files are identical in both projects, 1.39 fails, 0.38 works as it should. Maybe  you manage to see something
-sterios

TEST_rainbow_0.38-1.39.zip

Yves Savourel

unread,
Apr 25, 2020, 8:11:00 AM4/25/20
to okapi-users

Hi Sterios,

 

There is a difference in the OmegaT project itself:

The command-line to generate the target is missing in the 1.39 project.

 

 

Now we have to understand why it didn’t get created with the command-line.

In my test with Rainbow 1.39 the line was set properly. Maybe you can try to create another OmegaT project with Rainbow and check if that line is there. If it is I would suspect that it got removed accidentally at some point when using OmegaT, maybe setting on/off some options.

image001.jpg

Manuel Souto Pico

unread,
Apr 25, 2020, 10:34:00 AM4/25/20
to Yves Savourel, okapi-users
In case it helps, I got the issue with a Word file using the okp_openxml filter.
Cheers, Manuel

Yves Savourel

unread,
Apr 26, 2020, 8:44:11 AM4/26/20
to okapi-users

Hi Sterios,

 

It seems the root cause of the issue is the filename of the jar, as you found out.

I’m not sure why things worked for me when I tested it, but I may have had side effects due to the debugging/development environment.

I can reproduce the problem now.

I’ve open a ticket for this (https://bitbucket.org/okapiframework/okapi/issues/932) and we can try to find a solution.

 

Meanwhile, normally we should be able to set the hook manually and get it to work.

The error you are getting seems to be related to SWT, which is the UI library for Rainbow: somehow it doesn’t find it. I’ll try on my side.

 

-ys

 

From: στέργιος προσινικλής <steriospr...@gmail.com>
Sent: Sunday, April 26, 2020 2:02 AM
To: Yves Savourel <yves.s...@gmail.com>
Subject: Re: [okapi-users] Unable to create OmegaT project with post-processing hook

 

In the okapi help i see

The hook (the one missing in the 1.39 test project) is in the form of a CLI command:

 java -jar /path/to/okapi/lib/rainbow.jar -x TranslationKitPostProcessing -np "${projectRoot}manifest.rkm" -fc okf_rainbowkit-noprompt

Note: The hook will fail if rainbow.jar cannot be found at the specified path. This may happen in the following situations:

  • You move your Okapi installation
  • You send the translation kit to a machine with Okapi installed at a different location, or not installed at all

 

Well, i see that rainbow.jar is missing from okapi-apps_gtk2-linux-x86_64_1.39.0 that offers the okapi site but is renamed to /opt/okapi-apps_gtk2-linux-x86_64_1.39.0/lib/okapi-application-rainbow-1.39.0.jar and i actually have this  installed  in /opt while in the 0.38 it's there...

 

omegat.project file (missing the hook) is populated when i launch OmegaT for the first time.

 

Trying to copy manually the cli hook, OmegaT launches rainbow post-processing

 

"Executing command: java -jar "/opt/okapi-apps_gtk2-linux-x86_64_1.39.0/lib/okapi-application-rainbow-1.39.0.jar" -x TranslationKitPostProcessing -np "/home/sterios/Desktop/TEST_rainbow_0.38-1.39/1.39_3RD_OmegaT_rainbow/manifest.rkm" -fc okf_rainbowkit-noprompt"

 

bu fails to create the file with a Warning

 

21017: Πληροφορίες: Τέλος μεταγλώττισης έργου (LOG_DATAENGINE_COMPILE_END)
21017: Προειδοποίηση: java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Display
21017: Προειδοποίηση: at net.sf.okapi.applications.rainbow.Main.main(Main.java:30)
21017: Προειδοποίηση: Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Display
21017: Προειδοποίηση: at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
21017: Προειδοποίηση: at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
21017: Προειδοποίηση: at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
21017: Προειδοποίηση: at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
21017: Προειδοποίηση: ... 1 more
21017: Προειδοποίηση: Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/okapi/common/exceptions/OkapiException
21017: Προειδοποίηση: at net.sf.okapi.applications.rainbow.Main.main(Main.java:48)
21017: Προειδοποίηση: Caused by: java.lang.ClassNotFoundException: net.sf.okapi.common.exceptions.OkapiException
21017: Προειδοποίηση: at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
21017: Προειδοποίηση: at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
21017: Προειδοποίηση: at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
21017: Προειδοποίηση: at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
21017: Προειδοποίηση: ... 1 more

 

Στις Σάβ, 25 Απρ 2020 στις 5:55 μ.μ., ο/η στέργιος προσινικλής <steriospr...@gmail.com> έγραψε:

The creation of the post processing hook has something to do with the following part (copied from okapi help). Both options in Rainbow and OmegaT are correctly enabled.

Created yet  another OmegaT project that fails, no external command line. Trying now to understand where the problem is, in okapi or OmegaT? (currently using version 5.2.0)

I attach my OmegaT settings folder.

 

Include post-processing hook — set this option to include a hook in the OmegaT project that will allow OmegaT's Create Translated Documents command to automatically invoke the Rainbow Translation Kit Merging process. In order for the command to be invoked, you must check the Also allow per-project external commands checkbox in OmegaT in the Options > Save... panel.

 

image001.jpg

Y S

unread,
Apr 26, 2020, 9:13:35 AM4/26/20
to okapi-users
I think you should be able to use this command-line:

java -cp "/opt/okapi-apps_gtk2-linux-x86_64_1.39.0/lib/*" net.sf.okapi.applications.rainbow.Main -x TranslationKitPostProcessing -np "/home/sterios/Desktop/TEST_rainbow_0.38-1.39/1.39_3RD_OmegaT_rainbow/manifest.rkm" -fc okf_rainbowkit-noprompt

(Instead of specifying the jar file where we used to have the classpath defined, you just specify the classpath and the Rainbow main class).
I can't test on Linux, but it works on Windows.

-ys


στέργιος προσινικλής

unread,
Apr 26, 2020, 10:41:58 AM4/26/20
to Y S, okapi-users
Works on Linux too, thank you for the help to sort this out!

--
You received this message because you are subscribed to the Google Groups "okapi-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to okapi-users...@googlegroups.com.

Yves Savourel

unread,
Apr 26, 2020, 11:03:59 AM4/26/20
to okapi-users

Sorry we didn’t catch about the problem when we released 1.39. I should have thought about it.

I’ll implement the fix and it’ll be in the next release (and in the snapshot until then).

Thanks for reporting the issue.

-ys

 

From: στέργιος προσινικλής <steriospr...@gmail.com>
Sent: Sunday, April 26, 2020 8:42 AM
To: Y S <yves.s...@gmail.com>
Cc: okapi-users <okapi...@googlegroups.com>
Subject: Re: [okapi-users] Unable to create OmegaT project with post-processing hook

 

Works on Linux too, thank you for the help to sort this out!

Reply all
Reply to author
Forward
0 new messages