Skip to content

Commit

Permalink
Merge pull request #1639 from unfoldingWord/stage
Browse files Browse the repository at this point in the history
Stage to master for updating production to v1.17
  • Loading branch information
Joel-C-Johnson authored Dec 14, 2023
2 parents 1687b81 + e5e04db commit 5af7e19
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 25 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tc-create-app",
"homepage": "https://create.translationcore.com/",
"version": "1.16",
"version": "1.17",
"license": "MIT",
"private": false,
"bugs": {
Expand Down Expand Up @@ -35,8 +35,8 @@
"@material-ui/styles": "^4.11.3",
"axios": "^0.21.0",
"bible-reference-range": "^1.1.0",
"datatable-translatable": "1.2.3",
"dcs-branch-merger": "^1.3.0",
"datatable-translatable": "1.2.4",
"dcs-branch-merger": "1.4.1",
"deep-freeze": "^0.0.1",
"gitea-react-toolkit": "2.2.4",
"lodash.isequal": "^4.5.0",
Expand Down
2 changes: 1 addition & 1 deletion public/build_number
Original file line number Diff line number Diff line change
@@ -1 +1 @@
273-2ccee8b
278-e8671df
12 changes: 3 additions & 9 deletions src/components/translatable/Translatable.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,32 +55,25 @@ function Translatable() {
<CircularProgress />{' '}
</div>
);
// console.log("filepathsMatch=", filepathsMatch)
// console.log("sourceFileContent", sourceFileContent)
// console.log("releasedSourceContent", releasedSourceContent)
// console.log("targetFileContent", targetFileContent)
if (
filepathsMatch &&
(sourceFileContent || releasedSourceContent) &&
targetFileContent
) {
const organizationName = targetRepository?.full_name.split('/')[0]?.toLowerCase();
if (filepath.match(/\.md$/)) {

let translatableProps = {
original: sourceFileContent ? sourceFileContent : releasedSourceContent,
original: organizationName === "unfoldingword" ? sourceFileContent:releasedSourceContent,
translation: targetFileContent,
onTranslation: saveTranslation,
onContentIsDirty: setContentIsDirty,
translationFontFamily: selectedFont,
};
console.log('Markdown file selected');
_translatable = <MarkdownContextProvider><MarkDownTranslatable {...translatableProps} /></MarkdownContextProvider>;
} else if (filepath.match(/\.tsv$/)) {
console.log('TSV file selected');
const onSave = async function (...args) {
console.log("branch-merger: started saving");
const saved = await saveTranslation(...args);
console.log("branch-merger: finished saving");
return saved;
}
const onEdit = function (...args) {
Expand All @@ -106,6 +99,7 @@ function Translatable() {
saveTranslation,
autoSaveOnEdit,
selectedFont,
targetRepository.full_name
]);

useEffect(() => {
Expand Down
10 changes: 6 additions & 4 deletions src/components/translatable/TranslatableTSV.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export default function TranslatableTSV({
expandedScripture,
cachedFile,
selectedFont,
targetRepository,
},
actions: { setResourceLinks },
giteaReactToolkit: {
Expand All @@ -66,19 +67,20 @@ export default function TranslatableTSV({
},
} = useContext(AppContext);

const organizationName = targetRepository?.full_name.split('/')[0]?.toLowerCase();

const {
filepath: sourceFilepath,
content: sourceContent,
publishedContent: releasedSourceContent,
} = sourceFileHook.state || {};
const { content: targetContent } = targetFileHook.state || {};
const { content: cachedContent } = cachedFile || {};
// console.log("TranslatableTSV() sourceContent, publishedContent:", sourceContent, releasedSourceContent)
const columnNames = useMemo(() => {
const _content = sourceContent || releasedSourceContent;
const _content = organizationName === "unfoldingword" ? sourceContent : releasedSourceContent;
const _columnNames = columnNamesFromContent({ content: _content, delimiters });
return _columnNames;
}, [sourceContent, releasedSourceContent]);
}, [sourceContent, releasedSourceContent, organizationName ]);

const {
actions: { onValidate },
Expand Down Expand Up @@ -184,7 +186,7 @@ export default function TranslatableTSV({
ORIGINAL_LANG_POSITION={ORIGINAL_LANG_POSITION}
>
<DataTable
sourceFile={sourceContent || releasedSourceContent}
sourceFile={organizationName === "unfoldingword" ? sourceContent : releasedSourceContent}
targetFile={cachedContent || targetContent}
onSave={onSave}
onEdit={onEdit}
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5727,10 +5727,10 @@ data-urls@^1.0.0, data-urls@^1.1.0:
whatwg-mimetype "^2.2.0"
whatwg-url "^7.0.0"

[email protected].3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/datatable-translatable/-/datatable-translatable-1.2.3.tgz#f8d32c1f0da9a2b66662eca2983ea9d88185aca8"
integrity sha512-QT+JAKq5QfA+bGkrwFO5rMoTKaJ34/mGlMzKX3q2ILK7QdWYg5vP2Xq28iroAa5Fpu/Ka8tlCBIlFtYJwtygrA==
[email protected].4:
version "1.2.4"
resolved "https://registry.yarnpkg.com/datatable-translatable/-/datatable-translatable-1.2.4.tgz#73f17f0ee00bc091f872962766aaadfcc199d8c8"
integrity sha512-P+NZCOjwgBcohVPHm1iQSVUNo5QkA0sdmmW6xPaeo2L9I5AWdE02vRLWEfyfPBlOW7hymGHVqWOi5LGyk+N5PQ==
dependencies:
deep-freeze "^0.0.1"
extensible-rcl "^1.1.0"
Expand All @@ -5749,10 +5749,10 @@ dayjs@^1.9.3:
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.7.tgz#4b296922642f70999544d1144a2c25730fce63e2"
integrity sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ==

dcs-branch-merger@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/dcs-branch-merger/-/dcs-branch-merger-1.3.0.tgz#0836fa5c6cd37d28fccc8b7fc9569b1ef3eae393"
integrity sha512-MZ8skMj7J96PQiYwu/ILTSE5gItpFvKNFshc/aekkEAMzXeo+ZDbO0v3g05CVQGXLHQ5vQ09igAUIXz36LzsZw==
dcs-branch-merger@1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/dcs-branch-merger/-/dcs-branch-merger-1.4.1.tgz#57a2819c8189f8f23325eff8bebf4f7c698b2c49"
integrity sha512-IJbG5OpZQkxNDYao+T5MOrtVatvzDBGsuEwoZ7kq214OCTwlR+J96ApyamNeg+/i5ZQ8oKa3H4OMM6NFp6s7Zw==
dependencies:
path "0.12.7"

Expand Down

0 comments on commit 5af7e19

Please sign in to comment.