Skip to content

feat(i18n): pull latest translations from openlibrary-i18n in olbase#13070

Draft
mekarpeles wants to merge 1 commit into
masterfrom
i18n/olbase-pull-translations
Draft

feat(i18n): pull latest translations from openlibrary-i18n in olbase#13070
mekarpeles wants to merge 1 commit into
masterfrom
i18n/olbase-pull-translations

Conversation

@mekarpeles

Copy link
Copy Markdown
Member

Summary

Adds a git clone step to Dockerfile.olbase that fetches the current messages.po for all languages from internetarchive/openlibrary-i18n at image build time. olbase rebuilds weekly (Tuesdays) and on workflow_dispatch, so translations stay fresh without any changes to this repo.

How it fits into the pipeline

messages.pot changes on master
  → trigger-i18n.yml fires repository_dispatch
  → openlibrary-i18n AI pipeline runs, fills untranslated strings, merges PRs
  → olbase weekly rebuild: git clone openlibrary-i18n → bakes fresh .po files into image
  → deployed containers have current translations

Local dev

Volume-mount via OL_MOUNT_DIR still serves the .po files committed in this repo — the baked-in translations are only used in production images. Removing the committed .po files (so local dev also pulls from openlibrary-i18n) is a separate future phase and requires a make i18n-sync or similar mechanism first.

Files changed

  • docker/Dockerfile.olbase — one RUN git clone block after COPY . /openlibrary

Dependencies

Related

Adds a git clone step to Dockerfile.olbase that fetches the current
messages.po for each language from internetarchive/openlibrary-i18n
at image build time. olbase rebuilds weekly (and on workflow_dispatch),
so translations stay current without any changes to this repo.

Local dev: volume-mount via OL_MOUNT_DIR still serves the .po files
committed in this repo. Removing those files (so local dev also pulls
from openlibrary-i18n) is a separate future phase.
@mekarpeles

Copy link
Copy Markdown
Member Author

Summary:

When: a PR is merged to openlibrary
Action: The .pot is moved over to openlibrary-i18n, translations are generated in batch by languages.
Next: Once proven, we'll be linking up openlibrary so it pulls in final translations from openlibrary-i18n (and so we'll likely need to update our docs + process so contributors open PRs there as well); that's this PR

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.

2 participants