Skip to content

blend-ed/openedx-translations

 
 

Repository files navigation

openedx-translations

This openedx-translations repository contains translation files from Open edX repositories to be kept in sync with Transifex. To accomplish this task, a GitHub Action in .github/workflows/ named extract-translation-source-files.yml regularly extracts English translation source files form Open edX repositories containing code and adds them to this repository. A GitHub Transifex app allows for the automatic upload of these translation files and after being translated on Transifex, the automatic download back into this repository. The translation files in this repository can then be accessed by using the openedx-atlas CLI tool to download specific directories of translation files from openedx-translations.

This repository implements the OEP-58 proposal.

Main and Release branches

This repository has a main branch in addition to a dedicated branch for every release. As of May 10th, 2024 the following are the release branches:

main branch

This branch is used for the latest version of Open edX such as Tutor nightly, edx-platform "master" branch and others.

To translate the latest versions the open-edx/openedx-translations Transifex project should be used.

open-release/<release-name>.master branch

This branch is used for the latest version of the Open edX Release, which will be a version of Tutor and corresponding branches in tagged repos. For example, for the Redwood release (June 2024), the branches were: Tutor Redwood v18, edx-platform "open-release/redwood.master" branch and others.

To update translations for a named release, find the corresponding named release project in the Open edX Transifex project by searching for the release name (for example, Redwood) in the search box.

Tools for repository maintainers

This repository contains both GitHub Actions workflows and Makefile programs to automate and assist maintainers chores including:

Fix resource names in Transifex

The GitHub Transifex App integeration puts an inconvenient names for resources like translations..frontend-app-something..src-i18n-transifex-input--main instead of frontend-app-something.

Running this command should be safe and can be ran multiple times on both the main openedx-translations project or on release projects by setting the TRANSIFEX_PROJECT_SLUG make variable as shown below:

# Dry run the name fix
make TRANSIFEX_PROJECT_SLUG='openedx-translations-zebrawood' fix_transifex_resource_names_dry_run
# If runs without errors, run the actual command:
make TRANSIFEX_PROJECT_SLUG='openedx-translations-zebrawood' fix_transifex_resource_names

Translation validation

This repository validates translations with the GNU gettext msgfmt tool.

The validation can be run locally with the following command:

make validate_translations

The validation errors is also posted as a comment on the update translation pull requests.

Retry merging Transifex pull requests

If GitHub Actions has an outage or any other issues there will be a backlog of stale unmerged Transifex bot pull requests. To re-run tests and merge the pull requests, run the following command:

make retry_merge_transifex_bot_pull_requests

About

Open edX Translation files in sync with Transifex

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 91.1%
  • Makefile 5.3%
  • Shell 3.6%