Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add check for loading data to ClassLoader instances. Fixes: #12135 #12686

Merged
merged 3 commits into from
Oct 9, 2024

Conversation

SukiCZ
Copy link
Contributor

@SukiCZ SukiCZ commented Oct 5, 2024

Proposed changes

This adds a deploy check (python manage.py check --deploy) that will check all instances of ClassLoader and tries to load their data.

Fixes: #12135

Checklist

  • Lint and unit tests pass locally with my changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added documentation to describe my feature.
  • I have squashed my commits into logic units.
  • I have described the changes in the commit messages.

Other information

If loading fails, CheckMessage will be shown:

?: (weblate.E028) Module 'weblate.addons.consistency' does not define a 'LangauegConsistencyAddon' class in WEBLATE_ADDONS
	HINT: https://docs.weblate.org/en/latest/admin/config.html

This also fixes a typo LangaugeConsistencyAddon to LangaugeConsistencyAddon with backward compatibility.

@nijel nijel self-assigned this Oct 9, 2024
@nijel nijel added this to the 5.8 milestone Oct 9, 2024
@nijel nijel merged commit 4aa7286 into WeblateOrg:main Oct 9, 2024
34 of 35 checks passed
@nijel
Copy link
Member

nijel commented Oct 9, 2024

Merged, thanks for your contribution!

@SukiCZ SukiCZ deleted the fix/12135 branch October 9, 2024 14:41
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.

Validate lazily loaded classes in deploy checks
2 participants