Skip to content

Ensure all strings are valid and don't break builds #549

Open
@brian-smith-tcril

Description

@brian-smith-tcril

@OmarIthawi mentioned an example where invalid strings could break a build here.

what do you think should happen if a po file fails to compile due to Translator writing invalid strings Hi {user} --> Merhaba {kullanci}?

When the strings were checked into the repos directly, this would fail the individual repo CI. With the switch to openedx-translations/openedx-atlas, strings updated in transifex and synced to openedx-translations will not trigger a CI build on any given repo.

We'll want to ensure we don't have strings that break builds checked into openedx-translations, so we should add validation somewhere.

In the same comment, @OmarIthawi mentioned

I'm thinking we should add validation to the https://github.com/openedx/openedx-translations

That seems like a good plan to me

### Tasks
- [ ] Validate JavaScript (React) translation to avoid breaking the build.
- [x] Validate Python (pofile) translations: https://github.com/openedx/openedx-translations/pull/564
- [x] Implement full validation for Python strings like `i18n_tool validate` in addition to `msgfmt` of https://github.com/openedx/openedx-translations/pull/564

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions