Version: 1.2 (KDE 4.6) (using KDE 4.6.4)
Some file references are not shown in "metadata" panel.
Steps to Reproduce:
Open a .po file with the following message:
#. i18n: file: ui/forms/wdgshapeoptions.ui:35
#. i18n: ectx: property (text), item, widget (QComboBox, cmbOutline)
#: rc.cpp:3977 plugins/paintops/libpaintop/kis_paintop_option.cpp:26
"Metadata" panel contains only this:
i18n: ectx: property (text), item, widget (QComboBox, cmbOutline)
"rc.cpp:3977" and "plugins/paintops/libpaintop/kis_paintop_option.cpp:26" should also be shown.
Lokalize skips the rc.cpp entry by design if it finds a .ui entry. This is the expected behavior.
What about the other missing path, the .cpp? Well, Lokalize expects only one path on each #: line, and when it ignores the rc.cpp entry, it ignores also the other path in the same line because Lokaliez assumes that there are no more paths in this line. This is a bug, the Gettext documentation shows examples of #: lines with more than one path.
The issue is in this function: https://projects.kde.org/projects/kde/kdesdk/lokalize/repository/revisions/master/entry/src/catalog/gettext/gettextstorage.cpp#L307
I do not have time to fix it, and I won’' work again on Lokalize for some time. I encourage any other KDE developer to fix this, it should be trivial given the information above, but if no one else fixes it before I get back I will fix it myself.
Git commit a6e6dee0fb8c4395c1840d90cc009380f195b965 by Adrián Chaves.
Committed on 15/09/2019 at 07:55.
Pushed by adrianchavesfernandez into branch 'master'.
Don’t skip file references from the same line as rc.cpp
Summary: BUG: 277966
Test Plan: Tested manually with a PO file as described in the bug report.
Reviewers: #localization, aacid
Reviewed By: #localization, aacid
Differential Revision: https://phabricator.kde.org/D23643
M +3 -1 src/catalog/gettext/gettextstorage.cpp