ci(port,i18n): pull translations from Transifex directly#7833
Draft
scarf005 wants to merge 5 commits intocataclysmbn:mainfrom
Draft
ci(port,i18n): pull translations from Transifex directly#7833scarf005 wants to merge 5 commits intocataclysmbn:mainfrom
scarf005 wants to merge 5 commits intocataclysmbn:mainfrom
Conversation
…commits - Create build-translations workflow to pull from Transifex during builds - Update release workflow to build translations before main builds - Update build workflow to download translation artifacts - Add placeholder.po for builds without Transifex access - Add lang/update_stats.sh to generate translation statistics - Add lang/discard_invalid_po.sh to validate .po files - Update lang/CMakeLists.txt to skip placeholder.po - Document how to build with translations locally This reduces repository size and ensures translations are always current in releases without daily commit noise from automated translation pulls. Co-authored-by: harakka <harakka@users.noreply.github.com>
b265a76 to
079472d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of change (The Why)
Similar to CleverRaven/Cataclysm-DDA#84375. Currently, translation files are committed to the repository and updated daily via automated workflow. This causes:
Describe the solution (The How)
Port DDA's approach: pull translations from Transifex during CI builds instead of daily commits.
New workflow (
.github/workflows/build-translations.yml)Updated workflows
release.yml- Addedbuild-translationsas dependencybuild.yml- Downloads translation artifacts before building (withcontinue-on-errorfor forks)How 2 Translation
lang/update_stats.sh- Generates translation statisticslang/discard_invalid_po.sh- Validates .po files from Transifexlang/po/placeholder.po- Minimal .po file for builds without Transifex accesslang/CMakeLists.txt- Updated to skip placeholder.poDocumentation
Describe alternatives you've considered
tx pullTesting
tested on https://github.com/scarf005/Cataclysm-BN/actions/runs/21029703506
verified artifact contains:
lang/po/with 25 translation files (ar, da, de, el, es_AR, es_ES, fr, hu, id, is, it_IT, ja, ko, nb, nl, pl_PL, pt_BR, ru_RU, sr, tr, uk, uk_UA, zh_CN, zh_TW)src/lang_stats.incwith translation statisticsChecklist
Mandatory
closes #1234in Summary of the PR so it can be closed automatically.mainso it won't cause conflict when updatingmainbranch later.Optional
portscope to the PR title.Co-Authored-Byin the commit message.docs/folder.