Closed ntluong95 closed 9 months ago
Is your repo public? In any case I'll look at your issue more precisely later this week.
Will the update be only in markdown text, or applied also to code chunk?
babeldown translates Markdown text, it does not translate code.
If we add or delete code chunks, will this be also updated in other languages? I guess no?
The idea is that it should be updated!
adding this link in case you didn't know it https://ropensci.org/blog/2024/01/16/deepl-update-babeldown/
(edited: no I don't need to look at the Git repo, I think I see the issue) I tried again deepl_update()
in a babelquarto book and it went well:
bot_cheatsheet.Rmd
.babeldown::deepl_update("bot_cheatsheet.Rmd", "bot_cheatsheet.es.Rmd", source_lang = "EN", target_lang="ES")
and could see bot_cheatsheet.es.Rmd
had been updated in the relevant places.Could maybe the paths created with here be problematic? That would explain why log[["commit"]][[latest_source_commit_index]]
isn't found: the code is trying to find a commit with the source in it, but there is none, so it tries until it reaches the end of the log. If that's the case I definitely need to add more checks as the error message is not informative.
see #58
@ntluong95 could you please install babeldown (pak::pak("ropensci-review-tools/babeldown")
) and try running your code again?
I opened the issue as I don't want to close it before you confirm it's fixed. :innocent:
Hi it is fixed 🎉🎉 But I did not see changes in the code chunk, only markdown text has been updated
Ok, see #59
I have a Quarto book that is available in English. Then I was successfully create a German (DE) version of it by using
deepl_translate_quarto()
functionNext I want to try making changes in English version, and using
deepl_update()
function to implement on DE version and other languages (ideally there are currently 7 language versions available, but they were translated manually)For example, I made changes on "basics.qmd", "factors.qmd" chapters, so I wrote this function to implement changes
but I got this error: Error in log[["commit"]][[latest_source_commit_index]] : subscript out of bounds
The steps I did was first made changes on EN version, commit to Git, and run the above function In addition, I have also the following questions: