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

add translated pdfs to manual build process #505

Open
icke-siegen opened this issue Nov 19, 2024 · 1 comment
Open

add translated pdfs to manual build process #505

icke-siegen opened this issue Nov 19, 2024 · 1 comment

Comments

@icke-siegen
Copy link
Contributor

Now as there are a number of versions translated to German, may I please ask to add creating those as pdf to the build process? I fail to make this locally, and I am told the best way is to integrate this into the automatic build on github. I am happy to help with this wherever possible (when trying locally it builds the combined md file but then Pandoc breaks, and currently I am trying to find the error in Pandoc or the missing dependency or whatsoever - but as the automatic build seems to be just fine, please add i18n/de to the pdf build.

@icke-siegen
Copy link
Contributor Author

icke-siegen commented Nov 24, 2024

I believe the problem is that /parse/avoParse.js doesn't know that the translated md files actually live in website\i18n\[lang]\docusaurus-plugin-content-docs\version-xx.y (the docusaurus-plugin-content-docs folder is the problem here):

const versionsFile = JSON.parse(fs.readFileSync(this.paths.versions))
const trans = [this.lang, ...fs.readdirSync(this.paths.transDocsDir)].filter(dir => dir != ".DS_Store")

trans.forEach(tran => {
  const mainLang = tran == this.lang

  const tranDir = path.join(this.paths.transDocsDir,tran)
  const tranVers = !mainLang ? fs.readdirSync(tranDir) : null

  versionsFile.forEach(version => {
    if(mainLang || tranVers.includes(`version-${version}`)) {
      let dir = path.join(this.paths.versionedDocsDir, `version-${version}`)

      if(!mainLang)
        dir = path.join(tranDir, `version-${version}`)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant