Fix 'Rescan' not enforcing rescan of source translation files. #11687
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
Set the
force
option toTrue
when callingcreate_translations
in thedo_file_scan
handler, as already done by thedo_reset
one.Currently, 'Reset' will (after resetting the weblate repository) enforce a complete rescan of all source translation files (e.g. all PO files).
The 'Rescan' option however, does not. As a consequence, translations sources are only re-scanned in case the source files are actually detected as changed since last update.
This behavior does not seem consistent with the description of this command (
Loads translations from the files into Weblate. Use when Weblate missed some of the strings after updating the repository
).And it does not indeed actually update translations when e.g. the regular 'Update' command failed to finish properly (due to reaching the request timeout delay of the WSGI server e.g.).
Checklist
Other information
Found out this unexpected behavior while investigating 'missed updates' issues for some of our translations at translate.blender.org