You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Revised the IsSelectionAcrossHiddenAttributesMetadata() function to provide the user with a more understandable warning message. This routine also had a couple faulty msg.Format(...) statements that were not constructed properly resulting in the loss of the messages that were to be displayed, and only displayed the contents of the %s substitution strings.
Revised the AppendSrcPhraseEndingInfo() function to insert an EOL before certain markers that have been swept up markers in the process of filtering, such as a \c n chapter marker that should have an EOL before it so that it starts on a new line in exports.
Removed the "empty-key" filler words that can appear in the ParsePostWordPunctsAndEndMkrs() function. I think it is better to simply leave the m_key and m_srcPhrase empty as we do in other places for markers empty of content.
Made some adjustments to the DoMarkerHousekeeping() function to make it conform to the handling of inline nonbinding end markers elsewhere.
Provided more smarts for the GetPriorityBeginMkr() function and renamed it to GetPriorityTextTypeChangingBeginMkr(). The function now does not simply return the first or the last marker within m_markers, but examines the markers present and returns the last marker present that has an effect on the textType.
Added a return len statement at a critical juncture in ParseWord() which is needed to properly re-filter a data hiding marker after it has been unfiltered.
Needed to add an appropriate test within ParseWord() in order to properly call SetInlineBindingEndMarkers(), or etInlineBindingEndMarkers().
Added a fill filtering routine within an otherwise empty if (bIsToBeFiltered) block in TokenizeText(), to make it conform to other filtering blocks elsewhere.
Added a bKeepPtrFromAdvancing = TRUE statement at one point in TokenizeText() for when the marker detected is a within m_charAttributeMkrs.
Added a GetInlineNonbindingEndMarkersAsArray() function to CSourcePhrase class.
wxString GetLastBeginMkr(wxString mkrs); // BEW 13Dec22 get the last one in m_markers, but the last one
499
499
// does not always result in getting the correct TextType; but some places need this so keep it.
500
500
// However, GetPriorityBeginMkr() -- see next line, should do better job; get \v if present
501
-
wxString GetPriorityBeginMkr(wxString mkrs); // BEW 2Aug23 get the priority beginMkr from m_markers, to set the TextType - \v if present
501
+
//
502
+
// whm 12Mar2024 refactored and changed the name of the next function call.
503
+
// The function previously was named GetPriorityMkr(), but is now named
504
+
// GetPriorityTextTypeChangingBeginMkr(). It now returns the first marker
505
+
// found within m_markers that is also found in the App's m_RegBeginMarkers
506
+
// set, or if not present there, the last marker in m_markers is returned,
507
+
// or wxEmptyString if no markers are within m_markers.
508
+
wxString GetPriorityTextTypeChangingBeginMkr(wxString mkrs); // BEW 2Aug23 get the priority beginMkr from m_markers, to set the TextType - \v if present
wxString msg = _("Merging across stored(hidden) USFM3 metadata is not allowed. The metadata is hidden at the word: %s");
11584
-
msg = msg.Format(strAt.c_str());
11611
+
// whm 8Mar2024 revised the warning message below to be more understandable to the user and also
11612
+
// its original form didn't actually include the warning, only the single word passed into the %s due
11613
+
// to a faulty .Format() call that didn't have the msg as first parameter of .Format().
11614
+
// Also to supply more helpful information in the warning, I've added two parameters to the
11615
+
// IsSelectionAcrossHiddenAttributesMetadata() function call above, with the necessary internal
11616
+
// modifications.
11617
+
//wxString msg = _("Merging across stored(hidden) USFM3 metadata is not allowed. The metadata is hidden at the word: %s");
11618
+
//msg = msg.Format(strAt.c_str());
11619
+
wxString msg = _("Adapt It attempted to make a phrase of the source words \" %s\".\nHowever, the word \"%s\" within this marker span:\n\n%s\n\nhas stored (hidden/filtered) data.\nMaking a phrase across stored (hidden/filtered) data is not allowed.");
// the CSourcePhrase instances of the selection. In the call, signature's bIsMerger
2120
2120
// is default FALSE - which is appropriate for a retranslation
2121
2121
wxString strAt = wxEmptyString;
2122
-
if (m_pView->IsSelectionAcrossHiddenAttributesMetadata(pList, strAt))
2123
-
{
2124
-
wxString msg = _("Sorry, this operation is not allowed when the selection contains hidden(stored) USFM3 metadata. Instead, try making retranslations either side of the word at %s.");
2125
-
msg = msg.Format(strAt.c_str());
2126
-
// whm 15May2020 added below to supress phrasebox run-on due to handling of ENTER in CPhraseBox::OnKeyUp()
2122
+
wxString srcWords = wxEmptyString; wxUnusedVar(srcWords); // not used here
2123
+
wxString mkrSpan = wxEmptyString;
2124
+
if (m_pView->IsSelectionAcrossHiddenAttributesMetadata(pList, srcWords, strAt, mkrSpan))
2125
+
{
2126
+
wxString msg = _("Sorry, this operation is not allowed when the selection contains hidden (stored) data.\nThe hidden data is in this span of text:\n\n%s\n\nInstead, try making retranslations either side of the word at %s.");
2127
+
// whm 8Mar2024 fixed the .Format() call below. The msg must be first parameter in the formatting call, i.e., .Format(msg, strAt.c_str())
2128
+
// When the msg is missing the only string shown in the message box is the strAt word
0 commit comments