diff --git a/CHANGELOG.md b/CHANGELOG.md index 28fe6785e2..49be41c773 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog + +## [v3.5.0](https://github.com/unfoldingWord/translationCore/tree/v3.5.0) (2023-7-31) + +**Implemented enhancements:** + +- Add Print Preview and Pdf generation for projects [\#7456](https://github.com/unfoldingWord/translationCore/issues/7456) +- Update to use Electronite v22.0.3 and add support for Mac Universal Builds [\#7443](https://github.com/unfoldingWord/translationCore/issues/7443) +- Added the SIL Charis font [\#7506](https://github.com/unfoldingWord/translationCore/issues/7506) +- Add support for navigating by reference to Translation Notes/Words [\#7502](https://github.com/unfoldingWord/translationCore/issues/7502) +- EPIC: Support changing Greek Original Lang (e.g. SR Greek version of UGNT) [\#7458](https://github.com/unfoldingWord/translationCore/issues/7458) +- Add ability to use QA server [\#7449](https://github.com/unfoldingWord/translationCore/issues/7449) + +**Fixed bugs:** + +- Export with alignments fails in tCore with empty verses [\#7511](https://github.com/unfoldingWord/translationCore/issues/7511) +- Fix for git creating new projects with default branch of main instead of master [\#7487](https://github.com/unfoldingWord/translationCore/issues/7487) +- Fix to update original language data in alignment data when project is opened [\#7474](https://github.com/unfoldingWord/translationCore/issues/7474) +- When User changes GLs, make sure the Original Language for appropriate org is shown in Scripture Pane [\#7470](https://github.com/unfoldingWord/translationCore/issues/7470) + + ## [v3.4.0](https://github.com/unfoldingWord/translationCore/tree/v3.4.0) (2022-9-22) **Implemented enhancements:** diff --git a/package-lock.json b/package-lock.json index a63631f9d7..b01fd83b33 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "translationCore", - "version": "3.5.0", + "version": "3.5.1", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "3.5.0", + "version": "3.5.1", "license": "GPL-2.0", "dependencies": { "@craco/craco": "5.6.4", diff --git a/package.json b/package.json index d48b4be39d..e2d5792af7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "translationCore", "productName": "translationCore", - "version": "3.5.0", + "version": "3.5.1", "minCompatibleVersion": "3.4.0", "manifestVersion": "8", "description": "A bridge between TS and TM", diff --git a/src/assets/previewTemplate.css b/src/assets/previewTemplate.css index b7e1f25ec4..2b86613be2 100644 --- a/src/assets/previewTemplate.css +++ b/src/assets/previewTemplate.css @@ -201,8 +201,10 @@ div.periphBody { .xt {font-weight: bold} .chapter { - padding-left: %PS0.25%em; - float: right; + /* for rtl: padding-left: %PS0.25%em; */ + %CHAPTER_PADDING%: %PS0.25%em; + /* for rtl: float: right; */ + float: %CHAPTER_FLOAT%; vertical-align: top; margin-top:0; margin-bottom: 0; diff --git a/src/js/components/PreviewContent.js b/src/js/components/PreviewContent.js index 50f33d974e..6573812649 100644 --- a/src/js/components/PreviewContent.js +++ b/src/js/components/PreviewContent.js @@ -113,7 +113,7 @@ function replacePageSizes(previewStyleTemplate, factor) { let template = previewStyleTemplate; const startStr = '%PS'; const units = ''; - const fractionDigits = 0; + const fractionDigits = 2; const endStr = '%'; template = scaleVariablesInTemplate(template, startStr, endStr, factor, fractionDigits, units); @@ -143,9 +143,10 @@ function replacePixelSizes(previewStyleTemplate, factor) { * @param {string} projectFont * @param {number} baseSizePx * @param {number} scale - scale to apply to everything + * @param {string} textDirection - direction for text (e.g. 'ltr' or 'rtl' * @returns {string} - returns new html */ -function convertPrintPreviewHtml(html, projectFont, baseSizePx, scale=1) { +function convertPrintPreviewHtml(html, projectFont, baseSizePx, scale=1, textDirection = 'ltr') { let publicBase; if (isProduction) { @@ -161,6 +162,18 @@ function convertPrintPreviewHtml(html, projectFont, baseSizePx, scale=1) { previewStyleTemplate = replaceFontSizes(previewStyleTemplate, baseSizePx*scale/7); previewStyleTemplate = replacePageSizes(previewStyleTemplate, scale); previewStyleTemplate = replacePixelSizes(previewStyleTemplate, scale); + + let CHAPTER_PADDING = 'padding-left'; + let CHAPTER_FLOAT = 'right'; + + if (textDirection === 'ltr') { + CHAPTER_PADDING = 'padding-right'; + CHAPTER_FLOAT = 'left'; + } + + previewStyleTemplate = previewStyleTemplate.replace('%CHAPTER_PADDING%', CHAPTER_PADDING); + previewStyleTemplate = previewStyleTemplate.replace('%CHAPTER_FLOAT%', CHAPTER_FLOAT); + const startStyleStr = ''; @@ -273,11 +286,11 @@ function PreviewContent({ useEffect(() => { if (html && submitPreview && !running) { - const html_ = convertPrintPreviewHtml(html, projectFont, fontSize); + const html_ = convertPrintPreviewHtml(html, projectFont, fontSize, 1, textDirection); onRefresh && onRefresh(html_); setSubmitPreview(false); } - }, [html, submitPreview, running, projectFont, onRefresh, fontSize]); + }, [html, submitPreview, running, projectFont, onRefresh, fontSize, textDirection]); useEffect(() => { if ( !submitPreview ) { @@ -354,7 +367,7 @@ function PreviewContent({ setScale(scale_ + ''); if (onRefresh) { - const html_ = convertPrintPreviewHtml(html, projectFont, fontSize, scale_); + const html_ = convertPrintPreviewHtml(html, projectFont, fontSize, scale_, textDirection); onRefresh && onRefresh(html_); } }