diff --git a/src/edframe.cpp b/src/edframe.cpp index f94ab689ee..8112df159c 100644 --- a/src/edframe.cpp +++ b/src/edframe.cpp @@ -2497,18 +2497,23 @@ void PoeditFrame::OfferSideloadingSourceText() if (!Language::TryGuessFromFilename(filename, &wildcard).IsValid()) return; + wxFileName fn(filename); + wildcard.Replace("*", "en"); wxFileName ref(wildcard); - if (!ref.FileExists() || wxFileName(filename) == ref) + if (!ref.FileExists() || fn == ref) return; + wxFileName displayRef(ref); + displayRef.MakeRelativeTo(fn.GetPath()); + AttentionMessage msg ( "sideload-symbolic-id-source", AttentionMessage::Question, _("Would you like to use English for source text?") ); - msg.SetExplanation(wxString::Format(_(L"This file uses string IDs instead of source text. Poedit can load English texts from the ā€œ%sā€ file for you."), ref.GetFullName())); + msg.SetExplanation(wxString::Format(_(L"This file uses string IDs instead of source text. Poedit can load English texts from the ā€œ%sā€ file for you."), displayRef.GetFullPath())); // TRANSLATORS: Shown as action button when asking if the user wants to replace string IDs with English text; "load" as in "load from file" msg.AddAction(_("Load English"),[=]{ SideloadSourceTextFromFile(ref); diff --git a/src/edlistctrl.cpp b/src/edlistctrl.cpp index 1de274727c..9b9ea714b4 100644 --- a/src/edlistctrl.cpp +++ b/src/edlistctrl.cpp @@ -717,7 +717,8 @@ void PoeditListCtrl::UpdateColumns() if (m_catalog->HasSideloadedReferenceFile()) { wxFileName fn(m_catalog->GetSideloadedSourceData()->reference_file->GetFileName()); - sourceTitle += wxString::Format(" [%s]", fn.GetFullName()); + fn.MakeRelativeTo(wxFileName(m_catalog->GetFileName()).GetPath()); + sourceTitle += wxString::Format(" [%s]", fn.GetFullPath()); } m_colSource->SetTitle(sourceTitle);