Rainbow: Error message not clear, when creating a project with HTML files

Issue #492 on hold
Sebastian Ebert created an issue

I use Rainbow quite often to create translation projects with HTML source files. However files I use, oftenly have minor syntax error that are handled correctly by browsers (e.g. using non-standard HTML tags, missing closing tags or adding double quotes in attribute names where not allowed).

On the debug window, Rainbow displays warnings as well as errors. On warnings, it seems quite clear that the project was created and is ready for translation. However it's not clear what happens on errors. Was the project created? Can I use it for translation? Will there be any problems on the postprocessing? Could you probably add an additional message on the debug window that explicitly states something like "58 errors found. But project can still be used for translation -- if so)?

Comments (12)

  1. ysavourel

    Those error messages are coming from the underlying Jericho HTML parser. As far as I know there is not much we can do about them, as I think there is no option to control them in the Jericho API.

  2. Sebastian Ebert reporter

    If you cannot provide details about the errors, it would probably already help if you state something like "12 errors found. But project will still be processed correctly by Rainbow" or "project will NOT be processed correctly by Rainbow". The user does not know if he can step further or not. It's different with warnings. Then I would assume that I definetely can step further.

  3. ysavourel

    Yes, it would be helpful to be able to make the distinction. We'll discuss it at the next call. Maybe the main developer on this filter will have some idea.

  4. Jim Hargrave (OLD)

    Minimally maybe we want a config option to turn these off by default. We depend on the log entries so will turn them on. It's possible that all of these errors should be demoted to warnings even if they are turned on.

    Accumulating these and resending as a single log entry is also interesting, but how can we do this with slf4j? I do this sort of thing in our private system, but must hard code a specific logging framework to accomplish it. This isn't acceptable with Okapi as it is a library, not an app.

  5. Jim Hargrave

    Rainbow (or any Okapi client) should specify a logging filter to eliminate the Jericho error messages. I don't think this is an issue with Okapi, but for the configuration of each client and user preference.

  6. Sebastian Ebert reporter

    I'm not really deep into it. But does it mean that you will introduce or reconfigure the client default preferences? At least me (and many other users) would not know how to do it. The main problem from the user's side is the question, if one can use the project or not if those error messages appear.

  7. Jim Hargrave

    I think that is a fair request. We may need to switch the Rainbow logger (from the current JDK logger) in order to do this easily. Then we can deploy Rainbow with a config file that can be edited to suit the users needs.

  8. Jim Hargrave
    • changed status to open

    Actually the description of the ticket is general enough for us to keep it open. Instead of fixing this in the code we fix this via logger configuration

  9. Jim Hargrave (OLD)

    This could be fixed But if not we could add code here:

        else if ( lev == Level.WARNING ) {
                // Filter out Axis warnings
                if ( "org.apache.axis.utils.JavaUtils".equals(record.getLoggerName()) ) return;
                // Otherwise print
                log.warning(record.getMessage());
            }
    
  10. Log in to comment