feat: add translations:pull support#11
Conversation
9b6ee2c to
d11d00a
Compare
|
I'm working on the |
| npm run dev | ||
|
|
||
| pull_translations: | ||
| npm run translations:pull |
There was a problem hiding this comment.
| npm run translations:pull | |
| npm run translations:pull -- --atlas-options="$(ATLAS_OPTIONS)" |
Noticed this was missing from the migration guide when I was updating the authn and learner-dashboard PRs. Make a PR to update the guide openedx/frontend-base#217.
d11d00a to
9b2ecbc
Compare
| @@ -0,0 +1 @@ | |||
| export default []; | |||
There was a problem hiding this comment.
This shouldn't be checked in, we should instead have the messages.d.ts from the migration guide
import type { SiteMessages } from '@openedx/frontend-base';
declare const messages: SiteMessages;
export default messages;| If translations have not been pulled, the build still succeeds thanks to a | ||
| placeholder ``src/i18n/messages.ts`` that exports an empty array. The site will | ||
| simply fall back to the default English strings baked into each component. |
There was a problem hiding this comment.
With the fallback plugin "placeholder" isn't fully correct here.
|
We probably want to regenerate the lockfile to ensure |
9b2ecbc to
d011aa1
Compare
Co-Authored-By: Claude <noreply@anthropic.com>
d011aa1 to
76c1f6e
Compare
brian-smith-tcril
left a comment
There was a problem hiding this comment.
Thanks for doing this one and finding the issues that led to
LGTM!
Description
Adds the
translations:pullnpm script and corresponding Makefile target (pull_translations) so that translated message files can be fetched viaopenedx translations:pull. ConfiguresatlasTranslationsinpackage.jsonwith the authn and learner-dashboard dependencies.Also adds the
src/i18n/index.jsre-export module and a placeholdersrc/i18n/messages.ts(force-added despite being gitignored) so the build doesn't break before translations are pulled. Updates.gitignorewith the standard i18n generated file patterns.LLM usage notice
Built with assistance from Claude.