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 a means to disable the default translation mode #473

Merged
merged 4 commits into from
Oct 21, 2021

Conversation

zerolab
Copy link
Collaborator

@zerolab zerolab commented Oct 21, 2021

Fixes #447

This PR adds a new global WAGTAIL_LOCALIZE_DEFAULT_TRANSLATION_MODE setting that allows a developer to disable the default translation editor by setting this value to 'simple'

It also checks for a localize_default_translation_mode attribute on the source model allowing for more specificity (e.g. globally disabled translation mode, but enabled for a particular page type. Or the other way around)

@zerolab zerolab force-pushed the feature/translation-mode-setting branch 2 times, most recently from d5c00aa to aa0473e Compare October 21, 2021 15:47
@codecov-commenter
Copy link

codecov-commenter commented Oct 21, 2021

Codecov Report

Merging #473 (49d8e93) into main (b7a321b) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #473      +/-   ##
==========================================
+ Coverage   93.07%   93.09%   +0.01%     
==========================================
  Files          35       35              
  Lines        2844     2852       +8     
  Branches      447      448       +1     
==========================================
+ Hits         2647     2655       +8     
  Misses        101      101              
  Partials       96       96              
Impacted Files Coverage Δ
wagtail_localize/test/models.py 97.66% <100.00%> (+0.05%) ⬆️
wagtail_localize/views/submit_translations.py 93.38% <100.00%> (+0.20%) ⬆️
wagtail_localize/wagtail_hooks.py 88.33% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b7a321b...49d8e93. Read the comment docs.

@zerolab zerolab force-pushed the feature/translation-mode-setting branch from aa0473e to 49d8e93 Compare October 21, 2021 16:44
@kaedroho kaedroho merged commit 97a7139 into wagtail:main Oct 21, 2021
kaedroho added a commit that referenced this pull request Oct 21, 2021
@zerolab zerolab deleted the feature/translation-mode-setting branch October 22, 2021 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to create translations with "translation mode" off by default
3 participants