Skip to content

Commit

Permalink
Bugfix 7562 / rtl helps fix (#7570)
Browse files Browse the repository at this point in the history
* fix rtl in tHelps dialogs.

* pass GL language direction to tools.

* cleanup

---------

Co-authored-by: PhotoNomad0 <[email protected]>
  • Loading branch information
PhotoNomad0 and PhotoNomad0 authored Mar 19, 2024
1 parent 7cc9422 commit ee24062
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 19 deletions.
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "translationCore",
"productName": "translationCore",
"version": "3.6.3",
"version": "3.6.4",
"minCompatibleVersion": "3.6.0",
"manifestVersion": "8",
"description": "A bridge between TS and TM",
Expand Down Expand Up @@ -133,7 +133,7 @@
"axios": "0.19.1",
"babel-polyfill": "6.26.0",
"bible-reference-range": "1.0.1",
"checking-tool-wrapper": "7.4.9",
"checking-tool-wrapper": "7.4.10",
"crypto-js": "3.1.8",
"csv": "1.2.1",
"deep-equal": "1.0.1",
Expand Down Expand Up @@ -189,7 +189,7 @@
"tc-source-content-updater": "1.4.24",
"tc-strings": "0.1.7",
"tc-tool": "4.1.0",
"tc-ui-toolkit": "6.2.8",
"tc-ui-toolkit": "6.2.9",
"truncate-utf8-bytes": "1.0.2",
"tsv-groupdata-parser": "1.1.0",
"usfm-js": "3.4.2",
Expand Down
4 changes: 4 additions & 0 deletions src/js/actions/MyProjects/ProjectLoadingActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ import { getUSFMDetails } from '../../helpers/usfmHelpers';
import { confirmOnlineAction } from '../OnlineModeConfirmActions';
import { getMostRecentVersionInFolder } from '../../helpers/originalLanguageResourcesHelpers';
import { downloadMissingResource } from '../SourceContentUpdatesActions';
import * as LangHelpers from '../../helpers/LanguageHelpers';

export const promptForViewUrl = (projectSaveLocation, translate) => (dispatch, getState) => {
dispatch(confirmOnlineAction(() => {
Expand Down Expand Up @@ -674,6 +675,8 @@ function makeToolProps(dispatch, state, projectDir, bookId, toolName) {
const sourceBook = getSourceBook(state, getOriginalLangOwner(gatewayLanguageOwner));
const targetBook = getTargetBook(state);
const gatewayLanguageCode = getToolGatewayLanguage(state, toolName);
const gl = LangHelpers.getLanguageByCode(gatewayLanguageCode);
const gatewayLanguageDirection = gl.ltr ? 'ltr' : 'rtl';

return {
//resource api
Expand Down Expand Up @@ -708,6 +711,7 @@ function makeToolProps(dispatch, state, projectDir, bookId, toolName) {
bookId,
toolName,
gatewayLanguageCode,
gatewayLanguageDirection,
gatewayLanguageOwner,

contextId: {
Expand Down
5 changes: 5 additions & 0 deletions src/js/containers/ToolContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import complexScriptFonts from '../common/complexScriptFonts';
import { addObjectPropertyToManifest } from '../actions/ProjectDetailsActions';
import { getOriginalLangOwner } from '../helpers/ResourcesHelpers';
import { DEFAULT_ORIG_LANG_OWNER } from '../common/constants';
import * as LangHelpers from '../helpers/LanguageHelpers';

const styles = {
container: {
Expand Down Expand Up @@ -89,6 +90,9 @@ class ToolContainer extends Component {
currentLanguage: { code },
} = nextProps;

const gl = LangHelpers.getLanguageByCode(gatewayLanguageCode);
const gatewayLanguageDirection = gl.ltr ? 'ltr' : 'rtl';

return {
// project api
project: projectApi,
Expand All @@ -115,6 +119,7 @@ class ToolContainer extends Component {
projects,
username,
gatewayLanguageCode,
gatewayLanguageDirection,
gatewayLanguageOwner,

// project data
Expand Down

0 comments on commit ee24062

Please sign in to comment.