Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choice to always use source USFM for generating new USFM #405

Closed
johnml1135 opened this issue Jun 10, 2024 · 5 comments · Fixed by #420
Closed

Choice to always use source USFM for generating new USFM #405

johnml1135 opened this issue Jun 10, 2024 · 5 comments · Fixed by #420
Labels
enhancement New feature or request

Comments

@johnml1135
Copy link
Collaborator

Currently the choice of whether to use source or target USFM as the template for inserting in the pretranslations is not given to the user. This issue is to allow that choice to be made at the Serval level - this is a spin off from #398 from @pmachapman's comments.

Issues:

  • I assume that the existing target verses may be able to be placed in the source USFM template - or will we only allow inserting pretranslations?
  • Will this be a 5th option for "pretranslations only", etc., such as "pretranslations in source USFM", or will it be a separate field that can have the 4 options?
  • Is this really needed or would better USFM handling and error visibility be the main issue?
@github-project-automation github-project-automation bot moved this to 🆕 New in Serval Jun 10, 2024
@johnml1135 johnml1135 added the enhancement New feature or request label Jun 11, 2024
@pmachapman
Copy link
Collaborator

pmachapman commented Jun 11, 2024

Particular scenarios this could resolve:

1. The target does not contain verse numbers matching the source.

For example, one project contained a complete chapter in the source, the the target USFM for the chapter looked like:

...
\c 2
\v5 One verse completed
\c 3
...

2. The target has different verse numbering than the source.

For example:

  • The source has combined verses, i.e. 2-3, while the target has separate verse 1, verse 2, verse 3, etc.
  • The source has verse letters, i.e. 2, 2a, 2b, while the target just has verse 2

@johnml1135 johnml1135 changed the title Always use source USFM for generating new USFM Choice to always use source USFM for generating new USFM Jun 14, 2024
@johnml1135
Copy link
Collaborator Author

These are two different issues, that people may want to resolve differently.

  1. To resolve the missing verses, it would seem intelligent to me to always fill in the verses if they are missing. I don't see why people wouldn't want this functionality. For non-scripture text, I can see why they may not want it. I don't think that should be default. This is now tracked in Auto-add missing verses in target USFM #414.

  2. I also see value in "use source USFM as template" so that non-scripture text as well as verses ranges can be accurately converted. We can still have the 4 options (preferExisting, etc.) but just pull out the target text into a set of rows that is (or is not) inserted into the source USFM structure.

@ddaspit
Copy link
Contributor

ddaspit commented Jun 14, 2024

One issue that we would need to resolve is the case where the target book is partially translated. If we force it to use the source in this case, then the existing verse text will be lost. If the target book is empty, then this will not be an issue.

@ddaspit
Copy link
Contributor

ddaspit commented Jun 26, 2024

The easiest and most flexible way to implement this is to add a new query parameter that allows the caller to specify if you want to use the source or target book.

@johnml1135
Copy link
Collaborator Author

Done - both pull requests are in your inbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants