Closed elsylambert closed 8 months ago
This PR fixes the issue in scripture-resource-rcl https://github.com/unfoldingWord/scripture-resources-rcl/pull/180
I updated to the most recent version of scripture-resources-rcl but it didn't seem to fix the problem. @abelpz I could use your help on this!
@kintsoogi You may need to update that library in single-scripture-rcl too. @PhotoNomad0 may be able to point you in the right direction.
Ohhhh that makes sense!
I updated to the most recent version of scripture-resources-rcl but it didn't seem to fix the problem. @abelpz I could use your help on this!
I can't get it to work either - so probably something more complicated going on.
@abelpz @kintsoogi - I seem to remember that the scripture-reasources-rcl had a refactor to remove the selection maps. So the changes will probably be more involved with GWE and single-scripture-rcl.
@kintsoogi I looks like the additional change you will need to make is in ScriptureCard. The new SelectionsContextProvider props are:
SelectionsContextProvider.propTypes = {
/** words in a selection */
selections: PropTypes.instanceOf(Map),
/** action taken after a selection is made */
onSelections: PropTypes.func.isRequired,
/** the quote to be selected */
quote: PropTypes.string.isRequired,
/** all chapter-verses where quote may be found */
bookObject: PropTypes.object,
/** string chapter-verse reference. i.e. 1:5-6 */
refString: PropTypes.string,
/** if quote occurs mulitple times, this is the occurence of the one selected */
occurrence: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
/** action taken when quote is provided */
onQuote: PropTypes.func,
};
Currently we are passing:
return (
<SelectionsContextProvider
selections={selections}
onSelections={newSelections => {
// console.log('onSelections', newSelections)
}}
quote={selectedQuote?.quote}
occurrence={fixOccurrence(selectedQuote?.occurrence)}
verseObjectsMap={verseObjectsMap}
>
Part of the challenge is that in the UGNT we are not actually using an elision
character, but using the RIGHT SINGLE QUOTATION MARK
(U+2019) . So where that would normally be treated as punctuation, we have to add special handling to include it as part of the word in the original language.
Part of the challenge is that in the UGNT we are not actually using an
elision
character, but using theRIGHT SINGLE QUOTATION MARK
(U+2019) . So where that would normally be treated as punctuation, we have to add special handling to include it as part of the word in the original language.
This is fixed with the latest version of scripture-resources-rcl and working in tc-create. I think you are right pointing to the change in the API for the selections component @PhotoNomad0, adapting to that should fix it. No need to do any special handling in gE or other library.
Part of the challenge is that in the UGNT we are not actually using an
elision
character, but using theRIGHT SINGLE QUOTATION MARK
(U+2019) . So where that would normally be treated as punctuation, we have to add special handling to include it as part of the word in the original language.This is fixed with the latest version of scripture-resources-rcl and working in tc-create. I think you are right pointing to the change in the API for the selections component @PhotoNomad0, adapting to that should fix it. No need to do any special handling in gE or other library.
Made progress with the update to the props for the selections context. At least now highlighting is working on most tNotes. But still this specific issue is not working even with the newer rcl. Double checking to see if I have missed one detail.
OK found the problem is in getQuoteMatchesInBookRef() which is stripping out the right quote character here
https://github.com/unfoldingWord/uw-quote-helpers/blob/main/src/helpers/quote.js#L244
@elsylambert @danielklapp The fix is in release v2.2.0 build 3179311 QA
v2.2.0 build 3179311 QA. Highlights for Greek elision marks and for occurrence number works fine #535.
Need to update scripture-resources-rcl version to incorporate the fix for highlighting in GWE.
Message from Stepheh in Zulip: