Skip to content

Commit

Permalink
Modified GetUnfilteredCrossRefsAndMMarkers() to return filtered infor…
Browse files Browse the repository at this point in the history
…mation - needed in order for the export of target text to properly include filtered information.

Modified the FromMergerMakeTstr() and FromSingleMakeTstr() functions so that like their source export counterparts, they now also export filtered information. Without these mods when collaborating with Paratext, filtered information within Adapt It would get lost in target text that gets sent back to the Paratext project for storing target text. I think this issue was also causing problems during collaboration for some users.
Also, for good measure and consistency, I made the same modifications to the FromMergerMakeGstr() for export of glosses.
Renamed the markersPrefix in the above functions to filteredInfoSuffix which more accurately describes the function of the variable now that filtered information stored on a given source phrase, is actually to be restored back to the location of a following source phrase.
  • Loading branch information
pngbill committed Jan 9, 2025
1 parent 8987ca6 commit abc305e
Show file tree
Hide file tree
Showing 2 changed files with 158 additions and 109 deletions.
30 changes: 16 additions & 14 deletions source/ExportFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17267,6 +17267,7 @@ wxString AppendSrcPhraseEndingInfo(wxString appendHere, CSourcePhrase* pSrcPhras

// BEW created 11Oct10
// BEW 22Jun15, refactored so that it returns no filtered information
// whm 9Jan2025 restored to legacy form that returns filtered information
wxString GetUnfilteredCrossRefsAndMMarkers(wxString prefixStr, wxString markersStr,
wxString xrefStr, bool bAttachFilteredInfo, bool bAttach_m_markers)
{
Expand All @@ -17285,26 +17286,27 @@ wxString GetUnfilteredCrossRefsAndMMarkers(wxString prefixStr, wxString markersS
markersPrefix.Trim();
markersPrefix += aSpace + markersStr;
}
}
}
wxUnusedVar(bAttachFilteredInfo);
// BEW 22Jun15, do not return filtered info
/*
if (!xrefStr.IsEmpty() && bAttachFilteredInfo)
//}
//}
//wxUnusedVar(bAttachFilteredInfo);
// BEW 22Jun15, do not return filtered info
// whm 9Jan2025 restored the return of filtered info to this function, so
// uncommented the blocks below
// /*
if (!xrefStr.IsEmpty() && bAttachFilteredInfo)
{
// a xref follows a verse number, so make sure there is an intervening
// space
markersPrefix.Trim();
markersPrefix += aSpace + xrefStr;
// a xref follows a verse number, so make sure there is an intervening
// space
markersPrefix.Trim();
markersPrefix += aSpace + xrefStr;
}

}
else
{
if (!xrefStr.IsEmpty() && bAttachFilteredInfo)
{
markersPrefix.Trim();
markersPrefix += aSpace + xrefStr;
markersPrefix.Trim();
markersPrefix += aSpace + xrefStr;
}
} // end of else block for test: if (bAttach_m_markers)
}
Expand All @@ -17317,7 +17319,7 @@ wxString GetUnfilteredCrossRefsAndMMarkers(wxString prefixStr, wxString markersS
markersPrefix += aSpace + xrefStr;
}
}
*/
// */ // whm 9Jan2025 restored the return of filtered info
return markersPrefix;
}

Expand Down
Loading

0 comments on commit abc305e

Please sign in to comment.