Improve path mechanism for filter settings

Issue #19 resolved
YvesS created an issue

Currently the path to the settings file for a filter is absolute. This cause problem when working across platform and/or when sending filter settings along with a project.

The path needs to accept a relative syntax, or allow a default universal location.

Initial email thread: https://groups.yahoo.com/neo/groups/OmegaT/conversations/topics/40777

Comments (7)

  1. YvesS reporter
    • assigned issue to

    @hoffmank Maybe you can see what can be done for this one. I have not looked at a solution yet. If you don't find a way, it's ok: we can look at it together later.

  2. Chase Tingley

    I ran into this issue when writing okapi-ant. The workaround was to go into pln/rnb files and manually make the paths relative (see issues on this help page), which is not a practical option here.

  3. Former user Account Deleted

    I'm wondering if somewhere around here:

    https://bitbucket.org/okapiframework/omegat-plugin/src/7f86857d82898cfdf9c703c2afa5855cb8fd95ce/filters/src/main/java/net/sf/okapi/lib/omegat/XLIFFOptions.java?at=dev&fileviewer=file-view-default#XLIFFOptions.java-151

    We might be able to take the newly created file and copy it somewhere into the OmegaT project folder (maybe a default universal location, as suggested by YS), then set the path to the file as a relative path.

  4. Chase Tingley

    I think this is a more general problem -- I've seen it also with paths to SRX files for the segmentation step in Rainbow pipelines, although I don't think that one would affect OmegaT. Is there a piece of common code that hands file references in IParameters?

  5. YvesS reporter

    I think this case with the OmegaT Plugin is simpler than references within the parameters file. It's the path to the parameters file itself that is saved in a platform-specific format in the project, so if you set up your project in Windows you can't open it on the Mac.

    A first step could be to ensure the string uses / always. But that doesn't solve the location itself. I suppose the only way to make it cross-platform and portable would be to make it relative to the project location.

  6. YvesS reporter

    Additional notes, from Marco:

    When you specify a local folder in a filter configuration, the absolute path is stored. This way, we cannot share that filter configuration with other users (for instance in a team project). On top of that, if you edit that path, converting it into a relative path, such as filter/xyz.fprm, this is appended to C:/Program Files/OmegaT, but on Windows ONLY. On a Mac, OmegaT searches for /filter/xyz.fprm.

    If I set my path when I first import the project to SVN, then other team members (if they don't have the same path) get an error telling them that the specific configuration file cannot be found. And the project is not downloaded nor opened (so they can't manually change that path in filters.xml).

    If I don't set my specific configuration file, then I need to ask each translator to put the FPRM file somewhere on their computer and change the settings accordingly. However, if I'm not mistaken, filters.xml is synched when a project is saved, so each team member will change other's configuration...

    Even though filters.xml is not under SVN, each team member still needs to deal with this manual configuration, which is not optimal.

  7. Log in to comment