poedit icon indicating copy to clipboard operation
poedit copied to clipboard

Line numbers in Catalog can get out of sync

Open vslavik opened this issue 7 years ago • 0 comments

CatalogItem stores line number, which is needed for matching errors from gettext tools and for the --line command-line argument. Unfortunately, this information becomes invalid when saving a file, because it doesn't account for the msgcat post-processing. It is also modified every time DoSaveOnly is called, which can be in non-saving situations like when creating a temporary file for the purposes of validation.

See https://github.com/vslavik/poedit/pull/358#issuecomment-300728398 for the original report:

If does not work with this scenario: a) PO file is open and has been saved poedit.exe --line is launched

This is a reproducible test case for the save issue (reproducible with file locales\ca.po in the poedit repo).

  1. Run poedit ca.po --line 2010 ==> It opens file ca.po and correctly goes to segment "&Apply"
  2. Click the Save button in Poedit
  3. Run poedit ca.po --line 2010 ==> It goes to the wrong segment (in this case "shift", at the end of the file).

vslavik avatar May 11 '17 13:05 vslavik