Menu

#1099 Absolute paths used in search results from TMs

5.8
closed-fixed
None
5
2024-09-20
2022-05-24
msoutopico
No

Steps to reproduce

  1. Press Ctrl+F.
  2. Check the "File names" option.
  3. Check the "TMs" option (and uncheck "Project")
  4. Run a search in TMs.

Expected results

Results include the file name (as the name of the option suggests), or rather, more conveniently, the relative short path inside the /tm folder:

/auto/filename_good_to_see.tmx
-- This is a sample sentence.
-- Bla bla bla, blu blu blú.

.

Actual results

Results include the full absolute file path from the root folder (i.e. /) of the operating system:

/home/pico/Sync/OmegaT/tickets/test-omt-projects/very/looooong/path/that/I/do/not/need/to/see/in/search/results/sample_project_omt/tm/auto/filename_good_to_see.tmx
-- This is a sample sentence.
-- Bla bla bla, blu blu blú.

.
The following screencast shows the problem: https://i.imgur.com/mrP5tRK.gif

The full absolute path is unnecessary (the user already knows where the project sits in the file structure) and it eats a lot of precious space.

Suggestion

If variables used in TM match display template apply here, probably this problem can be fixed easily replacing ${filePath} with ${fileShortPath}. Just a wild guess.

On the other hand, having ${fileNameOnly} would be inconvenient, because it's important for the translator to see where exactly inside the TM folder (from /tm/enforce, or /tm/auto, or /tm/penalty-XX, etc.) the match is coming from.

Discussion

  • Hiroshi Miura

    Hiroshi Miura - 2022-05-27

    Does a patch attached give you an expected behavior?

    It show me like

    tm/auto/osm-trans-ja-omegat.tmx
    -- Access class
    -- アクセスクラス


    tm/auto/osm-trans-ja-omegat.tmx
    -- Access class must not contain ''{0}''!
    -- アクセスクラスには ''{0}'' を含めることができません。

     

    Last edit: Hiroshi Miura 2022-05-27
    • msoutopico

      msoutopico - 2022-05-29

      I can confirm patch attached to ticket 1098 fixes both issues (reported in tickets 1098 and 1099). Thanks a lot.

       
  • Hiroshi Miura

    Hiroshi Miura - 2022-05-27

    This looks like enhancement proposal rather than a defeat.

     
  • Hiroshi Miura

    Hiroshi Miura - 2022-09-26
    • status: open --> open-fixed
    • assigned_to: Hiroshi Miura
     
  • Hiroshi Miura

    Hiroshi Miura - 2022-09-26

    The fix is merged. [46b905]

     

    Related

    Commit: [46b905]

  • Hiroshi Miura

    Hiroshi Miura - 2023-09-27
    • status: open-fixed --> closed-fixed
     
  • Hiroshi Miura

    Hiroshi Miura - 2023-09-27

    released

     
  • msoutopico

    msoutopico - 2024-09-20

    Here comes an update: this problem doesn't seem to happen (anymore) in file paths in search results (Search dialog) and in matches (Matches pane), however it still happens in the "Found in" dialog that appears to show location of hidden matches when they are identical to the one displayed. SHould this ticket be re-opened or shall I create a new one?

    e.g.

     

Log in to post a comment.

MongoDB Logo MongoDB