Skip to content

Commit

Permalink
For some breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
johnml1135 committed Feb 20, 2025
1 parent e024561 commit d33c213
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ await GetAllAsync(engineId, modelRevision, corpusId, textId, cancellationToken)
textId,
pretranslations.ToList(),
fullName: targetSettings.FullName,
behavior: UpdateUsfmBehavior.PreferExisting
textBehavior: UpdateUsfmTextBehavior.PreferExisting
) ?? "";
break;
case PretranslationUsfmTextOrigin.PreferPretranslated:
Expand All @@ -109,7 +109,7 @@ await GetAllAsync(engineId, modelRevision, corpusId, textId, cancellationToken)
textId,
pretranslations.ToList(),
fullName: targetSettings.FullName,
behavior: UpdateUsfmBehavior.PreferNew
textBehavior: UpdateUsfmTextBehavior.PreferNew
) ?? "";
break;
case PretranslationUsfmTextOrigin.OnlyExisting:
Expand All @@ -118,7 +118,7 @@ await GetAllAsync(engineId, modelRevision, corpusId, textId, cancellationToken)
textId,
[], // don't put any pretranslations, we only want the existing text.
fullName: targetSettings.FullName,
behavior: UpdateUsfmBehavior.PreferNew
textBehavior: UpdateUsfmTextBehavior.PreferNew
) ?? "";
break;
case PretranslationUsfmTextOrigin.OnlyPretranslated:
Expand All @@ -127,7 +127,7 @@ await GetAllAsync(engineId, modelRevision, corpusId, textId, cancellationToken)
textId,
pretranslations.ToList(),
fullName: targetSettings.FullName,
behavior: UpdateUsfmBehavior.StripExisting
textBehavior: UpdateUsfmTextBehavior.StripExisting
) ?? "";
break;
}
Expand All @@ -151,14 +151,14 @@ await GetAllAsync(engineId, modelRevision, corpusId, textId, cancellationToken)
textId,
pretranslations.ToList(),
fullName: targetSettings.FullName,
behavior: UpdateUsfmBehavior.StripExisting
textBehavior: UpdateUsfmTextBehavior.StripExisting
) ?? "";
case PretranslationUsfmTextOrigin.OnlyExisting:
return updater.UpdateUsfm(
textId,
[], // don't pass the pretranslations, we only want the existing text.
fullName: targetSettings.FullName,
behavior: UpdateUsfmBehavior.StripExisting
textBehavior: UpdateUsfmTextBehavior.StripExisting
) ?? "";
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public void GetZipParatextProjectTextUpdater()
TestEnvironment env = new();
using ZipParatextProjectTextUpdater updater = env.Service.GetZipParatextProjectTextUpdater("file1.zip");
Assert.That(
updater.UpdateUsfm("MAT", [], behavior: UpdateUsfmBehavior.PreferExisting).ReplaceLineEndings("\n"),
updater.UpdateUsfm("MAT", [], textBehavior: UpdateUsfmTextBehavior.PreferExisting).ReplaceLineEndings("\n"),
Is.EqualTo(
$@"\id MAT - PROJ
\h {Canon.BookIdToEnglishName("MAT")}
Expand Down

0 comments on commit d33c213

Please sign in to comment.