Skip to content

[DEV-4124] Implement documentation upload workflow to Crowdin#207

Open
Sebastiano-Bertolin wants to merge 7 commits into
DEV-4124-add-crowdin-sync-workflow-placeholderfrom
DEV-4124-implement-workflow-to-upload-to-crowdin-the-docs
Open

[DEV-4124] Implement documentation upload workflow to Crowdin#207
Sebastiano-Bertolin wants to merge 7 commits into
DEV-4124-add-crowdin-sync-workflow-placeholderfrom
DEV-4124-implement-workflow-to-upload-to-crowdin-the-docs

Conversation

@Sebastiano-Bertolin
Copy link
Copy Markdown
Collaborator

This pull request introduces a workflow and supporting scripts to automate the preparation and upload of documentation sources to Crowdin for translation. The main focus is on generating a manifest of the documentation structure, allowing selective uploads, and ensuring integration with GitHub Actions. The changes add configuration, scripts, and documentation to streamline and clarify the translation process.

Workflow and automation enhancements:

  • Added a new GitHub Actions workflow (.github/workflows/upload_sources_to_crowdin.yml) to automate the upload of documentation sources to Crowdin, supporting optional selective path uploads and integrating steps for checkout, Node.js setup, dependency caching, manifest generation, and Crowdin upload.
  • Introduced scripts (src/generateDocStructure.ts, src/generateCrowdinConfig.ts) to generate a documentation structure manifest (docs-structure.json) and a dynamic Crowdin configuration file (crowdin.yml), with support for limiting uploaded files based on workflow inputs. [1] [2]

Documentation structure and configuration:

  • Implemented src/docsStructure.ts to recursively scan the docs/ directory, build a manifest of directories and markdown files (excluding ignored directories like .gitbook), and provide utilities for manifest output and file selection logic.
  • Added a package.json with scripts for generating the doc structure and Crowdin config, along with required dependencies and TypeScript setup.

Developer documentation:

  • Updated src/README.md to explain the manifest schema, available scripts, and how to use the new workflow dispatch input for selective uploads.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces a Node/TypeScript-based automation to generate a documentation structure manifest and a Crowdin configuration, plus a GitHub Actions workflow to upload documentation sources to Crowdin for translation.

Changes:

  • Added TypeScript scripts to scan docs, generate docs-structure.json, and generate crowdin.yml (optionally filtered by selected paths).
  • Added a workflow_dispatch GitHub Actions workflow to run the scripts and upload sources to Crowdin.
  • Added npm/TypeScript project scaffolding (package.json/lockfile/tsconfig) and developer documentation.

Reviewed changes

Copilot reviewed 6 out of 9 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
.github/workflows/upload_sources_to_crowdin.yml New workflow to build manifests/config and upload sources to Crowdin.
package.json Adds Node/TS dependencies and scripts to generate manifest/config.
package-lock.json Locks newly introduced Node dependencies.
tsconfig.json TypeScript configuration for the new scripts.
src/docsStructure.ts Core logic to scan docs, build the manifest, and build Crowdin file entries.
src/generateDocStructure.ts CLI entrypoint to generate docs-structure.json.
src/generateCrowdinConfig.ts CLI entrypoint to generate crowdin.yml, with optional path filtering.
src/README.md Documentation for manifest schema, scripts, and workflow input usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/upload_sources_to_crowdin.yml Outdated
Comment thread .github/workflows/upload_sources_to_crowdin.yml Outdated
Comment thread .github/workflows/upload_sources_to_crowdin.yml Outdated
Comment thread src/generateCrowdinConfig.ts Outdated
Comment thread src/generateCrowdinConfig.ts
Comment thread src/docsStructure.ts
Comment thread package.json Outdated
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

Successfully merging this pull request may close these issues.

3 participants