Skip to content

Commit

Permalink
Require a config flag to enable auto translation
Browse files Browse the repository at this point in the history
  • Loading branch information
davidebbo committed Apr 25, 2024
1 parent fb96f14 commit e2836e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion models/db.py
Expand Up @@ -42,7 +42,7 @@
## Configure i18n
T.set_current_languages('en', 'en-en')
# Allow translators to add new languages e.g. on the test (beta) site, but not on prod
T.is_writable = is_testing
T.is_writable = is_testing and myconf.get('general.allow_translation_string_writing')
#ALL pages can set ?lang=XXX to override the browser default for translating strings
if request.vars.lang:
T.force(request.vars.lang)
Expand Down
2 changes: 2 additions & 0 deletions private/appconfig.ini.example
Expand Up @@ -31,6 +31,8 @@ url = https://www.sandbox.paypal.com
save_to_tmp_file_dir =

[general]
; Enable "automatic translations" behavior. Ignored unless is_testing is also set
; allow_translation_string_writing = 1

[images]
; * url_base: get thumbnail images from this source. If not
Expand Down

0 comments on commit e2836e3

Please sign in to comment.